hy-dispatch-ui-v3 0.2.35 → 0.2.37

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 (32) hide show
  1. package/dist/tailwind.css +45 -12
  2. package/es/components/hyButton/button.vue.mjs +23 -57
  3. package/es/components/hyButton/style/button.scss +1 -1
  4. package/es/components/hyDialog/dialog.vue.mjs +20 -13
  5. package/es/components/hyForm/cpns/arrayItem.vue.mjs +2 -1
  6. package/es/components/hyForm/cpns/formItem.vue.mjs +37 -16
  7. package/es/components/hyForm/js/index.mjs +3 -2
  8. package/es/components/hySearch/cpns/searchItem.vue.mjs +2 -1
  9. package/es/components/hyTable/cpns/columnSelect.vue.mjs +23 -16
  10. package/es/components/hyTableActionButton/index.mjs +6 -0
  11. package/es/components/hyTableActionButton/style/tableActionButton.scss +5 -0
  12. package/es/components/hyTableActionButton/tableActionButton.vue.mjs +316 -0
  13. package/es/components/index.mjs +1 -0
  14. package/es/index.mjs +1 -0
  15. package/es/style/element/hy-element.scss +17 -0
  16. package/es/version.mjs +1 -1
  17. package/lib/components/hyButton/button.vue.js +21 -55
  18. package/lib/components/hyButton/style/button.scss +1 -1
  19. package/lib/components/hyDialog/dialog.vue.js +19 -12
  20. package/lib/components/hyForm/cpns/arrayItem.vue.js +2 -1
  21. package/lib/components/hyForm/cpns/formItem.vue.js +36 -15
  22. package/lib/components/hyForm/js/index.js +3 -2
  23. package/lib/components/hySearch/cpns/searchItem.vue.js +2 -1
  24. package/lib/components/hyTable/cpns/columnSelect.vue.js +23 -16
  25. package/lib/components/hyTableActionButton/index.js +11 -0
  26. package/lib/components/hyTableActionButton/style/tableActionButton.scss +5 -0
  27. package/lib/components/hyTableActionButton/tableActionButton.vue.js +320 -0
  28. package/lib/components/index.js +8 -6
  29. package/lib/index.js +8 -6
  30. package/lib/style/element/hy-element.scss +17 -0
  31. package/lib/version.js +1 -1
  32. package/package.json +17 -6
