@kp-ui/lowcode 1.0.41 → 1.0.42

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/package.json +28 -28
  3. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +1 -1
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +0 -1
  5. package/src/components/form-designer/form-widget/field-widget/{toolbar-widget.vue.js → button-list-widget.vue.js} +63 -16
  6. package/src/components/form-designer/form-widget/field-widget/index.js +1 -1
  7. package/src/components/form-designer/setting-panel/property-editor/button-list-editor.vue.js +247 -11
  8. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  9. package/src/components/form-designer/setting-panel/property-editor/flex-editor.vue.js +64 -0
  10. package/src/components/form-designer/setting-panel/property-editor/index.js +2 -1
  11. package/src/components/form-designer/setting-panel/propertyRegister.js +1 -0
  12. package/src/components/form-designer/widget-panel/advancedFieldsEnums.js +0 -2
  13. package/src/components/form-designer/widget-panel/{advanced/toolbar.js → basicFields/buttonList.js} +4 -4
  14. package/src/components/form-designer/widget-panel/basicFieldsEnums.js +2 -0
  15. package/src/components/form-render/container-item/data-table-item.vue.js +1 -2
  16. package/src/lang/en-US.js +1 -0
  17. package/src/lang/zh-CN.js +2 -0
  18. package/src/utils/i18n.js +1 -14
  19. package/styles/style.css +1 -1
  20. package/types/src/components/form-designer/setting-panel/index.d.ts +1 -0
  21. package/types/src/components/form-designer/widget-panel/advanced/index.d.ts +1 -1
  22. package/types/src/components/form-designer/widget-panel/advanced/index.d.ts.map +1 -1
  23. package/types/src/components/form-designer/widget-panel/advancedFieldsEnums.d.ts +0 -8
  24. package/types/src/components/form-designer/widget-panel/advancedFieldsEnums.d.ts.map +1 -1
  25. package/types/src/components/form-designer/widget-panel/{advanced/toolbar.d.ts → basicFields/buttonList.d.ts} +2 -2
  26. package/types/src/components/form-designer/widget-panel/basicFields/buttonList.d.ts.map +1 -0
  27. package/src/components/BtnListConfig/BtnListConfigDialog.vue.js +0 -80
  28. package/src/components/BtnListConfig/BtnListConfigDialog.vue2.js +0 -4
  29. package/types/src/components/form-designer/widget-panel/advanced/toolbar.d.ts.map +0 -1
@@ -1,13 +1,13 @@
1
1
  if (typeof window !== "undefined") {
2
2
  let loadSvg = function() {
3
3
  var body = document.body;
4
- var svgDom = document.getElementById("__svg__icons__dom__1747363768276__");
4
+ var svgDom = document.getElementById("__svg__icons__dom__1747383489070__");
5
5
  if (!svgDom) {
6
6
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
7
7
  svgDom.style.position = "absolute";
8
8
  svgDom.style.width = "0";
9
9
  svgDom.style.height = "0";
10
- svgDom.id = "__svg__icons__dom__1747363768276__";
10
+ svgDom.id = "__svg__icons__dom__1747383489070__";
11
11
  svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
12
12
  svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
13
13
  }
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
- "name": "@kp-ui/lowcode",
3
- "version": "1.0.41",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "main": "index.js",
8
- "module": "index.js",
9
- "types": "main.d.ts",
10
- "dependencies": {
11
- "@element-plus/icons-vue": "^0.2.4",
12
- "@kp-ui/tool": "1.0.24",
13
- "@surely-vue/table": "^5.0.3",
14
- "animate.css": "^4.1.1",
15
- "ant-design-vue": "3.2.20",
16
- "axios": "^1.3.5",
17
- "bpmn-js": "13.2.0",
18
- "clipboard": "^2.0.8",
19
- "core-js": "^3.6.5",
20
- "dayjs": "^1.11.10",
21
- "file-saver": "^2.0.5",
22
- "json-bigint": "^1.0.0",
23
- "lodash-es": "^4.17.21",
24
- "mitt": "^3.0.0",
25
- "query-string": "^9.1.1",
26
- "sortablejs": "1.14.0",
27
- "vue": "3.3.11",
28
- "vue3-quill": "^0.2.6"
29
- }
2
+ "name": "@kp-ui/lowcode",
3
+ "version": "1.0.42",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "main": "index.js",
8
+ "module": "index.js",
9
+ "types": "main.d.ts",
10
+ "dependencies": {
11
+ "@element-plus/icons-vue": "^0.2.4",
12
+ "@kp-ui/tool": "1.0.24",
13
+ "@surely-vue/table": "^5.0.3",
14
+ "animate.css": "^4.1.1",
15
+ "ant-design-vue": "3.2.20",
16
+ "axios": "^1.3.5",
17
+ "bpmn-js": "13.2.0",
18
+ "clipboard": "^2.0.8",
19
+ "core-js": "^3.6.5",
20
+ "dayjs": "^1.11.10",
21
+ "file-saver": "^2.0.5",
22
+ "json-bigint": "^1.0.0",
23
+ "lodash-es": "^4.17.21",
24
+ "mitt": "^3.0.0",
25
+ "query-string": "^9.1.1",
26
+ "sortablejs": "1.14.0",
27
+ "vue": "3.3.11",
28
+ "vue3-quill": "^0.2.6"
29
+ }
30
30
  }
@@ -49,7 +49,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
49
49
  _: 1
50
50
  }, 8, ["designer", "widget", "parent-widget", "parent-list", "index-of-parent-list", "style"]);
