<template> <el-select v-model="selectValueOrg" @change="queryGameApi"> <el-option v-for="item in baseDataList" :key="item.value" :label="lang=='zh' ? item.nameCn : item.nameEn" :value="item.value"> </el-option> </el-select> </template> <script> export default { name: 'options', data(){ return {selectValueOrg:this.selectValue} }, props: ['selectValue', 'baseDataList'], methods: { queryGameApi() { this.$emit('update:selectValue', this.selectValueOrg) this.$emit('change') } }, computed: { lang() { return this.$store.getters.lang } } } </script> 这么写应该就不会报错了
这么写应该就不会报错了