@kp-ui/lowcode 1.0.51 → 1.0.52

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.
Files changed (29) hide show
  1. package/_virtual/virtual_svg-icons-register.js +2 -2
  2. package/_virtual/virtual_svg-icons-register.js.map +1 -1
  3. package/package.json +1 -1
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +1 -1
  5. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js.map +1 -1
  6. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +0 -170
  7. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js.map +1 -1
  8. package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js +11 -34
  9. package/src/components/form-designer/form-widget/field-widget/button-list-widget.vue.js.map +1 -1
  10. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js +13 -210
  11. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js.map +1 -1
  12. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js +56 -422
  13. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-showButtonsColumn-editor.vue.js.map +1 -1
  14. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +1 -3
  15. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js.map +1 -1
  16. package/src/components/form-render/container-item/data-table-item.vue.js +7 -13
  17. package/src/components/form-render/container-item/data-table-item.vue.js.map +1 -1
  18. package/src/components/public/ActionButtonListDialog.vue.js +189 -0
  19. package/src/components/public/ActionButtonListDialog.vue.js.map +1 -0
  20. package/src/components/public/ActionButtonListDialog.vue2.js +115 -0
  21. package/src/components/public/ActionButtonListDialog.vue2.js.map +1 -0
  22. package/src/components/public/ActionButtonListRender.vue.js +44 -0
  23. package/src/components/public/ActionButtonListRender.vue.js.map +1 -0
  24. package/src/components/public/ActionButtonListRender.vue2.js +86 -0
  25. package/src/components/public/ActionButtonListRender.vue2.js.map +1 -0
  26. package/src/mixins/useDataTableMixin.js +8 -33
  27. package/src/mixins/useDataTableMixin.js.map +1 -1
  28. package/styles/style.css +1 -1
  29. package/types/src/types/button.d.ts +10 -0
@@ -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-surely-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 :deep(.tpf-surely-table) {\n min-height: 280px;\n }\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;A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AA;AAAA;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-surely-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 selected() {\n return this.widget.id === this.designer.selectedId;\n }\n },\n methods: {\n selectWidget(widget) {\n this.designer.setSelected(widget);\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 :deep(.tpf-surely-table) {\n min-height: 280px;\n }\n }\n }\n\n .collapse-container.selected {\n outline: 2px solid $--color-primary !important;\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,IACDC,WAAW;AACP,aAAO,KAAKtB,OAAOuB,OAAO,KAAKhB,SAASiB;AAAAA,IAC5C;AAAA,EACH;AAAA,EACDC,SAAS;AAAA,IACLC,aAAa1B,QAAQ;AACjB,WAAKO,SAASoB,YAAY3B,MAAM;AAAA,IACpC;AAAA,EACJ;AACJ;"}
@@ -3,7 +3,8 @@ import emitter from "../../../../utils/emitter.js";
3
3
  import i18n from "../../../../utils/i18n.js";
4
4
  import fieldMixin from "./fieldMixin.js";
5
5
  import SvgIcon from "../../../svg-icon/index.vue.js";
6
- import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, createVNode, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
6
+ import ActionButtonListRender from "../../../public/ActionButtonListRender.vue.js";
7
+ import { resolveComponent, createBlock, openBlock, withCtx, createVNode } from "vue";
7
8
  /* empty css */
8
9
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
9
10
  const _sfc_main = {
@@ -41,6 +42,7 @@ const _sfc_main = {
41
42
  return {};
42
43
  },
43
44
  components: {
45
+ ActionButtonListRender,
44
46
  SvgIcon,
45
47
  StaticContentWrapper
46
48
  },
@@ -94,9 +96,7 @@ const _sfc_main = {
94
96
  }
95
97
  };
96
98
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
97
- const _component_SvgIcon = resolveComponent("SvgIcon");
98
- const _component_a_button = resolveComponent("a-button");
99
- const _component_a_space = resolveComponent("a-space");
99
+ const _component_ActionButtonListRender = resolveComponent("ActionButtonListRender");
100
100
  const _component_static_content_wrapper = resolveComponent("static-content-wrapper");
101
101
  return openBlock(), createBlock(_component_static_content_wrapper, {
102
102
  designer: $props.designer,
@@ -110,40 +110,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
110
110
  "sub-form-row-id": $props.subFormRowId
111
111
  }, {
112
112
  default: withCtx(() => [
113
- createElementVNode("div", {
114
- ref: "fieldEditor",
115
- class: normalizeClass(["flex", ...$options.customClass]),
116
- style: normalizeStyle(`--flex: ${$props.field.options.flex}`)
117
- }, [
118
- createVNode(_component_a_space, { x: 8 }, {
119
- default: withCtx(() => [
120
- (openBlock(true), createElementBlock(Fragment, null, renderList($options.buttonList, (item) => {
121
- return openBlock(), createBlock(_component_a_button, {
122
- key: item.key,
123
- type: item.type,
124
- danger: item.danger,
125
- disabled: $options.handleDisabled(item),
126
- onClick: ($event) => $options.hanldeClick(item)
127
- }, {
128
- default: withCtx(() => [
129
- item.icon ? (openBlock(), createBlock(_component_SvgIcon, {
130
- key: 0,
131
- "icon-class": item.icon
132
- }, null, 8, ["icon-class"])) : createCommentVNode("", true),
133
- createTextVNode(" " + toDisplayString(item.label), 1)
134
- ]),
135
- _: 2
136
- }, 1032, ["type", "danger", "disabled", "onClick"]);
137
- }), 128))
138
- ]),
139
- _: 1
140
- })
141
- ], 6)
113
+ createVNode(_component_ActionButtonListRender, {
114
+ buttonList: $options.buttonList,
115
+ customClass: $options.customClass,
116
+ flex: $props.field.options.flex,
117
+ ctx: this
118
+ }, null, 8, ["buttonList", "customClass", "flex"])
142
119
  ]),
143
120
  _: 1
144
121
  }, 8, ["designer", "field", "design-state", "parent-widget", "parent-list", "index-of-parent-list", "sub-form-row-index", "sub-form-col-index", "sub-form-row-id"]);
145
122
  }
