1, vue 2.5.13 can be obtained normally, and then the version cannot be obtained
2. Code:
.vue file:
computed: {
...mapGetters({
packages: "getPackageByTag_data",
pagerData: "getPackagesPager",
}),
},
in the pkg.js of modules of store:
getters: {
getPackageByTag_data: state => state.packages.Items || [],
getPackagesPager: (state) => {
delete state.packages.Items;
return state.packages;
},
in index.js of store:
const store = new Vuex.Store({
state: {
sskey: "",
isShowAlert: false,
},
getters,
actions,
mutations,
modules: {
pkg,
tag,
account,
// sskey
},
});