首页 > TAG信息列表 > websiteInfo

查漏补缺——说说Vuex中的getters方法

问题 如题所示 答案 相关源码: notice() { return this.$store.getters.notice } const getters = { loading: state => state.loading, runTimeInterval: state => state.runTimeInterval, notice: state => state.websiteInfo?state.

查漏补缺——说说三目运算符

问题 如题所示 答案 相关源码: const getters = { loading: state => state.loading, runTimeInterval: state => state.runTimeInterval, notice: state => state.websiteInfo?state.websiteInfo.notice:'' } 这里有一行关于三目运算符的代码: notice: state => sta