146
- const buttonListWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-7e133232"]]);
123
+ const buttonListWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-27f69227"]]);
147
124
  export {
148
125
  buttonListWidget as default
149
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"button-list-widget.vue.js","sources":["../../../../../../src/components/form-designer/form-widget/field-widget/button-list-widget.vue"],"sourcesContent":["<template>\n <static-content-wrapper\n :designer=\"designer\"\n :field=\"field\"\n :design-state=\"designState\"\n :parent-widget=\"parentWidget\"\n :parent-list=\"parentList\"\n :index-of-parent-list=\"indexOfParentList\"\n :sub-form-row-index=\"subFormRowIndex\"\n :sub-form-col-index=\"subFormColIndex\"\n :sub-form-row-id=\"subFormRowId\"\n >\n <!-- 渲染到自定义位置 -->\n <!-- <Teleport\n to=\"#LowcodeSubmitButtonList\"\n :disabled=\"field.options.buttonPosition == 0 || designState\"\n > -->\n <div\n ref=\"fieldEditor\"\n :class=\"['flex', ...customClass]\"\n :style=\"`--flex: ${field.options.flex}`\"\n >\n <a-space :x=\"8\">\n <a-button\n v-for=\"item in buttonList\"\n :key=\"item.key\"\n :type=\"item.type\"\n :danger=\"item.danger\"\n :disabled=\"handleDisabled(item)\"\n @click=\"hanldeClick(item)\"\n >\n <SvgIcon v-if=\"item.icon\" :icon-class=\"item.icon\" />\n {{ item.label }}\n </a-button>\n </a-space>\n </div>\n <!-- </Teleport> -->\n </static-content-wrapper>\n</template>\n\n<script>\n import StaticContentWrapper from './static-content-wrapper';\n import emitter from '@/utils/emitter';\n import i18n from '@/utils/i18n';\n import fieldMixin from '@/components/form-designer/form-widget/field-widget/fieldMixin';\n import SvgIcon from '@/components/svg-icon';\n export default {\n name: 'button-list-widget',\n componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件\n mixins: [emitter, fieldMixin, i18n],\n props: {\n field: Object,\n parentWidget: Object,\n parentList: Array,\n indexOfParentList: Number,\n designer: Object,\n\n designState: {\n type: Boolean,\n default: false\n },\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 data() {\n return {};\n },\n components: {\n SvgIcon,\n StaticContentWrapper\n },\n computed: {\n customClass() {\n return this.field.options.customClass || [];\n },\n buttonList() {\n return this.field.options.buttonList.filter(item => !this.handleHidden(item));\n }\n },\n beforeCreate() {\n /* 这里不能访问方法和属性!! */\n },\n\n created() {\n /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop\n 需要在父组件created中初始化!! */\n this.registerToRefList();\n this.initEventHandler();\n\n this.handleOnCreated();\n },\n\n mounted() {\n this.handleOnMounted();\n },\n methods: {\n hanldeClick(item) {\n if (this.designState) {\n //设计状态不触发点击事件\n return;\n }\n if (item.onClick) {\n const customFn = new Function(item.onClick);\n return customFn.call(this);\n }\n },\n handleDisabled(item) {\n const { onDisabled } = item;\n if (onDisabled) {\n const disabledFn = new Function(onDisabled);\n return disabledFn.call(this);\n }\n return false;\n },\n handleHidden(item) {\n const { onHidden } = item;\n if (onHidden) {\n const disabledFn = new Function(onHidden);\n return disabledFn.call(this);\n }\n return false;\n }\n },\n beforeUnmount() {\n this.unregisterFromRefList();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .flex {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n }\n</style>\n"],"names":["_createBlock","_createElementVNode","_normalizeStyle","_createVNode","_createElementBlock","_Fragment","_renderList","_toDisplayString"],"mappings":";;;;;;;;AA8CI,MAAK,YAAU;AAAA,EACX,MAAM;AAAA,EACN,eAAe;AAAA;AAAA,EACf,QAAQ,CAAC,SAAS,YAAY,IAAI;AAAA,EAClC,OAAO;AAAA,IACH,OAAO;AAAA,IACP,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,UAAU;AAAA,IAEV,aAAa;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACZ;AAAA,IAED,iBAAiB;AAAA;AAAA,MACS,MAAM;AAAA,MAC5B,SAAS;AAAA,IACZ;AAAA,IACD,iBAAiB;AAAA;AAAA,MACS,MAAM;AAAA,MAC5B,SAAS;AAAA,IACZ;AAAA,IACD,cAAc;AAAA;AAAA,MACc,MAAM;AAAA,MAC9B,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACD,OAAO;AACH,WAAO,CAAE;AAAA,EACZ;AAAA,EACD,YAAY;AAAA,IACR;AAAA,IACA;AAAA,EACH;AAAA,EACD,UAAU;AAAA,IACN,cAAc;AACV,aAAO,KAAK,MAAM,QAAQ,eAAe,CAAE;AAAA,IAC9C;AAAA,IACD,aAAa;AACT,aAAO,KAAK,MAAM,QAAQ,WAAW,OAAO,UAAQ,CAAC,KAAK,aAAa,IAAI,CAAC;AAAA,IAChF;AAAA,EACH;AAAA,EACD,eAAe;AAAA,EAEd;AAAA,EAED,UAAU;AAGN,SAAK,kBAAmB;AACxB,SAAK,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C,UAAA,MAAAC,WATQ,SAAU,YAAA,CAAlB,SAAI;kCADfN,YAUW,qBAAA;AAAA,gBARN,KAAK,KAAK;AAAA,gBACV,MAAM,KAAK;AAAA,gBACX,QAAQ,KAAK;AAAA,gBACb,UAAU,SAAc,eAAC,IAAI;AAAA,gBAC7B,SAAK,YAAE,SAAW,YAAC,IAAI;AAAA;iCAExB,MAAoD;AAAA,kBAArC,KAAK,qBAApBA,YAAoD,oBAAA;AAAA;oBAAzB,cAAY,KAAK;AAAA;kCAAQ,MACpDO,gBAAG,KAAK,KAAK,GAAA,CAAA;AAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"button-list-widget.vue.js","sources":["../../../../../../src/components/form-designer/form-widget/field-widget/button-list-widget.vue"],"sourcesContent":["<template>\n <static-content-wrapper\n :designer=\"designer\"\n :field=\"field\"\n :design-state=\"designState\"\n :parent-widget=\"parentWidget\"\n :parent-list=\"parentList\"\n :index-of-parent-list=\"indexOfParentList\"\n :sub-form-row-index=\"subFormRowIndex\"\n :sub-form-col-index=\"subFormColIndex\"\n :sub-form-row-id=\"subFormRowId\"\n >\n <ActionButtonListRender\n :buttonList=\"buttonList\"\n :customClass=\"customClass\"\n :flex=\"field.options.flex\"\n :ctx=\"this\"\n />\n </static-content-wrapper>\n</template>\n\n<script>\n import StaticContentWrapper from './static-content-wrapper';\n import emitter from '@/utils/emitter';\n import i18n from '@/utils/i18n';\n import fieldMixin from '@/components/form-designer/form-widget/field-widget/fieldMixin';\n import SvgIcon from '@/components/svg-icon';\n import ActionButtonListRender from '@/components/public/ActionButtonListRender.vue';\n export default {\n name: 'button-list-widget',\n componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件\n mixins: [emitter, fieldMixin, i18n],\n props: {\n field: Object,\n parentWidget: Object,\n parentList: Array,\n indexOfParentList: Number,\n designer: Object,\n\n designState: {\n type: Boolean,\n default: false\n },\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 data() {\n return {};\n },\n components: {\n ActionButtonListRender,\n SvgIcon,\n StaticContentWrapper\n },\n computed: {\n customClass() {\n return this.field.options.customClass || [];\n },\n buttonList() {\n return this.field.options.buttonList.filter(item => !this.handleHidden(item));\n }\n },\n beforeCreate() {\n /* 这里不能访问方法和属性!! */\n },\n\n created() {\n /* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop\n 需要在父组件created中初始化!! */\n this.registerToRefList();\n this.initEventHandler();\n\n this.handleOnCreated();\n },\n\n mounted() {\n this.handleOnMounted();\n },\n methods: {\n hanldeClick(item) {\n if (this.designState) {\n //设计状态不触发点击事件\n return;\n }\n if (item.onClick) {\n const customFn = new Function(item.onClick);\n return customFn.call(this);\n }\n },\n handleDisabled(item) {\n const { onDisabled } = item;\n if (onDisabled) {\n const disabledFn = new Function(onDisabled);\n return disabledFn.call(this);\n }\n return false;\n },\n handleHidden(item) {\n const { onHidden } = item;\n if (onHidden) {\n const disabledFn = new Function(onHidden);\n return disabledFn.call(this);\n }\n return false;\n }\n },\n beforeUnmount() {\n this.unregisterFromRefList();\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .flex {\n flex: 1;\n display: flex;\n justify-content: var(--flex);\n }\n</style>\n"],"names":["_createBlock","_createVNode"],"mappings":";;;;;;;;;AA4BI,MAAK,YAAU;AAAA,EACX,MAAM;AAAA,EACN,eAAe;AAAA;AAAA,EACf,QAAQ,CAAC,SAAS,YAAY,IAAI;AAAA,EAClC,OAAO;AAAA,IACH,OAAO;AAAA,IACP,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,UAAU;AAAA,IAEV,aAAa;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACZ;AAAA,IAED,iBAAiB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ACX;AAAA,EACH;AAAA,EACD,gBAAgB;AACZ,SAAK,sBAAuB;AAAA,EAChC;AACH;;;;sBAvHDA,YAiByB,mCAAA;AAAA,IAhBpB,UAAU,OAAQ;AAAA,IAClB,OAAO,OAAK;AAAA,IACZ,gBAAc,OAAW;AAAA,IACzB,iBAAe,OAAY;AAAA,IAC3B,eAAa,OAAU;AAAA,IACvB,wBAAsB,OAAiB;AAAA,IACvC,sBAAoB,OAAe;AAAA,IACnC,sBAAoB,OAAe;AAAA,IACnC,mBAAiB,OAAY;AAAA;qBAE9B,MAKE;AAAA,MALFC,YAKE,mCAAA;AAAA,QAJG,YAAY,SAAU;AAAA,QACtB,aAAa,SAAW;AAAA,QACxB,MAAM,OAAA,MAAM,QAAQ;AAAA,QACpB,KAAK;AAAA;;;;;;"}
@@ -2,7 +2,8 @@ import i18n from "../../../../utils/i18n.js";
2
2
  import CodeModalEditor from "../../../code-editor/code-modal-editor.vue.js";
