为了账号安全,请及时绑定邮箱和手机立即绑定

为什么我的List.vue页面获取不到Add.vue添加的数据呢?

<script>
import store from '@/store/index'
export default {
  name: "NewsList",
  store,
  computed: {
    packLists () {
      return store.state.packLists
    }
  }
}
</script>

App.vuehttp://img1.sycdn.imooc.com//5f53659d0001666d09680472.jpg

List.vuehttp://img1.sycdn.imooc.com//5f5365b70001530a09700378.jpg

这个是什么原因呢?试了很多次都不行

正在回答

2 回答

@慕无忌7118148


正解,注意alias的路径可以在vue.config.js中配置

0 回复 有任何疑惑可以回复我~
import store from '@/store/index'  这个路径引入的对不
1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

为什么我的List.vue页面获取不到Add.vue添加的数据呢?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信