super-page-designer 2.0.67 → 2.0.73

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 (39) hide show
  1. package/dist/es/components/design/utils/form-design-util.js +6 -0
  2. package/dist/es/components/design/utils/page-table-util.js +17 -14
  3. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue.js +3 -3
  4. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue2.js +1 -702
  5. package/dist/es/components/design/views/assemblys/common/common-variable-bind.vue3.js +702 -1
  6. package/dist/es/components/design/views/assemblys/data/component/configuration-value.vue.js +1 -1
  7. package/dist/es/components/design/views/assemblys/data/component/data-origin.vue.js +1 -1
  8. package/dist/es/components/design/views/assemblys/data/component/data-origin.vue2.js +12 -0
  9. package/dist/es/components/design/views/assemblys/data/component/formatting.vue.js +1 -1
  10. package/dist/es/components/design/views/assemblys/data/component/querySetting.vue.js +1 -1
  11. package/dist/es/components/design/views/assemblys/data/component/table-children-column.vue.js +11 -3
  12. package/dist/es/components/design/views/assemblys/data/table/table-attr-base.vue.js +1 -1
  13. package/dist/es/components/design/views/assemblys/data/table/table-design.vue.js +1 -1
  14. package/dist/es/components/design/views/assemblys/data/table/table-design.vue2.js +10 -1
  15. package/dist/es/components/design/views/assemblys/data/table/tablecolumn-attr-base.vue.js +4 -5
  16. package/dist/es/components/design/views/assemblys/form/common/data-format.vue.js +1 -1
  17. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue.js +1 -1
  18. package/dist/es/components/design/views/assemblys/form/common/data-origin.vue2.js +9 -1
  19. package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue.js +2 -2
  20. package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue2.js +1 -217
  21. package/dist/es/components/design/views/assemblys/form/common/icon-set-dialog.vue3.js +217 -1
  22. package/dist/es/components/design/views/assemblys/form/common/suffixmodule.vue.js +27 -8
  23. package/dist/es/components/design/views/assemblys/form/date-picker/datepicker-design.vue2.js +4 -4
  24. package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-autoset.vue.js +0 -1
  25. package/dist/es/components/design/views/assemblys/form/dept-tree/depttree-design.vue2.js +1 -0
  26. package/dist/es/components/design/views/assemblys/form/file-upload/fileupload-design.vue2.js +1 -0
  27. package/dist/es/components/design/views/assemblys/form/input-number/input-number-design.vue2.js +2 -2
  28. package/dist/es/components/design/views/assemblys/form/input-text/inputtext-design.vue2.js +2 -2
  29. package/dist/es/components/design/views/assemblys/form/rich-text/richtext-design.vue2.js +1 -1
  30. package/dist/es/components/design/views/assemblys/form/select/select-design.vue.js +1 -0
  31. package/dist/es/components/design/views/assemblys/form/select/select-design.vue2.js +2 -2
  32. package/dist/es/components/design/views/assemblys/form/select/select-design.vue3.js +1 -0
  33. package/dist/es/components/design/views/assemblys/form/switch/switch-design.vue.js +1 -0
  34. package/dist/es/components/design/views/assemblys/form/switch/switch-design.vue2.js +2 -2
  35. package/dist/es/components/design/views/assemblys/form/switch/switch-design.vue3.js +1 -0
  36. package/dist/es/components/design/views/assemblys/form/textarea/textarea-design.vue2.js +2 -2
  37. package/dist/es/stores/table-store.js +3 -1
  38. package/dist/es/style.css +110 -102
  39. package/package.json +4 -4
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, createCommentVNode, createElementBlock, Fragment, renderList } from "vue";
2
2
  import "@element-plus/icons-vue";
3
- import "../../form/common/icon-set-dialog.vue3.js";
3
+ import "../../form/common/icon-set-dialog.vue2.js";
4
4
  import http from "agilebuilder-ui/src/utils/request";
