@veltra/desktop 1.1.33 → 1.1.35

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.
@@ -6,9 +6,9 @@ type __VLS_Slots = {
6
6
  default?: () => VNode[];
7
7
  };
8
8
  declare const __VLS_base: import("vue").DefineComponent<ActionGroupProps, _ActionGroupExposed, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
9
+ type: import("@veltra/utils").ColorType;
9
10
  text: boolean;
10
11
  size: "small" | "default" | "large";
11
- type: import("@veltra/utils").ColorType;
12
12
  circle: boolean;
13
13
  max: number;
14
14
  loading: boolean;
@@ -12,9 +12,9 @@ declare const __VLS_base: import("vue").DefineComponent<ActionProps, {}, {}, {},
12
12
  }, string, import("vue").PublicProps, Readonly<ActionProps> & Readonly<{
13
13
  onRun?: (() => any) | undefined;
14
14
  }>, {
15
+ type: ButtonType;
15
16
  text: boolean;
16
17
  size: import("@veltra/utils").ComponentSize;
17
- type: ButtonType;
18
18
  circle: boolean;
19
19
  loading: boolean;
20
20
  inDropdown: boolean;
@@ -17,9 +17,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
17
17
  "onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
18
18
  onChange?: ((checked: boolean) => any) | undefined;
19
19
  }>, {
20
+ type: import("@veltra/utils").ColorType;
20
21
  disabled: boolean;
21
22
  readonly: boolean;
22
- type: import("@veltra/utils").ColorType;
23
23
  round: boolean;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -7,8 +7,8 @@ declare const __VLS_export: import("vue").DefineComponent<DatePanelProps, {}, {}
7
7
  "onSelect:range-date"?: ((rangeDate?: [import("@cat-kit/core").Dater, import("@cat-kit/core").Dater] | undefined) => any) | undefined;
8
8
  "onSelect:date"?: ((date: import("@cat-kit/core").Dater) => any) | undefined;
9
9
  }>, {
10
- size: import("@veltra/utils").ComponentSize;
11
10
  type: "date" | "month" | "year";
11
+ size: import("@veltra/utils").ComponentSize;
12
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
14
14
  //#endregion
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<DatePickerProps, {}, {
5
5
  }, string, import("vue").PublicProps, Readonly<DatePickerProps> & Readonly<{
6
6
  "onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
7
7
  }>, {
8
+ type: "date" | "month" | "year";
8
9
  placeholder: string;
9
10
  clearable: boolean;
10
11
  disabled: boolean;
11
12
  readonly: boolean;
12
- type: "date" | "month" | "year";
13
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  //#endregion
@@ -5,11 +5,11 @@ declare const __VLS_export: import("vue").DefineComponent<DateRangePickerProps,
5
5
  }, string, import("vue").PublicProps, Readonly<DateRangePickerProps> & Readonly<{
6
6
  "onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
7
7
  }>, {
8
+ type: "date" | "month" | "year";
8
9
  placeholder: [string, string];
9
10
  clearable: boolean;
10
11
  disabled: boolean;
11
12
  readonly: boolean;
12
- type: "date" | "month" | "year";
13
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  //#endregion
@@ -24,7 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  type: Boolean,
25
25
  default: true
26
26
  },
27
- fullscreen: { type: Boolean }
27
+ fullscreen: { type: Boolean },
28
+ transition: { default: "fade-scale" }
28
29
  }, {
29
30
  "modelValue": {
30
31
  type: Boolean,
@@ -46,10 +47,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
47
  const dialogRef = shallowRef();
47
48
  /** 弹框头部模板引用 */
48
49
  const headerRef = shallowRef();
49
- /** 弹框body模板引用 */
50
- const bodyRef = shallowRef();
51
- /** 弹框footer模板引用 */
52
- const footerRef = shallowRef();
53
50
  const visible = useModel(__props, "modelValue");
54
51
  const overlayVisible = shallowRef(false);
55
52
  const dialogVisible = shallowRef(false);
@@ -147,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
147
144
  onKeyup: withKeys(close, ["esc"]),
148
145
  tabindex: "0"
149
146
  }, [createVNode(Transition, {
150
- name: "spring",
147
+ name: __props.transition,
151
148
  onAfterLeave: onAfterDialogLeave
152
149
  }, {
153
150
  default: withCtx(() => [dialogVisible.value ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
@@ -195,8 +192,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
195
192
  createVNode(unref(_sfc_main$2), {
196
193
  tag: "section",
197
194
  class: normalizeClass(unref(cls).e("body")),
198
- ref_key: "bodyRef",
199
- ref: bodyRef,
200
195
  "content-style": { height: unref(maximized) ? "100%" : void 0 },
201
196
  onTransitionend: _cache[6] || (_cache[6] = withModifiers(() => {}, ["stop"])),
202
197
  onTransitioncancel: _cache[7] || (_cache[7] = withModifiers(() => {}, ["stop"]))
@@ -206,13 +201,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
206
201
  }, 8, ["class", "content-style"]),
207
202
  _ctx.$slots.footer ? (openBlock(), createElementBlock("section", {
208
203
  key: 0,
209
- ref_key: "footerRef",
210
- ref: footerRef,
211
204
  class: normalizeClass(footerCls)
212
- }, [renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps({ close })))], 512)) : createCommentVNode("v-if", true)
205
+ }, [renderSlot(_ctx.$slots, "footer", normalizeProps(guardReactiveProps({ close })))])) : createCommentVNode("v-if", true)
213
206
  ], 16)) : createCommentVNode("v-if", true)]),
214
207
  _: 3
215
- })], 34)), [[vShow, overlayVisible.value]]) : createCommentVNode("v-if", true)]),
208
+ }, 8, ["name"])], 34)), [[vShow, overlayVisible.value]]) : createCommentVNode("v-if", true)]),
216
209
  _: 3
217
210
  })])),
