NativeScript-Vue-组件未刷新,但app.js确实

问题描述 投票:0回答:1

存在一个非常奇怪的问题,导入到app.js中的组件在进行更改时不会刷新/重新加载,但是对app.js所做的更改会反映在模拟器和我的手机中。

因此,如果我更改导航组件中的任何内容,则不会发生任何事情。如果我更改ActionBar标题,则该更改会反映出来,但导航中的第一个更改仍然没有。

仅在我重新加载整个项目时才生效。

<template>
    <Page>
        <ActionBar title="Welcome to the Shop"/>
        <GridLayout columns="*" rows="*">
            <Label class="message" :text="msg" col="0" row="0"/>
            <navigation></navigation>
        </GridLayout>
    </Page>
</template>

<script>
import navigation from '@/components/navigation/Master.vue';

  export default {
    components: {
        'navigation': navigation
    },
    data() {
      return {
        msg: 'Hello World! This is Big D.'
      }
    }
  }
</script>
nativescript nativescript-vue
1个回答
1
投票

实际上,Webpack过去一直在观察Nativescript中的那些变化,并且在重新呈现原生元素时还没有变得成熟。我也经常面对这个问题!我观察到,这种情况曾经发生在我曾经观看过教程的人身上。

© www.soinside.com 2019 - 2024. All rights reserved.