<el-row class="searchForm"> <template v-for="(item,index) in searchConfig" :gutter="20"> <el-col :key="index" :span="6"> <!-- <span>{{ item.placeholder }}:</span> --> <span>{{ $t('table["'+ item.placeholder +'"]') }}:</span> <el-input v-if="item.type == 'input'" v-model="listQuery[item.dataModel]" style="calc(100% - 100px)" class="filter-item" /> <el-select v-if="item.type == 'select'" v-model="listQuery[item.dataModel]" style="calc(100% - 100px)" clearable class="filter-item"> <el-option v-for="(item2,index2) in item.options" :key="index2" :label="item2.label" :value="item2.value" /> </el-select> </el-col> </template> </el-row>
主要是
<span>{{ $t('table["'+ item.placeholder +'"]') }}:</span>