218
211
  createCommentVNode(" 触发 "),
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":["$attrs","$slots"],"sources":["../../../src/components/dialog/dialog.vue"],"sourcesContent":["<template>\n <Teleport to=\"body\">\n <transition name=\"fade\" @after-leave=\"emit('closed')\" @enter=\"onOverlayEnter\">\n <div\n v-if=\"overlayVisible || opened\"\n v-show=\"overlayVisible\"\n :class=\"[cls.e('overlay'), bem.is('modal', modal)]\"\n ref=\"overlayRef\"\n @mousedown=\"modal && close()\"\n @keyup.esc=\"close\"\n tabindex=\"0\"\n >\n <transition name=\"spring\" @after-leave=\"onAfterDialogLeave\">\n <div\n v-if=\"dialogVisible\"\n v-bind=\"$attrs\"\n :class=\"className\"\n ref=\"dialogRef\"\n @mousedown.stop=\"handleIncreaseZIndex\"\n >\n <section :class=\"headerCls\" ref=\"headerRef\" @transitionend.stop @transitioncancel.stop>\n <div :class=\"cls.e('title')\" @mousedown.stop>\n <slot name=\"header\">\n {{ header || title }}\n </slot>\n </div>\n\n <div :class=\"cls.e('buttons')\" @mousedown.stop>\n <u-icon\n v-if=\"maximized\"\n :class=\"cls.e('btn-recover')\"\n @click=\"toggleMaximize(false)\"\n title=\"还原\"\n >\n <Recover />\n </u-icon>\n <u-icon\n v-else\n :class=\"cls.e('btn-maximize')\"\n @click=\"toggleMaximize(true)\"\n title=\"最大化\"\n >\n <Maximum />\n </u-icon>\n <u-icon :class=\"cls.e('btn-close')\" @click=\"close\" title=\"关闭\">\n <Close />\n </u-icon>\n </div>\n </section>\n\n <u-scroll\n tag=\"section\"\n :class=\"cls.e('body')\"\n ref=\"bodyRef\"\n :content-style=\"{ height: maximized ? '100%' : undefined }\"\n @transitionend.stop\n @transitioncancel.stop\n >\n <slot v-bind=\"{ maximized }\" />\n </u-scroll>\n\n <section ref=\"footerRef\" :class=\"footerCls\" v-if=\"$slots.footer\">\n <slot name=\"footer\" v-bind=\"{ close }\" />\n </section>\n </div>\n </transition>\n </div>\n </transition>\n </Teleport>\n\n <!-- 触发 -->\n <UNodeRender @click=\"visible = !visible\" :content=\"getTriggerNode()\" ref=\"triggerRef\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { useDrag, useFallbackProps } from '@veltra/compositions'\nimport { Close, Maximum, Recover } from '@veltra/icons/normal'\nimport { bem, extractNormalVNodes, setStyles, zIndex } from '@veltra/utils'\nimport { shallowRef, watch, computed, provide, nextTick } from 'vue'\n\nimport type { DialogProps, DialogEmits, DialogExposed, ComponentSize } from '../../types'\nimport type { ScrollExposed } from '../../types'\nimport { UIcon } from '../icon'\nimport { UNodeRender } from '../node-render'\nimport { UScroll } from '../scroll'\nimport { DialogDIKey } from './di'\nimport { useMaximum } from './use-maximum'\n\ndefineOptions({ name: 'Dialog', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n modal: true,\n modelValue: true,\n autoScroll: true\n})\nconst emit = defineEmits<DialogEmits>()\n\nconst slots = defineSlots<{\n footer?: (props: { close: () => void }) => any\n trigger?: () => any\n header?: () => any\n default?: (props: {\n /** 弹框是否最大化了 */\n maximized: boolean\n }) => any\n}>()\n\nconst cls = bem('dialog')\nconst headerCls = [cls.e('header')]\nconst footerCls = [cls.e('footer')]\n\nconst { size } = useFallbackProps([props], { size: 'default' as ComponentSize })\n\nconst overlayRef = shallowRef<HTMLDivElement>()\n\n/** 弹框模板引用 */\nconst dialogRef = shallowRef<HTMLDivElement>()\n\n/** 弹框头部模板引用 */\nconst headerRef = shallowRef<HTMLDivElement>()\n\n/** 弹框body模板引用 */\nconst bodyRef = shallowRef<ScrollExposed>()\n\n/** 弹框footer模板引用 */\nconst footerRef = shallowRef<HTMLDivElement>()\n\nconst visible = defineModel<boolean>({ default: false })\n\nconst overlayVisible = shallowRef(false)\nconst dialogVisible = shallowRef(false)\n\nwatch(visible, (v) => {\n if (v) {\n overlayVisible.value = true\n } else {\n dialogVisible.value = false\n }\n})\n\nfunction getTriggerNode() {\n const nodes = slots.trigger?.()\n if (!nodes?.length) return null\n\n const node = extractNormalVNodes(nodes)[0]\n return node\n}\n\nfunction onOverlayEnter() {\n dialogVisible.value = true\n}\n\nfunction onAfterDialogLeave() {\n overlayVisible.value = false\n}\n\nconst { toggleMaximize, maximized } = useMaximum({ dialogRef, cls })\n\nconst className = computed(() => {\n return [cls.b, cls.m(size.value)]\n})\n\n/**\n * 是否弹出过, 用于控制下一次弹出时是否采用v-show的方式\n */\nlet opened = false\n\nwatch(visible, (v) => {\n if (!v) return\n\n if (!opened) opened = true\n\n // 初始化位置偏移量\n translated.x = 0\n translated.y = 0\n\n nextTick(() => {\n setStyles(overlayRef.value!, { zIndex: zIndex() })\n })\n})\n\n/** dialog位移的位置 */\nconst translated = { x: 0, y: 0 }\n\n/**\n * 更新弹框位置\n * 使用独立 `translate` 而非整体 `transform`, 与 spring 动画的 `scale` 解耦,\n * 避免动画期间整体 transform 被关键帧覆盖、动画结束后又\"啪\"地跳回内联位置\n */\nconst updateDialogTransform = (x: number, y: number) => {\n const dom = dialogRef.value\n if (!dom) return\n setStyles(dom, { translate: `${x}px ${y}px` })\n}\n\n// 运用拖拽\nuseDrag({\n target: headerRef,\n\n onDragStart() {\n handleIncreaseZIndex()\n },\n\n onDrag({ x, y }) {\n if (maximized.value) return\n updateDialogTransform(translated.x + x, translated.y + y)\n },\n\n onDragEnd({ x, y }) {\n if (maximized.value) return\n translated.x += x\n translated.y += y\n\n // 字体模糊的bug修正\n if (translated.x % 2 !== 0) {\n translated.x += x < 0 ? 1 : -1\n }\n if (translated.y % 2 !== 0) {\n translated.y += y < 0 ? 1 : -1\n }\n updateDialogTransform(translated.x, translated.y)\n }\n})\n\nfunction handleIncreaseZIndex() {\n if (props.modal) return\n setStyles(overlayRef.value!, { zIndex: zIndex() })\n}\n\n/** 关闭 */\nconst close = ()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;IAiE5B,mBAAA,MAAA;IACA,YAAwF,MAAA,UAAA,GAAA;KAA1E,SAAK,OAAA,QAAA,OAAA,OAAA,WAAE,QAAA,QAAO,CAAI,QAAA;KAAU,SAAS,eAAc;KAAI,KAAI"}
1
+ {"version":3,"file":"dialog.js","names":["$attrs","$slots"],"sources":["../../../src/components/dialog/dialog.vue"],"sourcesContent":["<template>\n <Teleport to=\"body\">\n <transition name=\"fade\" @after-leave=\"emit('closed')\" @enter=\"onOverlayEnter\">\n <div\n v-if=\"overlayVisible || opened\"\n v-show=\"overlayVisible\"\n :class=\"[cls.e('overlay'), bem.is('modal', modal)]\"\n ref=\"overlayRef\"\n @mousedown=\"modal && close()\"\n @keyup.esc=\"close\"\n tabindex=\"0\"\n >\n <transition :name=\"transition\" @after-leave=\"onAfterDialogLeave\">\n <div\n v-if=\"dialogVisible\"\n v-bind=\"$attrs\"\n :class=\"className\"\n ref=\"dialogRef\"\n @mousedown.stop=\"handleIncreaseZIndex\"\n >\n <section :class=\"headerCls\" ref=\"headerRef\" @transitionend.stop @transitioncancel.stop>\n <div :class=\"cls.e('title')\" @mousedown.stop>\n <slot name=\"header\">\n {{ header || title }}\n </slot>\n </div>\n\n <div :class=\"cls.e('buttons')\" @mousedown.stop>\n <u-icon\n v-if=\"maximized\"\n :class=\"cls.e('btn-recover')\"\n @click=\"toggleMaximize(false)\"\n title=\"还原\"\n >\n <Recover />\n </u-icon>\n <u-icon\n v-else\n :class=\"cls.e('btn-maximize')\"\n @click=\"toggleMaximize(true)\"\n title=\"最大化\"\n >\n <Maximum />\n </u-icon>\n <u-icon :class=\"cls.e('btn-close')\" @click=\"close\" title=\"关闭\">\n <Close />\n </u-icon>\n </div>\n </section>\n\n <u-scroll\n tag=\"section\"\n :class=\"cls.e('body')\"\n :content-style=\"{ height: maximized ? '100%' : undefined }\"\n @transitionend.stop\n @transitioncancel.stop\n >\n <slot v-bind=\"{ maximized }\" />\n </u-scroll>\n\n <section :class=\"footerCls\" v-if=\"$slots.footer\">\n <slot name=\"footer\" v-bind=\"{ close }\" />\n </section>\n </div>\n </transition>\n </div>\n </transition>\n </Teleport>\n\n <!-- 触发 -->\n <UNodeRender @click=\"visible = !visible\" :content=\"getTriggerNode()\" ref=\"triggerRef\" />\n</template>\n\n<script lang=\"ts\" setup>\nimport { useDrag, useFallbackProps } from '@veltra/compositions'\nimport { Close, Maximum, Recover } from '@veltra/icons/normal'\nimport { bem, extractNormalVNodes, setStyles, zIndex } from '@veltra/utils'\nimport { shallowRef, watch, computed, provide, nextTick } from 'vue'\n\nimport type { DialogProps, DialogEmits, DialogExposed, ComponentSize } from '../../types'\nimport { UIcon } from '../icon'\nimport { UNodeRender } from '../node-render'\nimport { UScroll } from '../scroll'\nimport { DialogDIKey } from './di'\nimport { useMaximum } from './use-maximum'\n\ndefineOptions({ name: 'Dialog', inheritAttrs: false })\n\nconst props = withDefaults(defineProps<DialogProps>(), {\n modal: true,\n modelValue: true,\n autoScroll: true,\n transition: 'fade-scale'\n})\nconst emit = defineEmits<DialogEmits>()\n\nconst slots = defineSlots<{\n footer?: (props: { close: () => void }) => any\n trigger?: () => any\n header?: () => any\n default?: (props: {\n /** 弹框是否最大化了 */\n maximized: boolean\n }) => any\n}>()\n\nconst cls = bem('dialog')\nconst headerCls = [cls.e('header')]\nconst footerCls = [cls.e('footer')]\n\nconst { size } = useFallbackProps([props], { size: 'default' as ComponentSize })\n\nconst overlayRef = shallowRef<HTMLDivElement>()\n\n/** 弹框模板引用 */\nconst dialogRef = shallowRef<HTMLDivElement>()\n\n/** 弹框头部模板引用 */\nconst headerRef = shallowRef<HTMLDivElement>()\n\nconst visible = defineModel<boolean>({ default: false })\n\nconst overlayVisible = shallowRef(false)\nconst dialogVisible = shallowRef(false)\n\nwatch(visible, (v) => {\n if (v) {\n overlayVisible.value = true\n } else {\n dialogVisible.value = false\n }\n})\n\nfunction getTriggerNode() {\n const nodes = slots.trigger?.()\n if (!nodes?.length) return null\n\n const node = extractNormalVNodes(nodes)[0]\n return node\n}\n\nfunction onOverlayEnter() {\n dialogVisible.value = true\n}\n\nfunction onAfterDialogLeave() {\n overlayVisible.value = false\n}\n\nconst { toggleMaximize, maximized } = useMaximum({ dialogRef, cls })\n\nconst className = computed(() => {\n return [cls.b, cls.m(size.value)]\n})\n\n/**\n * 是否弹出过, 用于控制下一次弹出时是否采用v-show的方式\n */\nlet opened = false\n\nwatch(visible, (v) => {\n if (!v) return\n\n if (!opened) opened = true\n\n // 初始化位置偏移量\n translated.x = 0\n translated.y = 0\n\n nextTick(() => {\n setStyles(overlayRef.value!, { zIndex: zIndex() })\n })\n})\n\n/** dialog位移的位置 */\nconst translated = { x: 0, y: 0 }\n\n/**\n * 更新弹框位置\n * 使用独立 `translate` 而非整体 `transform`, 与 spring 动画的 `scale` 解耦,\n * 避免动画期间整体 transform 被关键帧覆盖、动画结束后又\"啪\"地跳回内联位置\n */\nconst updateDialogTransform = (x: number, y: number) => {\n const dom = dialogRef.value\n if (!dom) return\n setStyles(dom, { translate: `${x}px ${y}px` })\n}\n\n// 运用拖拽\nuseDrag({\n target: headerRef,\n\n onDragStart() {\n handleIncreaseZIndex()\n },\n\n onDrag({ x, y }) {\n if (maximized.value) return\n updateDialogTransform(translated.x + x, translated.y + y)\n },\n\n onDragEnd({ x, y }) {\n if (maximized.value) return\n translated.x += x\n translated.y += y\n\n // 字体模糊的bug修正\n if (translated.x % 2 !== 0) {\n translated.x += x < 0 ? 1 : -1\n }\n if (translated.y % 2 !== 0) {\n translated.y += y < 0 ? 1 : -1\n }\n updateDialogTransform(translated.x, translated.y)\n }\n})\n\nfunction handleIncreaseZIndex() {\n if (props.modal) return\n setStyles(overlayRef.value!, { zIndex: zIndex() })\n}\n\n/** 关闭 */\nconst close = () => {\n visible.value = false\n}\n\nprovide(DialogDIKey, { visible })\n\ndefineExpose<DialogExposed>({ close })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFA,MAAM,QAAQ;EAMd,MA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types/dialog.js";
2
2
  //#region src/components/dialog/dialog.vue.d.ts
3
3
  type __VLS_Props = DialogProps;
4
4
  type __VLS_Slots = {
@@ -26,6 +26,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, impor
26
26
  }>, {
27
27
  modelValue: boolean;
28
28
  modal: boolean;
29
+ transition: DialogTransition;
29
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
31
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
32
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,4 @@
1
1
  import "../icon/style.js";
2
2
  import "../scroll/style.js";
3
3
  import "./style2.css";
4
- import "@veltra/styles/transitions/fade.scss";
5
- import "@veltra/styles/transitions/spring.scss";
4
+ import "@veltra/styles/transitions/fade-scale.scss";
@@ -303,12 +303,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
303
303
  return openBlock(), createBlock(unref(_sfc_main$6), {
304
304
  key: option[__props.valueKey],
305
305
  closable: !unref(disabled),
306
+ size: "small",
306
307
  onClose: ($event) => handleClose(option)
307
308
  }, {
308
309
  default: withCtx(() => [createTextVNode(toDisplayString(option[__props.labelKey]), 1)]),
309
310
  _: 2
310
311
  }, 1032, ["closable", "onClose"]);
311
- }), 128)), restTag.value ? (openBlock(), createBlock(unref(_sfc_main$6), { key: 0 }, {
312
+ }), 128)), restTag.value ? (openBlock(), createBlock(unref(_sfc_main$6), {
313
+ key: 0,
314
+ size: "small"
315
+ }, {
312
316
  default: withCtx(() => [createTextVNode(toDisplayString(restTag.value) + "+ ", 1)]),
313
317
  _: 1
314
318
  })) : createCommentVNode("v-if", true)], 2)) : createCommentVNode("v-if", true),
