diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index 7b4fd53..26959ba 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -149,7 +149,7 @@ export default { }, btnWidth: { type: Number, - default: 140, + default: 200, }, // 分页相关 diff --git a/src/views/component/detail.vue b/src/views/component/detail.vue new file mode 100644 index 0000000..5f01508 --- /dev/null +++ b/src/views/component/detail.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index c40e792..ab17c76 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -13,15 +13,15 @@ export default { }, render(h) { return h( - "el-dialog", + "Modal", { props: { title: "新增", - visible: this.dialogVisible, - width: "600px", + value: this.dialogVisible, + width: 80, }, on: { - "update:visible": (val) => { + "on-visible-change": (val) => { this.dialogVisible = val; }, }, @@ -30,6 +30,7 @@ export default { h( "el-form", { + class: "form-body", ref: "elForm", props: { model: this.form, @@ -46,6 +47,7 @@ export default { h( "el-form-item", { + class: "form-body__item", ref: `elFormItem${i.field}`, style: { width: "100%", @@ -154,6 +156,9 @@ export default { h( "el-button", { + props: { + size: "mini" + }, on: { click: () => (this.dialogVisible = false), }, @@ -166,6 +171,7 @@ export default { props: { type: "warning", plain: true, + size: 'mini' }, on: { click: () => this.init(), @@ -178,6 +184,7 @@ export default { { props: { type: "primary", + size: 'mini' }, on: { click: this.submit, @@ -429,6 +436,8 @@ export default { } } }); + + document.documentElement.style.setProperty('--column-num', Math.floor(newVal.length / 8).toString()) }, //immediate: true, }, @@ -450,7 +459,13 @@ export default { }; + diff --git a/src/views/component/table.vue b/src/views/component/table.vue index 7a51e00..81573e3 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -4,7 +4,7 @@
@@ -22,7 +22,7 @@ v-for="item in form" :key="item.id" :value="item.field" - >{{ item.name }}{{ item.name }} @@ -58,7 +58,7 @@ export default { } }}> { - this.localFields.map(i => { + [{field:'id',name:'id'},...this.localFields].map(i => { return ( )