@@ -0,0 +1,316 @@
1
+ import { defineComponent, ref, computed, watch, resolveComponent, openBlock, createElementBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString, createElementVNode, Fragment, renderList, createCommentVNode, normalizeStyle } from 'vue';
2
+ import { ElPopover, ElIcon } from 'element-plus';
3
+ import { Warning } from '@element-plus/icons-vue';
4
+ import { useLocale } from '../../hooks/useLocale.mjs';
5
+ import { HyTooltip } from '../hyTooltip/index.mjs';
6
+ import { HyButton } from '../hyButton/index.mjs';
7
+ import { HyIcon } from '../hyIcon/index.mjs';
8
+ import { isPermission, isBoolean } from '../../utils/is.mjs';
9
+
10
+ import "./style/tableActionButton.scss";
11
+
12
+ const __default__ = defineComponent({
13
+ name: "HyTableActionButton"
14
+ });
15
+ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
16
+ props: {
17
+ type: {
18
+ type: String,
19
+ default: "default"
20
+ // default 默认 primary 亮色 success 添加 danger 删除
21
+ },
22
+ size: {
23
+ type: String,
24
+ default: () => {
25
+ return "small";
26
+ }
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: false
31
+ },
32
+ // 默认按钮样式
33
+ svgName: {
34
+ type: String,
35
+ default: () => {
36
+ return "addV2";
37
+ }
38
+ },
39
+ // 默认按钮文案
40
+ label: {
41
+ type: String,
42
+ default: () => {
43
+ return "\u6DFB\u52A0";
44
+ }
45
+ },
46
+ // 类型
47
+ buttonClass: {
48
+ type: String,
49
+ default: () => {
50
+ return "button_addTo";
51
+ }
52
+ },
53
+ // 操作数据
54
+ operateList: {
55
+ type: Array,
56
+ default: () => {
57
+ return [];
58
+ }
59
+ }
60
+ },
61
+ emits: ["change"],
62
+ setup(__props, { expose: __expose, emit: __emit }) {
63
+ const props = __props;
64
+ const emits = __emit;
65
+ const { t } = useLocale();
66
+ const visible = ref(false);
67
+ const dataList = ref([]);
68
+ const selectedData = ref(null);
69
+ const buttonTxt = computed(() => {
70
+ if (selectedData.value) {
71
+ const label = selectedData.value.label || "";
72
+ const labelList = label.split(" ");
73
+ return label.replace(`${labelList[0]} `, labelList[0]);
74
+ }
75
+ return props.label;
76
+ });
77
+ function buttonChange(item) {
78
+ emits("change", item.value);
79
+ }
80
+ function getDataList(dataList2 = []) {
81
+ const arr = [];
82
+ dataList2.forEach((item) => {
83
+ const children = item.children || [];
84
+ let list = [];
85
+ children.forEach((operate) => {
86
+ if (operateShowHandler(operate)) {
87
+ list.push(operate);
88
+ }
89
+ });
90
+ if (list.length) {
91
+ arr.push({
92
+ ...item,
93
+ children: list
94
+ });
95
+ }
96
+ });
97
+ return arr;
98
+ }
99
+ function setSelectedData() {
100
+ dataList.value = getDataList(props.operateList);
101
+ const length = dataList.value.length;
102
+ if (length === 1) {
103
+ const item = dataList.value[0];
104
+ if (item.children && item.children.length === 1) {
105
+ selectedData.value = item.children[0];
106
+ return;
107
+ }
108
+ }
109
+ selectedData.value = null;
110
+ }
111
+ function operateShowHandler(operate) {
112
+ if (operate.permission && !isPermission(operate.permission)) {
113
+ return false;
114
+ }
115
+ const show = unref(operate.show);
116
+ if (isBoolean(show)) return show;
117
+ return true;
118
+ }
119
+ watch(() => props.operateList, setSelectedData, { deep: true, immediate: true });
120
+ __expose({});
121
+ return (_ctx, _cache) => {
122
+ const _component_ArrowDown = resolveComponent("ArrowDown");
123
+ return dataList.value.length ? (openBlock(), createElementBlock("div", {
124
+ key: 0,
125
+ class: "hy-action-button"
126
+ }, [
127
+ selectedData.value ? (openBlock(), createBlock(unref(HyTooltip), {
128
+ key: 0,
129
+ "open-delay": 500,
130
+ disabled: !selectedData.value.altText,
131
+ content: selectedData.value.altText,
132
+ "is-always": true,
133
+ placement: "bottom"
134
+ }, {
135
+ default: withCtx(() => [
136
+ createVNode(unref(HyButton), {
137
+ type: __props.type,
138
+ size: __props.size,
139
+ disabled: __props.disabled,
140
+ class: normalizeClass(selectedData.value.buttonClass || __props.buttonClass),
141
+ svgName: selectedData.value.svgName || __props.svgName,
142
+ onClick: ($event) => buttonChange(selectedData.value)
143
+ }, {
144
+ default: withCtx(() => [
145
+ createTextVNode(
146
+ toDisplayString(buttonTxt.value),
147
+ 1
148
+ /* TEXT */
149
+ )
150
+ ]),
151
+ _: 1
152
+ /* STABLE */
153
+ }, 8, ["type", "size", "disabled", "class", "svgName", "onClick"])
154
+ ]),
155
+ _: 1
156
+ /* STABLE */
157
+ }, 8, ["disabled", "content"])) : (openBlock(), createBlock(unref(ElPopover), {
158
+ key: 1,
159
+ visible: visible.value,
160
+ "onUpdate:visible": ($event) => visible.value = $event,
161
+ placement: "bottom",
162
+ "open-delay": 200,
163
+ disabled: __props.disabled,
164
+ trigger: "click"
165
+ }, {
166
+ reference: withCtx(() => [
167
+ createVNode(unref(HyButton), {
168
+ type: __props.type,
169
+ size: __props.size,
170
+ disabled: __props.disabled,
171
+ class: normalizeClass(__props.buttonClass),
172
+ onClick: ($event) => buttonChange(selectedData.value)
173
+ }, {
174
+ content: withCtx(() => [
175
+ createElementVNode("div", { class: "h-full flex items-center justify-center pl-[14px]" }, [
176
+ createVNode(unref(HyIcon), { "svg-name": __props.svgName }, null, 8, ["svg-name"]),
177
+ createElementVNode(
178
+ "span",
179
+ { class: "ml-[6px]" },
180
+ toDisplayString(__props.label),
181
+ 1
182
+ /* TEXT */
183
+ ),
184
+ createElementVNode(
185
+ "div",
186
+ {
187
+ class: normalizeClass(["w-[1px] h-full ml-[7px]", {
188
+ "bg-auxiliary": __props.type === "default",
189
+ "bg-success": __props.type === "success",
190
+ "bg-theme": __props.type === "primary",
191
+ "bg-danger-2": __props.type === "danger"
192
+ }])
193
+ },
194
+ null,
195
+ 2
196
+ /* CLASS */
197
+ ),
198
+ createElementVNode("div", { class: "w-[30px] h-full flex items-center justify-center" }, [
199
+ createVNode(unref(ElIcon), {
200
+ color: "rgb(var(--hy-main))",
201
+ style: normalizeStyle([{ "transition": "0.3s all linear" }, {
202
+ transform: visible.value ? "rotateX(180deg)" : "rotateX(0deg)"
203
+ }])
204
+ }, {
205
+ default: withCtx(() => [
206
+ createVNode(_component_ArrowDown)
207
+ ]),
208
+ _: 1
209
+ /* STABLE */
210
+ }, 8, ["style"])
211
+ ])
212
+ ])
213
+ ]),
214
+ _: 1
215
+ /* STABLE */
216
+ }, 8, ["type", "size", "disabled", "class", "onClick"])
217
+ ]),
218
+ default: withCtx(() => [
219
+ createElementVNode("ul", { class: "max-h-[500px] overflow-x-auto box-border" }, [
220
+ (openBlock(true), createElementBlock(
221
+ Fragment,
222
+ null,
223
+ renderList(dataList.value, (item, index) => {
224
+ return openBlock(), createElementBlock(
225
+ "li",
226
+ {
227
+ key: index,
228
+ class: normalizeClass([{
229
+ "border-b border-border": index !== dataList.value.length - 1
230
+ }, "box-border text-xs text-auxiliary"])
231
+ },
232
+ [
233
+ item.title ? (openBlock(), createElementBlock(
234
+ "div",
235
+ {
236
+ key: 0,
237
+ class: "box-border pt-2 px-2 over_one_line mb-1"
238
+ },
239
+ toDisplayString(item.title),
240
+ 1
241
+ /* TEXT */
242
+ )) : createCommentVNode("v-if", true),
243
+ createElementVNode("ul", { class: "text-sm text-main" }, [
244
+ (openBlock(true), createElementBlock(
245
+ Fragment,
246
+ null,
247
+ renderList(item.children, (row) => {
248
+ return openBlock(), createElementBlock("li", {
249
+ key: row.value,
250
+ class: "h-[32px] flex items-center justify-between px-2 box-border clickBox hover:text-theme hover:bg-backgroundv3",
251
+ onClick: ($event) => buttonChange(row)
252
+ }, [
253
+ createVNode(unref(HyTooltip), {
254
+ "open-delay": 500,
255
+ content: row.label,
256
+ "is-always": true,
257
+ placement: "bottom"
258
+ }, {
259
+ default: withCtx(() => [
260
+ createElementVNode(
261
+ "div",
262
+ {
263
+ class: normalizeClass([row.textClass, "max-w-[200px] over_one_line"])
264
+ },
265
+ toDisplayString(row.label),
266
+ 3
267
+ /* TEXT, CLASS */
268
+ )
269
+ ]),
270
+ _: 2
271
+ /* DYNAMIC */
272
+ }, 1032, ["content"]),
273
+ row.altText ? (openBlock(), createBlock(unref(HyTooltip), {
274
+ key: 0,
275
+ "open-delay": 500,
276
+ content: row.altText,
277
+ "is-always": true,
278
+ placement: "top"
279
+ }, {
280
+ default: withCtx(() => [
281
+ createVNode(unref(ElIcon), { class: "flex-shrink-0 ml-2 text-auxiliary" }, {
282
+ default: withCtx(() => [
283
+ createVNode(unref(Warning))
284
+ ]),
285
+ _: 1
286
+ /* STABLE */
287
+ })
288
+ ]),
289
+ _: 1
290
+ /* STABLE */
291
+ }, 8, ["content"])) : createCommentVNode("v-if", true)
292
+ ], 8, ["onClick"]);
293
+ }),
294
+ 128
295
+ /* KEYED_FRAGMENT */
296
+ ))
297
+ ])
298
+ ],
299
+ 2
300
+ /* CLASS */
301
+ );
302
+ }),
303
+ 128
304
+ /* KEYED_FRAGMENT */
305
+ ))
306
+ ])
307
+ ]),
308
+ _: 1
309
+ /* STABLE */
310
+ }, 8, ["visible", "onUpdate:visible", "disabled"]))
311
+ ])) : createCommentVNode("v-if", true);
312
+ };
313
+ }
314
+ });
315
+
316
+ export { _sfc_main as default };
@@ -21,6 +21,7 @@ export { HyAudioPlayer } from './hyAudioPlayer/index.mjs';
21
21
  export { ElInput, HyInput } from './hyInput/index.mjs';