3
3
  import { generateId } from "../../../../utils/util.js";
4
4
  import { cloneDeep } from "lodash-es";
5
- import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from "vue";
5
+ import ActionButtonListDialog from "../../../public/ActionButtonListDialog.vue.js";
6
+ import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, createElementVNode, toDisplayString } from "vue";
6
7
  /* empty css */
7
8
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
9
  const _sfc_main = {
@@ -14,6 +15,7 @@ const _sfc_main = {
14
15
  optionModel: Object
15
16
  },
16
17
  components: {
18
+ ActionButtonListDialog,
17
19
  CodeModalEditor
18
20
  },
19
21
  data() {
@@ -56,17 +58,11 @@ const _sfc_main = {
56
58
  }
57
59
  }
58
60
  };
59
- const _hoisted_1 = { class: "btn-center" };
60
- const _hoisted_2 = { class: "dialog-footer" };
61
+ const _hoisted_1 = { class: "dialog-footer" };
61
62
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
62
63
  const _component_a_button = resolveComponent("a-button");
63
64
  const _component_a_form_item = resolveComponent("a-form-item");
64
- const _component_a_input = resolveComponent("a-input");
65
- const _component_STableColumn = resolveComponent("STableColumn");
66
- const _component_a_select_option = resolveComponent("a-select-option");
67
- const _component_a_select = resolveComponent("a-select");
68
- const _component_a_switch = resolveComponent("a-switch");
69
- const _component_STable = resolveComponent("STable");
65
+ const _component_ActionButtonListDialog = resolveComponent("ActionButtonListDialog");
70
66
  const _component_a_modal = resolveComponent("a-modal");