5
5
  const _hoisted_1 = { class: "dialog-footer" };
6
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./data-origin.vue2.js";
2
2
  import "./data-origin.vue3.js";
3
3
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const DataOrigin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4978a9d6"]]);
4
+ const DataOrigin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0f08e3d1"]]);
5
5
  export {
6
6
  DataOrigin as default
7
7
  };
@@ -152,6 +152,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
152
152
  });
153
153
  }
154
154
  }
155
+ initQueryField();
156
+ function initQueryField() {
157
+ const systemCode = props.pageDesign.systemCode;
158
+ const systemVersion = props.pageDesign.version;
159
+ const myTableInfo = {
160
+ name: props.configure.props.dataOrigin.tableName
161
+ };
162
+ queryTableFields(systemCode, systemVersion, myTableInfo.name).then((tableFields) => {
163
+ modelFields.value = tableFields;
164
+ tableFieldStore.addFieldList(tableFields);
165
+ });
166
+ }
155
167
  function showColumnDialog() {
156
168
  const systemCode = props.configure.tableSysCode ? props.configure.tableSysCode : props.pageDesign.systemCode;
157
169
  const systemVersion = props.configure.tableSysVersion ? props.configure.tableSysVersion : props.pageDesign.version;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, createCommentVNode, unref } from "vue";
2
2
  import _sfc_main$1 from "../../form/common/suffixmodule.vue.js";
3
3
  import { Search } from "@element-plus/icons-vue";
4
- import "../../form/common/icon-set-dialog.vue3.js";
4
+ import "../../form/common/icon-set-dialog.vue2.js";
5
5
  import _sfc_main$2 from "./formatting-icon-label.vue.js";
6
6
  const _hoisted_1 = { class: "dialog-footer" };
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode } from "vue";
2
2
  import "@element-plus/icons-vue";
3
- import "../../form/common/icon-set-dialog.vue3.js";
3
+ import "../../form/common/icon-set-dialog.vue2.js";
4
4
  const _hoisted_1 = { class: "dialog-footer" };
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "querySetting",
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, resolveComponent, openBlock, createBlock, createSlots, withCtx, createElementBlock, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, unref, normalizeClass, toDisplayString, reactive } from "vue";
1
+ import { defineComponent, ref, resolveComponent, openBlock, createBlock, createSlots, withCtx, createElementBlock, Fragment, renderList, createCommentVNode, normalizeStyle, unref, normalizeClass, toDisplayString, reactive } from "vue";
2
2
  import { columnTittleStyle, columnCustomTittleClass } from "../../../../utils/form-design-util.js";
3
3
  import { VueDraggable } from "vue-draggable-plus";
4
4
  import eventBus from "../../../../utils/eventBus.js";
@@ -172,13 +172,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
172
172
  !__props.listColumns.children || __props.listColumns.children.length == 0 ? {
173
173
  name: "header",
174
174
  fn: withCtx((scope) => [
175
- createElementVNode("div", {
175
+ __props.listColumns.props && __props.listColumns.props.base && __props.listColumns.props.base.prop === "$selection" ? (openBlock(), createBlock(_component_el_checkbox, {
176
+ key: 0,
177
+ style: normalizeStyle(unref(columnTittleStyle)(__props.listColumns)),
178
+ class: normalizeClass(unref(columnCustomTittleClass)(__props.listColumns)),
179
+ onClick: ($event) => headerClick(__props.listColumns, scope.column),
180
+ onMouseout: ($event) => cellMouseLeave({}, scope.column),
181
+ onMouseover: ($event) => cellMouseEnter({}, scope.column)
182
+ }, null, 8, ["style", "class", "onClick", "onMouseout", "onMouseover"])) : (openBlock(), createElementBlock("div", {
183
+ key: 1,
176
184
  style: normalizeStyle(unref(columnTittleStyle)(__props.listColumns)),
177
185
  class: normalizeClass(unref(columnCustomTittleClass)(__props.listColumns)),
178
186
  onClick: ($event) => headerClick(__props.listColumns, scope.column),
179
187
  onMouseout: ($event) => cellMouseLeave({}, scope.column),
180
188
  onMouseover: ($event) => cellMouseEnter({}, scope.column)
181
- }, toDisplayString(getTableHeaderName(__props.listColumns)), 47, _hoisted_1)
189
+ }, toDisplayString(getTableHeaderName(__props.listColumns)), 47, _hoisted_1))
182
190
  ]),
183
191
  key: "0"
184
192
  } : void 0,
