@kp-ui/lowcode 1.0.46 → 1.0.48
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.
- package/_virtual/virtual_svg-icons-register.js +2 -2
- package/_virtual/virtual_svg-icons-register.js.map +1 -1
- package/package.json +28 -28
- package/src/components/CustomRender/components/RenderBodyCell.js +0 -5
- package/src/components/CustomRender/components/RenderBodyCell.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +3 -4
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js.map +1 -1
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +3 -4
- package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js.map +1 -1
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +192 -237
- package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js.map +1 -1
- package/src/components/public/methoad-item.vue.js +2 -3
- package/src/components/public/methoad-item.vue.js.map +1 -1
- package/src/mixins/useDataTableMixin.js +0 -1
- package/src/mixins/useDataTableMixin.js.map +1 -1
- package/src/utils/executeFunction.js +1 -1
- package/src/utils/executeFunction.js.map +1 -1
- package/styles/style.css +1 -1
package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js.map
CHANGED
|
@@ -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: "
|
|
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
|
|
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,19 +183,20 @@ 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[
|
|
186
|
+
"onUpdate:visible": _cache[3] || (_cache[3] = ($event) => $data.dialogVisible = $event),
|
|
137
187
|
"show-close": true,
|
|
138
|
-
"append-to-body": "",
|
|
139
188
|
"close-on-click-modal": false,
|
|
140
189
|
"close-on-press-escape": false,
|
|
141
190
|
"destroy-on-close": true,
|
|
142
|
-
width: "1200px"
|
|
191
|
+
width: "1200px",
|
|
192
|
+
"aria-hidden": "false",
|
|
193
|
+
wrapClassName: "table-columns-modal"
|
|
143
194
|
}, {
|
|
144
195
|
footer: withCtx(() => [
|
|
145
|
-
createElementVNode("div",
|
|
196
|
+
createElementVNode("div", _hoisted_3, [
|
|
146
197
|
createVNode(_component_a_button, {
|
|
147
198
|
size: "default",
|
|
148
|
-
onClick: _cache[
|
|
199
|
+
onClick: _cache[2] || (_cache[2] = ($event) => $data.dialogVisible = false)
|
|
149
200
|
}, {
|
|
150
201
|
default: withCtx(() => [
|
|
151
202
|
createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.cancel")), 1)
|
|
@@ -166,234 +217,138 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
166
217
|
]),
|
|
167
218
|
default: withCtx(() => [
|
|
168
219
|
createElementVNode("div", _hoisted_1, [
|
|
169
|
-
createVNode(
|
|
220
|
+
createVNode(_component_s_table, {
|
|
221
|
+
"aria-hidden": "false",
|
|
170
222
|
dataSource: $props.optionModel.tableColumns,
|
|
171
223
|
style: { "width": "100%" },
|
|
172
|
-
class: "tpf-table",
|
|
224
|
+
class: "tpf-surely-table",
|
|
225
|
+
deepWatchDataSource: "",
|
|
173
226
|
"cell-style": { padding: "0" },
|
|
174
227
|
height: "600",
|
|
175
|
-
bordered: "",
|
|
176
|
-
"row-key": (r) => r.columnId,
|
|
177
228
|
id: "singleTable",
|
|
178
229
|
scroll: { y: 300, x: 300 },
|
|
179
|
-
pagination: false
|
|
230
|
+
pagination: false,
|
|
231
|
+
resizable: "",
|
|
232
|
+
"row-key": (record) => record.columnId,
|
|
233
|
+
columns: $data.columns
|
|
180
234
|
}, {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
]
|
|
200
|
-
|
|
201
|
-
}, 8, ["
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
},
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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"
|
|
235
|
+
bodyCell: withCtx(({ column, recordIndexs }) => [
|
|
236
|
+
column.dataIndex === "dataIndex" ? (openBlock(), createBlock(_component_a_input, {
|
|
237
|
+
key: 0,
|
|
238
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].dataIndex,
|
|
239
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].dataIndex = $event
|
|
240
|
+
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
241
|
+
column.dataIndex === "title" ? (openBlock(), createBlock(_component_a_input, {
|
|
242
|
+
key: 1,
|
|
243
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].title,
|
|
244
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].title = $event
|
|
245
|
+
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
246
|
+
column.dataIndex === "width" ? (openBlock(), createBlock(_component_a_input, {
|
|
247
|
+
key: 2,
|
|
248
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].width,
|
|
249
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].width = $event
|
|
250
|
+
}, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
251
|
+
column.dataIndex === "show" ? (openBlock(), createBlock(_component_a_switch, {
|
|
252
|
+
key: 3,
|
|
253
|
+
checked: $props.optionModel.tableColumns[recordIndexs[0]].show,
|
|
254
|
+
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].show = $event
|
|
255
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
256
|
+
column.dataIndex === "sorter" ? (openBlock(), createBlock(_component_a_switch, {
|
|
257
|
+
key: 4,
|
|
258
|
+
checked: $props.optionModel.tableColumns[recordIndexs[0]].sorter,
|
|
259
|
+
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].sorter = $event
|
|
260
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
261
|
+
column.dataIndex === "resizable" ? (openBlock(), createBlock(_component_a_switch, {
|
|
262
|
+
key: 5,
|
|
263
|
+
checked: $props.optionModel.tableColumns[recordIndexs[0]].resizable,
|
|
264
|
+
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].resizable = $event
|
|
265
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
266
|
+
column.dataIndex === "ellipsis" ? (openBlock(), createBlock(_component_a_switch, {
|
|
267
|
+
key: 6,
|
|
268
|
+
checked: $props.optionModel.tableColumns[recordIndexs[0]].ellipsis,
|
|
269
|
+
"onUpdate:checked": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].ellipsis = $event
|
|
270
|
+
}, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("", true),
|
|
271
|
+
column.dataIndex === "fixed" ? (openBlock(), createBlock(_component_a_select, {
|
|
272
|
+
key: 7,
|
|
273
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].fixed,
|
|
274
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].fixed = $event,
|
|
275
|
+
allowClear: "",
|
|
276
|
+
style: {}
|
|
287
277
|
}, {
|
|
288
|
-
default: withCtx((
|
|
289
|
-
createVNode(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
},
|
|
278
|
+
default: withCtx(() => [
|
|
279
|
+
createVNode(_component_a_select_option, { value: "left" }, {
|
|
280
|
+
default: withCtx(() => [
|
|
281
|
+
createTextVNode("左固定")
|
|
282
|
+
]),
|
|
283
|
+
_: 1
|
|
284
|
+
}),
|
|
285
|
+
createVNode(_component_a_select_option, { value: "right" }, {
|
|
295
286
|
default: withCtx(() => [
|
|
296
|
-
|
|
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
|
-
})
|
|
287
|
+
createTextVNode("右固定")
|
|
308
288
|
]),
|
|
309
|
-
_:
|
|
310
|
-
}
|
|
289
|
+
_: 1
|
|
290
|
+
})
|
|
311
291
|
]),
|
|
312
|
-
_:
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
292
|
+
_: 2
|
|
293
|
+
}, 1032, ["value", "onUpdate:value"])) : createCommentVNode("", true),
|
|
294
|
+
column.dataIndex === "align" ? (openBlock(), createBlock(_component_a_select, {
|
|
295
|
+
key: 8,
|
|
296
|
+
style: {},
|
|
297
|
+
value: $props.optionModel.tableColumns[recordIndexs[0]].align,
|
|
298
|
+
"onUpdate:value": ($event) => $props.optionModel.tableColumns[recordIndexs[0]].align = $event,
|
|
299
|
+
options: $data.alignOptions
|
|
300
|
+
}, null, 8, ["value", "onUpdate:value", "options"])) : createCommentVNode("", true),
|
|
301
|
+
column.dataIndex === "customRender" ? (openBlock(), createBlock(_component_a_button, {
|
|
302
|
+
key: 9,
|
|
303
|
+
onClick: ($event) => $options.showRenderDialog(_ctx.index, column.dataIndex),
|
|
304
|
+
size: "small",
|
|
305
|
+
shape: "round"
|
|
318
306
|
}, {
|
|
319
|
-
default: withCtx((
|
|
320
|
-
|
|
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"])
|
|
307
|
+
default: withCtx(() => [
|
|
308
|
+
createTextVNode(" edit ")
|
|
326
309
|
]),
|
|
327
|
-
_:
|
|
328
|
-
},
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}, {
|
|
335
|
-
default: withCtx((scope) => [
|
|
336
|
-
createVNode(_component_a_button, {
|
|
337
|
-
onClick: ($event) => $options.showRenderDialog(scope.record),
|
|
310
|
+
_: 2
|
|
311
|
+
}, 1032, ["onClick"])) : createCommentVNode("", true),
|
|
312
|
+
column.dataIndex === "action" ? (openBlock(), createBlock(_component_a_space, { key: 10 }, {
|
|
313
|
+
default: withCtx(() => [
|
|
314
|
+
$props.optionModel.tableColumns.length !== 1 ? (openBlock(), createBlock(_component_a_button, {
|
|
315
|
+
key: 0,
|
|
316
|
+
title: _ctx.i18nt("designer.setting.deleteTableColumn"),
|
|
338
317
|
size: "small",
|
|
339
|
-
|
|
318
|
+
onClick: _cache[0] || (_cache[0] = ($event) => $options.handleDelete(_ctx.scope.$index, _ctx.scope.row)),
|
|
319
|
+
type: "text"
|
|
340
320
|
}, {
|
|
341
321
|
default: withCtx(() => [
|
|
342
|
-
createTextVNode("
|
|
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)
|
|
322
|
+
createTextVNode(" 删除 ")
|
|
381
323
|
]),
|
|
382
|
-
_:
|
|
383
|
-
},
|
|
324
|
+
_: 1
|
|
325
|
+
}, 8, ["title"])) : createCommentVNode("", true)
|
|
384
326
|
]),
|
|
385
327
|
_: 1
|
|
386
|
-
}
|
|
328
|
+
})) : createCommentVNode("", true)
|
|
387
329
|
]),
|
|
388
330
|
_: 1
|
|
389
|
-
}, 8, ["dataSource", "row-key"])
|
|
331
|
+
}, 8, ["dataSource", "row-key", "columns"]),
|
|
332
|
+
createElementVNode("div", _hoisted_2, [
|
|
333
|
+
createVNode(_component_a_button, {
|
|
334
|
+
title: _ctx.i18nt("designer.setting.addTableColumn"),
|
|
335
|
+
type: "primary",
|
|
336
|
+
size: "medium",
|
|
337
|
+
onClick: _cache[1] || (_cache[1] = ($event) => $options.addCol())
|
|
338
|
+
}, {
|
|
339
|
+
default: withCtx(() => [
|
|
340
|
+
createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addTableColumn")), 1)
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
}, 8, ["title"])
|
|
344
|
+
])
|
|
390
345
|
])
|
|
391
346
|
]),
|
|
392
347
|
_: 1
|
|
393
348
|
}, 8, ["title", "visible"]),
|
|
394
349
|
createVNode(_component_CodeModalEditor, {
|
|
395
350
|
modelValue: $data.renderJson,
|
|
396
|
-
"onUpdate:modelValue": _cache[
|
|
351
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.renderJson = $event),
|
|
397
352
|
onSave: $options.saveColumnRender,
|
|
398
353
|
ref: "CodeModalEditorRef",
|
|
399
354
|
title: _ctx.i18nt("designer.setting.renderFunction"),
|
|
@@ -401,7 +356,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
401
356
|
}, null, 8, ["modelValue", "onSave", "title", "event-header"])
|
|
402
357
|
], 64);
|
|
403
358
|
}
|
|
404
|
-
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
359
|
+
const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c7607d09"]]);
|
|
405
360
|
export {
|
|
406
361
|
dataTableTableColumnsEditor as default
|
|
407
362
|
};
|