@@ -436,7 +440,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
436
440
  key: 1,
437
441
  class: normalizeClass([unref(cls).m(unref(size)), unref(cls).e("readonly-tags")])
438
442
  }, [createElementVNode("div", { class: normalizeClass(unref(cls).e("tags")) }, [(openBlock(true), createElementBlock(Fragment, null, renderList(tags.value, (option) => {
439
- return openBlock(), createBlock(unref(_sfc_main$6), { key: option[__props.valueKey] }, {
443
+ return openBlock(), createBlock(unref(_sfc_main$6), {
444
+ key: option[__props.valueKey],
445
+ size: "small"
446
+ }, {
440
447
  default: withCtx(() => [createTextVNode(toDisplayString(option[__props.labelKey]), 1)]),
441
448
  _: 2
442
449
  }, 1024);
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select.js","names":[],"sources":["../../../src/components/multi-select/multi-select.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n trigger=\"click\"\n ref=\"dropdownRef\"\n :class=\"[cls.b, cls.m(size), bem.is('disabled', disabled)]\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size), contentClass]\"\n :content-style=\"contentStyle\"\n :min-width=\"minWidth\"\n :width=\"width\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n :disabled=\"disabled\"\n @update:visible=\"handleDropdownVisible\"\n >\n <!-- 触发 -->\n <template #trigger>\n <span :class=\"cls.e('placeholder')\" v-show=\"!model?.length\">\n {{ placeholder }}\n </span>\n\n <div v-if=\"model?.length\" :class=\"cls.e('tags')\">\n <u-tag\n v-for=\"option of tags\"\n :key=\"option[valueKey]\"\n :closable=\"!disabled\"\n @close=\"handleClose(option)\"\n >\n {{ option[labelKey] }}\n </u-tag>\n <u-tag v-if=\"restTag\"> {{ restTag }}+ </u-tag>\n </div>\n\n <transition name=\"zoom-in\" mode=\"out-in\">\n <u-icon\n v-if=\"clearable && model?.length && hovered && !disabled\"\n :class=\"cls.e('clear')\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </u-icon>\n\n <u-icon :class=\"cls.e('arrow')\" v-else><ArrowDown /></u-icon>\n </transition>\n </template>\n\n <!-- 下拉内容 -->\n <template #content>\n <!-- 多选栏 -->\n <div :class=\"cls.e('content-header')\">\n <u-checkbox\n :model-value=\"allChecked\"\n :indeterminate=\"indeterminate\"\n @update:model-value=\"handleCheckAll\"\n :disabled=\"max !== undefined\"\n >\n 全选\n </u-checkbox>\n\n <span> 已选 {{ model?.length }}/{{ max ?? options?.length ?? 0 }} </span>\n </div>\n\n <!-- 过滤器 -->\n <div v-if=\"filterable\" :class=\"cls.e('content-filter')\">\n <u-input\n placeholder=\"输入关键字进行过滤\"\n v-model=\"queryString\"\n @keydown.enter.prevent=\"handleCreateByEnter\"\n >\n <template #suffix>\n <u-icon><Search /></u-icon>\n </template>\n </u-input>\n </div>\n\n <!-- 多选列表 -->\n <!--\n 虚拟化启用时内容容器 height 由 useVirtualizer 命令式写入;\n 模板不再绑定 totalSize,避免尺寸变化引起重渲染。\n -->\n <u-scroll\n tag=\"ul\"\n :class=\"[cls.e('options')]\"\n ref=\"scrollRef\"\n v-if=\"options.length\"\n :content-class=\"[cls.e('options-wrap'), bem.is('virtual', virtualEnabled)]\"\n >\n <template v-if=\"virtualEnabled\">\n <u-multi-select-option\n v-for=\"{ option, index, key, label, offset } of virtualOptions\"\n :option=\"option\"\n :disabled=\"isDisabled(option)\"\n :key=\"key\"\n :style=\"{ transform: `translateY(${offset}px)` }\"\n @check=\"handleCheck(option, $event)\"\n :checked=\"checkedSet.has(option)\"\n :index=\"index\"\n :measure-element=\"measureElement\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ label }}\n </slot>\n </u-multi-select-option>\n </template>\n\n <template v-else>\n <u-multi-select-option\n v-for=\"(option, index) of options\"\n :option=\"option\"\n :disabled=\"isDisabled(option)\"\n :key=\"chainObj(option).get(valueKey)\"\n @check=\"handleCheck(option, $event)\"\n :checked=\"checkedSet.has(option)\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ chainObj(option).get(labelKey) }}\n </slot>\n </u-multi-select-option>\n </template>\n </u-scroll>\n\n <div v-else :class=\"cls.e('empty')\">\n <UEmpty />\n </div>\n </template>\n </u-dropdown>\n\n <div v-else-if=\"model?.length\" :class=\"[cls.m(size), cls.e('readonly-tags')]\">\n <div :class=\"cls.e('tags')\">\n <u-tag v-for=\"option of tags\" :key=\"option[valueKey]\">\n {{ option[labelKey] }}\n </u-tag>\n </div>\n </div>\n\n <template v-else>\n {{ FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { o as chainObj } from '@cat-kit/core'\nimport { useFormFallbackProps, useVirtualizer } from '@veltra/compositions'\nimport { ArrowDown, Close, Search } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, shallowReactive, watch, provide } from 'vue'\n\nimport type {\n MultiSelectEmits,\n MultiSelectProps,\n ScrollExposed,\n DropdownExposed\n} from '../../types'\nimport { UCheckbox } from '../checkbox'\nimport { UDropdown } from '../dropdown'\nimport { UEmpty } from '../empty'\nimport { UIcon } from '../icon'\nimport { UInput } from '../input'\nimport { UScroll } from '../scroll'\nimport { useOptions } from '../select/use-options'\nimport { UTag } from '../tag'\nimport { MultiSelectDIKey } from './di'\nimport UMultiSelectOption from './multi-select-option.vue'\n\ndefineOptions({ name: 'MultiSelect' })\n\nconst props = withDefaults(defineProps<MultiSelectProps>(), {\n labelKey: 'label',\n valueKey: 'value',\n placeholder: '请选择',\n clearable: true,\n visibilityLimit: 3,\n disabled: undefined,\n readonly: undefined,\n minWidth: '220px'\n})\n\nconst emit = defineEmits<MultiSelectEmits>()\n\nconst cls = bem('multi-select')\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst scrollRef = shallowRef<ScrollExposed>()\n\nconst hovered = shallowRef(false)\n\nconst { options: rawOptions, queryString, allOptions: rawAllOptions } = useOptions({ props })\n\nconst createdOptions = shallowRef<Record<string, any>[]>([])\n\nconst options = computed(() => {\n const base = rawOptions.value\n if (!props.creatable || !createdOptions.value.length) return base\n\n const { valueKey } = props\n const createdValues = new Set(createdOptions.value.map((o) => chainObj(o).get(valueKey)))\n const deduped = base.filter((o) => !(o.__isTemp && createdValues.has(chainObj(o).get(valueKey))))\n const dedupedValues = new Set(deduped.map((o) => chainObj(o).get(valueKey)))\n const toAdd = createdOptions.value.filter((o) => !dedupedValues.has(chainObj(o).get(valueKey)))\n return [...toAdd, ...deduped]\n})\n\nconst allOptions = computed(() => {\n if (!props.creatable || !createdOptions.value.length) return rawAllOptions.value\n return [...createdOptions.value, ...rawAllOptions.value]\n})\n\nconst virtualEnabled = computed(() => options.value.length > 80)\n\nconst { virtualizer, items } = useVirtualizer({\n estimateSize: () => 40,\n count: computed(() => options.value.length),\n scrollEl: () => scrollRef.value?.containerRef ?? null,\n contentEl: () => (virtualEnabled.value ? (scrollRef.value?.contentRef ?? null) : null)\n})\n\nconst virtualOptions = computed(() => {\n const { valueKey, labelKey } = props\n const _options = options.value\n return items.value.map((v) => {\n const option = _options[v.index]!\n const val = chainObj(option).get(valueKey)\n return {\n option,\n index: v.index,\n val,\n key: v.index,\n offset: v.start,\n label: chainObj(option).get(labelKey)\n }\n })\n})\n\nconst measureElement: (index: number, el: Element | null) => void = (index, el) =>\n virtualizer.measureElement(index, el)\n\nconst filterable = computed(() => {\n return props.filterable || props.creatable || typeof props.options === 'function'\n})\n\nconst model = defineModel<Array<string | number>>()\n\nconst checkedSet = shallowReactive<Set<Record<string, any>>>(new Set())\nconst allChecked = computed(() => {\n return checkedSet.size === options.value.length\n})\nconst indeterminate = computed(() => {\n return checkedSet.size > 0 && !allChecked.value\n})\n\nconst optionsMap = computed(() => {\n const { valueKey } = props\n return new Map<string | number, Record<string, any>>(\n allOptions.value.map((option) => [option[valueKey], option])\n )\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\n\nlet internalChange = false\n\nwatch(\n [model, optionsMap],\n ([model, optionsMap]) => {\n if (internalChange) {\n internalChange = false\n return\n }\n checkedSet.clear()\n if (optionsMap.size && model?.length) {\n model.forEach((v) => {\n const option = optionsMap.get(v)\n option && checkedSet.add(option)\n })\n }\n },\n { immediate: true }\n)\n\nconst emitChange = () => {\n emit('change', Array.from(checkedSet))\n}\n\nconst tags = computed(() => {\n let tags: Record<string, any>[] = []\n let { visibilityLimit } = props\n if (visibilityLimit < 0) {\n visibilityLimit = 0\n }\n\n // 禁用时,显示全部\n if (disabled.value || readonly.value) {\n visibilityLimit = model.value?.length ?? 0\n }\n\n model.value?.slice(0, visibilityLimit).forEach((k) => {\n const option = optionsMap.value.get(k)\n option && tags.push(option)\n })\n\n return tags\n})\n\nconst restTag = computed(() => {\n return (model.value?.length ?? 0) - tags.value.length\n})\n\nconst handleDropdownVisible = (visible: boolean) => {\n if (!visible) {\n queryString.value = ''\n }\n}\n\nconst handleCheck = (option: Record<string, any>, checked: boolean) => {\n const { valueKey, labelKey } = props\n if (checked) {\n if (option.__isTemp && props.creatable) {\n const created: Record<string, any> = {\n [labelKey]: chainObj(option).get(labelKey),\n [valueKey]: chainObj(option).get(valueKey)\n }\n createdOptions.value = [...createdOptions.value, created]\n checkedSet.add(created)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(created).get(valueKey)]\n queryString.value = ''\n } else if (!checkedSet.has(option)) {\n checkedSet.add(option)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(option).get(valueKey)]\n }\n } else {\n checkedSet.delete(option)\n const val = chainObj(option).get(valueKey)\n internalChange = true\n model.value = (model.value ?? []).filter((v) => v !== val)\n removeCreatedOption(option)\n }\n\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\n/** 全选 */\nconst handleCheckAll = (checked: boolean) => {\n const { valueKey } = props\n if (checked) {\n options.value.forEach((option) => {\n if (!option.__isTemp) checkedSet.add(option)\n })\n internalChange = true\n model.value = Array.from(checkedSet).map((o) => chainObj(o).get(valueKey))\n } else {\n checkedSet.clear()\n internalChange = true\n model.value = []\n if (props.creatable) {\n createdOptions.value = []\n }\n }\n\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\n/** 清除选项 */\nconst handleClear = () => {\n checkedSet.clear()\n internalChange = true\n model.value = []\n if (props.creatable) {\n createdOptions.value = []\n }\n emit('change', [])\n}\n\nconst handleClose = (option: Record<string, any>) => {\n checkedSet.delete(option)\n const val = chainObj(option).get(props.valueKey)\n internalChange = true\n model.value = (model.value ?? []).filter((v) => v !== val)\n removeCreatedOption(option)\n emitChange()\n}\n\nconst removeCreatedOption = (option: Record<string, any>) => {\n if (!props.creatable || !createdOptions.value.length) return\n const { valueKey } = props\n const val = chainObj(option).get(valueKey)\n createdOptions.value = createdOptions.value.filter((o) => chainObj(o).get(valueKey) !== val)\n}\n\nconst handleCreateByEnter = () => {\n if (!props.creatable) return\n const qs = queryString.value?.trim()\n if (!qs) return\n\n const { labelKey, valueKey } = props\n\n const existingCreated = createdOptions.value.find((o) => chainObj(o).get(valueKey) === qs)\n if (existingCreated) {\n if (!checkedSet.has(existingCreated)) {\n checkedSet.add(existingCreated)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(existingCreated).get(valueKey)]\n }\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n return\n }\n\n const exactMatch = rawOptions.value.find((o) => !o.__isTemp && chainObj(o).get(labelKey) === qs)\n if (exactMatch) {\n if (!checkedSet.has(exactMatch)) {\n checkedSet.add(exactMatch)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(exactMatch).get(valueKey)]\n }\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n return\n }\n\n const created: Record<string, any> = { [labelKey]: qs, [valueKey]: qs }\n createdOptions.value = [...createdOptions.value, created]\n checkedSet.add(created)\n internalChange = true\n model.value = [...(model.value ?? []), qs]\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\nconst isDisabled = (option: Record<string, any>) => {\n const { max } = props\n return max !== undefined && checkedSet.size >= max && !checkedSet.has(option)\n}\n\nconst optionClass = cls.e('option')\nconst rippleClass = cls.e('ripple')\nconst checkboxClass = cls.e('checkbox')\n\nprovide(MultiSelectDIK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,EAAA,GAAA,CAAA,gBAAA,gBADN,MAAA,kBAAA,CAAkB,GAAA,CAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"multi-select.js","names":[],"sources":["../../../src/components/multi-select/multi-select.vue"],"sourcesContent":["<template>\n <u-dropdown\n v-if=\"!readonly\"\n trigger=\"click\"\n ref=\"dropdownRef\"\n :class=\"[cls.b, cls.m(size), bem.is('disabled', disabled)]\"\n :content-class=\"[cls.e('panel'), cls.em('panel', size), contentClass]\"\n :content-style=\"contentStyle\"\n :min-width=\"minWidth\"\n :width=\"width\"\n @mouseenter=\"hovered = true\"\n @mouseleave=\"hovered = false\"\n :disabled=\"disabled\"\n @update:visible=\"handleDropdownVisible\"\n >\n <!-- 触发 -->\n <template #trigger>\n <span :class=\"cls.e('placeholder')\" v-show=\"!model?.length\">\n {{ placeholder }}\n </span>\n\n <div v-if=\"model?.length\" :class=\"cls.e('tags')\">\n <u-tag\n v-for=\"option of tags\"\n :key=\"option[valueKey]\"\n :closable=\"!disabled\"\n size=\"small\"\n @close=\"handleClose(option)\"\n >\n {{ option[labelKey] }}\n </u-tag>\n <u-tag v-if=\"restTag\" size=\"small\"> {{ restTag }}+ </u-tag>\n </div>\n\n <transition name=\"zoom-in\" mode=\"out-in\">\n <u-icon\n v-if=\"clearable && model?.length && hovered && !disabled\"\n :class=\"cls.e('clear')\"\n @click.stop=\"handleClear\"\n >\n <Close />\n </u-icon>\n\n <u-icon :class=\"cls.e('arrow')\" v-else><ArrowDown /></u-icon>\n </transition>\n </template>\n\n <!-- 下拉内容 -->\n <template #content>\n <!-- 多选栏 -->\n <div :class=\"cls.e('content-header')\">\n <u-checkbox\n :model-value=\"allChecked\"\n :indeterminate=\"indeterminate\"\n @update:model-value=\"handleCheckAll\"\n :disabled=\"max !== undefined\"\n >\n 全选\n </u-checkbox>\n\n <span> 已选 {{ model?.length }}/{{ max ?? options?.length ?? 0 }} </span>\n </div>\n\n <!-- 过滤器 -->\n <div v-if=\"filterable\" :class=\"cls.e('content-filter')\">\n <u-input\n placeholder=\"输入关键字进行过滤\"\n v-model=\"queryString\"\n @keydown.enter.prevent=\"handleCreateByEnter\"\n >\n <template #suffix>\n <u-icon><Search /></u-icon>\n </template>\n </u-input>\n </div>\n\n <!-- 多选列表 -->\n <!--\n 虚拟化启用时内容容器 height 由 useVirtualizer 命令式写入;\n 模板不再绑定 totalSize,避免尺寸变化引起重渲染。\n -->\n <u-scroll\n tag=\"ul\"\n :class=\"[cls.e('options')]\"\n ref=\"scrollRef\"\n v-if=\"options.length\"\n :content-class=\"[cls.e('options-wrap'), bem.is('virtual', virtualEnabled)]\"\n >\n <template v-if=\"virtualEnabled\">\n <u-multi-select-option\n v-for=\"{ option, index, key, label, offset } of virtualOptions\"\n :option=\"option\"\n :disabled=\"isDisabled(option)\"\n :key=\"key\"\n :style=\"{ transform: `translateY(${offset}px)` }\"\n @check=\"handleCheck(option, $event)\"\n :checked=\"checkedSet.has(option)\"\n :index=\"index\"\n :measure-element=\"measureElement\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ label }}\n </slot>\n </u-multi-select-option>\n </template>\n\n <template v-else>\n <u-multi-select-option\n v-for=\"(option, index) of options\"\n :option=\"option\"\n :disabled=\"isDisabled(option)\"\n :key=\"chainObj(option).get(valueKey)\"\n @check=\"handleCheck(option, $event)\"\n :checked=\"checkedSet.has(option)\"\n >\n <slot v-bind=\"{ option, index }\">\n {{ chainObj(option).get(labelKey) }}\n </slot>\n </u-multi-select-option>\n </template>\n </u-scroll>\n\n <div v-else :class=\"cls.e('empty')\">\n <UEmpty />\n </div>\n </template>\n </u-dropdown>\n\n <div v-else-if=\"model?.length\" :class=\"[cls.m(size), cls.e('readonly-tags')]\">\n <div :class=\"cls.e('tags')\">\n <u-tag v-for=\"option of tags\" :key=\"option[valueKey]\" size=\"small\">\n {{ option[labelKey] }}\n </u-tag>\n </div>\n </div>\n\n <template v-else>\n {{ FORM_EMPTY_CONTENT }}\n </template>\n</template>\n\n<script lang=\"ts\" setup>\nimport { o as chainObj } from '@cat-kit/core'\nimport { useFormFallbackProps, useVirtualizer } from '@veltra/compositions'\nimport { ArrowDown, Close, Search } from '@veltra/icons/normal'\nimport { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'\nimport { injectFormContext } from '@veltra/utils'\nimport { computed, shallowRef, shallowReactive, watch, provide } from 'vue'\n\nimport type {\n MultiSelectEmits,\n MultiSelectProps,\n ScrollExposed,\n DropdownExposed\n} from '../../types'\nimport { UCheckbox } from '../checkbox'\nimport { UDropdown } from '../dropdown'\nimport { UEmpty } from '../empty'\nimport { UIcon } from '../icon'\nimport { UInput } from '../input'\nimport { UScroll } from '../scroll'\nimport { useOptions } from '../select/use-options'\nimport { UTag } from '../tag'\nimport { MultiSelectDIKey } from './di'\nimport UMultiSelectOption from './multi-select-option.vue'\n\ndefineOptions({ name: 'MultiSelect' })\n\nconst props = withDefaults(defineProps<MultiSelectProps>(), {\n labelKey: 'label',\n valueKey: 'value',\n placeholder: '请选择',\n clearable: true,\n visibilityLimit: 3,\n disabled: undefined,\n readonly: undefined,\n minWidth: '220px'\n})\n\nconst emit = defineEmits<MultiSelectEmits>()\n\nconst cls = bem('multi-select')\n\nconst { formProps } = injectFormContext()\n\nconst { size, disabled, readonly } = useFormFallbackProps([formProps ?? {}, props], {\n size: 'default',\n disabled: false,\n readonly: false\n})\n\nconst scrollRef = shallowRef<ScrollExposed>()\n\nconst hovered = shallowRef(false)\n\nconst { options: rawOptions, queryString, allOptions: rawAllOptions } = useOptions({ props })\n\nconst createdOptions = shallowRef<Record<string, any>[]>([])\n\nconst options = computed(() => {\n const base = rawOptions.value\n if (!props.creatable || !createdOptions.value.length) return base\n\n const { valueKey } = props\n const createdValues = new Set(createdOptions.value.map((o) => chainObj(o).get(valueKey)))\n const deduped = base.filter((o) => !(o.__isTemp && createdValues.has(chainObj(o).get(valueKey))))\n const dedupedValues = new Set(deduped.map((o) => chainObj(o).get(valueKey)))\n const toAdd = createdOptions.value.filter((o) => !dedupedValues.has(chainObj(o).get(valueKey)))\n return [...toAdd, ...deduped]\n})\n\nconst allOptions = computed(() => {\n if (!props.creatable || !createdOptions.value.length) return rawAllOptions.value\n return [...createdOptions.value, ...rawAllOptions.value]\n})\n\nconst virtualEnabled = computed(() => options.value.length > 80)\n\nconst { virtualizer, items } = useVirtualizer({\n estimateSize: () => 40,\n count: computed(() => options.value.length),\n scrollEl: () => scrollRef.value?.containerRef ?? null,\n contentEl: () => (virtualEnabled.value ? (scrollRef.value?.contentRef ?? null) : null)\n})\n\nconst virtualOptions = computed(() => {\n const { valueKey, labelKey } = props\n const _options = options.value\n return items.value.map((v) => {\n const option = _options[v.index]!\n const val = chainObj(option).get(valueKey)\n return {\n option,\n index: v.index,\n val,\n key: v.index,\n offset: v.start,\n label: chainObj(option).get(labelKey)\n }\n })\n})\n\nconst measureElement: (index: number, el: Element | null) => void = (index, el) =>\n virtualizer.measureElement(index, el)\n\nconst filterable = computed(() => {\n return props.filterable || props.creatable || typeof props.options === 'function'\n})\n\nconst model = defineModel<Array<string | number>>()\n\nconst checkedSet = shallowReactive<Set<Record<string, any>>>(new Set())\nconst allChecked = computed(() => {\n return checkedSet.size === options.value.length\n})\nconst indeterminate = computed(() => {\n return checkedSet.size > 0 && !allChecked.value\n})\n\nconst optionsMap = computed(() => {\n const { valueKey } = props\n return new Map<string | number, Record<string, any>>(\n allOptions.value.map((option) => [option[valueKey], option])\n )\n})\n\nconst dropdownRef = shallowRef<DropdownExposed>()\n\nlet internalChange = false\n\nwatch(\n [model, optionsMap],\n ([model, optionsMap]) => {\n if (internalChange) {\n internalChange = false\n return\n }\n checkedSet.clear()\n if (optionsMap.size && model?.length) {\n model.forEach((v) => {\n const option = optionsMap.get(v)\n option && checkedSet.add(option)\n })\n }\n },\n { immediate: true }\n)\n\nconst emitChange = () => {\n emit('change', Array.from(checkedSet))\n}\n\nconst tags = computed(() => {\n let tags: Record<string, any>[] = []\n let { visibilityLimit } = props\n if (visibilityLimit < 0) {\n visibilityLimit = 0\n }\n\n // 禁用时,显示全部\n if (disabled.value || readonly.value) {\n visibilityLimit = model.value?.length ?? 0\n }\n\n model.value?.slice(0, visibilityLimit).forEach((k) => {\n const option = optionsMap.value.get(k)\n option && tags.push(option)\n })\n\n return tags\n})\n\nconst restTag = computed(() => {\n return (model.value?.length ?? 0) - tags.value.length\n})\n\nconst handleDropdownVisible = (visible: boolean) => {\n if (!visible) {\n queryString.value = ''\n }\n}\n\nconst handleCheck = (option: Record<string, any>, checked: boolean) => {\n const { valueKey, labelKey } = props\n if (checked) {\n if (option.__isTemp && props.creatable) {\n const created: Record<string, any> = {\n [labelKey]: chainObj(option).get(labelKey),\n [valueKey]: chainObj(option).get(valueKey)\n }\n createdOptions.value = [...createdOptions.value, created]\n checkedSet.add(created)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(created).get(valueKey)!]\n queryString.value = ''\n } else if (!checkedSet.has(option)) {\n checkedSet.add(option)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(option).get(valueKey)!]\n }\n } else {\n checkedSet.delete(option)\n const val = chainObj(option).get(valueKey)\n internalChange = true\n model.value = (model.value ?? []).filter((v) => v !== val)\n removeCreatedOption(option)\n }\n\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\n/** 全选 */\nconst handleCheckAll = (checked: boolean) => {\n const { valueKey } = props\n if (checked) {\n options.value.forEach((option) => {\n if (!option.__isTemp) checkedSet.add(option)\n })\n internalChange = true\n model.value = Array.from(checkedSet).map((o) => chainObj(o).get(valueKey)!)\n } else {\n checkedSet.clear()\n internalChange = true\n model.value = []\n if (props.creatable) {\n createdOptions.value = []\n }\n }\n\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\n/** 清除选项 */\nconst handleClear = () => {\n checkedSet.clear()\n internalChange = true\n model.value = []\n if (props.creatable) {\n createdOptions.value = []\n }\n emit('change', [])\n}\n\nconst handleClose = (option: Record<string, any>) => {\n checkedSet.delete(option)\n const val = chainObj(option).get(props.valueKey)\n internalChange = true\n model.value = (model.value ?? []).filter((v) => v !== val)\n removeCreatedOption(option)\n emitChange()\n}\n\nconst removeCreatedOption = (option: Record<string, any>) => {\n if (!props.creatable || !createdOptions.value.length) return\n const { valueKey } = props\n const val = chainObj(option).get(valueKey)\n createdOptions.value = createdOptions.value.filter((o) => chainObj(o).get(valueKey) !== val)\n}\n\nconst handleCreateByEnter = () => {\n if (!props.creatable) return\n const qs = queryString.value?.trim()\n if (!qs) return\n\n const { labelKey, valueKey } = props\n\n const existingCreated = createdOptions.value.find((o) => chainObj(o).get(valueKey) === qs)\n if (existingCreated) {\n if (!checkedSet.has(existingCreated)) {\n checkedSet.add(existingCreated)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(existingCreated).get(valueKey)!]\n }\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n return\n }\n\n const exactMatch = rawOptions.value.find((o) => !o.__isTemp && chainObj(o).get(labelKey) === qs)\n if (exactMatch) {\n if (!checkedSet.has(exactMatch)) {\n checkedSet.add(exactMatch)\n internalChange = true\n model.value = [...(model.value ?? []), chainObj(exactMatch).get(valueKey)!]\n }\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n return\n }\n\n const created: Record<string, any> = { [labelKey]: qs, [valueKey]: qs }\n createdOptions.value = [...createdOptions.value, created]\n checkedSet.add(created)\n internalChange = true\n model.value = [...(model.value ?? []), qs]\n queryString.value = ''\n emitChange()\n dropdownRef.value?.updateDropdown()\n}\n\nconst isDisabled = (option: Record<string, any>) => {\n const { max } = props\n return max !== undefined && checkedSet.size >= max && !checkedSet.has(option)\n}\n\nconst optionClass = cls.e('option')\nconst rippleClass = cls.e('ripple')\nconst checkboxClass = cls.e('checkbox')\n\nprovide(MultiSelectDIKey, { optionClass, rippleClass, checkboxClass })\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwKA,MAAM,QAAQ;EAWd,MAAM,OAAO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//#region src/components/number/number.vue.d.ts
3
3
  declare const __VLS_export: import("vue").DefineComponent<NumberProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NumberProps> & Readonly<{}>, {
4
- duration: number;
5
4
  format: "currency" | "percent" | "decimal";
5
+ duration: number;
6
6
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
7
  declare const _default: typeof __VLS_export;
8
8
  //#endregion
@@ -12,8 +12,8 @@ declare const __VLS_base: import("vue").DefineComponent<PopConfirmProps, {}, {},
12
12
  onConfirm?: (() => any) | undefined;
13
13
  onCancel?: (() => any) | undefined;
14
14
  }>, {
15
- trigger: "hover" | "click";
16
15
  direction: TipDirection;
16
+ trigger: "hover" | "click";
17
17
  icon: import("vue").Component;
18
18
  iconColor: string;
19
19
  confirmText: string;
@@ -12,8 +12,8 @@ declare const __VLS_base: import("vue").DefineComponent<StepsProps, {}, {}, {},
12
12
  "onUpdate:current"?: ((value?: string | number | undefined) => any) | undefined;
13
13
  "onItem-click"?: ((item: Record<string, any>, index: number) => any) | undefined;
14
14
  }>, {
15
- labelKey: string;
16
15
  direction: "horizontal" | "vertical";
16
+ labelKey: string;
17
17
  finishedStepType: import("@veltra/utils").ColorType;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -70,7 +70,7 @@ const UTableRow = defineComponent({
70
70
  const expandCtx = getCellCtx(row, _expandColumn);
71
71
  const cellSpan = tableProps.mergeCell?.(expandCtx);
72
72
  if (!cellSpan || cellSpan.colspan && cellSpan.rowspan) {
73
- const marginLeft = tableProps.tree ? (row.depth - 1) * 14 : 0;
73
+ const marginLeft = tableProps.tree ? row.depth * 14 : 0;
74
74
  expandCell = createVNode(_sfc_main$2, mergeProps({
75
75
  "cellClass": getCellClass(_expandColumn),
76
76
  "left": _expandColumn.style.left,
@@ -1 +1 @@
1
- {"version":3,"file":"table-row.js","names":["ArrowRight","defineComponent","DefineComponent","inject","onUnmounted","JSX","TableRow","ITableRow","UButton","UIcon","TableDIKey","UTabelCell","_isSlot","s","Object","prototype","toString","call","_isVNode","ROW_MOD_CLASS","const","rowModCls","row","i","isCurrent","checked","expanded","UTableRow","index","name","props","type","required","Number","setup","cls","columnConfig","getColumnSlotsNode","toggleTreeRowExpand","getCellCtx","handleRowClick","handleCellClick","tableProps","measureElement","getCellClass","rowBaseCls","e","expandToggleCls","expandSpaceCls","measureRefCache","Map","el","getMeasureRef","ref","get","undefined","Element","set","clear","columns","expandColumn","_expandColumn","value","expandCell","expandCtx","cellSpan","mergeCell","colspan","rowspan","marginLeft","tree","depth","_createVNode","_mergeProps","style","left","right","uid","key","default","isLeaf","expandable","isExpandRow","stopPropagation","mod","rowCls","map","column","cellCtx","cellNode","UExpandTableRow","getExpandRowSlotsNode","leafColumns","cellCls","measureRef","node","rowData","data","length"],"sources":["../../../src/components/table/table-row.tsx"],"sourcesContent":["import { ArrowRight } from '@veltra/icons/normal'\nimport { defineComponent, type DefineComponent } from 'vue'\nimport { inject, onUnmounted } from 'vue'\nimport type { JSX } from 'vue/jsx-runtime'\n\nimport type { TableRow as ITableRow } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { TableDIKey } from './di'\nimport UTabelCell from './table-cell.vue'\n\n/**\n * A3:行修饰类组合静态查找表。\n *\n * 位模式:bit2 = isCurrent, bit1 = checked, bit0 = expanded。\n * 与 `bem.is('...')` 对于 `'current' | 'checked' | 'expanded'` 的输出完全等价,\n * 直接从 index 读字符串,消除每行渲染期间的字符串拼接和 3 次 bem.is 调用。\n *\n * 放在模块顶层使所有 TableRow 实例共享一份引用(不会随 setup 重建)。\n */\nconst ROW_MOD_CLASS: readonly string[] = [\n '',\n 'is-expanded',\n 'is-checked',\n 'is-checked is-expanded',\n 'is-current',\n 'is-current is-expanded',\n 'is-current is-checked',\n 'is-current is-checked is-expanded'\n] as const\n\nfunction rowModCls(row: ITableRow): string {\n const i = (row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0)\n return ROW_MOD_CLASS[i]!\n}\n\nexport const UTableRow: DefineComponent<{ row: ITableRow; index: number }> = defineComponent({\n name: 'TableRow',\n\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n\n setup(props) {\n const {\n cls,\n columnConfig,\n getColumnSlotsNode,\n toggleTreeRowExpand,\n getCellCtx,\n handleRowClick,\n handleCellClick,\n tableProps,\n measureElement,\n getCellClass\n } = inject(TableDIKey)!\n\n // A1:把 cls.e('row') / cls.e('expand-toggle') 等静态字符串提升到 setup 一次性计算,\n // 避免每次 render 重新走 `cls.e` 拼接。\n const rowBaseCls = cls.e('row')\n const expandToggleCls = cls.e('expand-toggle')\n const expandSpaceCls = cls.e('expand-space')\n\n // A2:measureRef 按 index 缓存闭包。\n // 行虚拟化下,同一 TableRow 实例的 props.index 大多稳定,但在虚拟化重排或展开行切换时\n // 仍会发生变化;把 (index) → refFn 缓存起来,既保证引用稳定(利于 Vue 的 ref diff),\n // 又避免在未来可能的\"同实例跨 index 复用\"情形下重复分配闭包。\n const measureRefCache = new Map<number, (el: unknown) => void>()\n const getMeasureRef = (index: number): ((el: unknown) => void) => {\n let ref = measureRefCache.get(index)\n if (ref === undefined) {\n ref = (el: unknown) => {\n measureElement(index, el as Element | null)\n }\n measureRefCache.set(index, ref)\n }\n return ref\n }\n onUnmounted(() => {\n measureRefCache.clear()\n })\n\n const { columns, expandColumn } = columnConfig\n\n return () => {\n const { row } = props\n const _expandColumn = expandColumn.value\n\n let expandCell: JSX.Element | null = null\n if (_expandColumn) {\n const expandCtx = getCellCtx(row, _expandColumn)\n const cellSpan = tableProps.mergeCell?.(expandCtx)\n\n if (!cellSpan || (cellSpan.colspan && cellSpan.rowspan)) {\n const marginLeft = tableProps.tree ? (row.depth - 1) * 14 : 0\n expandCell = (\n <UTabelCell\n cellClass={getCellClass(_expandColumn)}\n left={_expandColumn.style.left}\n right={_expandColumn.style.right}\n key={row.uid + _expandColumn.key}\n {...tableProps.mergeCell?.(expandCtx)}\n >\n {!row.isLeaf || (tableProps.expandable && !row.isExpandRow) ? (\n <UButton\n text\n class={expandToggleCls}\n type='primary'\n size='small'\n circle\n onClick={(e) => {\n e.stopPropagation()\n toggleTreeRowExpand(row)\n }}\n style={`margin-left: ${marginLeft}px`}\n >\n <UIcon>\n <ArrowRight />\n </UIcon>\n </UButton>\n ) : (\n <i class={expandSpaceCls} style={`margin-left: ${marginLeft}px`}></i>\n )}\n\n {getColumnSlotsNode(expandCtx)}\n </UTabelCell>\n )\n }\n }\n\n // A3:行 class 由 base + 3-bit 组合查找产出,避免 Vue 的 class 数组归一化开销。\n const mod = rowModCls(row)\n const rowCls = mod ? rowBaseCls + ' ' + mod : rowBaseCls\n\n return (\n <tr\n class={rowCls}\n onClick={(e) => handleRowClick(row, e)}\n ref={getMeasureRef(props.index)}\n key={row.uid}\n >\n {expandCell}\n\n {columns.value.map((column) => {\n const cellCtx = getCellCtx(row, column)\n const cellSpan = tableProps.mergeCell?.(cellCtx)\n if (cellSpan && (!cellSpan.colspan || !cellSpan.rowspan)) {\n return null\n }\n\n const cellNode = getColumnSlotsNode(cellCtx)\n\n return (\n <UTabelCell\n cellClass={getCellClass(column)}\n left={column.style.left}\n right={column.style.right}\n key={row.uid + column.key}\n // @ts-ignore\n onClick={(e) => handleCellClick(row, column, e)}\n {...cellSpan}\n >\n {cellNode}\n </UTabelCell>\n )\n })}\n </tr>\n )\n }\n }\n})\n\nexport const UExpandTableRow = defineComponent({\n name: 'ExpandTableRow',\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n setup(props) {\n const { getExpandRowSlotsNode, cls, measureElement, columnConfig } = inject(TableDIKey)!\n const { leafColumns } = columnConfig\n\n const rowBaseCls = cls.e('row')\n const cellCls = cls.e('cell')\n\n const measureRef = (el: unknown) => {\n measureElement(props.index, el as Element | null)\n }\n\n return () => {\n const { row } = props\n const node = getExpandRowSlotsNode({\n row,\n index: row.index,\n columns: leafColumns.value,\n rowData: row.data\n })\n return (\n <tr class={rowBaseCls} ref={measureRef}>\n <td colspan={leafColumns.value.length} class={cellCls}>\n {node}\n </td>\n </tr>\n )\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAAY,QAAAC,GAAA;CAAA,OAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAA,qBAAA,CAAAK,QAAAL,CAAA;AAAA;AASA,MAAMM,gBAAmC;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAAmC;AAGrC,SAASE,UAAUC,KAAwB;CAEzC,OAAOH,eADIG,IAAIE,YAAY,IAAI,MAAMF,IAAIG,UAAU,IAAI,MAAMH,IAAII,WAAW,IAAI;AAElF;AAEA,MAAaC,YAAgE1B,gBAAgB;CAC3F4B,MAAM;CAENC,OAAO;EACLR,KAAK;GAAES,MAAMjB;GAA2BkB,UAAU;EAAK;EACvDJ,OAAO;GAAEG,MAAME;GAAQD,UAAU;EAAK;CACxC;CAEAE,MAAMJ,OAAO;EACX,MAAM,EACJK,KACAC,cACAC,oBACAC,qBACAC,YACAC,gBACAC,iBACAC,YACAC,gBACAC,iBACEzC,OAAOO,UAAU;EAIrB,MAAMmC,aAAaV,IAAIW,EAAE,KAAK;EAC9B,MAAMC,kBAAkBZ,IAAIW,EAAE,eAAe;EAC7C,MAAME,iBAAiBb,IAAIW,EAAE,cAAc;EAM3C,MAAMG,kCAAkB,IAAIC,IAAmC;EAC/D,MAAME,iBAAiBxB,UAA2C;GAChE,IAAIyB,MAAMJ,gBAAgBK,IAAI1B,KAAK;GACnC,IAAIyB,QAAQE,KAAAA,GAAW;IACrBF,OAAOF,OAAgB;KACrBR,eAAef,OAAOuB,EAAoB;IAC5C;IACAF,gBAAgBQ,IAAI7B,OAAOyB,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7B,QAAQQ;GAChB,MAAMiE,OAAOJ,sBAAsB;IACjCrE;IACAM,OAAON,IAAIM;IACX+B,SAASiC,YAAY9B;IACrBkC,SAAS1E,IAAI2E;GACf,CAAC;GACD,OAAAzB,YAAA,MAAA;IAAA,SACa3B;IAAU,OAAOiD;GAAU,GAAA,CAAAtB,YAAA,MAAA;IAAA,WACvBoB,YAAY9B,MAAMoC;IAAM,SAASL;GAAO,GAAA,CAClDE,IAAI,CAAA,CAAA,CAAA;EAIb;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"table-row.js","names":["ArrowRight","defineComponent","DefineComponent","inject","onUnmounted","JSX","TableRow","ITableRow","UButton","UIcon","TableDIKey","UTabelCell","_isSlot","s","Object","prototype","toString","call","_isVNode","ROW_MOD_CLASS","const","rowModCls","row","i","isCurrent","checked","expanded","UTableRow","index","name","props","type","required","Number","setup","cls","columnConfig","getColumnSlotsNode","toggleTreeRowExpand","getCellCtx","handleRowClick","handleCellClick","tableProps","measureElement","getCellClass","rowBaseCls","e","expandToggleCls","expandSpaceCls","measureRefCache","Map","el","getMeasureRef","ref","get","undefined","Element","set","clear","columns","expandColumn","_expandColumn","value","expandCell","expandCtx","cellSpan","mergeCell","colspan","rowspan","marginLeft","tree","depth","_createVNode","_mergeProps","style","left","right","uid","key","default","isLeaf","expandable","isExpandRow","stopPropagation","mod","rowCls","map","column","cellCtx","cellNode","UExpandTableRow","getExpandRowSlotsNode","leafColumns","cellCls","measureRef","node","rowData","data","length"],"sources":["../../../src/components/table/table-row.tsx"],"sourcesContent":["import { ArrowRight } from '@veltra/icons/normal'\nimport { defineComponent, type DefineComponent } from 'vue'\nimport { inject, onUnmounted } from 'vue'\nimport type { JSX } from 'vue/jsx-runtime'\n\nimport type { TableRow as ITableRow } from '../../types'\nimport { UButton } from '../button'\nimport { UIcon } from '../icon'\nimport { TableDIKey } from './di'\nimport UTabelCell from './table-cell.vue'\n\n/**\n * A3:行修饰类组合静态查找表。\n *\n * 位模式:bit2 = isCurrent, bit1 = checked, bit0 = expanded。\n * 与 `bem.is('...')` 对于 `'current' | 'checked' | 'expanded'` 的输出完全等价,\n * 直接从 index 读字符串,消除每行渲染期间的字符串拼接和 3 次 bem.is 调用。\n *\n * 放在模块顶层使所有 TableRow 实例共享一份引用(不会随 setup 重建)。\n */\nconst ROW_MOD_CLASS: readonly string[] = [\n '',\n 'is-expanded',\n 'is-checked',\n 'is-checked is-expanded',\n 'is-current',\n 'is-current is-expanded',\n 'is-current is-checked',\n 'is-current is-checked is-expanded'\n] as const\n\nfunction rowModCls(row: ITableRow): string {\n const i = (row.isCurrent ? 4 : 0) | (row.checked ? 2 : 0) | (row.expanded ? 1 : 0)\n return ROW_MOD_CLASS[i]!\n}\n\nexport const UTableRow: DefineComponent<{ row: ITableRow; index: number }> = defineComponent({\n name: 'TableRow',\n\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n\n setup(props) {\n const {\n cls,\n columnConfig,\n getColumnSlotsNode,\n toggleTreeRowExpand,\n getCellCtx,\n handleRowClick,\n handleCellClick,\n tableProps,\n measureElement,\n getCellClass\n } = inject(TableDIKey)!\n\n // A1:把 cls.e('row') / cls.e('expand-toggle') 等静态字符串提升到 setup 一次性计算,\n // 避免每次 render 重新走 `cls.e` 拼接。\n const rowBaseCls = cls.e('row')\n const expandToggleCls = cls.e('expand-toggle')\n const expandSpaceCls = cls.e('expand-space')\n\n // A2:measureRef 按 index 缓存闭包。\n // 行虚拟化下,同一 TableRow 实例的 props.index 大多稳定,但在虚拟化重排或展开行切换时\n // 仍会发生变化;把 (index) → refFn 缓存起来,既保证引用稳定(利于 Vue 的 ref diff),\n // 又避免在未来可能的\"同实例跨 index 复用\"情形下重复分配闭包。\n const measureRefCache = new Map<number, (el: unknown) => void>()\n const getMeasureRef = (index: number): ((el: unknown) => void) => {\n let ref = measureRefCache.get(index)\n if (ref === undefined) {\n ref = (el: unknown) => {\n measureElement(index, el as Element | null)\n }\n measureRefCache.set(index, ref)\n }\n return ref\n }\n onUnmounted(() => {\n measureRefCache.clear()\n })\n\n const { columns, expandColumn } = columnConfig\n\n return () => {\n const { row } = props\n const _expandColumn = expandColumn.value\n\n let expandCell: JSX.Element | null = null\n if (_expandColumn) {\n const expandCtx = getCellCtx(row, _expandColumn)\n const cellSpan = tableProps.mergeCell?.(expandCtx)\n\n if (!cellSpan || (cellSpan.colspan && cellSpan.rowspan)) {\n const marginLeft = tableProps.tree ? row.depth * 14 : 0\n expandCell = (\n <UTabelCell\n cellClass={getCellClass(_expandColumn)}\n left={_expandColumn.style.left}\n right={_expandColumn.style.right}\n key={row.uid + _expandColumn.key}\n {...tableProps.mergeCell?.(expandCtx)}\n >\n {!row.isLeaf || (tableProps.expandable && !row.isExpandRow) ? (\n <UButton\n text\n class={expandToggleCls}\n type='primary'\n size='small'\n circle\n onClick={(e) => {\n e.stopPropagation()\n toggleTreeRowExpand(row)\n }}\n style={`margin-left: ${marginLeft}px`}\n >\n <UIcon>\n <ArrowRight />\n </UIcon>\n </UButton>\n ) : (\n <i class={expandSpaceCls} style={`margin-left: ${marginLeft}px`}></i>\n )}\n\n {getColumnSlotsNode(expandCtx)}\n </UTabelCell>\n )\n }\n }\n\n // A3:行 class 由 base + 3-bit 组合查找产出,避免 Vue 的 class 数组归一化开销。\n const mod = rowModCls(row)\n const rowCls = mod ? rowBaseCls + ' ' + mod : rowBaseCls\n\n return (\n <tr\n class={rowCls}\n onClick={(e) => handleRowClick(row, e)}\n ref={getMeasureRef(props.index)}\n key={row.uid}\n >\n {expandCell}\n\n {columns.value.map((column) => {\n const cellCtx = getCellCtx(row, column)\n const cellSpan = tableProps.mergeCell?.(cellCtx)\n if (cellSpan && (!cellSpan.colspan || !cellSpan.rowspan)) {\n return null\n }\n\n const cellNode = getColumnSlotsNode(cellCtx)\n\n return (\n <UTabelCell\n cellClass={getCellClass(column)}\n left={column.style.left}\n right={column.style.right}\n key={row.uid + column.key}\n // @ts-ignore\n onClick={(e) => handleCellClick(row, column, e)}\n {...cellSpan}\n >\n {cellNode}\n </UTabelCell>\n )\n })}\n </tr>\n )\n }\n }\n})\n\nexport const UExpandTableRow = defineComponent({\n name: 'ExpandTableRow',\n props: {\n row: { type: Object as () => ITableRow, required: true },\n index: { type: Number, required: true }\n },\n setup(props) {\n const { getExpandRowSlotsNode, cls, measureElement, columnConfig } = inject(TableDIKey)!\n const { leafColumns } = columnConfig\n\n const rowBaseCls = cls.e('row')\n const cellCls = cls.e('cell')\n\n const measureRef = (el: unknown) => {\n measureElement(props.index, el as Element | null)\n }\n\n return () => {\n const { row } = props\n const node = getExpandRowSlotsNode({\n row,\n index: row.index,\n columns: leafColumns.value,\n rowData: row.data\n })\n return (\n <tr class={rowBaseCls} ref={measureRef}>\n <td colspan={leafColumns.value.length} class={cellCls}>\n {node}\n </td>\n </tr>\n )\n }\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAWA,SAAAY,QAAAC,GAAA;CAAA,OAAA,OAAAA,MAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAA,qBAAA,CAAAK,QAAAL,CAAA;AAAA;AASA,MAAMM,gBAAmC;CACvC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AAAmC;AAGrC,SAASE,UAAUC,KAAwB;CAEzC,OAAOH,eADIG,IAAIE,YAAY,IAAI,MAAMF,IAAIG,UAAU,IAAI,MAAMH,IAAII,WAAW,IAAI;AAElF;AAEA,MAAaC,YAAgE1B,gBAAgB;CAC3F4B,MAAM;CAENC,OAAO;EACLR,KAAK;GAAES,MAAMjB;GAA2BkB,UAAU;EAAK;EACvDJ,OAAO;GAAEG,MAAME;GAAQD,UAAU;EAAK;CACxC;CAEAE,MAAMJ,OAAO;EACX,MAAM,EACJK,KACAC,cACAC,oBACAC,qBACAC,YACAC,gBACAC,iBACAC,YACAC,gBACAC,iBACEzC,OAAOO,UAAU;EAIrB,MAAMmC,aAAaV,IAAIW,EAAE,KAAK;EAC9B,MAAMC,kBAAkBZ,IAA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AO;EACX,MAAM,EAAE6D,uBAAuBxD,KAAKQ,gBAAgBP,iBAAiBjC,OAAOO,UAAU;EACtF,MAAM,EAAEkF,gBAAgBxD;EAExB,MAAMS,aAAaV,IAAIW,EAAE,KAAK;EAC9B,MAAM+C,UAAU1D,IAAIW,EAAE,MAAM;EAE5B,MAAMgD,cAAc3C,OAAgB;GAClCR,eAAeb,MAAMF,OAAOuB,EAAoB;EAClD;EAEA,aAAa;GACX,MAAM,EAAE7B,QAAQQ;GAChB,MAAMiE,OAAOJ,sBAAsB;IACjCrE;IACAM,OAAON,IAAIM;IACX+B,SAASiC,YAAY9B;IACrBkC,SAAS1E,IAAI2E;GACf,CAAC;GACD,OAAAzB,YAAA,MAAA;IAAA,SACa3B;IAAU,OAAOiD;GAAU,GAAA,CAAAtB,YAAA,MAAA;IAAA,WACvBoB,YAAY9B,MAAMoC;IAAM,SAASL;GAAO,GAAA,CAClDE,IAAI,CAAA,CAAA,CAAA;EAIb;CACF;AACF,CAAC"}
@@ -9,11 +9,11 @@ declare const __VLS_base: import("vue").DefineComponent<TipProps, {}, {}, {}, {}
9
9
  }, string, import("vue").PublicProps, Readonly<TipProps> & Readonly<{
10
10
  "onUpdate:visible"?: ((value: boolean) => any) | undefined;
11
11
  }>, {
12
- content: string;
12
+ direction: TipDirection;
13
13
  trigger: "hover" | "click";
14
14
  contentTag: string;
15
15
  visible: boolean;
16
- direction: TipDirection;
16
+ content: string;
17
17
  alignment: TipAlign;
18
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -5,8 +5,8 @@ type __VLS_Slots = {} & {
5
5
  default?: (props: typeof __VLS_7) => any;
6
6
  };
7
7
  declare const __VLS_base: import("vue").DefineComponent<WatermarkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<WatermarkProps> & Readonly<{}>, {
8
- route: number;
9
8
  fontSize: number;
9
+ route: number;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
12
  declare const _default: typeof __VLS_export;
package/dist/index.d.ts CHANGED
@@ -21,7 +21,7 @@ import { NumberEmits, NumberExposed, NumberProps } from "./types/number.js";
21
21
  import { NotificationEmits, NotificationExposed, NotificationProps, _NotificationExposed } from "./types/notification.js";
22
22
  import { ButtonEmits, ButtonExposed, ButtonProps, ButtonType, _ButtonExposed } from "./types/button.js";
23
23
  import { DatePanelEmits, DatePanelProps, PanelType } from "./types/date-panel.js";
24
- import { DialogEmits, DialogExposed, DialogProps, _DialogExposed } from "./types/dialog.js";
24
+ import { DialogEmits, DialogExposed, DialogProps, DialogTransition, _DialogExposed } from "./types/dialog.js";
25
25
  import { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, _ActionExposed, _ActionGroupExposed } from "./types/action.js";
26
26
  import { NestedFieldMarker, formField, nestField } from "./components/form/helper.js";
27
27
  import { AllKeys, DataSettingConfig, FormExposed, FormModelField, FormModelItem, FormProps, IFormModel, ModelData, ModelRules, _FormExposed } from "./types/form.js";
@@ -181,8 +181,8 @@ export * from "@veltra/utils";
181
181
 
182
182
  //#region src/index.d.ts
183
183
  declare namespace index_d_exports {
184
- export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, EvaluateOptions as ConditionEvaluateOptions, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DynamicFormModel, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModel, FormModelField, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, _default as MessageConfirm, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NestedFieldMarker, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
184
+ export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, EvaluateOptions as ConditionEvaluateOptions, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DynamicFormModel, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModel, FormModelField, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, _default as MessageConfirm, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NestedFieldMarker, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
185
185
  }
186
186
  //#endregion
187
- export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AllKeys, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, type ContextmenuProps, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DataSettingConfig, type DatePanelEmits, type DatePanelProps, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, DynamicFormModel, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, FormModel, type FormModelField, type FormModelItem, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type IFormModel, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type MenuEmits, type MenuExposed, type MenuItem, type MenuProps, type Message, _default as MessageConfirm, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type ModelData, type ModelRules, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NestedFieldMarker, type NodeRenderExposed, type NodeRenderProps, Notification, type NotificationEmits, type NotificationExposed, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MenuExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
187
+ export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AllKeys, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, type ContextmenuProps, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DataSettingConfig, type DatePanelEmits, type DatePanelProps, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DialogTransition, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, DynamicFormModel, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, FormModel, type FormModelField, type FormModelItem, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type IFormModel, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type MenuEmits, type MenuExposed, type MenuItem, type MenuProps, type Message, _default as MessageConfirm, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type ModelData, type ModelRules, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NestedFieldMarker, type NodeRenderExposed, type NodeRenderProps, Notification, type NotificationEmits, type NotificationExposed, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MenuExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
188
188
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,8 @@
1
1
  import { ComponentSize, DeconstructValue } from "@veltra/utils";
2
2
 
3
3
  //#region src/types/dialog.d.ts
4
+ /** 对话框过渡动画名称 */
5
+ type DialogTransition = 'fade-scale';
4
6
  /** 对话框组件属性 */
5
7
  interface DialogProps {
6
8
  /** 显示或隐藏 */
@@ -15,6 +17,8 @@ interface DialogProps {
15
17
  modal?: boolean;
16
18
  /** 全屏 */
17
19
  fullscreen?: boolean;
20
+ /** 弹框过渡动画,默认为 spring */
21
+ transition?: DialogTransition;
18
22
  }
19
23
  /** 对话框组件定义的事件 */
20
24
  interface DialogEmits {
@@ -31,5 +35,5 @@ interface _DialogExposed {
31
35
  /** 对话框组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
32
36
  type DialogExposed = DeconstructValue<_DialogExposed>;
33
37
  //#endregion
34
- export { DialogEmits, DialogExposed, DialogProps, _DialogExposed };
38
+ export { DialogEmits, DialogExposed, DialogProps, DialogTransition, _DialogExposed };
35
39
  //# sourceMappingURL=dialog.d.ts.map
@@ -21,7 +21,7 @@ import { NumberEmits, NumberExposed, NumberProps } from "./number.js";
21
21
  import { NotificationEmits, NotificationExposed, NotificationProps, _NotificationExposed } from "./notification.js";
22
22
  import { ButtonEmits, ButtonExposed, ButtonProps, ButtonType, _ButtonExposed } from "./button.js";
23
23
  import { DatePanelEmits, DatePanelProps, PanelType } from "./date-panel.js";
24
- import { DialogEmits, DialogExposed, DialogProps, _DialogExposed } from "./dialog.js";
24
+ import { DialogEmits, DialogExposed, DialogProps, DialogTransition, _DialogExposed } from "./dialog.js";
25
25
  import { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, _ActionExposed, _ActionGroupExposed } from "./action.js";
26
26
  import { AllKeys, DataSettingConfig, FormExposed, FormModelField, FormModelItem, FormProps, IFormModel, ModelData, ModelRules, _FormExposed } from "./form.js";
27
27
  import { TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, _TableExposed } from "./table.js";
@@ -81,7 +81,7 @@ export type * from "@veltra/utils";
81
81
 
82
82
  //#region src/types/index.d.ts
83
83
  declare namespace index_d_exports {
84
- export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModelField, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NodeRenderExposed, NodeRenderProps, NotificationEmits, NotificationExposed, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
84
+ export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModelField, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NodeRenderExposed, NodeRenderProps, NotificationEmits, NotificationExposed, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
85
85
  }
86
86
  import * as import__veltra_utils from "@veltra/utils";
87
87
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veltra/desktop",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -68,11 +68,11 @@
68
68
  "@cat-kit/core": ">=1.1.6",
69
69
  "@cat-kit/excel": ">=1.0.0",
70
70
  "@cat-kit/fe": "^1.1.6",
71
- "@veltra/compositions": "1.1.33",
72
- "@veltra/directives": "1.1.33",
73
- "@veltra/icons": "1.1.33",
74
- "@veltra/styles": "1.1.33",
75
- "@veltra/utils": "1.1.33",
71
+ "@veltra/compositions": "1.1.35",
72
+ "@veltra/directives": "1.1.35",
73
+ "@veltra/icons": "1.1.35",
74
+ "@veltra/styles": "1.1.35",
75
+ "@veltra/utils": "1.1.35",
76
76
  "vue": ">=3.5.0"
77
77
  }
78
78
  }
@@ -10,7 +10,7 @@
10
10
  @keyup.esc="close"
11
11
  tabindex="0"
12
12
  >
13
- <transition name="spring" @after-leave="onAfterDialogLeave">
13
+ <transition :name="transition" @after-leave="onAfterDialogLeave">
14
14
  <div
15
15
  v-if="dialogVisible"
16
16
  v-bind="$attrs"
@@ -51,7 +51,6 @@
51
51
  <u-scroll
52
52
  tag="section"
53
53
  :class="cls.e('body')"
54
- ref="bodyRef"
55
54
  :content-style="{ height: maximized ? '100%' : undefined }"
56
55
  @transitionend.stop
57
56
  @transitioncancel.stop
@@ -59,7 +58,7 @@
59
58
  <slot v-bind="{ maximized }" />
60
59
  </u-scroll>
61
60
 
62
- <section ref="footerRef" :class="footerCls" v-if="$slots.footer">
61
+ <section :class="footerCls" v-if="$slots.footer">
63
62
  <slot name="footer" v-bind="{ close }" />
64
63
  </section>
65
64
  </div>
@@ -79,7 +78,6 @@ import { bem, extractNormalVNodes, setStyles, zIndex } from '@veltra/utils'
79
78
  import { shallowRef, watch, computed, provide, nextTick } from 'vue'
80
79
 
81
80
  import type { DialogProps, DialogEmits, DialogExposed, ComponentSize } from '../../types'
82
- import type { ScrollExposed } from '../../types'
83
81
  import { UIcon } from '../icon'
84
82
  import { UNodeRender } from '../node-render'
85
83
  import { UScroll } from '../scroll'
@@ -91,7 +89,8 @@ defineOptions({ name: 'Dialog', inheritAttrs: false })
91
89
  const props = withDefaults(defineProps<DialogProps>(), {
92
90
  modal: true,
93
91
  modelValue: true,
94
- autoScroll: true
92
+ autoScroll: true,
93
+ transition: 'fade-scale'
95
94
  })
96
95
  const emit = defineEmits<DialogEmits>()
97
96
 
@@ -119,12 +118,6 @@ const dialogRef = shallowRef<HTMLDivElement>()
119
118
  /** 弹框头部模板引用 */
120
119
  const headerRef = shallowRef<HTMLDivElement>()
121
120
 
122
- /** 弹框body模板引用 */
123
- const bodyRef = shallowRef<ScrollExposed>()
124
-
125
- /** 弹框footer模板引用 */
126
- const footerRef = shallowRef<HTMLDivElement>()
127
-
128
121
  const visible = defineModel<boolean>({ default: false })
129
122
 
130
123
  const overlayVisible = shallowRef(false)
@@ -1,5 +1,4 @@
1
1
  import '../icon/style'
2
2
  import '../scroll/style'
3
- import '@veltra/styles/transitions/fade.scss'
4
- import '@veltra/styles/transitions/spring.scss'
3
+ import '@veltra/styles/transitions/fade-scale.scss'
5
4
  import './style.scss'
@@ -24,11 +24,12 @@
24
24
  v-for="option of tags"
25
25
  :key="option[valueKey]"
26
26
  :closable="!disabled"
27
+ size="small"
27
28
  @close="handleClose(option)"
28
29
  >
29
30
  {{ option[labelKey] }}
30
31
  </u-tag>
31
- <u-tag v-if="restTag"> {{ restTag }}+ </u-tag>
32
+ <u-tag v-if="restTag" size="small"> {{ restTag }}+ </u-tag>
32
33
  </div>
33
34
 
34
35
  <transition name="zoom-in" mode="out-in">
@@ -127,7 +128,7 @@
127
128
 
128
129
  <div v-else-if="model?.length" :class="[cls.m(size), cls.e('readonly-tags')]">
129
130
  <div :class="cls.e('tags')">
130
- <u-tag v-for="option of tags" :key="option[valueKey]">
131
+ <u-tag v-for="option of tags" :key="option[valueKey]" size="small">
131
132
  {{ option[labelKey] }}
132
133
  </u-tag>
133
134
  </div>
@@ -330,12 +331,12 @@ const handleCheck = (option: Record<string, any>, checked: boolean) => {
330
331
  createdOptions.value = [...createdOptions.value, created]
331
332
  checkedSet.add(created)
332
333
  internalChange = true
333
- model.value = [...(model.value ?? []), chainObj(created).get(valueKey)]
334
+ model.value = [...(model.value ?? []), chainObj(created).get(valueKey)!]
334
335
  queryString.value = ''
335
336
  } else if (!checkedSet.has(option)) {
336
337
  checkedSet.add(option)
337
338
  internalChange = true
338
- model.value = [...(model.value ?? []), chainObj(option).get(valueKey)]
339
+ model.value = [...(model.value ?? []), chainObj(option).get(valueKey)!]
339
340
  }
340
341
  } else {
341
342
  checkedSet.delete(option)
@@ -357,7 +358,7 @@ const handleCheckAll = (checked: boolean) => {
357
358
  if (!option.__isTemp) checkedSet.add(option)
358
359
  })
359
360
  internalChange = true
360
- model.value = Array.from(checkedSet).map((o) => chainObj(o).get(valueKey))
361
+ model.value = Array.from(checkedSet).map((o) => chainObj(o).get(valueKey)!)
361
362
  } else {
362
363
  checkedSet.clear()
363
364
  internalChange = true
@@ -410,7 +411,7 @@ const handleCreateByEnter = () => {
410
411
  if (!checkedSet.has(existingCreated)) {
411
412
  checkedSet.add(existingCreated)
412
413
  internalChange = true
413
- model.value = [...(model.value ?? []), chainObj(existingCreated).get(valueKey)]
414
+ model.value = [...(model.value ?? []), chainObj(existingCreated).get(valueKey)!]
414
415
  }
415
416
  queryString.value = ''
416
417
  emitChange()
@@ -423,7 +424,7 @@ const handleCreateByEnter = () => {
423
424
  if (!checkedSet.has(exactMatch)) {
424
425
  checkedSet.add(exactMatch)
425
426
  internalChange = true
426
- model.value = [...(model.value ?? []), chainObj(exactMatch).get(valueKey)]
427
+ model.value = [...(model.value ?? []), chainObj(exactMatch).get(valueKey)!]
427
428
  }
428
429
  queryString.value = ''
429
430
  emitChange()
@@ -93,7 +93,7 @@ export const UTableRow: DefineComponent<{ row: ITableRow; index: number }> = def
93
93
  const cellSpan = tableProps.mergeCell?.(expandCtx)
94
94
 
95
95
  if (!cellSpan || (cellSpan.colspan && cellSpan.rowspan)) {
96
- const marginLeft = tableProps.tree ? (row.depth - 1) * 14 : 0
96
+ const marginLeft = tableProps.tree ? row.depth * 14 : 0
97
97
  expandCell = (
98
98
  <UTabelCell
99
99
  cellClass={getCellClass(_expandColumn)}
@@ -1,5 +1,8 @@
1
1
  import type { ComponentSize, DeconstructValue } from '@veltra/utils'
2
2
 
3
+ /** 对话框过渡动画名称 */
4
+ export type DialogTransition = 'fade-scale'
5
+
3
6
  /** 对话框组件属性 */
4
7
  export interface DialogProps {
5
8
  /** 显示或隐藏 */
@@ -14,6 +17,8 @@ export interface DialogProps {
14
17
  modal?: boolean
15
18
  /** 全屏 */
16
19
  fullscreen?: boolean
20
+ /** 弹框过渡动画,默认为 spring */
21
+ transition?: DialogTransition
17
22
  }
18
23
 
19
24
  /** 对话框组件定义的事件 */