小编Han*_*ker的帖子

nativescript-vue dataform 不更新源数据

任何人都可以帮忙吗?

我有这个一页应用程序来显示问题:

如果您修改一个字段,然后按顶部的“保存”,则更改的字段不会显示在控制台上...

<template>
    <Page>
        <ActionBar>
            <Label text="SAVE" @tap="saveScreen()" />
        </ActionBar>
        <StackLayout>
            <RadDataForm :source="person"/>
        </StackLayout>
  </Page>
</template>

<script>
export default {
    data () {
        return {
            person: {
                name: 'John',
                age: 23,
                email: 'john@company.com',
                city: 'New York',
                street: '5th Avenue',
                streetNumber: 11,
            },
        };
    },
    methods: {
        saveScreen() {
            console.log('=======personName: ' + JSON.stringify(this.person))
        }
    }
}
</script>
<style>
</style>
Run Code Online (Sandbox Code Playgroud)

我意识到这几乎是一个基本问题,我在互联网上搜索了答案,但找不到...

在此先感谢您的帮助。问候,汉斯

nativescript nativescript-vue

2
推荐指数
1
解决办法
735
查看次数

标签 统计

nativescript ×1

nativescript-vue ×1