22
22
  export { ElTimePicker, HyTimePicker } from './hyTimePicker/index.mjs';
23
23
  export { HyBatchTableForm, HyTableForm } from './hyTableForm/index.mjs';
24
+ export { HyTableActionButton } from './hyTableActionButton/index.mjs';
24
25
  export { resetAppFormValue, useAppForm } from './hyForm/js/useAppForm.mjs';
25
26
  export { resetAppSearchValue, useAppSearch } from './hySearch/js/useAppSearch.mjs';
26
27
  export { useAppTable } from './hyTable/js/useAppTable.mjs';
package/es/index.mjs CHANGED
@@ -19,6 +19,7 @@ export { HyNoPermissionsMap } from './components/hyNoPermissionsMap/index.mjs';
19
19
  export { HyOrgCascader } from './components/hyOrgCascader/index.mjs';
20
20
  export { HySearch } from './components/hySearch/index.mjs';
21
21
  export { HyTable } from './components/hyTable/index.mjs';
22
+ export { HyTableActionButton } from './components/hyTableActionButton/index.mjs';
22
23
  export { HyTree } from './components/hyTree/index.mjs';
23
24
  export { HyUserAvatar } from './components/hyUserAvatar/index.mjs';
24
25
  export { HyVideoPlayer } from './components/hyVideoPlayer/index.mjs';
