临时提交

This commit is contained in:
aixianling
2024-02-27 17:20:10 +08:00
parent 592981cdf8
commit 99030da813
3 changed files with 17 additions and 3 deletions

View File

@@ -87,6 +87,7 @@ export default {
this.tableData[k.substring(1) || 0] = item
} else if (![columnProp, 'key'].includes(k)) {
const index = columns.findIndex(e => k == e)
console.log(index)
if (index > -1) {
const item = this.tableData[index] || {}
item[prop] = v

View File

@@ -1,9 +1,10 @@
<script>
import AiDialogBtn from "dui/packages/layout/AiDialogBtn.vue";
import Template from "../../../../project/sass/apps/AppAskForm/components/Template.vue";
export default {
name: "tableEditor",
components: {AiDialogBtn},
components: {Template, AiDialogBtn},
model: {
event: "input",
prop: "tableData"
@@ -44,6 +45,7 @@ export default {
})
}
},
columns:v=>v.configs
},
methods: {
rowSave(form, done) {
@@ -82,6 +84,9 @@ export default {
<template>
<section class="tableEditor">
<avue-crud :option="option" :data="records" @row-save="rowSave" @row-cancel="rowSave" @row-del="rowDel">
<template v-for="c in columns" :slot="`${c.prop}Header`" slot-scope="{column = {}}">
<el-input class="headerInput" v-model="column.label" clearable placeholder="请输入列名" @change="$emit('update:configs', columns)"/>
</template>
<template v-if="label" v-slot:menuLeft>
<div class="label" v-text="label"/>
</template>
@@ -155,5 +160,13 @@ export default {
&:last-of-type {
margin-bottom: 0;
}
:deep(.headerInput) {
.el-input__inner {
padding: 0;
border: none;
background: transparent;
}
}
}
</style>

View File

@@ -37,8 +37,8 @@ module.exports = {
},
devServer: {
host: '0.0.0.0', //主机地址
port: 80, //端口号
open: true,
port: 7895, //端口号
// open: true,
proxy: {
//设置代理,可解决跨
'/lan': {