71
67
  const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
72
68
  return openBlock(), createElementBlock(Fragment, null, [
@@ -86,7 +82,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
82
  createVNode(_component_a_modal, {
87
83
  title: _ctx.i18nt("designer.setting.buttonsColumnEdit"),
88
84
  visible: $data.btnListConfigDialogVisible,
89
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => $data.btnListConfigDialogVisible = $event),
85
+ "onUpdate:visible": _cache[1] || (_cache[1] = ($event) => $data.btnListConfigDialogVisible = $event),
90
86
  "show-close": true,
91
87
  dialogClass: "drag-dialog",
92
88
  "append-to-body": "",
@@ -96,7 +92,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
96
92
  width: "1250px"
97
93
  }, {
98
94
  footer: withCtx(() => [
99
- createElementVNode("div", _hoisted_2, [
95
+ createElementVNode("div", _hoisted_1, [
100
96
  createVNode(_component_a_button, {
101
97
  size: "default",
102
98
  onClick: $options.handleCloseDialog
@@ -109,215 +105,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
109
105
  ])
110
106
  ]),
111
107
  default: withCtx(() => [
112
- createVNode(_component_STable, {
113
- deepWatchDataSource: true,
114
- "data-source": $data.buttonList,
115
- pagination: false,
116
- resizable: true
117
- }, {
118
- default: withCtx(() => [
119
- createVNode(_component_STableColumn, {
120
- rowDrag: true,
121
- dataIndex: "name",
122
- title: _ctx.i18nt("designer.setting.operationButtonLabel"),
123
- width: 150
124
- }, {
125
- default: withCtx(({ index }) => [
126
- createVNode(_component_a_input, {
127
- value: $data.buttonList[index].label,
128
- "onUpdate:value": ($event) => $data.buttonList[index].label = $event,
129
- placeholder: _ctx.i18nt("designer.setting.operationButtonLabel")
130
- }, null, 8, ["value", "onUpdate:value", "placeholder"])
131
- ]),
132
- _: 1
133
- }, 8, ["title"]),
134
- createVNode(_component_STableColumn, {
135
- dataIndex: "type",
136
- title: _ctx.i18nt("designer.setting.operationButtonType"),
137
- width: 120
138
- }, {
139
- default: withCtx(({ index }) => [
140
- createVNode(_component_a_select, {
141
- value: $data.buttonList[index].type,
142
- "onUpdate:value": ($event) => $data.buttonList[index].type = $event,
143
- placeholder: _ctx.i18nt("designer.setting.operationButtonType"),
144
- style: { "width": "100%" }
145
- }, {
146
- default: withCtx(() => [
147
- createVNode(_component_a_select_option, { value: "primary" }, {
148
- default: withCtx(() => [
149
- createTextVNode("primary")
150
- ]),
151
- _: 1
152
- }),
153
- createVNode(_component_a_select_option, { value: "ghost" }, {
154
- default: withCtx(() => [
155
- createTextVNode("ghost")
156
- ]),
157
- _: 1
158
- }),
159
- createVNode(_component_a_select_option, { value: "dashed" }, {
160
- default: withCtx(() => [
161
- createTextVNode("dashed")
162
- ]),
163
- _: 1
164
- }),
165
- createVNode(_component_a_select_option, { value: "text" }, {
166
- default: withCtx(() => [
167
- createTextVNode("text")
168
- ]),
169
- _: 1
170
- }),
171
- createVNode(_component_a_select_option, { value: "link" }, {
172
- default: withCtx(() => [
173
- createTextVNode("link")
174
- ]),
175
- _: 1
176
- }),
177
- createVNode(_component_a_select_option, { value: "default" }, {
178
- default: withCtx(() => [
179
- createTextVNode("default")
180
- ]),
181
- _: 1
182
- })
183
- ]),
184
- _: 2
185
- }, 1032, ["value", "onUpdate:value", "placeholder"])
186
- ]),
187
- _: 1
188
- }, 8, ["title"]),
189
- createVNode(_component_STableColumn, {
190
- dataIndex: "size",
191
- title: _ctx.i18nt("designer.setting.danger"),
192
- width: 120
193
- }, {
194
- default: withCtx(({ index }) => [
195
- createVNode(_component_a_switch, {
196
- checkedValue: 1,
197
- unCheckedValue: 0,
198
- checked: $data.buttonList[index].danger,
199
- "onUpdate:checked": ($event) => $data.buttonList[index].danger = $event
200
- }, null, 8, ["checked", "onUpdate:checked"])
201
- ]),
202
- _: 1
203
- }, 8, ["title"]),
204
- createVNode(_component_STableColumn, {
205
- dataIndex: "size",
206
- title: _ctx.i18nt("designer.setting.buttonIcon"),
207
- width: 120
208
- }, {
209
- default: withCtx(({ index }) => [
210
- createVNode(_component_a_input, {
211
- type: "text",
212
- value: $data.buttonList[index].icon,
213
- "onUpdate:value": ($event) => $data.buttonList[index].icon = $event
214
- }, null, 8, ["value", "onUpdate:value"])
215
- ]),
216
- _: 1
217
- }, 8, ["title"]),
218
- createVNode(_component_STableColumn, {
219
- dataIndex: "onHidden",
220
- title: _ctx.i18nt("designer.setting.operationButtonHidden"),
221
- width: 100
222
- }, {
223
- default: withCtx(({ record }) => [
224
- createVNode(_component_a_button, {
225
- class: normalizeClass([{ "button-text-highlight": !!record.onHidden }]),
226
- onClick: ($event) => $options.editEvent("onHidden", record),
227
- size: "small"
228
- }, {
229
- default: withCtx(() => [
230
- createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.operationButtonHidden")), 1)
231
- ]),
232
- _: 2
233
- }, 1032, ["class", "onClick"])
234
- ]),
235
- _: 1
236
- }, 8, ["title"]),
237
- createVNode(_component_STableColumn, {
238
- dataIndex: "disabled",
239
- title: _ctx.i18nt("designer.setting.operationButtonDisabled"),
240
- width: 100
241
- }, {
242
- default: withCtx(({ record }) => [
243
- createVNode(_component_a_button, {
244
- class: normalizeClass([{ "button-text-highlight": !!record.onDisabled }]),
245
- onClick: ($event) => $options.editEvent("onDisabled", record),
246
- size: "small"
247
- }, {
248
- default: withCtx(() => [
249
- createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.operationButtonDisabled")), 1)
250
- ]),
251
- _: 2
252
- }, 1032, ["class", "onClick"])
253
- ]),
254
- _: 1
255
- }, 8, ["title"]),
256
- createVNode(_component_STableColumn, {
257
- dataIndex: "onClick",
258
- title: "点击事件",
259
- width: 100
260
- }, {
261
- default: withCtx(({ record }) => [
262
- createVNode(_component_a_button, {
263
- class: normalizeClass([{ "button-text-highlight": !!record.onClick }]),
264
- onClick: ($event) => $options.editEvent("onClick", record),
265
- size: "small"
266
- }, {
267
- default: withCtx(() => [
268
- createTextVNode(" 点击事件 ")
269
- ]),
270
- _: 2
271
- }, 1032, ["class", "onClick"])
272
- ]),
273
- _: 1
274
- }),
275
- createVNode(_component_STableColumn, {
276
- dataIndex: "action",
277
- title: "操作",
278
- width: 80
279
- }, {
280
- default: withCtx(({ record, index }) => [
281
- createVNode(_component_a_button, {
282
- type: "link",
283
- onClick: ($event) => _ctx.deleteOperationButton(index),
284
- size: "small"
285
- }, {
286
- default: withCtx(() => [
287
- createTextVNode(" 删除 ")
288
- ]),
289
- _: 2
290
- }, 1032, ["onClick"])
291
- ]),
292
- _: 1
293
- })
294
- ]),
295
- _: 1
296
- }, 8, ["data-source"]),
297
- createElementVNode("div", _hoisted_1, [
298
- createVNode(_component_a_button, {
299
- type: "primary",
300
- size: "default",
301
- onClick: $options.addOperationButton
302
- }, {
303
- default: withCtx(() => [
304
- createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addOperationButton")), 1)
305
- ]),
306
- _: 1
307
- }, 8, ["onClick"])
308
- ])
108
+ createVNode(_component_ActionButtonListDialog, {
109
+ data: $data.buttonList,
110
+ "onUpdate:data": _cache[0] || (_cache[0] = ($event) => $data.buttonList = $event)
111
+ }, null, 8, ["data"])
309
112
  ]),
310
113
  _: 1
311
114
  }, 8, ["title", "visible"]),
312
115
  createVNode(_component_CodeModalEditor, {
313
116
  modelValue: $data.currentEditBtn[$data.currentEditEventName],
314
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.currentEditBtn[$data.currentEditEventName] = $event),
117
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => $data.currentEditBtn[$data.currentEditEventName] = $event),
315
118
  ref: "CodeModalEditorRef",
316
119
  "event-header": `${$data.currentEditBtn.label}.${$data.currentEditEventName}(){`
317
120
  }, null, 8, ["modelValue", "event-header"])
318
121
  ], 64);
319
122
  }
