临时提交

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 this.tableData[k.substring(1) || 0] = item
} else if (![columnProp, 'key'].includes(k)) { } else if (![columnProp, 'key'].includes(k)) {
const index = columns.findIndex(e => k == e) const index = columns.findIndex(e => k == e)
console.log(index)
if (index > -1) { if (index > -1) {
const item = this.tableData[index] || {} const item = this.tableData[index] || {}
item[prop] = v item[prop] = v

View File

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

View File

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