51
51
  }
52
- const dataTableWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2ac4c1d9"]]);
52
+ const dataTableWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3c2ed517"]]);
53
53
  export {
54
54
  dataTableWidget as default
55
55
  };
@@ -11,7 +11,6 @@ const _sfc_main = {
11
11
  mixins: [i18n, containerMixin, refMixinDesign, emitter, useDataTableMixin],
12
12
  inject: ["refList"],
13
13
  components: {
14
- STable,
15
14
  ContainerWrapper,
16
15
  ...comps
17
16
  },
@@ -2,11 +2,11 @@ import StaticContentWrapper from "./static-content-wrapper.vue.js";
2
2
  import emitter from "../../../../utils/emitter.js";
3
3
  import i18n from "../../../../utils/i18n.js";
4
4
  import fieldMixin from "./fieldMixin.js";
5
- import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
6
- /* empty css */
5
+ import { resolveComponent, createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, normalizeClass, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
6
+ /* empty css */
7
7
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
8
8
  const _sfc_main = {
9
- name: "toolbar-widget",
9
+ name: "button-list-widget",
10
10
  componentName: "FieldWidget",
11
11
  //必须固定为FieldWidget,用于接收父级组件的broadcast事件
12
12
  mixins: [emitter, fieldMixin, i18n],
@@ -42,7 +42,14 @@ const _sfc_main = {
42
42
  components: {
43
43
  StaticContentWrapper
44
44
  },
45
- computed: {},
45
+ computed: {
46
+ customClass() {
47
+ return this.field.options.customClass || [];
48
+ },
49
+ buttonList() {
50
+ return this.field.options.buttonList.filter((item) => !this.handleHidden(item));
51
+ }
52
+ },
46
53
  beforeCreate() {
47
54
  },
48
55
  created() {
@@ -53,12 +60,40 @@ const _sfc_main = {
53
60
  mounted() {
54
61
  this.handleOnMounted();
55
62
  },
63
+ methods: {
64
+ hanldeClick(item) {
65
+ if (this.designState) {
66
+ return;
67
+ }
68
+ if (item.onClick) {
69
+ const customFn = new Function(item.onClick);
70
+ return customFn.call(this);
71
+ }
72
+ },
73
+ handleDisabled(item) {
74
+ const { onDisabled } = item;
75
+ if (onDisabled) {
76
+ const disabledFn = new Function(onDisabled);
77
+ return disabledFn.call(this);
78
+ }
79
+ return false;
80
+ },
81
+ handleHidden(item) {
82
+ const { onHidden } = item;
83
+ if (onHidden) {
84
+ const disabledFn = new Function(onHidden);
85
+ return disabledFn.call(this);
86
+ }
87
+ return false;
88
+ }
89
+ },
56
90
  beforeUnmount() {
57
91
  this.unregisterFromRefList();
58
92
  }
59
93
  };
60
94
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
61
95
  const _component_a_button = resolveComponent("a-button");
96
+ const _component_a_space = resolveComponent("a-space");
62
97
  const _component_static_content_wrapper = resolveComponent("static-content-wrapper");
63
98
  return openBlock(), createBlock(_component_static_content_wrapper, {
64
99
  designer: $props.designer,
@@ -73,22 +108,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
73
108
  }, {
74
109
  default: withCtx(() => [
75
110
  createElementVNode("div", {
76
- class: normalizeClass([!!$props.designState ? "slot-wrapper-design" : "slot-wrapper-render"])
111
+ ref: "fieldEditor",
112
+ class: normalizeClass(["flex", ...$options.customClass]),
113
+ style: normalizeStyle(`--flex: ${$props.field.options.flex}`)
77
114
  }, [
78
- (openBlock(true), createElementBlock(Fragment, null, renderList($props.field.options.buttonList, (item) => {
79
- return openBlock(), createBlock(_component_a_button, null, {
80
- default: withCtx(() => [
81
- createTextVNode(toDisplayString(item), 1)
82
- ]),
83
- _: 2
84
- }, 1024);
85
- }), 256))
86
- ], 2)
115
+ createVNode(_component_a_space, { x: 8 }, {
116
+ default: withCtx(() => [
117
+ (openBlock(true), createElementBlock(Fragment, null, renderList($options.buttonList, (item) => {
118
+ return openBlock(), createBlock(_component_a_button, {
119
+ key: item.key,
120
+ type: item.type,
121
+ disabled: $options.handleDisabled(item),
122
+ onClick: ($event) => $options.hanldeClick(item)
123
+ }, {
124
+ default: withCtx(() => [
125
+ createTextVNode(toDisplayString(item.label), 1)
126
+ ]),
127
+ _: 2
128
+ }, 1032, ["type", "disabled", "onClick"]);
129
+ }), 128))
130
+ ]),
131
+ _: 1
132
+ })
133
+ ], 6)
87
134
  ]),
88
135
  _: 1
89
136
  }, 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"]);
90
137
  }
91
- const toolbarWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-da754402"]]);
138
+ const buttonListWidget = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3d32de5f"]]);
92
139
  export {
93
- toolbarWidget as default
140
+ buttonListWidget as default
94
141
  };
@@ -1,7 +1,7 @@
1
1
  import { defineAsyncComponent } from "vue";
2
2
  import { getFileName } from "../../../../utils/getFileName.js";
3
3
  const comps = {};
4
- const modules = /* @__PURE__ */ Object.assign({ "./attachment-render-widget.vue": () => import("./attachment-render-widget.vue.js"), "./bpmn-editor-widget.vue": () => import("./bpmn-editor-widget.vue.js"), "./button-widget.vue": () => import("./button-widget.vue.js"), "./cascader-widget.vue": () => import("./cascader-widget.vue.js"), "./checkbox-widget.vue": () => import("./checkbox-widget.vue.js"), "./code-editor-widget.vue": () => import("./code-editor-widget.vue.js"), "./color-widget.vue": () => import("./color-widget.vue.js"), "./date-range-widget.vue": () => import("./date-range-widget.vue.js"), "./date-widget.vue": () => import("./date-widget.vue.js"), "./divider-widget.vue": () => import("./divider-widget.vue.js"), "./diy-compontent-widget.vue": () => import("./diy-compontent-widget.vue.js"), "./dropdown-widget.vue": () => import("./dropdown-widget.vue.js"), "./file-upload-widget.vue": () => import("./file-upload-widget.vue.js"), "./form-item-wrapper.vue": () => import("./form-item-wrapper.vue.js"), "./html-text-widget.vue": () => import("./html-text-widget.vue.js"), "./input-widget.vue": () => import("./input-widget.vue.js"), "./number-widget.vue": () => import("./number-widget.vue.js"), "./picture-upload-widget.vue": () => import("./picture-upload-widget.vue.js"), "./radio-widget.vue": () => import("./radio-widget.vue.js"), "./rate-widget.vue": () => import("./rate-widget.vue.js"), "./rich-editor-widget.vue": () => import("./rich-editor-widget.vue.js"), "./select-widget.vue": () => import("./select-widget.vue.js"), "./slider-widget.vue": () => import("./slider-widget.vue.js"), "./slot-widget.vue": () => import("./slot-widget.vue.js"), "./static-content-wrapper.vue": () => import("./static-content-wrapper.vue.js"), "./static-text-widget.vue": () => import("./static-text-widget.vue.js"), "./switch-widget.vue": () => import("./switch-widget.vue.js"), "./textarea-widget.vue": () => import("./textarea-widget.vue.js"), "./time-range-widget.vue": () => import("./time-range-widget.vue.js"), "./time-widget.vue": () => import("./time-widget.vue.js"), "./toolbar-widget.vue": () => import("./toolbar-widget.vue.js"), "./treeSelect-widget.vue": () => import("./treeSelect-widget.vue.js") });
4
+ const modules = /* @__PURE__ */ Object.assign({ "./attachment-render-widget.vue": () => import("./attachment-render-widget.vue.js"), "./bpmn-editor-widget.vue": () => import("./bpmn-editor-widget.vue.js"), "./button-list-widget.vue": () => import("./button-list-widget.vue.js"), "./button-widget.vue": () => import("./button-widget.vue.js"), "./cascader-widget.vue": () => import("./cascader-widget.vue.js"), "./checkbox-widget.vue": () => import("./checkbox-widget.vue.js"), "./code-editor-widget.vue": () => import("./code-editor-widget.vue.js"), "./color-widget.vue": () => import("./color-widget.vue.js"), "./date-range-widget.vue": () => import("./date-range-widget.vue.js"), "./date-widget.vue": () => import("./date-widget.vue.js"), "./divider-widget.vue": () => import("./divider-widget.vue.js"), "./diy-compontent-widget.vue": () => import("./diy-compontent-widget.vue.js"), "./dropdown-widget.vue": () => import("./dropdown-widget.vue.js"), "./file-upload-widget.vue": () => import("./file-upload-widget.vue.js"), "./form-item-wrapper.vue": () => import("./form-item-wrapper.vue.js"), "./html-text-widget.vue": () => import("./html-text-widget.vue.js"), "./input-widget.vue": () => import("./input-widget.vue.js"), "./number-widget.vue": () => import("./number-widget.vue.js"), "./picture-upload-widget.vue": () => import("./picture-upload-widget.vue.js"), "./radio-widget.vue": () => import("./radio-widget.vue.js"), "./rate-widget.vue": () => import("./rate-widget.vue.js"), "./rich-editor-widget.vue": () => import("./rich-editor-widget.vue.js"), "./select-widget.vue": () => import("./select-widget.vue.js"), "./slider-widget.vue": () => import("./slider-widget.vue.js"), "./slot-widget.vue": () => import("./slot-widget.vue.js"), "./static-content-wrapper.vue": () => import("./static-content-wrapper.vue.js"), "./static-text-widget.vue": () => import("./static-text-widget.vue.js"), "./switch-widget.vue": () => import("./switch-widget.vue.js"), "./textarea-widget.vue": () => import("./textarea-widget.vue.js"), "./time-range-widget.vue": () => import("./time-range-widget.vue.js"), "./time-widget.vue": () => import("./time-widget.vue.js"), "./treeSelect-widget.vue": () => import("./treeSelect-widget.vue.js") });
5
5
  for (const path in modules) {
6
6
  const cname = getFileName(path);
7
7
  comps[cname] = defineAsyncComponent(modules[path]);
@@ -1,37 +1,74 @@
1
1
  import i18n from "../../../../utils/i18n.js";
2
- import _sfc_main$1 from "../../../BtnListConfig/BtnListConfigDialog.vue.js";
3
- import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode } from "vue";
2
+ import CodeModalEditor from "../../../code-editor/code-modal-editor.vue.js";
3
+ import { generateId } from "../../../../utils/util.js";
4
+ import { cloneDeep } from "lodash-es";
5
+ import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, withCtx, createTextVNode, createElementVNode, normalizeClass, toDisplayString } from "vue";
4
6
  /* empty css */
5
7
  import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
6
8
  const _sfc_main = {
7
9
  name: "button-list-editor",
8
10
  mixins: [i18n],
9
- components: { BtnListConfigDialog: _sfc_main$1 },
10
11
  props: {
11
12
  designer: Object,
12
13
  selectedWidget: Object,
13
14
  optionModel: Object
14
15
  },
16
+ components: {
17
+ CodeModalEditor
18
+ },
15
19
  data() {
16
20
  return {
21
+ buttonList: [],
22
+ currentEditEventName: "",
23
+ currentEditBtn: {},
17
24
  btnListConfigDialogVisible: false
18
25
  };
19
26
  },
20
- computed: {
21
- noLabelSetting() {
22
- return this.selectedWidget.type === "static-text" || this.selectedWidget.type === "html-text";
27
+ watch: {
28
+ buttonList() {
29
+ this.optionModel.buttonList = this.buttonList;
23
30
  }
24
31
  },
25
32
  methods: {
33
+ onButtonNameChange() {
34
+ console.log(1221);
35
+ },
36
+ addOperationButton() {
37
+ this.buttonList.splice(0, 0, {
38
+ key: generateId(),
39
+ label: "new btn",
40
+ type: "primary",
41
+ onHidden: "",
42
+ onDisabled: "",
43
+ onClick: ""
44
+ });
45
+ },
46
+ editEvent(type, row) {
47
+ this.currentEditBtn = row;
48
+ this.currentEditEventName = type;
49
+ this.$refs.CodeModalEditorRef.open(row[type]);
50
+ },
26
51
  handleConfigBtn() {
52
+ this.buttonList = cloneDeep(this.optionModel.buttonList);
27
53
  this.btnListConfigDialogVisible = true;
54
+ },
55
+ handleCloseDialog() {
56
+ this.btnListConfigDialogVisible = false;
28
57
  }
29
58
  }
30
59
  };
60
+ const _hoisted_1 = { class: "btn-center" };
61
+ const _hoisted_2 = { class: "dialog-footer" };
31
62
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
63
  const _component_a_button = resolveComponent("a-button");
33
64
  const _component_a_form_item = resolveComponent("a-form-item");
34
- const _component_BtnListConfigDialog = resolveComponent("BtnListConfigDialog");
65
+ const _component_a_input = resolveComponent("a-input");
66
+ const _component_STableColumn = resolveComponent("STableColumn");
67
+ const _component_a_select_option = resolveComponent("a-select-option");
68
+ const _component_a_select = resolveComponent("a-select");
69
+ const _component_STable = resolveComponent("STable");
70
+ const _component_a_modal = resolveComponent("a-modal");
71
+ const _component_CodeModalEditor = resolveComponent("CodeModalEditor");
35
72
  return openBlock(), createElementBlock(Fragment, null, [
36
73
  createVNode(_component_a_form_item, {
37
74
  label: _ctx.i18nt("designer.setting.buttonList")
@@ -46,13 +83,212 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
46
83
  ]),
47
84
  _: 1
48
85
  }, 8, ["label"]),
49
- createVNode(_component_BtnListConfigDialog, {
86
+ createVNode(_component_a_modal, {
87
+ title: _ctx.i18nt("designer.setting.buttonsColumnEdit"),
50
88
  visible: $data.btnListConfigDialogVisible,
51
- "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => $data.btnListConfigDialogVisible = $event)
52
- }, null, 8, ["visible"])
89
+ "onUpdate:visible": _cache[0] || (_cache[0] = ($event) => $data.btnListConfigDialogVisible = $event),
90
+ "show-close": true,
91
+ dialogClass: "drag-dialog",
92
+ "append-to-body": "",
93
+ "close-on-click-modal": false,
94
+ "close-on-press-escape": false,
95
+ "destroy-on-close": true,
96
+ width: "1250px"
97
+ }, {
98
+ footer: withCtx(() => [
99
+ createElementVNode("div", _hoisted_2, [
100
+ createVNode(_component_a_button, {
101
+ size: "default",
102
+ onClick: $options.handleCloseDialog
103
+ }, {
104
+ default: withCtx(() => [
105
+ createTextVNode(toDisplayString(_ctx.i18nt("designer.hint.closePreview")), 1)
106
+ ]),
107
+ _: 1
108
+ }, 8, ["onClick"])
109
+ ])
110
+ ]),
111
+ 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: "onHidden",
191
+ title: _ctx.i18nt("designer.setting.operationButtonHidden"),
192
+ width: 100
193
+ }, {
194
+ default: withCtx(({ record }) => [
195
+ createVNode(_component_a_button, {
196
+ class: normalizeClass([{ "button-text-highlight": !!record.onHidden }]),
197
+ onClick: ($event) => $options.editEvent("onHidden", record),
198
+ size: "small"
199
+ }, {
200
+ default: withCtx(() => [
201
+ createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.operationButtonHidden")), 1)
202
+ ]),
203
+ _: 2
204
+ }, 1032, ["class", "onClick"])
205
+ ]),
206
+ _: 1
207
+ }, 8, ["title"]),
208
+ createVNode(_component_STableColumn, {
209
+ dataIndex: "disabled",
210
+ title: _ctx.i18nt("designer.setting.operationButtonDisabled"),
211
+ width: 100
212
+ }, {
213
+ default: withCtx(({ record }) => [
214
+ createVNode(_component_a_button, {
215
+ class: normalizeClass([{ "button-text-highlight": !!record.onDisabled }]),
216
+ onClick: ($event) => $options.editEvent("onDisabled", record),
217
+ size: "small"
218
+ }, {
219
+ default: withCtx(() => [
220
+ createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.operationButtonDisabled")), 1)
221
+ ]),
222
+ _: 2
223
+ }, 1032, ["class", "onClick"])
224
+ ]),
225
+ _: 1
226
+ }, 8, ["title"]),
227
+ createVNode(_component_STableColumn, {
228
+ dataIndex: "onClick",
229
+ title: "点击事件",
230
+ width: 100
231
+ }, {
232
+ default: withCtx(({ record }) => [
233
+ createVNode(_component_a_button, {
234
+ class: normalizeClass([{ "button-text-highlight": !!record.onClick }]),
235
+ onClick: ($event) => $options.editEvent("onClick", record),
236
+ size: "small"
237
+ }, {
238
+ default: withCtx(() => [
239
+ createTextVNode(" 点击事件 ")
240
+ ]),
241
+ _: 2
242
+ }, 1032, ["class", "onClick"])
243
+ ]),
244
+ _: 1
245
+ }),
246
+ createVNode(_component_STableColumn, {
247
+ dataIndex: "action",
248
+ title: "操作",
249
+ width: 80
250
+ }, {
251
+ default: withCtx(({ record, index }) => [
252
+ createVNode(_component_a_button, {
253
+ type: "link",
254
+ onClick: ($event) => _ctx.deleteOperationButton(index),
255
+ size: "small"
256
+ }, {
257
+ default: withCtx(() => [
258
+ createTextVNode(" 删除 ")
259
+ ]),
260
+ _: 2
261
+ }, 1032, ["onClick"])
262
+ ]),
263
+ _: 1
264
+ })
265
+ ]),
266
+ _: 1
267
+ }, 8, ["data-source"]),
268
+ createElementVNode("div", _hoisted_1, [
269
+ createVNode(_component_a_button, {
270
+ type: "primary",
271
+ size: "default",
272
+ onClick: $options.addOperationButton
273
+ }, {
274
+ default: withCtx(() => [
275
+ createTextVNode(toDisplayString(_ctx.i18nt("designer.setting.addOperationButton")), 1)
276
+ ]),
277
+ _: 1
278
+ }, 8, ["onClick"])
279
+ ])
280
+ ]),
281
+ _: 1
282
+ }, 8, ["title", "visible"]),
283
+ createVNode(_component_CodeModalEditor, {
284
+ modelValue: $data.currentEditBtn[$data.currentEditEventName],
285
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $data.currentEditBtn[$data.currentEditEventName] = $event),
286
+ ref: "CodeModalEditorRef",
287
+ "event-header": `${$data.currentEditBtn.label}.${$data.currentEditEventName}(){`
288
+ }, null, 8, ["modelValue", "event-header"])
53
289
  ], 64);
