是否有某种方法可以在模板中使用导入的对象,而无需在 vue 组件中为其指定别名/属性。即我可以以某种方式使用未在“this”上定义的变量
<template>
<div v-if="Store.loaded"></div> //Store not defined on component
<div v-if="store.loaded"></div> //works
</template>
<script>
import Vue from 'vue'
import { Component } from 'vue-property-decorator'
import Store from "../store" // can I somehow use this directly?
@Component
export default class App extends Vue {
store = Store // is there some way so I don't need this line?
}
</script>