嘿,我有一些胡说八道的问题,商店没有被定义。有什么建议可以继续进行并完成此软件的构建吗?商店和商店内容显示在Vue Inspector工具中。像下面这样插入时,它将中断并呈现空白-App组件内没有DOM内容。
App.vue违规摘录
>>> a = np.lib.stride_tricks.as_strided(np.array([1, 512, 0, 3], dtype=np.int16),
shape=(3,), strides=(3,))
>>> a
array([1, 2, 3], dtype=int16)
>>> a.strides[0]
3
>>> a.itemsize
2
Store.js
<div v-if="$store.state.showPreloader == true" id="preloaderWrap">
<div id="preloader"></div>
</div>
Main.js
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const state = {
stuff
}
const mutations = {
stuff
}
const getters = {
stuff
}
const actions = {
stuff
}
export default new Vuex.Store({
state: state,
mutations: mutations,
getters: getters,
actions: actions
})
答案 0 :(得分:0)
您需要通过商店初始化Vue
:
new Vue({
el: '#app',
router,
store: store,
components: { App },
template: '<App/>'
})