320
- const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-77f39703"]]);
123
+ const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-0b9979c4"]]);
321
124
  export {
322
125
  buttonListEditor as default
323
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"button-list-editor.vue.js","sources":["../../../../../../src/components/form-designer/setting-panel/property-editor/button-list-editor.vue"],"sourcesContent":["<template>\n <a-form-item :label=\"i18nt('designer.setting.buttonList')\">\n <a-button @click=\"handleConfigBtn\">按钮配置</a-button>\n </a-form-item>\n <a-modal\n :title=\"i18nt('designer.setting.buttonsColumnEdit')\"\n v-model:visible=\"btnListConfigDialogVisible\"\n :show-close=\"true\"\n dialogClass=\"drag-dialog\"\n append-to-body\n :close-on-click-modal=\"false\"\n :close-on-press-escape=\"false\"\n :destroy-on-close=\"true\"\n width=\"1250px\"\n >\n <STable\n :deepWatchDataSource=\"true\"\n :data-source=\"buttonList\"\n :pagination=\"false\"\n :resizable=\"true\"\n >\n <STableColumn\n :rowDrag=\"true\"\n dataIndex=\"name\"\n :title=\"i18nt('designer.setting.operationButtonLabel')\"\n :width=\"150\"\n >\n <template #default=\"{ index }\">\n <a-input\n v-model:value=\"buttonList[index].label\"\n :placeholder=\"i18nt('designer.setting.operationButtonLabel')\"\n />\n </template>\n </STableColumn>\n <STableColumn\n dataIndex=\"type\"\n :title=\"i18nt('designer.setting.operationButtonType')\"\n :width=\"120\"\n >\n <template #default=\"{ index }\">\n <a-select\n v-model:value=\"buttonList[index].type\"\n :placeholder=\"i18nt('designer.setting.operationButtonType')\"\n style=\"width: 100%\"\n >\n <a-select-option value=\"primary\">primary</a-select-option>\n <a-select-option value=\"ghost\">ghost</a-select-option>\n <a-select-option value=\"dashed\">dashed</a-select-option>\n <a-select-option value=\"text\">text</a-select-option>\n <a-select-option value=\"link\">link</a-select-option>\n <a-select-option value=\"default\">default</a-select-option>\n </a-select>\n </template>\n </STableColumn>\n <STableColumn dataIndex=\"size\" :title=\"i18nt('designer.setting.danger')\" :width=\"120\">\n <template #default=\"{ index }\">\n <a-switch\n :checkedValue=\"1\"\n :unCheckedValue=\"0\"\n v-model:checked=\"buttonList[index].danger\"\n />\n </template>\n </STableColumn>\n <STableColumn\n dataIndex=\"size\"\n :title=\"i18nt('designer.setting.buttonIcon')\"\n :width=\"120\"\n >\n <template #default=\"{ index }\">\n <a-input type=\"text\" v-model:value=\"buttonList[index].icon\" />\n </template>\n </STableColumn>\n <STableColumn\n dataIndex=\"onHidden\"\n :title=\"i18nt('designer.setting.operationButtonHidden')\"\n :width=\"100\"\n >\n <template #default=\"{ record }\">\n <a-button\n :class=\"[{ 'button-text-highlight': !!record.onHidden }]\"\n @click=\"editEvent('onHidden', record)\"\n size=\"small\"\n >\n {{ i18nt('designer.setting.operationButtonHidden') }}\n </a-button>\n </template>\n </STableColumn>\n <STableColumn\n dataIndex=\"disabled\"\n :title=\"i18nt('designer.setting.operationButtonDisabled')\"\n :width=\"100\"\n >\n <template #default=\"{ record }\">\n <a-button\n :class=\"[{ 'button-text-highlight': !!record.onDisabled }]\"\n @click=\"editEvent('onDisabled', record)\"\n size=\"small\"\n >\n {{ i18nt('designer.setting.operationButtonDisabled') }}\n </a-button>\n </template>\n </STableColumn>\n <STableColumn dataIndex=\"onClick\" title=\"点击事件\" :width=\"100\">\n <template #default=\"{ record }\">\n <a-button\n :class=\"[{ 'button-text-highlight': !!record.onClick }]\"\n @click=\"editEvent('onClick', record)\"\n size=\"small\"\n >\n 点击事件\n </a-button>\n </template>\n </STableColumn>\n <STableColumn dataIndex=\"action\" title=\"操作\" :width=\"80\">\n <template #default=\"{ record, index }\">\n <a-button type=\"link\" @click=\"deleteOperationButton(index)\" size=\"small\">\n 删除\n </a-button>\n </template>\n </STableColumn>\n </STable>\n\n <div class=\"btn-center\">\n <a-button type=\"primary\" size=\"default\" @click=\"addOperationButton\">\n {{ i18nt('designer.setting.addOperationButton') }}\n </a-button>\n </div>\n <template #footer>\n <div class=\"dialog-footer\">\n <a-button size=\"default\" @click=\"handleCloseDialog\">\n {{ i18nt('designer.hint.closePreview') }}\n </a-button>\n </div>\n </template>\n </a-modal>\n <CodeModalEditor\n v-model=\"currentEditBtn[currentEditEventName]\"\n ref=\"CodeModalEditorRef\"\n :event-header=\"`${currentEditBtn.label}.${currentEditEventName}(){`\"\n />\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import CodeModalEditor from '@/components/code-editor/code-modal-editor.vue';\n import { generateId } from '@/utils/util';\n import { cloneDeep } from 'lodash-es';\n export default {\n name: 'button-list-editor',\n mixins: [i18n],\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object\n },\n components: {\n CodeModalEditor\n },\n data() {\n return {\n buttonList: [],\n currentEditEventName: '',\n currentEditBtn: {},\n btnListConfigDialogVisible: false\n };\n },\n watch: {\n buttonList() {\n this.optionModel.buttonList = this.buttonList;\n }\n },\n methods: {\n addOperationButton() {\n this.buttonList.splice(0, 0, {\n key: generateId(),\n label: 'new btn',\n type: 'primary',\n danger: false,\n icon: '',\n onHidden: '',\n onDisabled: '',\n onClick: ''\n });\n },\n editEvent(type, row) {\n this.currentEditBtn = row;\n this.currentEditEventName = type;\n this.$refs.CodeModalEditorRef.open(row[type]);\n },\n handleConfigBtn() {\n this.buttonList = cloneDeep(this.optionModel.buttonList);\n this.btnListConfigDialogVisible = true;\n },\n handleCloseDialog() {\n this.btnListConfigDialogVisible = false;\n }\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .radio-group-custom {\n :deep(.el-radio-button__inner),\n :deep(.ant-radio-button__inner) {\n padding-left: 12px;\n padding-right: 12px;\n }\n }\n .button-row {\n margin-bottom: 8px;\n border: 1px solid #e1e2e3;\n padding: 8px;\n border-radius: 4px;\n transition: all 0.3s;\n\n &:hover {\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n }\n :deep(.ant-table) {\n margin: -8px;\n }\n :deep(.ant-table-cell) {\n padding: 8px !important;\n vertical-align: middle;\n }\n :deep(.ant-form-item) {\n margin-bottom: 0;\n }\n :deep(.drag-handler) {\n cursor: move;\n font-size: 16px;\n color: #999;\n &:hover {\n color: #666;\n }\n }\n }\n .btn-center {\n padding: 20px;\n padding-bottom: 0;\n text-align: center;\n }\n</style>\n"],"names":["_createVNode","_createElementVNode","_withCtx","_normalizeClass"],"mappings":";;;;;;;AAmJI,MAAK,YAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAAC,IAAI;AAAA,EACb,OAAO;AAAA,IACH,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA,EAChB;AAAA,EACD,YAAY;AAAA,IACR;AAAA,EACH;AAAA,EACD,OAAO;AACH,WAAO;AAAA,MACH,YAAY,CAAE;AAAA,MACd,sBAAsB;AAAA,MACtB,gBAAgB,CAAE;AAAA,MAClB,4BAA4B;AAAA,IAC/B;AAAA,EACJ;AAAA,EACD,OAAO;AAAA,IACH,aAAa;AACT,WAAK,YAAY,aAAa,KAAK;AAAA,IACvC;AAAA,EACH;AAAA,EACD,SAAS;AAAA,IACL,qBAAqB;AACjB,WAAK,WAAW,OAAO,GAAG,GAAG;AAAA,QACzB,KAAK,WAAY;AAAA,QACjB,OAAO;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,UAAU;AAAA,QACV,YAAY;AAAA,QACZ,SAAS;AAAA,MACb,CAAC;AAAA,IACJ;AAAA,IACD,UAAU,MAAM,KAAK;AACjB,WAAK,iBAAiB;AACtB,WAAK,uBAAuB;AAC5B,W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oDAApD,KAAK,MAAA,0CAAA,CAAA,GAAA,CAAA;AAAA;;;;;;YAIpBH,YAUe,yBAAA;AAAA,cAVD,WAAU;AAAA,cAAU,OAAM;AAAA,cAAQ,OAAO;AAAA;cACxC,SAAOE,QACd,CAMW,EAPO,aAAM;AAAA,gBACxBF,YAMW,qBAAA;AAAA,kBALN,OAAKG,eAAA,CAAA,EAAA,yBAAA,CAAA,CAAgC,OAAO,QAAO,CAAA,CAAA;AAAA,kBACnD,SAAK,YAAE,SAAS,UAAA,WAAY,MAAM;AAAA,kBACnC,MAAK;AAAA;mCACR,MAED;AAAA,oCAFC,QAED;AAAA;;;;;;YAGRH,YAMe,yBAAA;AAAA,cAND,WAAU;AAAA,cAAS,OAAM;AAAA,cAAM,OAAO;AAAA;cACrC,SACPE,QAAA,CAEW,EAHO,QAAQ,MAAK,MAAA;AAAA,gBAC/BF,YAEW,qBAAA;AAAA,kBAFD,MAAK;AAAA,kBAAQ,SAAK,YAAE,KAAqB,sBAAC,KAAK;AAAA,kBAAG,MAAK;AAAA;mCAAQ,MAEzE;AAAA,oCAFyE,MAEzE;AAAA;;;;;;;;;QAKZC,mBAIM,OAJN,YAIM;AAAA,UAHFD,YAEW,qBAAA;AAAA,YAFD,MAAK;AAAA,YAAU,MAAK;AAAA,YAAW,SAAO,SAAkB;AAAA;6BAC9D,MAAkD;AAAA,8CAA/C,KAAK,MAAA,qCAAA,CAAA,GAAA,CAAA;AAAA;;;;;;;IAWpBA,YAIE,4BAAA;AAAA,MAHW,YAAA,MAAA,eAAe,MAAoB,oBAAA;AAAA,MAAnC,uBAAA,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAA,MAAA,eAAe,MAAoB,oBAAA,IAAA;AAAA,MAC5C,KAAI;AAAA,MACH,gBAAiB,GAAA,MAAA,eAAe,KAAK,IAAI,MAAoB,oBAAA;AAAA;;;;"}
1
+ {"version":3,"file":"button-list-editor.vue.js","sources":["../../../../../../src/components/form-designer/setting-panel/property-editor/button-list-editor.vue"],"sourcesContent":["<template>\n <a-form-item :label=\"i18nt('designer.setting.buttonList')\">\n <a-button @click=\"handleConfigBtn\">按钮配置</a-button>\n </a-form-item>\n <a-modal\n :title=\"i18nt('designer.setting.buttonsColumnEdit')\"\n v-model:visible=\"btnListConfigDialogVisible\"\n :show-close=\"true\"\n dialogClass=\"drag-dialog\"\n append-to-body\n :close-on-click-modal=\"false\"\n :close-on-press-escape=\"false\"\n :destroy-on-close=\"true\"\n width=\"1250px\"\n >\n <ActionButtonListDialog v-model:data=\"buttonList\" />\n <template #footer>\n <div class=\"dialog-footer\">\n <a-button size=\"default\" @click=\"handleCloseDialog\">\n {{ i18nt('designer.hint.closePreview') }}\n </a-button>\n </div>\n </template>\n </a-modal>\n <CodeModalEditor\n v-model=\"currentEditBtn[currentEditEventName]\"\n ref=\"CodeModalEditorRef\"\n :event-header=\"`${currentEditBtn.label}.${currentEditEventName}(){`\"\n />\n</template>\n\n<script>\n import i18n from '@/utils/i18n';\n import CodeModalEditor from '@/components/code-editor/code-modal-editor.vue';\n import { generateId } from '@/utils/util';\n import { cloneDeep } from 'lodash-es';\n import ActionButtonListDialog from '@/components/public/ActionButtonListDialog.vue';\n export default {\n name: 'button-list-editor',\n mixins: [i18n],\n props: {\n designer: Object,\n selectedWidget: Object,\n optionModel: Object\n },\n components: {\n ActionButtonListDialog,\n CodeModalEditor\n },\n data() {\n return {\n buttonList: [],\n currentEditEventName: '',\n currentEditBtn: {},\n btnListConfigDialogVisible: false\n };\n },\n watch: {\n buttonList() {\n this.optionModel.buttonList = this.buttonList;\n }\n },\n methods: {\n addOperationButton() {\n this.buttonList.splice(0, 0, {\n key: generateId(),\n label: 'new btn',\n type: 'primary',\n danger: false,\n icon: '',\n onHidden: '',\n onDisabled: '',\n onClick: ''\n });\n },\n editEvent(type, row) {\n this.currentEditBtn = row;\n this.currentEditEventName = type;\n this.$refs.CodeModalEditorRef.open(row[type]);\n },\n handleConfigBtn() {\n this.buttonList = cloneDeep(this.optionModel.buttonList);\n this.btnListConfigDialogVisible = true;\n },\n handleCloseDialog() {\n this.btnListConfigDialogVisible = false;\n }\n }\n };\n</script>\n\n<style lang=\"scss\" scoped>\n .radio-group-custom {\n :deep(.el-radio-button__inner),\n :deep(.ant-radio-button__inner) {\n padding-left: 12px;\n padding-right: 12px;\n }\n }\n .button-row {\n margin-bottom: 8px;\n border: 1px solid #e1e2e3;\n padding: 8px;\n border-radius: 4px;\n transition: all 0.3s;\n\n &:hover {\n background-color: #f5f5f5;\n border-color: #d9d9d9;\n }\n :deep(.ant-table) {\n margin: -8px;\n }\n :deep(.ant-table-cell) {\n padding: 8px !important;\n vertical-align: middle;\n }\n :deep(.ant-form-item) {\n margin-bottom: 0;\n }\n :deep(.drag-handler) {\n cursor: move;\n font-size: 16px;\n color: #999;\n &:hover {\n color: #666;\n }\n }\n }\n .btn-center {\n padding: 20px;\n padding-bottom: 0;\n text-align: center;\n }\n</style>\n"],"names":["_createVNode","_createElementVNode"],"mappings":";;;;;;;;AAqCI,MAAK,YAAU;AAAA,EACX,MAAM;AAAA,EACN,QAAQ,CAAC,IAAI;AAAA,EACb,OAAO;AAAA,IACH,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,aAAa;AAAA,EAChB;AAAA,EACD,YAAY;AAAA,IACR;AAAA,IACA;AAAA,EACH;AAAA,EACD,OAAO;AACH,WAAO;AAAA,MACH,YAAY,CAAE;AAAA,MACd,sBAAsB;AAAA,MACtB,gBAAgB,CAAE;AAAA,MAClB,4BAA4B;AAAA,IAC/B;AAAA,EACJ;AAAA,EACD,OAAO;AAAA,IACH,aAAa;AACT,WAAK,YAAY,aAAa,KAAK;AAAA,IACvC;AAAA,EACH;AAAA,EACD,SAAS;AAAA,IACL,qBAAqB;AACjB,WAAK,WAAW,OAAO,GAAG,GAAG;AAAA,QACzB,KAAK,WAAY;AAAA,QACjB,OAAO;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,MAAM;AAAA,QACN,UAAU;A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