@@ -8,7 +8,7 @@ import "agilebuilder-ui/src/utils/request";
8
8
  import "uuid";
9
9
  import "../../../../../../stores/page-store.js";
10
10
  import "../../../../../../stores/table-store.js";
11
- import "../../common/common-variable-bind.vue3.js";
11
+ import "../../common/common-variable-bind.vue2.js";
12
12
  import "../../../../utils/eventBus.js";
13
13
  import _sfc_main$1 from "../../common/common-function-code.vue.js";
14
14
  const _hoisted_1 = { style: { "padding": "8px 0px 0px 0px" } };
@@ -2,7 +2,7 @@ import _sfc_main from "./table-design.vue2.js";
2
2
  import "./table-design.vue3.js";
3
3
  import "./table-design.vue4.js";
4
4
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- const tableDesign = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-20ea5d48"]]);
5
+ const tableDesign = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fdf0b268"]]);
6
6
  export {
7
7
  tableDesign as default
8
8
  };
@@ -181,11 +181,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181
181
  });
182
182
  }
183
183
  function operationalMenuFun(type) {
184
+ var _a;
184
185
  closeMenuVisible();
185
186
  if (type === "createCombinedHeader") {
186
- const fieldInfo = { alias: "字段名称" };
187
+ const fieldInfo = {
188
+ alias: "字段名称",
189
+ displayOrder: columnData.value.props.base.displayOrder + 1
190
+ };
187
191
  let newObj = getTableColumnConf(fieldInfo);
188
192
  props.configure.items.splice(columnDataIndex.value + 1, 0, newObj);
193
+ (_a = props.configure.items) == null ? void 0 : _a.forEach((item, index) => {
194
+ if (!item.props.base.displayOrder || item.props.base.displayOrder != index) {
195
+ item.props.base.displayOrder = index;
196
+ }
197
+ });
189
198
  if (props.configure.props.base.isEnableGroupHeader) {
190
199
  addColumnToGroupHeaders(
191
200
  props.configure.items[columnDataIndex.value + 1],
@@ -11,7 +11,7 @@ import { getUuidv4 } from "../../../../utils/common-util.js";
11
11
  import eventBus from "../../../../utils/eventBus.js";
12
12
  import _sfc_main$1 from "../component/variate-select.vue.js";
13
13
  import _sfc_main$5 from "../../form/common/suffixmodule.vue.js";
14
- import "../../form/common/icon-set-dialog.vue3.js";
14
+ import "../../form/common/icon-set-dialog.vue2.js";
15
15
  import _sfc_main$2 from "../../common/common-function-code.vue.js";
16
16
  import _sfc_main$8 from "../../common/common-select-table.vue.js";
17
17
  import { queryTableFields, tableResetConfigIndo } from "../../../../utils/page-table-util.js";
@@ -607,8 +607,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
607
607
  ]),
608
608
  _: 1
609
609
  }),
