表格组件

This commit is contained in:
yanran200730
2023-03-15 15:18:19 +08:00
parent 106535fc01
commit 529e0ddccf
7 changed files with 87 additions and 55 deletions

View File

@@ -110,7 +110,7 @@
<el-input-number size="mini" style="width: 232px" :min="0" v-model="config.rowNum" controls-position="right"></el-input-number>
</div>
</div>
<div class="layout-config__item table-config" v-if="config.type === 'AiDvTable'" v-for="(item, index) in data" :key="index">
<div class="layout-config__item table-config" v-if="config.type === 'AiDvTable'" v-for="(item, index) in config.config" :key="index">
<label>{{ index + 1 }}</label>
<div class="layout-config__item--right">
<el-select size="mini" style="width: 80px;" v-model="item.align" placeholder="请选择" clearable>
@@ -119,7 +119,7 @@
<el-option label="居右" value="right"></el-option>
</el-select>
<el-color-picker v-model="item.color" style="margin: 0 10px;"></el-color-picker>
<el-input-number v-model="item.width" :min="1" label="描述文字" controls-position="right"></el-input-number>
<el-input-number v-model="item.width" label="描述文字" controls-position="right"></el-input-number>
</div>
</div>
</template>
@@ -213,23 +213,8 @@ export default {
tableStatus: [
{label: '是', value: '1'},
{label: '否', value: '0'}
],
data: []
]
}
},
watch: {
config: {
handler (v) {
this.data = v[v.dataType]
},
deep: true,
immediate: true
}
},
created() {
}
}
</script>