@kp-ui/lowcode 1.0.46 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"data-table-widget.vue2.js","sources":["../../../../../../src/components/form-designer/form-widget/container-widget/data-table-widget.vue"],"sourcesContent":["<template>\n <container-wrapper\n :designer=\"designer\"\n :widget=\"widget\"\n :parent-widget=\"parentWidget\"\n :parent-list=\"parentList\"\n :index-of-parent-list=\"indexOfParentList\"\n :style=\"{ display: 'flex', height: parseFloat(tableHeight || 0) + 'px' }\"\n >\n <div\n :key=\"widget.id\"\n class=\"collapse-container data-table-container\"\n :class=\"{ selected: selected }\"\n @click.stop=\"selectWidget(widget)\"\n >\n <s-table\n class=\"tpf-table\"\n ref=\"dataTable2\"\n :columns=\"columns.columns\"\n :class=\"[customClass]\"\n :size=\"widgetSize\"\n :dataSource=\"data\"\n :rowKey=\"record => record[widget.options.rowKey]\"\n :scroll=\"{ y: parseFloat(tableHeight || 0), x: 300 }\"\n :bordered=\"widget.options.border\"\n :style=\"{ width: widget.options.tableWidth }\"\n :row-class-name=\"rowClassName\"\n :rowSelection=\"handleRowSelection()\"\n :pagination=\"fmtPagination\"\n :customRow=\"handleCustomRow\"\n :rowClassName=\"rowClassName\"\n @change=\"handleTablePageChange\"\n @resizeColumn=\"handleResizeColumn\"\n :loading=\"loading\"\n >\n <template #emptyText>\n <a-empty />\n </template>\n <template #bodyCell=\"scope\">\n <template v-if=\"isShowBodyCell(scope.column.dataIndex)\">\n <RenderBodyCell\n :options=\"widget.options.dataSource\"\n :bodyCell=\"columns.bodyCell\"\n :scope=\"scope\"\n />\n </template>\n </template>\n </s-table>\n </div>\n </container-wrapper>\n</template>\n\n<script lang=\"jsx\">\n import ContainerWrapper from '@/components/form-designer/form-widget/container-widget/container-wrapper';\n import emitter from '@/utils/emitter';\n import i18n from '@/utils/i18n';\n import FieldComponents from '@/components/form-designer/form-widget/field-widget/index';\n import containerMixin from '@/components/form-designer/form-widget/container-widget/containerMixin';\n import refMixinDesign from '@/components/form-designer/refMixinDesign';\n import useDataTableMixin from '@/mixins/useDataTableMixin';\n export default {\n name: 'DataTableWidget',\n componentName: 'DataTableWidget',\n mixins: [i18n, containerMixin, refMixinDesign, emitter, useDataTableMixin],\n inject: ['refList'],\n components: {\n ContainerWrapper,\n ...FieldComponents\n },\n data() {\n return {\n // selectAllFlag: false\n };\n },\n props: {\n data: {\n type: Array,\n default: () => []\n },\n widget: Object,\n parentWidget: Object,\n parentList: Array,\n indexOfParentList: Number,\n designer: Object,\n\n subFormRowIndex: {\n /* 子表单组件行索引,从0开始计数 */ type: Number,\n default: -1\n },\n subFormColIndex: {\n /* 子表单组件列索引,从0开始计数 */ type: Number,\n default: -1\n },\n subFormRowId: {\n /* 子表单组件行Id,唯一id且不可变 */ type: String,\n default: ''\n }\n },\n created() {\n this.initRefList();\n },\n mounted() {\n this.loadDataTableDataSource();\n },\n beforeUnmount() {\n //\n },\n computed: {\n // paginationLayout() {\n // return !!this.widget.options.smallPagination\n // ? 'prev, pager, next'\n // : 'total, sizes, prev, pager, next, jumper';\n // },\n\n selected() {\n return this.widget.id === this.designer.selectedId;\n }\n\n // customClass() {\n // return this.widget.options.customClass || '';\n // },\n\n // widgetSize() {\n // return this.widget.options.tableSize || 'default';\n // },\n\n // buttonsColumnFixed() {\n // if (this.widget.options.buttonsColumnFixed === undefined) {\n // return 'right';\n // }\n\n // return !this.widget.options.buttonsColumnFixed\n // ? false\n // : this.widget.options.buttonsColumnFixed;\n // },\n\n // tableHeight() {\n // return this.widget.options.tableHeight || undefined;\n // },\n\n // selectionWidth() {\n // return !this.widget.options.showSummary\n // ? !this.widget.options.treeDataEnabled\n // ? 42\n // : 70\n // : 53;\n // }\n },\n methods: {\n // getOperationButtonLabel(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onGetOperationButtonLabel) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onGetOperationButtonLabel\n // );\n // //return customFn.call(this, buttonConfig, rowIndex, row) || buttonConfig.label\n // return customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return buttonConfig.label;\n // }\n // },\n // handleOperationButtonClick(btnName, rowIndex, row, scope, ob) {\n // this.skipSelectionChangeEvent = true;\n // try {\n // if (ob.onClick) {\n // const clcFn = new Function('record', 'index', 'column', 'btn', ob.onClick);\n // clcFn.call(this, row, rowIndex, scope.column, ob);\n\n // return;\n // }\n // if (!!this.widget.options.onOperationButtonClick) {\n // const customFn = new Function(\n // 'buttonName',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onOperationButtonClick\n // );\n // customFn.call(this, btnName, rowIndex, row);\n // } else {\n // this.dispatch('VFormRender', 'operationButtonClick', [this, btnName, rowIndex, row]);\n // }\n // } finally {\n // this.skipSelectionChangeEvent = false;\n // }\n // },\n // showOperationButton(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onHideOperationButton) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onHideOperationButton\n // );\n // return !customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return !buttonConfig.hidden;\n // }\n // },\n\n // disableOperationButton(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onDisableOperationButton) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onDisableOperationButton\n // );\n // return customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return buttonConfig.disabled;\n // }\n // },\n\n // customRenderIndex({ index }) {\n // return index + 1;\n // },\n // handleTablePageChange(pagination, filters, sorter, { currentDataSource }) {\n // const fn = this.widget.options.onTableChange;\n // this.widget.options.pagination.current = pagination.current;\n // this.widget.options.pagination.pageSize = pagination.pageSize;\n // if (fn) {\n // const changeFunc = new Function(\n // 'pagination',\n // 'filters',\n // 'sorter',\n // 'currentDataSource',\n // fn\n // );\n // changeFunc.call(this, pagination, filters, sorter, currentDataSource);\n // }\n // },\n // handleRowSelection(info) {\n // if (!info.hasRowSelection) {\n // return undefined;\n // }\n // return {\n // ...omit(info, ['onChange']),\n // onChange: (selectedRowKeys, selectedRows) => {\n // const rcFunc = new Function('selectedRowKeys', 'selectedRows', info.onChange);\n // rcFunc.call(this, selectedRowKeys, selectedRows);\n // }\n // };\n // },\n selectWidget(widget) {\n this.designer.setSelected(widget);\n }\n\n // getTableColumns() {\n // return this.widget.options.tableColumns;\n // }\n\n // setChildrenSelected(children, flag) {\n // const childrenKey = this.widget.options.childrenKey;\n // children.map(child => {\n // this.toggleSelection(child, flag);\n // if (child[childrenKey]) {\n // this.setChildrenSelected(child[childrenKey], flag);\n // }\n // });\n // },\n\n // toggleSelection(row, flag) {\n // if (row) {\n // this.$nextTick(() => {\n // this.$refs.dataTable.toggleRowSelection(row, flag);\n // });\n // }\n // },\n\n // handleRowSelect(selection, row) {\n // const childrenKey = this.widget.options.childrenKey;\n // if (\n // selection.some(el => {\n // return row.id === el.id;\n // })\n // ) {\n // if (row[childrenKey]) {\n // this.setChildrenSelected(row[childrenKey], true);\n // }\n // } else {\n // if (row[childrenKey]) {\n // this.setChildrenSelected(row[childrenKey], false);\n // }\n // }\n // },\n\n // setSelectedFlag(data, flag) {\n // const childrenKey = this.widget.options.childrenKey;\n // data.forEach(row => {\n // this.$refs.dataTable.toggleRowSelection(row, flag);\n // if (row[childrenKey]) {\n // this.setSelectedFlag(row[childrenKey], flag);\n // }\n // });\n // },\n\n // handleAllSelect(selection) {\n // this.selectAllFlag = !this.selectAllFlag;\n // this.setSelectedFlag(this.widget.options.tableData, this.selectAllFlag);\n // }\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .collapse-container {\n display: flex;\n margin: 2px;\n height: 100%;\n width: 100%;\n flex: 1 0 0;\n\n .form-widget-list {\n min-height: 28px;\n }\n }\n\n .collapse-container.selected {\n outline: 2px solid $--color-primary !important;\n }\n\n // .data-table-container {\n // :deep(.el-scrollbar__view) {\n // overflow-x: auto !important;\n // /* el-table默认显示水平滚动条!! */\n // height: 100%;\n // /* 水平滚动条固定在表格底部显示!! */\n // }\n // }\n\n // :deep(.el-collapsed__header) {\n // padding: 10px 12px;\n // }\n\n :deep(.ant-table) .table-striped td {\n background-color: #fafafa;\n }\n</style>\n"],"names":["name","componentName","mixins","i18n","containerMixin","refMixinDesign","emitter","useDataTableMixin","inject","components","ContainerWrapper","FieldComponents","data","props","type","Array","default","widget","Object","parentWidget","parentList","indexOfParentList","Number","designer","subFormRowIndex","subFormColIndex","subFormRowId","String","created","initRefList","mounted","loadDataTableDataSource","beforeUnmount","computed","selected","id","selectedId","methods","selectWidget","setSelected"],"mappings":";;;;;;;AA4DI,MAAe,YAAA;AAAA,EACXA,MAAM;AAAA,EACNC,eAAe;AAAA,EACfC,QAAQ,CAACC,MAAMC,gBAAgBC,gBAAgBC,SAASC,iBAAiB;AAAA,EACzEC,QAAQ,CAAC,SAAS;AAAA,EAClBC,YAAY;AAAA,IACRC;AAAAA,IACA,GAAGC;AAAAA,EACN;AAAA,EACDC,OAAO;AACH,WAAO;AAAA;AAAA,IAEN;AAAA,EACJ;AAAA,EACDC,OAAO;AAAA,IACHD,MAAM;AAAA,MACFE,MAAMC;AAAAA,MACNC,SAASA,MAAM,CAAA;AAAA,IAClB;AAAA,IACDC,QAAQC;AAAAA,IACRC,cAAcD;AAAAA,IACdE,YAAYL;AAAAA,IACZM,mBAAmBC;AAAAA,IACnBC,UAAUL;AAAAA,IAEVM,iBAAiB;AAAA;AAAA,MACSV,MAAMQ;AAAAA,MAC5BN,SAAS;AAAA,IACZ;AAAA,IACDS,iBAAiB;AAAA;AAAA,MACSX,MAAMQ;AAAAA,MAC5BN,SAAS;AAAA,IACZ;AAAA,IACDU,cAAc;AAAA;AAAA,MACcZ,MAAMa;AAAAA,MAC9BX,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACDY,UAAU;AACN,SAAKC,YAAa;AAAA,EACrB;AAAA,EACDC,UAAU;AACN,SAAKC,wBAAyB;AAAA,EACjC;AAAA,EACDC,gBAAgB;AAAA,EAEf;AAAA,EACDC,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAONC,WAAW;AACP,aAAO,KAAKjB,OAAOkB,OAAO,KAAKZ,SAASa;AAAAA,IAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+BH;AAAA,EACDC,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiGLC,aAAarB,QAAQ;AACjB,WAAKM,SAASgB,YAAYtB,MAAM;AAAA,IACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuDJ;AACJ;"}
1
+ {"version":3,"file":"data-table-widget.vue2.js","sources":["../../../../../../src/components/form-designer/form-widget/container-widget/data-table-widget.vue"],"sourcesContent":["<template>\n <container-wrapper\n :designer=\"designer\"\n :widget=\"widget\"\n :parent-widget=\"parentWidget\"\n :parent-list=\"parentList\"\n :index-of-parent-list=\"indexOfParentList\"\n :style=\"{ display: 'flex', height: parseFloat(tableHeight || 0) + 'px' }\"\n >\n <div\n :key=\"widget.id\"\n class=\"collapse-container data-table-container\"\n :class=\"{ selected: selected }\"\n @click.stop=\"selectWidget(widget)\"\n >\n <s-table\n class=\"tpf-table\"\n ref=\"dataTable2\"\n :columns=\"columns.columns\"\n :class=\"[customClass]\"\n :size=\"widgetSize\"\n :dataSource=\"data\"\n :rowKey=\"record => record[widget.options.rowKey]\"\n :scroll=\"{ y: parseFloat(tableHeight || 0), x: 300 }\"\n :bordered=\"widget.options.border\"\n :style=\"{ width: widget.options.tableWidth }\"\n :row-class-name=\"rowClassName\"\n :rowSelection=\"handleRowSelection()\"\n :pagination=\"fmtPagination\"\n :customRow=\"handleCustomRow\"\n :rowClassName=\"rowClassName\"\n @change=\"handleTablePageChange\"\n @resizeColumn=\"handleResizeColumn\"\n :loading=\"loading\"\n >\n <template #emptyText>\n <a-empty />\n </template>\n <template #bodyCell=\"scope\">\n <template v-if=\"isShowBodyCell(scope.column.dataIndex)\">\n <RenderBodyCell :bodyCell=\"columns.bodyCell\" :scope=\"scope\" />\n </template>\n </template>\n </s-table>\n </div>\n </container-wrapper>\n</template>\n\n<script lang=\"jsx\">\n import ContainerWrapper from '@/components/form-designer/form-widget/container-widget/container-wrapper';\n import emitter from '@/utils/emitter';\n import i18n from '@/utils/i18n';\n import FieldComponents from '@/components/form-designer/form-widget/field-widget/index';\n import containerMixin from '@/components/form-designer/form-widget/container-widget/containerMixin';\n import refMixinDesign from '@/components/form-designer/refMixinDesign';\n import useDataTableMixin from '@/mixins/useDataTableMixin';\n export default {\n name: 'DataTableWidget',\n componentName: 'DataTableWidget',\n mixins: [i18n, containerMixin, refMixinDesign, emitter, useDataTableMixin],\n inject: ['refList'],\n components: {\n ContainerWrapper,\n ...FieldComponents\n },\n data() {\n return {\n // selectAllFlag: false\n };\n },\n props: {\n widget: Object,\n parentWidget: Object,\n parentList: Array,\n indexOfParentList: Number,\n designer: Object,\n\n subFormRowIndex: {\n /* 子表单组件行索引,从0开始计数 */ type: Number,\n default: -1\n },\n subFormColIndex: {\n /* 子表单组件列索引,从0开始计数 */ type: Number,\n default: -1\n },\n subFormRowId: {\n /* 子表单组件行Id,唯一id且不可变 */ type: String,\n default: ''\n }\n },\n created() {\n this.initRefList();\n },\n mounted() {\n this.loadDataTableDataSource();\n },\n beforeUnmount() {\n //\n },\n computed: {\n data() {\n return this.widget.options.dataSource;\n },\n // paginationLayout() {\n // return !!this.widget.options.smallPagination\n // ? 'prev, pager, next'\n // : 'total, sizes, prev, pager, next, jumper';\n // },\n\n selected() {\n return this.widget.id === this.designer.selectedId;\n }\n\n // customClass() {\n // return this.widget.options.customClass || '';\n // },\n\n // widgetSize() {\n // return this.widget.options.tableSize || 'default';\n // },\n\n // buttonsColumnFixed() {\n // if (this.widget.options.buttonsColumnFixed === undefined) {\n // return 'right';\n // }\n\n // return !this.widget.options.buttonsColumnFixed\n // ? false\n // : this.widget.options.buttonsColumnFixed;\n // },\n\n // tableHeight() {\n // return this.widget.options.tableHeight || undefined;\n // },\n\n // selectionWidth() {\n // return !this.widget.options.showSummary\n // ? !this.widget.options.treeDataEnabled\n // ? 42\n // : 70\n // : 53;\n // }\n },\n methods: {\n // getOperationButtonLabel(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onGetOperationButtonLabel) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onGetOperationButtonLabel\n // );\n // //return customFn.call(this, buttonConfig, rowIndex, row) || buttonConfig.label\n // return customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return buttonConfig.label;\n // }\n // },\n // handleOperationButtonClick(btnName, rowIndex, row, scope, ob) {\n // this.skipSelectionChangeEvent = true;\n // try {\n // if (ob.onClick) {\n // const clcFn = new Function('record', 'index', 'column', 'btn', ob.onClick);\n // clcFn.call(this, row, rowIndex, scope.column, ob);\n\n // return;\n // }\n // if (!!this.widget.options.onOperationButtonClick) {\n // const customFn = new Function(\n // 'buttonName',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onOperationButtonClick\n // );\n // customFn.call(this, btnName, rowIndex, row);\n // } else {\n // this.dispatch('VFormRender', 'operationButtonClick', [this, btnName, rowIndex, row]);\n // }\n // } finally {\n // this.skipSelectionChangeEvent = false;\n // }\n // },\n // showOperationButton(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onHideOperationButton) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onHideOperationButton\n // );\n // return !customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return !buttonConfig.hidden;\n // }\n // },\n\n // disableOperationButton(buttonConfig, rowIndex, row) {\n // if (!!this.widget.options.onDisableOperationButton) {\n // const customFn = new Function(\n // 'buttonConfig',\n // 'rowIndex',\n // 'row',\n // this.widget.options.onDisableOperationButton\n // );\n // return customFn.call(this, buttonConfig, rowIndex, row);\n // } else {\n // return buttonConfig.disabled;\n // }\n // },\n\n // customRenderIndex({ index }) {\n // return index + 1;\n // },\n // handleTablePageChange(pagination, filters, sorter, { currentDataSource }) {\n // const fn = this.widget.options.onTableChange;\n // this.widget.options.pagination.current = pagination.current;\n // this.widget.options.pagination.pageSize = pagination.pageSize;\n // if (fn) {\n // const changeFunc = new Function(\n // 'pagination',\n // 'filters',\n // 'sorter',\n // 'currentDataSource',\n // fn\n // );\n // changeFunc.call(this, pagination, filters, sorter, currentDataSource);\n // }\n // },\n // handleRowSelection(info) {\n // if (!info.hasRowSelection) {\n // return undefined;\n // }\n // return {\n // ...omit(info, ['onChange']),\n // onChange: (selectedRowKeys, selectedRows) => {\n // const rcFunc = new Function('selectedRowKeys', 'selectedRows', info.onChange);\n // rcFunc.call(this, selectedRowKeys, selectedRows);\n // }\n // };\n // },\n selectWidget(widget) {\n this.designer.setSelected(widget);\n }\n\n // getTableColumns() {\n // return this.widget.options.tableColumns;\n // }\n\n // setChildrenSelected(children, flag) {\n // const childrenKey = this.widget.options.childrenKey;\n // children.map(child => {\n // this.toggleSelection(child, flag);\n // if (child[childrenKey]) {\n // this.setChildrenSelected(child[childrenKey], flag);\n // }\n // });\n // },\n\n // toggleSelection(row, flag) {\n // if (row) {\n // this.$nextTick(() => {\n // this.$refs.dataTable.toggleRowSelection(row, flag);\n // });\n // }\n // },\n\n // handleRowSelect(selection, row) {\n // const childrenKey = this.widget.options.childrenKey;\n // if (\n // selection.some(el => {\n // return row.id === el.id;\n // })\n // ) {\n // if (row[childrenKey]) {\n // this.setChildrenSelected(row[childrenKey], true);\n // }\n // } else {\n // if (row[childrenKey]) {\n // this.setChildrenSelected(row[childrenKey], false);\n // }\n // }\n // },\n\n // setSelectedFlag(data, flag) {\n // const childrenKey = this.widget.options.childrenKey;\n // data.forEach(row => {\n // this.$refs.dataTable.toggleRowSelection(row, flag);\n // if (row[childrenKey]) {\n // this.setSelectedFlag(row[childrenKey], flag);\n // }\n // });\n // },\n\n // handleAllSelect(selection) {\n // this.selectAllFlag = !this.selectAllFlag;\n // this.setSelectedFlag(this.widget.options.tableData, this.selectAllFlag);\n // }\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .collapse-container {\n display: flex;\n margin: 2px;\n height: 100%;\n width: 100%;\n flex: 1 0 0;\n\n .form-widget-list {\n min-height: 28px;\n }\n }\n\n .collapse-container.selected {\n outline: 2px solid $--color-primary !important;\n }\n\n // .data-table-container {\n // :deep(.el-scrollbar__view) {\n // overflow-x: auto !important;\n // /* el-table默认显示水平滚动条!! */\n // height: 100%;\n // /* 水平滚动条固定在表格底部显示!! */\n // }\n // }\n\n // :deep(.el-collapsed__header) {\n // padding: 10px 12px;\n // }\n\n :deep(.ant-table) .table-striped td {\n background-color: #fafafa;\n }\n</style>\n"],"names":["name","componentName","mixins","i18n","containerMixin","refMixinDesign","emitter","useDataTableMixin","inject","components","ContainerWrapper","FieldComponents","data","props","widget","Object","parentWidget","parentList","Array","indexOfParentList","Number","designer","subFormRowIndex","type","default","subFormColIndex","subFormRowId","String","created","initRefList","mounted","loadDataTableDataSource","beforeUnmount","computed","options","dataSource","selected","id","selectedId","methods","selectWidget","setSelected"],"mappings":";;;;;;;AAwDI,MAAe,YAAA;AAAA,EACXA,MAAM;AAAA,EACNC,eAAe;AAAA,EACfC,QAAQ,CAACC,MAAMC,gBAAgBC,gBAAgBC,SAASC,iBAAiB;AAAA,EACzEC,QAAQ,CAAC,SAAS;AAAA,EAClBC,YAAY;AAAA,IACRC;AAAAA,IACA,GAAGC;AAAAA,EACN;AAAA,EACDC,OAAO;AACH,WAAO;AAAA;AAAA,IAEN;AAAA,EACJ;AAAA,EACDC,OAAO;AAAA,IACHC,QAAQC;AAAAA,IACRC,cAAcD;AAAAA,IACdE,YAAYC;AAAAA,IACZC,mBAAmBC;AAAAA,IACnBC,UAAUN;AAAAA,IAEVO,iBAAiB;AAAA;AAAA,MACSC,MAAMH;AAAAA,MAC5BI,SAAS;AAAA,IACZ;AAAA,IACDC,iBAAiB;AAAA;AAAA,MACSF,MAAMH;AAAAA,MAC5BI,SAAS;AAAA,IACZ;AAAA,IACDE,cAAc;AAAA;AAAA,MACcH,MAAMI;AAAAA,MAC9BH,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACDI,UAAU;AACN,SAAKC,YAAa;AAAA,EACrB;AAAA,EACDC,UAAU;AACN,SAAKC,wBAAyB;AAAA,EACjC;AAAA,EACDC,gBAAgB;AAAA,EAEf;AAAA,EACDC,UAAU;AAAA,IACNrB,OAAO;AACH,aAAO,KAAKE,OAAOoB,QAAQC;AAAAA,IAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAODC,WAAW;AACP,aAAO,KAAKtB,OAAOuB,OAAO,KAAKhB,SAASiB;AAAAA,IAC5C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA+BH;AAAA,EACDC,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiGLC,aAAa1B,QAAQ;AACjB,WAAKO,SAASoB,YAAY3B,MAAM;AAAA,IACpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuDJ;AACJ;"}
@@ -1,5 +1,4 @@
1
1
  import i18n from "../../../../../utils/i18n.js";