@@ -216,6 +216,16 @@
216
216
  white-space: nowrap;
217
217
  }
218
218
 
219
+ .hy-el-textarea__clear {
220
+ position: absolute;
221
+ right: 11px;
222
+ top: 15px;
223
+ transform: translateY(-50%);
224
+ color: var(--el-input-icon-color);
225
+ font-size: 14px;
226
+ cursor: pointer;
227
+ }
228
+
219
229
  // 日期选择器
220
230
  .hy-el-popper.hy-el-tooltip.hy-el-picker__popper {
221
231
  --hy-el-border-color-light: rgba(var(--hy-auxiliary), 1);
@@ -921,6 +931,12 @@
921
931
  position: relative;
922
932
  height: 38px;
923
933
  padding-left: 20px;
934
+
935
+ .hy-el-collapse-item__title {
936
+ overflow: hidden;
937
+ text-overflow: ellipsis;
938
+ white-space: nowrap;
939
+ }
924
940
  }
925
941
 
926
942
  .hy-el-collapse-item__wrap {
@@ -954,6 +970,7 @@
954
970
  td.is-selected {
955
971
  box-shadow: 0px 0 12px 0px rgba(var(--hy-theme), 1) inset;
956
972
  background: rgba(var(--hy-background-2), 1);
973
+
957
974
  .hy-el-calendar-day {
958
975
  border: 1px solid rgba(var(--hy-theme), 1);
959
976
  }
package/es/version.mjs CHANGED
@@ -1,3 +1,3 @@
1
- const version = "0.2.34";
1
+ const version = "0.2.36";
2
2
 
3
3
  export { version };
@@ -40,11 +40,6 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
40
40
  svgName: {
41
41
  type: String
42
42
  },
43
- expand: {
44
- // 展开,仅普通按钮支持
45
- type: Boolean,
46
- default: false
47
- },
48
43
  link: {
49
44
  // 链接按钮
50
45
  type: Boolean,
@@ -128,60 +123,31 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
128
123
  }, {
129
124
  default: vue.withCtx(() => [
130
125
  vue.renderSlot(_ctx.$slots, "content", {}, () => [
131
- vue.createElementVNode(
132
- "div",
133
- {
134
- class: vue.normalizeClass(["flex items-center text-main", {
135
- "px-3": !__props.expand,
136
- "pl-3 pr-1.5": __props.expand
137
- }])
138
- },
139
- [
140
- !__props.loading ? vue.renderSlot(_ctx.$slots, "svg", {}, () => [
141
- __props.svgName ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
142
- key: 0,
143
- "svg-name": __props.svgName,
144
- "class-name": "!w-3 !h-3 text-main mr-2"
145
- }, null, 8, ["svg-name"])) : vue.createCommentVNode("v-if", true)
146
- ], void 0, 0) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
147
- key: 1,
148
- color: "rgb(var(--hy-main))",
149
- class: "is-loading mr-2"
150
- }, {
151
- default: vue.withCtx(() => [
152
- vue.createVNode(vue.unref(iconsVue.Loading))
153
- ]),
154
- _: 1
155
- /* STABLE */
156
- })),
157
- vue.renderSlot(_ctx.$slots, "default")
158
- ],
159
- 2
160
- /* CLASS */
161
- )
126
+ vue.createElementVNode("div", { class: "flex items-center text-main px-3" }, [
127
+ !__props.loading ? vue.renderSlot(_ctx.$slots, "svg", {}, () => [
128
+ __props.svgName ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.HyIcon), {
129
+ key: 0,
130
+ "svg-name": __props.svgName,
131
+ "class-name": "!w-3 !h-3 text-main mr-2"
132
+ }, null, 8, ["svg-name"])) : vue.createCommentVNode("v-if", true)
133
+ ], void 0, 0) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
134
+ key: 1,
135
+ color: "rgb(var(--hy-main))",
136
+ class: "is-loading mr-2"
137
+ }, {
138
+ default: vue.withCtx(() => [
139
+ vue.createVNode(vue.unref(iconsVue.Loading))
140
+ ]),
141
+ _: 1
142
+ /* STABLE */
143
+ })),
144
+ vue.renderSlot(_ctx.$slots, "default")
145
+ ])
162
146
  ])