610
- __props.configure.props.editLine.editable ? (openBlock(), createBlock(_component_el_form_item, {
611
- key: 0,
610
+ createVNode(_component_el_form_item, {
612
611
  label: "默认值",
613
612
  class: "amb-design-attr-item"
614
613
  }, {
@@ -619,9 +618,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
619
618
  }, null, 8, ["modelValue"])
620
619
  ]),
621
620
  _: 1
622
- })) : createCommentVNode("", true),
621
+ }),
623
622
  __props.configure.props.editLine.editable ? (openBlock(), createBlock(_component_el_form_item, {
624
- key: 1,
623
+ key: 0,
625
624
  label: "组件类型",
626
625
  class: "amb-design-attr-item"
627
626
  }, {
@@ -7,7 +7,7 @@ import "@element-plus/icons-vue";
7
7
  import http from "agilebuilder-ui/src/utils/request";
8
8
  import { usePageContextStore } from "../../../../../../stores/page-store.js";
9
9
  import "../../../../../../stores/table-store.js";
10
- import "../../common/common-variable-bind.vue3.js";
10
+ import "../../common/common-variable-bind.vue2.js";
11
11
  import _sfc_main$4 from "./data-origin-service-in.vue.js";
12
12
  import { queryTableFields } from "../../../../utils/page-table-util.js";
13
13
  import { getCustomFuncs } from "../../../../utils/page-event-util.js";
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./data-origin.vue2.js";
2
2
  import "./data-origin.vue3.js";
3
3
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const DataOrigin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0ac2eace"]]);
4
+ const DataOrigin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f1c21952"]]);
5
5
  export {
6
6
  DataOrigin as default
7
7
  };
@@ -59,7 +59,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
59
59
  atPresentSortIndex.value = index;
60
60
  }
61
61
  if (!props.configure.props.dataOrigin.optionValueSetType || props.configure.props.dataOrigin.optionValueSetType.length === 0) {
62
- props.configure.props.dataOrigin.optionValueSetType = "static";
62
+ props.configure.props.dataOrigin.optionValueSetType = "none";
63
63
  }
64
64
  const queryOptionGroupLoading = ref(false);
65
65
  const optionGroups = ref([]);
@@ -205,6 +205,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
205
205
  onChange: optionValueTypeChange
206
206
  }, {
207
207
  default: withCtx(() => [
208
+ withDirectives(createVNode(_component_el_radio, { value: "none" }, {
209
+ default: withCtx(() => [
210
+ createTextVNode("无")
211
+ ]),
212
+ _: 1
213
+ }, 512), [
214
+ [vShow, !__props.isDynamicColumn]
215
+ ]),
208
216
  withDirectives(createVNode(_component_el_radio, { value: "static" }, {
209
217
  default: withCtx(() => [
210
218
  createTextVNode("静态数据")
@@ -1,5 +1,5 @@
1
- import _sfc_main from "./icon-set-dialog.vue2.js";
2
- import "./icon-set-dialog.vue3.js";
1
+ import _sfc_main from "./icon-set-dialog.vue3.js";
2
+ import "./icon-set-dialog.vue2.js";
3
3
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
4
  const IconSetDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4aa5ce08"]]);
5
5
  export {
@@ -1,217 +1 @@
1
- import { defineComponent, ref, reactive, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, unref, createElementVNode, createTextVNode, renderList, normalizeClass, createBlock, resolveDynamicComponent, toDisplayString, pushScopeId, popScopeId } from "vue";
2
- import { Search, Plus, ChatLineRound, Unlock, MuteNotification, Operation, WarningFilled } from "@element-plus/icons-vue";
3
- const _withScopeId = (n) => (pushScopeId("data-v-4aa5ce08"), n = n(), popScopeId(), n);
4
- const _hoisted_1 = { class: "icon-set-center-body" };
5
- const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "新建", -1));
6
- const _hoisted_3 = ["onClick"];
7
- const _hoisted_4 = { class: "dialog-footer" };
8
- const _hoisted_5 = { class: "dialog-footer" };
9
- const _sfc_main = /* @__PURE__ */ defineComponent({
10
- __name: "icon-set-dialog",
11
- props: {
12
- modelValue: {
13
- type: String,
14
- default: ""
15
- }
16
- },
17
- emits: ["update:modelValue"],
18
- setup(__props, { emit: __emit }) {
19
- const props = __props;
20
- const emit = __emit;
21
- const iconValue = ref(props.modelValue);
22
- const dialogVisible = ref(false);
23
- const selectIconName = ref("");
24
- const addIconDialogVisible = ref(false);
25
- const form = reactive({});
26
- const iconList = [
27
- { name: "ChatLineRound", icon: ChatLineRound },
28
- { name: "Unlock", icon: Unlock },
29
- { name: "MuteNotification", icon: MuteNotification },
30
- { name: "Operation", icon: Operation },
31
- { name: "WarningFilled", icon: WarningFilled }
32
- ];
33
- watch(() => props.modelValue, (newVal) => {
34
- iconValue.value = newVal;
35
- });
36
- function selectIcon(name) {
37
- selectIconName.value = name;
38
- }
39
- function openDialog() {
40
- dialogVisible.value = true;
41
- }
42
- function addIcon() {
43
- console.log("%c描述-105701", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", selectIconName.value);
44
- emit("update:modelValue", selectIconName.value);
45
- dialogVisible.value = false;
46
- }
47
- return (_ctx, _cache) => {
48
- const _component_el_button = resolveComponent("el-button");
49
- const _component_el_input = resolveComponent("el-input");
50
- const _component_el_icon = resolveComponent("el-icon");
51
- const _component_el_dialog = resolveComponent("el-dialog");
52
- const _component_el_form_item = resolveComponent("el-form-item");
53
- const _component_el_option = resolveComponent("el-option");
54
- const _component_el_select = resolveComponent("el-select");
55
- const _component_el_form = resolveComponent("el-form");
56
- return openBlock(), createElementBlock(Fragment, null, [
57
- createVNode(_component_el_input, {
58
- modelValue: iconValue.value,
59
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => iconValue.value = $event),
60
- onClick: openDialog
61
- }, {
62
- append: withCtx(() => [
63
- createVNode(_component_el_button, {
64
- icon: unref(Search),
65
- onClick: openDialog
66
- }, null, 8, ["icon"])
67
- ]),
68
- _: 1
69
- }, 8, ["modelValue"]),
70
- createVNode(_component_el_dialog, {
71
- modelValue: dialogVisible.value,
72
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
73
- title: "选择icon",
74
- width: "40%"
75
- }, {
76
- footer: withCtx(() => [
77
- createElementVNode("div", _hoisted_4, [
78
- createVNode(_component_el_button, {
79
- onClick: _cache[2] || (_cache[2] = ($event) => dialogVisible.value = false)
80
- }, {
81
- default: withCtx(() => [
82
- createTextVNode("取消")
83
- ]),
84
- _: 1
85
- }),
86
- createVNode(_component_el_button, {
87
- type: "primary",
88
- onClick: addIcon
89
- }, {
90
- default: withCtx(() => [
91
- createTextVNode(" 确定 ")
92
- ]),
93
- _: 1
94
- })
95
- ])
96
- ]),
97
- default: withCtx(() => [
98
- createElementVNode("div", _hoisted_1, [
99
- createElementVNode("div", {
100
- class: "icon-set-center-creation",
101
- onClick: _cache[1] || (_cache[1] = ($event) => addIconDialogVisible.value = true)
102
- }, [
103
- createVNode(_component_el_icon, null, {
104
- default: withCtx(() => [
105
- createVNode(unref(Plus))
106
- ]),
107
- _: 1
108
- }),
109
- _hoisted_2
110
- ]),
111
- (openBlock(), createElementBlock(Fragment, null, renderList(iconList, (item, index) => {
112
- return createElementVNode("div", {
113
- key: index,
114
- class: normalizeClass(selectIconName.value === item.name ? "icon-set-center-item icon-set-center-item-border" : "icon-set-center-item"),
115
- onClick: ($event) => selectIcon(item.name)
116
- }, [
117
- (openBlock(), createBlock(resolveDynamicComponent(item.icon), { style: { "width": "40px", "height": "40px" } })),
118
- createElementVNode("span", null, toDisplayString(item.name), 1)
119
- ], 10, _hoisted_3);
120
- }), 64))
121
- ])
122
- ]),
123
- _: 1
124
- }, 8, ["modelValue"]),
125
- createVNode(_component_el_dialog, {
126
- modelValue: addIconDialogVisible.value,
127
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => addIconDialogVisible.value = $event),
128
- title: "创建icon",
129
- width: "30%"
130
- }, {
131
- footer: withCtx(() => [
132
- createElementVNode("div", _hoisted_5, [
133
- createVNode(_component_el_button, {
134
- onClick: _cache[7] || (_cache[7] = ($event) => addIconDialogVisible.value = false)
135
- }, {
136
- default: withCtx(() => [
137
- createTextVNode("取消")
138
- ]),
139
- _: 1
140
- }),
141
- createVNode(_component_el_button, {
142
- type: "primary",
143
- onClick: _cache[8] || (_cache[8] = ($event) => addIconDialogVisible.value = false)
144
- }, {
145
- default: withCtx(() => [
146
- createTextVNode(" 确定 ")
147
- ]),
148
- _: 1
149
- })
150
- ])
151
- ]),
152
- default: withCtx(() => [
153
- createVNode(_component_el_form, {
154
- model: form,
155
- "label-width": "80px"
156
- }, {
157
- default: withCtx(() => [
158
- createVNode(_component_el_form_item, {
159
- label: "类名",
160
- prop: "name",
161
- rules: [{ required: true, message: "请输入类名", trigger: "blur" }]
162
- }, {
163
- default: withCtx(() => [
164
- createVNode(_component_el_input, {
165
- size: "default",
166
- modelValue: form.name,
167
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => form.name = $event)
168
- }, null, 8, ["modelValue"])
169
- ]),
170
- _: 1
171
- }),
172
- createVNode(_component_el_form_item, { label: "标准按钮" }, {
173
- default: withCtx(() => [
174
- createVNode(_component_el_select, {
175
- size: "default",
176
- modelValue: form.region,
177
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form.region = $event),
178
- placeholder: "please select your zone"
179
- }, {
180
- default: withCtx(() => [
181
- createVNode(_component_el_option, {
182
- label: "Zone one",
183
- value: "shanghai"
184
- }),
185
- createVNode(_component_el_option, {
186
- label: "Zone two",
187
- value: "beijing"
188
- })
189
- ]),
190
- _: 1
191
- }, 8, ["modelValue"])
192
- ]),
193
- _: 1
194
- }),
195
- createVNode(_component_el_form_item, { label: "备注" }, {
196
- default: withCtx(() => [
197
- createVNode(_component_el_input, {
198
- size: "default",
199
- modelValue: form.name,
200
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form.name = $event)
201
- }, null, 8, ["modelValue"])
202
- ]),
203
- _: 1
204
- })
205
- ]),
206
- _: 1
207
- }, 8, ["model"])
208
- ]),
209
- _: 1
210
- }, 8, ["modelValue"])
211
- ], 64);
212
- };
213
- }
214
- });
215
- export {
216
- _sfc_main as default
217
- };
1
+
@@ -1 +1,217 @@
1
-
1
+ import { defineComponent, ref, reactive, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, unref, createElementVNode, createTextVNode, renderList, normalizeClass, createBlock, resolveDynamicComponent, toDisplayString, pushScopeId, popScopeId } from "vue";
2
+ import { Search, Plus, ChatLineRound, Unlock, MuteNotification, Operation, WarningFilled } from "@element-plus/icons-vue";
3
+ const _withScopeId = (n) => (pushScopeId("data-v-4aa5ce08"), n = n(), popScopeId(), n);
4
+ const _hoisted_1 = { class: "icon-set-center-body" };
5
+ const _hoisted_2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "新建", -1));
6
+ const _hoisted_3 = ["onClick"];
7
+ const _hoisted_4 = { class: "dialog-footer" };
8
+ const _hoisted_5 = { class: "dialog-footer" };
9
+ const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ __name: "icon-set-dialog",
11
+ props: {
12
+ modelValue: {
13
+ type: String,
14
+ default: ""
15
+ }
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(__props, { emit: __emit }) {
19
+ const props = __props;
20
+ const emit = __emit;
21
+ const iconValue = ref(props.modelValue);
22
+ const dialogVisible = ref(false);
23
+ const selectIconName = ref("");
24
+ const addIconDialogVisible = ref(false);
25
+ const form = reactive({});
26
+ const iconList = [
27
+ { name: "ChatLineRound", icon: ChatLineRound },
28
+ { name: "Unlock", icon: Unlock },
29
+ { name: "MuteNotification", icon: MuteNotification },
30
+ { name: "Operation", icon: Operation },
31
+ { name: "WarningFilled", icon: WarningFilled }
32
+ ];
33
+ watch(() => props.modelValue, (newVal) => {
34
+ iconValue.value = newVal;
35
+ });
36
+ function selectIcon(name) {
37
+ selectIconName.value = name;
38
+ }
39
+ function openDialog() {
40
+ dialogVisible.value = true;
41
+ }
42
+ function addIcon() {
43
+ console.log("%c描述-105701", "color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px", selectIconName.value);
44
+ emit("update:modelValue", selectIconName.value);
45
+ dialogVisible.value = false;
46
+ }
47
+ return (_ctx, _cache) => {
48
+ const _component_el_button = resolveComponent("el-button");
49
+ const _component_el_input = resolveComponent("el-input");
50
+ const _component_el_icon = resolveComponent("el-icon");
51
+ const _component_el_dialog = resolveComponent("el-dialog");
52
+ const _component_el_form_item = resolveComponent("el-form-item");
53
+ const _component_el_option = resolveComponent("el-option");
54
+ const _component_el_select = resolveComponent("el-select");
55
+ const _component_el_form = resolveComponent("el-form");
56
+ return openBlock(), createElementBlock(Fragment, null, [
57
+ createVNode(_component_el_input, {
58
+ modelValue: iconValue.value,
59
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => iconValue.value = $event),
60
+ onClick: openDialog
61
+ }, {
62
+ append: withCtx(() => [
63
+ createVNode(_component_el_button, {
64
+ icon: unref(Search),
65
+ onClick: openDialog
66
+ }, null, 8, ["icon"])
67
+ ]),
68
+ _: 1
69
+ }, 8, ["modelValue"]),
70
+ createVNode(_component_el_dialog, {
71
+ modelValue: dialogVisible.value,
72
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
73
+ title: "选择icon",
74
+ width: "40%"
75
+ }, {
76
+ footer: withCtx(() => [
77
+ createElementVNode("div", _hoisted_4, [
78
+ createVNode(_component_el_button, {
79
+ onClick: _cache[2] || (_cache[2] = ($event) => dialogVisible.value = false)
80
+ }, {
81
+ default: withCtx(() => [
82
+ createTextVNode("取消")
83
+ ]),
84
+ _: 1
85
+ }),
86
+ createVNode(_component_el_button, {
87
+ type: "primary",
88
+ onClick: addIcon
89
+ }, {
90
+ default: withCtx(() => [
91
+ createTextVNode(" 确定 ")
92
+ ]),
93
+ _: 1
94
+ })
95
+ ])
96
+ ]),
97
+ default: withCtx(() => [
98
+ createElementVNode("div", _hoisted_1, [
99
+ createElementVNode("div", {
100
+ class: "icon-set-center-creation",
101
+ onClick: _cache[1] || (_cache[1] = ($event) => addIconDialogVisible.value = true)
102
+ }, [
103
+ createVNode(_component_el_icon, null, {
104
+ default: withCtx(() => [
105
+ createVNode(unref(Plus))
106
+ ]),
107
+ _: 1
108
+ }),
109
+ _hoisted_2
110
+ ]),
111
+ (openBlock(), createElementBlock(Fragment, null, renderList(iconList, (item, index) => {
112
+ return createElementVNode("div", {
113
+ key: index,
114
+ class: normalizeClass(selectIconName.value === item.name ? "icon-set-center-item icon-set-center-item-border" : "icon-set-center-item"),
115
+ onClick: ($event) => selectIcon(item.name)
116
+ }, [
117
+ (openBlock(), createBlock(resolveDynamicComponent(item.icon), { style: { "width": "40px", "height": "40px" } })),
118
+ createElementVNode("span", null, toDisplayString(item.name), 1)
119
+ ], 10, _hoisted_3);
120
+ }), 64))
121
+ ])
122
+ ]),
123
+ _: 1
124
+ }, 8, ["modelValue"]),
125
+ createVNode(_component_el_dialog, {
126
+ modelValue: addIconDialogVisible.value,
127
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => addIconDialogVisible.value = $event),
128
+ title: "创建icon",
129
+ width: "30%"
130
+ }, {
131
+ footer: withCtx(() => [
132
+ createElementVNode("div", _hoisted_5, [
133
+ createVNode(_component_el_button, {
134
+ onClick: _cache[7] || (_cache[7] = ($event) => addIconDialogVisible.value = false)
135
+ }, {
136
+ default: withCtx(() => [
137
+ createTextVNode("取消")
138
+ ]),
139
+ _: 1
140
+ }),
141
+ createVNode(_component_el_button, {
142
+ type: "primary",
143
+ onClick: _cache[8] || (_cache[8] = ($event) => addIconDialogVisible.value = false)
144
+ }, {
145
+ default: withCtx(() => [
146
+ createTextVNode(" 确定 ")
147
+ ]),
148
+ _: 1
149
+ })
150
+ ])
151
+ ]),
152
+ default: withCtx(() => [
153
+ createVNode(_component_el_form, {
154
+ model: form,
155
+ "label-width": "80px"
156
+ }, {
157
+ default: withCtx(() => [
158
+ createVNode(_component_el_form_item, {
159
+ label: "类名",
160
+ prop: "name",
161
+ rules: [{ required: true, message: "请输入类名", trigger: "blur" }]
162
+ }, {
163
+ default: withCtx(() => [
164
+ createVNode(_component_el_input, {
165
+ size: "default",
166
+ modelValue: form.name,
167
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => form.name = $event)
168
+ }, null, 8, ["modelValue"])
169
+ ]),
170
+ _: 1
171
+ }),
172
+ createVNode(_component_el_form_item, { label: "标准按钮" }, {
173
+ default: withCtx(() => [
174
+ createVNode(_component_el_select, {
175
+ size: "default",
176
+ modelValue: form.region,
177
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form.region = $event),
178
+ placeholder: "please select your zone"
179
+ }, {
180
+ default: withCtx(() => [
181
+ createVNode(_component_el_option, {
182
+ label: "Zone one",
183
+ value: "shanghai"
184
+ }),
185
+ createVNode(_component_el_option, {
186
+ label: "Zone two",
187
+ value: "beijing"
188
+ })
189
+ ]),
190
+ _: 1
191
+ }, 8, ["modelValue"])
192
+ ]),
193
+ _: 1
194
+ }),
195
+ createVNode(_component_el_form_item, { label: "备注" }, {
196
+ default: withCtx(() => [
197
+ createVNode(_component_el_input, {
198
+ size: "default",
199
+ modelValue: form.name,
200
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form.name = $event)
201
+ }, null, 8, ["modelValue"])
202
+ ]),
203
+ _: 1
204
+ })
205
+ ]),
206
+ _: 1
207
+ }, 8, ["model"])
208
+ ]),
209
+ _: 1
210
+ }, 8, ["modelValue"])
211
+ ], 64);
212
+ };
213
+ }
214
+ });
215
+ export {
216
+ _sfc_main as default
217
+ };