54
290
  }
55
- const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-c439e9dc"]]);
291
+ const buttonListEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-452d68d7"]]);
56
292
  export {
57
293
  buttonListEditor as default
58
294
  };
@@ -139,7 +139,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
139
139
  "close-on-click-modal": false,
140
140
  "close-on-press-escape": false,
141
141
  "destroy-on-close": true,
142
- width: "1200px"
142
+ width: "1280px"
143
143
  }, {
144
144
  footer: withCtx(() => [
145
145
  createElementVNode("div", _hoisted_2, [
@@ -256,7 +256,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
256
256
  }, 8, ["title"]),
257
257
  createVNode(_component_a_table_column, {
258
258
  title: `可拖动调整宽度`,
259
- width: 150,
259
+ width: 130,
260
260
  dataIndex: "resizable"
261
261
  }, {
262
262
  default: withCtx((scope) => [
@@ -401,7 +401,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
401
401
  }, null, 8, ["modelValue", "onSave", "title", "event-header"])
402
402
  ], 64);
403
403
  }
404
- const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-ab8e7e10"]]);
404
+ const dataTableTableColumnsEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-a8000fb7"]]);
405
405
  export {
406
406
  dataTableTableColumnsEditor as default
407
407
  };
@@ -0,0 +1,64 @@
1
+ import i18n from "../../../../utils/i18n.js";
2
+ import { resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
3
+ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const _sfc_main = {
5
+ name: "flex-editor",
6
+ mixins: [i18n],
7
+ props: {
8
+ designer: Object,
9
+ selectedWidget: Object,
10
+ optionModel: Object
11
+ },
12
+ data() {
13
+ return {
14
+ alignOptions: [
15
+ {
16
+ label: this.i18nt("designer.setting.leftAlign"),
17
+ value: "flex-start"
18
+ },
19
+ {
20
+ label: this.i18nt("designer.setting.centerAlign"),
21
+ value: "center"
22
+ },
23
+ {
24
+ label: this.i18nt("designer.setting.rightAlign"),
25
+ value: "flex-end"
26
+ }
27
+ ]
28
+ };
29
+ }
30
+ };
31
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
32
+ const _component_a_radio_button = resolveComponent("a-radio-button");
33
+ const _component_a_radio_group = resolveComponent("a-radio-group");
34
+ const _component_a_form_item = resolveComponent("a-form-item");
35
+ return openBlock(), createBlock(_component_a_form_item, {
36
+ label: _ctx.i18nt("designer.setting.widgetFlex")
37
+ }, {
38
+ default: withCtx(() => [
39
+ createVNode(_component_a_radio_group, {
40
+ value: $props.optionModel.flex,
41
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => $props.optionModel.flex = $event)
42
+ }, {
43
+ default: withCtx(() => [
44
+ (openBlock(true), createElementBlock(Fragment, null, renderList($data.alignOptions, (item) => {
45
+ return openBlock(), createBlock(_component_a_radio_button, {
46
+ value: item.value
47
+ }, {
48
+ default: withCtx(() => [
49
+ createTextVNode(toDisplayString(item.label), 1)
50
+ ]),
51
+ _: 2
52
+ }, 1032, ["value"]);
53
+ }), 256))
54
+ ]),
55
+ _: 1
56
+ }, 8, ["value"])
57
+ ]),
58
+ _: 1
59
+ }, 8, ["label"]);
60
+ }
61
+ const flexEditor = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
62
+ export {
63
+ flexEditor as default
64
+ };