163
147
  ]),
164
148
  _: 3
165
149
  /* FORWARDED */
166
- }, 8, ["disabled", "content"]),
167
- __props.expand ? (vue.openBlock(), vue.createElementBlock(
168
- vue.Fragment,
169
- { key: 0 },
170
- [
171
- vue.createElementVNode("div", { class: "w-px h-full bg-success/50" }),
172
- vue.createElementVNode("div", { class: "w-[30px] flex items-center justify-center" }, [
173
- vue.createVNode(vue.unref(elementPlus.ElIcon), { color: "rgb(var(--hy-main))" }, {
174
- default: vue.withCtx(() => [
175
- vue.createVNode(vue.unref(iconsVue.ArrowDown))
176
- ]),
177
- _: 1
178
- /* STABLE */
179
- })
180
- ])
181
- ],
182
- 64
183
- /* STABLE_FRAGMENT */
184
- )) : vue.createCommentVNode("v-if", true)
150
+ }, 8, ["disabled", "content"])
185
151
  ]),
186
152
  vue.createCommentVNode(" \u6E10\u53D8\u906E\u7F69 e "),
187
153
  vue.createElementVNode("div", { class: "hy-button__mask w-full h-full absolute blur-[1px]" })
@@ -30,7 +30,7 @@
30
30
  }