2
- import Sortable from "sortablejs";
3
2
  import CodeModalEditor from "../../../../code-editor/code-modal-editor.vue.js";
4
3
  import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, toDisplayString, createElementVNode, createBlock, createCommentVNode } from "vue";
5
4
  /* empty css */
@@ -15,6 +14,83 @@ const _sfc_main = {
15
14
  },
16
15
  data() {
17
16
  return {
17
+ columns: [
18
+ {
19
+ title: "序号",
20
+ dataIndex: "index",
21
+ width: 60,
22
+ fixed: "left",
23
+ rowDrag: true,
24
+ resizable: true,
25
+ customRender: ({ index }) => index + 1
26
+ },
27
+ {
28
+ title: this.i18nt("designer.setting.columnName"),
29
+ dataIndex: "dataIndex",
30
+ resizable: true,
31
+ width: 100
32
+ },
33
+ {
34
+ title: this.i18nt("designer.setting.columnLabel"),
35
+ dataIndex: "title",
36
+ resizable: true,
37
+ width: 100
38
+ },
39
+ {
40
+ title: this.i18nt("designer.setting.columnWidth"),
41
+ dataIndex: "width",
42
+ resizable: true,
43
+ width: 100
44
+ },
45
+ {
46
+ title: this.i18nt("designer.setting.visibleColumn"),
47
+ dataIndex: "show",
48
+ resizable: true,
49
+ width: 90
50
+ },
51
+ {
52
+ title: this.i18nt("designer.setting.sortableColumn"),
53
+ dataIndex: "sorter",
54
+ resizable: true,
55
+ width: 90
56
+ },
57
+ {
58
+ title: "可拖动调整宽度",
59
+ dataIndex: "resizable",
60
+ width: 150
61
+ },
62
+ {
63
+ title: "超过宽度将自动省略",
64
+ dataIndex: "ellipsis",
65
+ resizable: true,
66
+ width: 150
67
+ },
68
+ {
69
+ title: this.i18nt("designer.setting.fixedColumn"),
70
+ dataIndex: "fixed",
71
+ resizable: true,
72
+ width: 100
73
+ },
74
+ {
75
+ title: this.i18nt("designer.setting.alignTypeOfColumn"),
76
+ dataIndex: "align",
77
+ resizable: true,
78
+ width: 100
79
+ },
80
+ {
81
+ title: "自定义渲染函数",
82
+ dataIndex: "customRender",
83
+ width: 120,
84
+ resizable: true,
85
+ fixed: "right"
86
+ },
87
+ {
88
+ title: this.i18nt("designer.setting.actionColumn"),
89
+ dataIndex: "action",
90
+ width: 80,
91
+ fixed: "right"
92
+ }
93
+ ],
18
94
  dialogVisible: false,
19
95
  currentTableColumn: {},
20
96
  renderJson: "",
@@ -27,27 +103,6 @@ const _sfc_main = {
27
103
  };
28
104
  },
29
105
  methods: {
30
- //表格拖动排序
31
- dragSort() {
32
- const el = document.querySelectorAll(
33
- "#singleTable .ant-table-body tbody.ant-table-tbody "
34
- )[0];
35
- const tableData = this.optionModel.tableColumns;
36
- this.sortable = Sortable.create(el, {
37
- ghostClass: "sortable-ghost",
38
- setData: function(dataTransfer) {
39
- dataTransfer.setData("Text", "");
40
- },
41
- onEnd: (e) => {
42
- const { oldIndex, newIndex } = e;
43
- if (oldIndex === newIndex) {
44
- return;
45
- }
46
- const targetRow = tableData.splice(e.oldIndex - 1, 1)[0];
47
- tableData.splice(newIndex - 1, 0, targetRow);
48
- }
49
- });
50
- },
51
106
  showRenderDialog(tableColumn) {
52
107
  this.currentTableColumn = tableColumn;
53
108
  this.renderJson = tableColumn.customRender || "";
@@ -65,7 +120,6 @@ const _sfc_main = {
65
120
  width: 150,
66
121
  sorter: false,
67
122
  customRender: "",
68
- autoHeight: false,
69
123
  fixed: "",
70
124
  align: "center",
71
125
  title: "标题名",
@@ -91,25 +145,21 @@ const _sfc_main = {
91
145
  },
92
146
  openSetting() {
93
147
  this.dialogVisible = true;
94
- this.$nextTick(() => {
95
- this.dragSort();
96
- });
97
148
  }
98
149
  }
99
150
  };
100
151
  const _hoisted_1 = { class: "table-wrap" };
101
- const _hoisted_2 = { class: "dialog-footer" };
152
+ const _hoisted_2 = { class: "add-btn" };
153
+ const _hoisted_3 = { class: "dialog-footer" };
102
154
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
103
155
  const _component_a_button = resolveComponent("a-button");
104
156
  const _component_a_form_item = resolveComponent("a-form-item");
105
- const _component_a_table_column = resolveComponent("a-table-column");
106
157
  const _component_a_input = resolveComponent("a-input");
107
- const _component_a_input_number = resolveComponent("a-input-number");
108
158
  const _component_a_switch = resolveComponent("a-switch");
109
159
  const _component_a_select_option = resolveComponent("a-select-option");
110
160
  const _component_a_select = resolveComponent("a-select");
111
161
  const _component_a_space = resolveComponent("a-space");
112
- const _component_a_table = resolveComponent("a-table");
162
+ const _component_s_table = resolveComponent("s-table");
113
163
  const _component_a_modal = resolveComponent("a-modal");
114
164
  const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
115
165
  return openBlock(), createElementBlock(Fragment, null, [
@@ -133,7 +183,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
133
183
  createVNode(_component_a_modal, {
134
184
  title: _ctx.i18nt("designer.setting.tableColEdit"),
135
185
  visible: $data.dialogVisible,
136
- "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $data.dialogVisible = $event),
186
+ "onUpdate:visible": _cache[3] || (_cache[3] = ($event) => $data.dialogVisible = $event),
137
187
  "show-close": true,
138
188
  "append-to-body": "",
139
189
  "close-on-click-modal": false,
@@ -142,10 +192,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
142
192
  width: "1200px"
143
193
  }, {
144
194
  footer: withCtx(() => [
145
- createElementVNode("div", _hoisted_2, [
195
+ createElementVNode("div", _hoisted_3, [
146
196
  createVNode(_component_a_button, {
147
197
  size: "default",
148
- onClick: _cache[0] || (_cache[0] = ($event) => $data.dialogVisible = false)
198
+ onClick: _cache[2] || (_cache[2] = ($event) => $data.dialogVisible = false)
149
199
  }, {
150
200
  default: withCtx(() => [
151
201
  createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
@@ -166,234 +216,137 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
216
  ]),
167
217
  default: withCtx(() => [
168
218
  createElementVNode("div", _hoisted_1, [
169
- createVNode(_component_a_table, {
219
+ createVNode(_component_s_table, {
170
220
  dataSource: $props.optionModel.tableColumns,
171
221
  style: { "width": "100%" },
172
- class: "tpf-table",
222
+ class: "tpf-surely-table",
223
+ deepWatchDataSource: "",
173
224
  "cell-style": { padding: "0" },
174
225
  height: "600",
175
- bordered: "",
176
- "row-key": (r) => r.columnId,
177
226
  id: "singleTable",
178
227
  scroll: { y: 300, x: 300 },
179
- pagination: false
228
+ pagination: false,
229
+ resizable: "",
230
+ "row-key": (record) => record.columnId,
231
+ columns: $data.columns
180
232
  }, {
181
- default: withCtx(() => [
182
- createVNode(_component_a_table_column, {
183
- title: "序号",
184
- width: 60,
185
- fixed: "left",
186
- customRender: ({ index }) => index + 1
187
- }, null, 8, ["customRender"]),
188
- createVNode(_component_a_table_column, {
189
- title: _ctx.i18nt("designer.setting.columnName"),
190
- width: 100,
191
- dataIndex: "dataIndex"
192
- }, {
193
- default: withCtx((scope) => [
194
- createVNode(_component_a_input, {
195
- value: scope.record.dataIndex,
196
- "onUpdate:value": ($event) => scope.record.dataIndex = $event,
197
- style: { "width": "90%" }
198
- }, null, 8, ["value", "onUpdate:value"])
199
- ]),
200
- _: 1
201
- }, 8, ["title"]),
202
- createVNode(_component_a_table_column, {
203
- title: _ctx.i18nt("designer.setting.columnLabel"),
204
- width: 100,
205
- dataIndex: "title"
206
- }, {
207
- default: withCtx((scope) => [
208
- createVNode(_component_a_input, {
209
- value: scope.record.title,
210
- "onUpdate:value": ($event) => scope.record.title = $event,
211
- style: { "width": "90%" }
212
- }, null, 8, ["value", "onUpdate:value"])
213
- ]),
214
- _: 1
215
- }, 8, ["title"]),
216
- createVNode(_component_a_table_column, {
217
- title: _ctx.i18nt("designer.setting.columnWidth"),
218
- width: 100,
219
- dataIndex: "width"
220
- }, {
221
- default: withCtx((scope) => [
222
- createVNode(_component_a_input_number, {
223
- min: 20,
224
- max: 500,
225
- value: scope.record.width,
226
- "onUpdate:value": ($event) => scope.record.width = $event
227
- }, null, 8, ["value", "onUpdate:value"])
228
- ]),
229
- _: 1
230
- }, 8, ["title"]),
231
- createVNode(_component_a_table_column, {
232
- title: _ctx.i18nt("designer.setting.visibleColumn"),
233
- width: 90,
234
- dataIndex: "show"
235
- }, {
236
- default: withCtx((scope) => [
237
- createVNode(_component_a_switch, {
238
- checked: scope.record.show,
239
- "onUpdate:checked": ($event) => scope.record.show = $event
240
- }, null, 8, ["checked", "onUpdate:checked"])
241
- ]),
242
- _: 1
243
- }, 8, ["title"]),
244
- createVNode(_component_a_table_column, {
245
- title: _ctx.i18nt("designer.setting.sortableColumn"),
246
- width: 90,
247
- dataIndex: "sorter"
248
- }, {
249
- default: withCtx((scope) => [
250
- createVNode(_component_a_switch, {
251
- checked: scope.record.sorter,
252
- "onUpdate:checked": ($event) => scope.record.sorter = $event
253
- }, null, 8, ["checked", "onUpdate:checked"])
254
- ]),
255
- _: 1
256
- }, 8, ["title"]),
257
- createVNode(_component_a_table_column, {
258
- title: `可拖动调整宽度`,
259
- width: 150,
260
- dataIndex: "resizable"
261
- }, {
262
- default: withCtx((scope) => [
263
- createVNode(_component_a_switch, {
264
- checked: scope.record.resizable,
265
- "onUpdate:checked": ($event) => scope.record.resizable = $event
266
- }, null, 8, ["checked", "onUpdate:checked"])
267
- ]),
268
- _: 1
269
- }),
270
- createVNode(_component_a_table_column, {
271
- title: "超过宽度将自动省略",
272
- width: 150,
273
- dataIndex: "ellipsis"
274
- }, {
275
- default: withCtx((scope) => [
276
- createVNode(_component_a_switch, {
277
- checked: scope.record.ellipsis,
278
- "onUpdate:checked": ($event) => scope.record.ellipsis = $event
279
- }, null, 8, ["checked", "onUpdate:checked"])
280
- ]),
281
- _: 1
282
- }),
283
- createVNode(_component_a_table_column, {
284
- title: _ctx.i18nt("designer.setting.fixedColumn"),
285
- width: 100,
286
- dataIndex: "fixed"
233
+ bodyCell: withCtx(({ column, recordIndexs }) => [
234
+ column.dataIndex === "dataIndex" ? (openBlock(), createBlock(_component_a_input, {
235
+ key: 0,
236
+ value: $props.optionModel.tableColumns[recordIndexs[0]].dataIndex,
237
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].dataIndex = $event
238
+ }, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
239
+ column.dataIndex === "title" ? (openBlock(), createBlock(_component_a_input, {
240
+ key: 1,
241
+ value: $props.optionModel.tableColumns[recordIndexs[0]].title,
242
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].title = $event
243
+ }, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
244
+ column.dataIndex === "width" ? (openBlock(), createBlock(_component_a_input, {
245
+ key: 2,
246
+ value: $props.optionModel.tableColumns[recordIndexs[0]].width,
247
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].width = $event
248
+ }, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
249
+ column.dataIndex === "show" ? (openBlock(), createBlock(_component_a_input, {
250
+ key: 3,
251
+ value: $props.optionModel.tableColumns[recordIndexs[0]].show,
252
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].show = $event
253
+ }, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
254
+ column.dataIndex === "sorter" ? (openBlock(), createBlock(_component_a_switch, {
255
+ key: 4,
256
+ checked: $props.optionModel.tableColumns[recordIndexs[0]].sorter,
257
+ "onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].sorter = $event
258
+ }, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
259
+ column.dataIndex === "resizable" ? (openBlock(), createBlock(_component_a_switch, {
260
+ key: 5,
261
+ checked: $props.optionModel.tableColumns[recordIndexs[0]].resizable,
262
+ "onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].resizable = $event
263
+ }, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
264
+ column.dataIndex === "ellipsis" ? (openBlock(), createBlock(_component_a_switch, {
265
+ key: 6,
266
+ checked: $props.optionModel.tableColumns[recordIndexs[0]].ellipsis,
267
+ "onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].ellipsis = $event
268
+ }, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
269
+ column.dataIndex === "fixed" ? (openBlock(), createBlock(_component_a_select, {
270
+ key: 7,
271
+ value: $props.optionModel.tableColumns[recordIndexs[0]].fixed,
272
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].fixed = $event,
273
+ allowClear: "",
274
+ style: {}
287
275
  }, {
288
- default: withCtx((scope) => [
289
- createVNode(_component_a_select, {
290
- value: scope.record.fixed,
291
- "onUpdate:value": ($event) => scope.record.fixed = $event,
292
- style: { "width": "90%" },
293
- allowClear: ""
294
- }, {
276
+ default: withCtx(() => [
277
+ createVNode(_component_a_select_option, { value: "left" }, {
278
+ default: withCtx(() => [
279
+ createTextVNode("左固定")
280
+ ]),
281
+ _: 1
282
+ }),
283
+ createVNode(_component_a_select_option, { value: "right" }, {
295
284
  default: withCtx(() => [
296
- createVNode(_component_a_select_option, { value: "left" }, {
297
- default: withCtx(() => [
298
- createTextVNode("左固定")
299
- ]),
300
- _: 1
301
- }),
302
- createVNode(_component_a_select_option, { value: "right" }, {
303
- default: withCtx(() => [
304
- createTextVNode("右固定")
305
- ]),
306
- _: 1
307
- })
285
+ createTextVNode("右固定")
308
286
  ]),
309
- _: 2
310
- }, 1032, ["value", "onUpdate:value"])
287
+ _: 1
288
+ })
311
289
  ]),
312
- _: 1
313
- }, 8, ["title"]),
314
- createVNode(_component_a_table_column, {
315
- title: _ctx.i18nt("designer.setting.alignTypeOfColumn"),
316
- width: 100,
317
- dataIndex: "align"
290
+ _: 2
291
+ }, 1032, ["value", "onUpdate:value"])) : createCommentVNode("", true),
292
+ column.dataIndex === "align" ? (openBlock(), createBlock(_component_a_select, {
293
+ key: 8,
294
+ style: {},
295
+ value: $props.optionModel.tableColumns[recordIndexs[0]].align,
296
+ "onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].align = $event,
297
+ options: $data.alignOptions
298
+ }, null, 8, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
299
+ column.dataIndex === "customRender" ? (openBlock(), createBlock(_component_a_button, {
300
+ key: 9,
301
+ onClick: ($event) => $options.showRenderDialog(_ctx.index, column.dataIndex),
302
+ size: "small",
303
+ shape: "round"
318
304
  }, {
319
- default: withCtx((scope) => [
320
- createVNode(_component_a_select, {
321
- value: scope.record.align,
322
- "onUpdate:value": ($event) => scope.record.align = $event,
323
- options: $data.alignOptions,
324
- style: { "width": "100%" }
325
- }, null, 8, ["value", "onUpdate:value", "options"])
305
+ default: withCtx(() => [
306
+ createTextVNode(" edit ")
326
307
  ]),
327
- _: 1
328
- }, 8, ["title"]),
329
- createVNode(_component_a_table_column, {
330
- align: "center",
331
- title: "自定义渲染函数",
332
- width: 120,
333
- fixed: "right"
334
- }, {
335
- default: withCtx((scope) => [
336
- createVNode(_component_a_button, {
337
- onClick: ($event) => $options.showRenderDialog(scope.record),
308
+ _: 2
309
+ }, 1032, ["onClick"])) : createCommentVNode("", true),
310
+ column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key: 10 }, {
311
+ default: withCtx(() => [
312
+ $props.optionModel.tableColumns.length !== 1 ? (openBlock(), createBlock(_component_a_button, {
313
+ key: 0,
314
+ title: _ctx.i18nt("designer.setting.deleteTableColumn"),
338
315
  size: "small",
339
- shape: "round"
316
+ onClick: _cache[0] || (_cache[0] = ($event) => $options.handleDelete(_ctx.scope.$index, _ctx.scope.row)),
317
+ type: "text"
340
318
  }, {
341
319
  default: withCtx(() => [
342
- createTextVNode(" edit ")
343
- ]),
344
- _: 2
345
- }, 1032, ["onClick"])
346
- ]),
347
- _: 1
348
- }),
349
- createVNode(_component_a_table_column, {
350
- align: "center",
351
- title: _ctx.i18nt("designer.setting.actionColumn"),
352
- width: 120,
353
- fixed: "right"
354
- }, {
355
- default: withCtx((scope) => [
356
- createVNode(_component_a_space, null, {
357
- default: withCtx(() => [
358
- createVNode(_component_a_button, {
359
- title: _ctx.i18nt("designer.setting.addTableColumn"),
360
- size: "small",
361
- onClick: $options.addCol,
362
- type: "text"
363
- }, {
364
- default: withCtx(() => [
365
- createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addTableColumn")), 1)
366
- ]),
367
- _: 1
368
- }, 8, ["title", "onClick"]),
369
- $props.optionModel.tableColumns.length !== 1 ? (openBlock(), createBlock(_component_a_button, {
370
- key: 0,
371
- title: _ctx.i18nt("designer.setting.deleteTableColumn"),
372
- size: "small",
373
- onClick: ($event) => $options.handleDelete(scope.$index, scope.row),
374
- type: "text"
375
- }, {
376
- default: withCtx(() => [
377
- createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.deleteTableColumn")), 1)
378
- ]),
379
- _: 2
380
- }, 1032, ["title", "onClick"])) : createCommentVNode("", true)
320
+ createTextVNode(" 删除 ")
381
321
  ]),
382
- _: 2
383
- }, 1024)
322
+ _: 1
323
+ }, 8, ["title"])) : createCommentVNode("", true)
384
324
  ]),
385
325
  _: 1
386
- }, 8, ["title"])
326
+ })) : createCommentVNode("", true)
387
327
  ]),
388
328
  _: 1
389
- }, 8, ["dataSource", "row-key"])
329
+ }, 8, ["dataSource", "row-key", "columns"]),
330
+ createElementVNode("div", _hoisted_2, [
331
+ createVNode(_component_a_button, {
332
+ title: _ctx.i18nt("designer.setting.addTableColumn"),
333
+ type: "primary",
334
+ size: "medium",
335
+ onClick: _cache[1] || (_cache[1] = ($event) => $options.addCol())
336
+ }, {
337
+ default: withCtx(() => [
338
+ createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addTableColumn")), 1)
339
+ ]),
340
+ _: 1
341
+ }, 8, ["title"])
342
+ ])
390
343
  ])
391
344
  ]),
392
345
  _: 1
393
346
  }, 8, ["title", "visible"]),
394
347
  createVNode(_component_CodeModalEditor, {
395
348
  modelValue: $data.renderJson,
396
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.renderJson = $event),
349
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.renderJson = $event),
397
350
  onSave: $options.saveColumnRender,
398
351
  ref: "CodeModalEditorRef",
399
352
  title: _ctx.i18nt("designer.setting.renderFunction"),
@@ -401,7 +354,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
401
354
  }, null, 8, ["modelValue", "onSave", "title", "event-header"])
402
355
  ], 64);
403
356
  }
404
- const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-56fe3743"]]);
357
+ const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ec98caec"]]);
405
358
  export {
406
359
  dataTableTableColumnsEditor as default
407
360
  };