31
31
 
32
32
  & + & {
33
- margin-left: 16px;
33
+ margin-left: 12px;
34
34
  }
35
35
 
36
36
  &.hy-button_default {
@@ -135,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
135
135
  onEnd?.();
136
136
  }, 750);
137
137
  }
138
- function showToWorkspace(initDragLevelIndex) {
138
+ function setDragLevelIndex(initDragLevelIndex) {
139
139
  dragLevelIndex.value = initDragLevelIndex;
140
140
  if (minimized.value) runAnim();
141
141
  minimized.value = false;
@@ -152,8 +152,18 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
152
152
  function dialogMousedown(e) {
153
153
  emits("onDialogMousedown", e);
154
154
  }
155
+ const modalClass = vue.computed(() => {
156
+ const classes = [];
157
+ if (animating.value || minimized.value) {
158
+ classes.push("hy-dialog-app-shrink");
159
+ }
160
+ if (minimized.value) {
161
+ classes.push("hy-dialog-is-minimized");
162
+ }
163
+ return classes.join(" ");
164
+ });
155
165
  __expose({
156
- showToWorkspace,
166
+ setDragLevelIndex,
157
167
  hideToWorkspace
158
168
  });
159
169
  return (_ctx, _cache) => {
@@ -162,14 +172,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
162
172
  null,
163
173
  [
164
174
  vue.createCommentVNode(" @mousedown.stop"),
165
- vue.createCommentVNode(' :z-index="zIndex || dragLevelIndex"'),
166
- vue.createCommentVNode(" draggable"),
167
175
  vue.createCommentVNode(` :align-center="!['right', 'fullscreen'].includes(props.dialogType)"`),
168
176
  vue.createCommentVNode(' body-class="h-0 flex-1"'),
169
177
  vue.createCommentVNode(' :class="dialogClass"'),
170
- vue.createCommentVNode(' :overflow="false"'),
171
- vue.createCommentVNode(' :modal="false"'),
172
178
  vue.createVNode(vue.unref(elementPlus.ElDialog), vue.mergeProps({
179
+ "z-index": dragLevelIndex.value,
180
+ draggable: props.showShrink,
181
+ modal: !props.showShrink,
182
+ overflow: !props.showShrink,
183
+ "modal-penetrable": "",
173
184
  ref_key: "dialogTestRef",
174
185
  ref: dialogTestRef,
175
186
  onMousedown: dialogMousedown,
@@ -177,11 +188,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
177
188
  "close-on-click-modal": false,
178
189
  "close-on-press-escape": false,
179
190
  "show-close": false,
180
- "modal-penetrable": "",
181
- "modal-class": {
182
- "hy-dialog-app-shrink": animating.value || minimized.value,
183
- "hy-dialog-is-minimized": minimized.value
184
- },
191
+ "modal-class": modalClass.value,
185
192
  modelValue: visible.value,
186
193
  "onUpdate:modelValue": ($event) => visible.value = $event,
187
194
  width: props.width,
@@ -287,7 +294,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
287
294
  ]),
288
295
  _: 3
289
296
  /* FORWARDED */
290
- }, 16, ["modal-class", "modelValue", "onUpdate:modelValue", "width", "top"])
297
+ }, 16, ["z-index", "draggable", "modal", "overflow", "modal-class", "modelValue", "onUpdate:modelValue", "width", "top"])
291
298
  ],
292
299
  2112
293
300
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
@@ -252,7 +252,8 @@ const _sfc_main = {
252
252
  "parent-prop": __props.column.field,
253
253
  index: index$1,
254
254
  loading: __props.loading,
255
- readonly: __props.readonly
255
+ readonly: __props.readonly,
256
+ level: 3
256
257
  }, vue.createSlots({
257
258
  _: 2
258
259
  /* DYNAMIC */
@@ -43,6 +43,10 @@ const _sfc_main = {
43
43
  readonly: {
44
44
  type: Boolean,
45
45
  default: false
46
+ },
47
+ level: {
48
+ type: Number,
49
+ default: 2
46
50
  }
47
51
  },
48
52
  setup(__props) {
@@ -142,21 +146,38 @@ const _sfc_main = {
142
146
  ])) : vue.createCommentVNode("v-if", true)
143
147
  ]),
144
148
  vue.createCommentVNode(" \u5185\u5BB9\u4EC5\u67E5\u770B "),
145
- __props.column.readonly || __props.readonly || !__props.column.type && !__props.column.slot ? (vue.openBlock(), vue.createElementBlock("div", {
146
- key: 0,
147
- class: "w-full text-main h-[32px]"
148
- }, [
149
- vue.unref(index.renderText)(props, __props.column) ? (vue.openBlock(), vue.createElementBlock(
150
- "span",
151
- { key: 0 },
152
- vue.toDisplayString(vue.unref(index.renderText)(props, __props.column)),
153
- 1
154
- /* TEXT */
155
- )) : (vue.openBlock(), vue.createElementBlock("span", {
156
- key: 1,
157
- class: "text-auxiliary"
158
- }, "- -"))
159
- ])) : (vue.openBlock(), vue.createElementBlock(
149
+ __props.column.readonly || __props.readonly || !__props.column.type && !__props.column.slot ? (vue.openBlock(), vue.createElementBlock(
150
+ "div",
151
+ {
152
+ key: 0,
153
+ class: vue.normalizeClass(["w-full flex items-center text-main px-2", {
154
+ "min-h-[40px]": _ctx.size === "large",
155
+ "min-h-[32px]": _ctx.size === "default",
156
+ "min-h-[24px]": _ctx.size === "small",
157
+ "bg-background": __props.level === 1,
158
+ "bg-background-2": __props.level === 2,
159
+ "bg-background-3": __props.level === 3,
160
+ "bg-background-4": __props.level === 4
161
+ }])
162
+ },
163
+ [
164
+ vue.unref(index.renderText)(props, __props.column) ? (vue.openBlock(), vue.createElementBlock(
165
+ "span",
166
+ {
167
+ key: 0,
168
+ class: "break-all"
169
+ },
170
+ vue.toDisplayString(vue.unref(index.renderText)(props, __props.column)),
171
+ 1
172
+ /* TEXT */
173
+ )) : (vue.openBlock(), vue.createElementBlock("span", {
174
+ key: 1,
175
+ class: "text-auxiliary"
176
+ }, "- -"))
177
+ ],
178
+ 2
179
+ /* CLASS */
180
+ )) : (vue.openBlock(), vue.createElementBlock(
160
181
  vue.Fragment,
161
182
  { key: 1 },
162
183
  [
@@ -54,7 +54,7 @@ function isDisabled(props, column) {
54
54
  }
55
55
  function renderText(props, column = {}) {
56
56
  const { type, field, customRender } = column;
57
- const { props: fieldNames, options = [] } = column.attrs || {};
57
+ const { props: fieldNames } = column.attrs || {};
58
58
  if (customRender && typeof customRender === "function") {
59
59
  return customRender({
60
60
  column,
@@ -71,7 +71,8 @@ function renderText(props, column = {}) {
71
71
  return [props.model[lon], props.model[lat]].filter(Boolean).join("\uFF0C");
72
72
  }
73
73
  if (/^(select|radio|checkbox)$/.test(type)) {
74
- const target = options.find(
74
+ const optionList = optionsHandler(props, column);
75
+ const target = optionList.find(
75
76
  (item) => item[fieldNames.value] === props.model?.[field]
76
77
  );
77
78
  return target?.[fieldNames.label] || props.model?.[field] || "";
@@ -222,7 +222,8 @@ const _sfc_main = {
222
222
  modelValue: bindValue.value,
223
223
  "onUpdate:modelValue": ($event) => bindValue.value = $event
224
224
  }, __props.column.attrs, {
225
- disabled: vue.unref(index.isDisabled)(props, __props.column)
225
+ disabled: vue.unref(index.isDisabled)(props, __props.column),
226
+ onChange: onChangeHandler
226
227
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])
227
228
  ],
228
229
  2112