@aplus-frontend/ui 0.1.26 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/es/src/ap-download/ap-download.vue.d.ts +12 -4
  2. package/es/src/ap-download/ap-download.vue.mjs +72 -37
  3. package/es/src/ap-download/interface.d.ts +5 -12
  4. package/es/src/ap-download/style/ap-download.css +6 -0
  5. package/es/src/ap-field/select/index.vue.mjs +65 -63
  6. package/es/src/ap-table/ap-table.vue.mjs +231 -183
  7. package/es/src/ap-table/components/interface.d.ts +33 -1
  8. package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
  9. package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
  10. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  11. package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
  12. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
  13. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  14. package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
  15. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
  16. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  17. package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
  18. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
  19. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  20. package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
  21. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
  22. package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  23. package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
  24. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  25. package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
  26. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
  27. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  28. package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
  29. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
  30. package/es/src/ap-table/components/setting/utils.d.ts +17 -0
  31. package/es/src/ap-table/components/setting/utils.mjs +48 -0
  32. package/es/src/ap-table/components/style/setting/modal.css +39 -0
  33. package/es/src/ap-table/components/style/setting/select-group.css +7 -0
  34. package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  35. package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
  36. package/es/src/ap-table/components/style/setting/sorter.css +26 -0
  37. package/es/src/ap-table/constants.d.ts +31 -8
  38. package/es/src/ap-table/constants.mjs +41 -53
  39. package/es/src/ap-table/context.d.ts +31 -0
  40. package/es/src/ap-table/context.mjs +20 -0
  41. package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  42. package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
  43. package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
  44. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  45. package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
  46. package/es/src/ap-table/interface.d.ts +51 -1
  47. package/es/src/ap-table/style/ap-table.css +29 -1
  48. package/es/src/ap-table/utils.d.ts +1 -1
  49. package/es/src/ap-table/utils.mjs +82 -82
  50. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  51. package/es/src/business/ap-attachment/ApAttachment.mjs +89 -66
  52. package/es/src/business/ap-attachment/interface.d.ts +1 -1
  53. package/es/src/business/ap-attachment/style.css +6 -0
  54. package/es/src/business/ap-input-radio/interface.d.ts +1 -1
  55. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  56. package/es/src/business/index.d.ts +1 -3
  57. package/es/src/editable-table/interface.d.ts +1 -1
  58. package/es/src/locale/lang/en.mjs +14 -0
  59. package/es/src/locale/lang/zh-cn.mjs +14 -0
  60. package/es/src/theme/ap-attachment/ap-attachment.css +6 -0
  61. package/es/src/theme/ap-download/ap-download.css +6 -0
  62. package/es/src/theme/ap-table/ap-table.css +29 -1
  63. package/es/src/theme/ap-table/setting/modal.css +39 -0
  64. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  65. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  66. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  67. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  68. package/es/src/theme/css-var/index.mjs +22 -12
  69. package/lib/src/ap-download/ap-download.vue.d.ts +12 -4
  70. package/lib/src/ap-download/ap-download.vue.js +1 -1
  71. package/lib/src/ap-download/interface.d.ts +5 -12
  72. package/lib/src/ap-download/style/ap-download.css +6 -0
  73. package/lib/src/ap-field/select/index.vue.js +1 -1
  74. package/lib/src/ap-table/ap-table.vue.js +1 -1
  75. package/lib/src/ap-table/components/interface.d.ts +33 -1
  76. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  77. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  78. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  79. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  80. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  81. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  82. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  83. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  84. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  85. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  86. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  87. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  88. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  89. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  90. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  91. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  92. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  93. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  94. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  95. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  96. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  97. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  98. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  99. package/lib/src/ap-table/components/setting/utils.js +1 -0
  100. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  101. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  102. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  103. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  104. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  105. package/lib/src/ap-table/constants.d.ts +31 -8
  106. package/lib/src/ap-table/constants.js +1 -1
  107. package/lib/src/ap-table/context.d.ts +31 -0
  108. package/lib/src/ap-table/context.js +1 -0
  109. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  110. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  111. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  112. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  113. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  114. package/lib/src/ap-table/interface.d.ts +51 -1
  115. package/lib/src/ap-table/style/ap-table.css +29 -1
  116. package/lib/src/ap-table/utils.d.ts +1 -1
  117. package/lib/src/ap-table/utils.js +1 -1
  118. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  119. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  120. package/lib/src/business/ap-attachment/interface.d.ts +1 -1
  121. package/lib/src/business/ap-attachment/style.css +6 -0
  122. package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
  123. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  124. package/lib/src/business/index.d.ts +1 -3
  125. package/lib/src/editable-table/interface.d.ts +1 -1
  126. package/lib/src/locale/lang/en.js +1 -1
  127. package/lib/src/locale/lang/zh-cn.js +1 -1
  128. package/lib/src/theme/ap-attachment/ap-attachment.css +6 -0
  129. package/lib/src/theme/ap-download/ap-download.css +6 -0
  130. package/lib/src/theme/ap-table/ap-table.css +29 -1
  131. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  132. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  133. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  134. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  135. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  136. package/lib/src/theme/css-var/index.js +1 -1
  137. package/package.json +3 -2
@@ -1,5 +1,6 @@
1
1
  import { ApDownLoadProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { ButtonType } from 'ant-design-vue/es/button';
3
4
  declare function __VLS_template(): {
4
5
  slots: {
5
6
  icon?(_: {}): any;
@@ -8,14 +9,21 @@ declare function __VLS_template(): {
8
9
  attrs: Partial<{}>;
9
10
  };
10
11
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
12
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps>, {
13
+ type: string;
12
14
  size: string;
13
15
  disabled: boolean;
14
- }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps<Record<string, string>>>, {
16
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
17
+ downloadCallback: (...args: any[]) => void;
18
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApDownLoadProps>, {
19
+ type: string;
15
20
  size: string;
16
21
  disabled: boolean;
17
- }>>>, {
18
- size: "small" | "middle" | "large";
22
+ }>>> & {
23
+ onDownloadCallback?: ((...args: any[]) => any) | undefined;
24
+ }, {
25
+ size: "small" | "large" | "middle";
26
+ type: ButtonType;
19
27
  disabled: boolean;
20
28
  }, {}>;
21
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,56 +1,91 @@
1
- import { defineComponent as b, useSlots as F, computed as s, unref as t, openBlock as n, createElementBlock as a, normalizeStyle as O, normalizeClass as l, createElementVNode as r, renderSlot as h, createCommentVNode as A, toDisplayString as k } from "vue";
1
+ import { defineComponent as z, ref as N, useSlots as O, computed as t, unref as s, openBlock as l, createBlock as F, mergeProps as x, withCtx as A, createElementVNode as r, normalizeClass as S, createElementBlock as c, createVNode as I, createCommentVNode as d, renderSlot as L, toDisplayString as M } from "vue";
2
+ import { Button as U } from "ant-design-vue";
3
+ import { LoadingOutlined as V } from "@ant-design/icons-vue";
2
4
  import "../config-provider/index.mjs";
3
- import { useOssInit as v } from "./hooks/index.mjs";
5
+ import { useOssInit as j } from "./hooks/index.mjs";
4
6
  import "./style/ap-download.css";
5
- import { getFileInfo as B } from "./utils/getFileInfo.mjs";
6
- import { useStyle as x } from "./hooks/useStyle.mjs";
7
- import { useLocale as I } from "../config-provider/hooks/use-locale.mjs";
8
- import { useGlobalConfig as c } from "../config-provider/hooks/use-global-config.mjs";
9
- const U = {
7
+ import { getFileInfo as D } from "./utils/getFileInfo.mjs";
8
+ import { useStyle as E } from "./hooks/useStyle.mjs";
9
+ import { useLocale as G } from "../config-provider/hooks/use-locale.mjs";
10
+ import { useGlobalConfig as p } from "../config-provider/hooks/use-global-config.mjs";
11
+ const P = {
10
12
  key: 0,
13
+ class: "spin"
14
+ }, R = {
15
+ key: 1,
11
16
  class: "icon"
12
- }, D = { class: "text" }, H = /* @__PURE__ */ b({
17
+ }, T = { class: "text" }, ee = /* @__PURE__ */ z({
13
18
  name: "ApDownload",
14
19
  __name: "ap-download",
15
20
  props: {
16
- text: {},
17
- color: {},
21
+ prefixCls: {},
22
+ type: { default: "link" },
23
+ htmlType: {},
24
+ shape: {},
18
25
  size: { default: "middle" },
26
+ loading: { type: [Boolean, Object] },
19
27
  disabled: { type: Boolean, default: !1 },
28
+ ghost: { type: Boolean },
29
+ block: { type: Boolean },
30
+ danger: { type: Boolean },
31
+ icon: {},
32
+ href: {},
33
+ target: {},
34
+ title: {},
35
+ onClick: {},
36
+ onMousedown: {},
37
+ text: {},
38
+ color: {},
20
39
  fileName: {},
21
40
  needName: { type: [Boolean, Object] },
22
41
  getOssAccess: {}
23
42
  },
24
- setup(i) {
25
- const { lang: p } = I(), d = F(), m = s(() => p.value === "zh-cn" ? "zh_CN" : "en_US"), u = c("uiMode"), e = i, f = c("apUpload"), g = s(() => e.disabled), C = s(() => e.color ? e.color : u.value === "aplus" ? "#0070FF" : "#1890FF"), _ = s(() => e.size), { wrapperStyle: y, getWrapperClass: w, getInnerWrapperClass: z } = x(
26
- C,
27
- _,
28
- g
29
- ), N = s(() => {
43
+ emits: ["downloadCallback"],
44
+ setup(m, { emit: u }) {
45
+ const f = u, n = N(!1), { lang: g } = G(), y = O(), C = t(() => g.value === "zh-cn" ? "zh_CN" : "en_US"), _ = p("uiMode"), e = m, b = p("apUpload"), a = t(() => e.disabled), h = t(() => e.color ? e.color : _.value === "aplus" ? "#0070FF" : "#1890FF"), k = t(() => e.size), { getInnerWrapperClass: w } = E(h, k, a), B = t(() => {
30
46
  var o;
31
- return e.getOssAccess || ((o = f.value) == null ? void 0 : o.getOssAccess);
32
- }), S = async () => {
33
- e.disabled || await (await v(
34
- N.value,
35
- t(m)
36
- )).downloadFile(B(e.needName, e.fileName));
47
+ return e.getOssAccess || ((o = b.value) == null ? void 0 : o.getOssAccess);
48
+ }), v = async () => {
49
+ if (!e.disabled) {
50
+ n.value = !0;
51
+ try {
52
+ const i = await (await j(
53
+ B.value,
54
+ s(C)
55
+ )).downloadFile(
56
+ D(e.needName, e.fileName)
57
+ );
58
+ f("downloadCallback", i);
59
+ } catch (o) {
60
+ console.error(o);
61
+ } finally {
62
+ n.value = !1;
63
+ }
64
+ }
37
65
  };
38
- return (o, E) => (n(), a("span", {
39
- style: O(t(y)),
40
- class: l(t(w)),
41
- onClick: S
42
- }, [
43
- r("span", {
44
- class: l(t(z))
45
- }, [
46
- t(d).icon ? (n(), a("span", U, [
47
- h(o.$slots, "icon")
48
- ])) : A("", !0),
49
- r("span", D, k(o.text), 1)
50
- ], 2)
51
- ], 6));
66
+ return (o, i) => (l(), F(s(U), x(e, {
67
+ type: e.type,
68
+ size: e.size,
69
+ disabled: a.value,
70
+ onClick: v
71
+ }), {
72
+ default: A(() => [
73
+ r("div", {
74
+ class: S(s(w))
75
+ }, [
76
+ n.value ? (l(), c("span", P, [
77
+ I(s(V), { spin: !0 })
78
+ ])) : d("", !0),
79
+ s(y).icon ? (l(), c("span", R, [
80
+ L(o.$slots, "icon")
81
+ ])) : d("", !0),
82
+ r("span", T, M(o.text), 1)
83
+ ], 2)
84
+ ]),
85
+ _: 3
86
+ }, 16, ["type", "size", "disabled"]));
52
87
  }
53
88
  });
54
89
  export {
55
- H as default
90
+ ee as default
56
91
  };
@@ -1,9 +1,10 @@
1
- import { accessCreate } from '@aplus-frontend/oss';
1
+ import { accessCreate, client } from '@aplus-frontend/oss';
2
+ import { ButtonProps } from 'ant-design-vue/es/button';
2
3
  /**
3
4
  * 类型转换为单例和数组
4
5
  */
5
6
  type TypeToSingleAndArray<Type = any> = Type extends any ? Type | Type[] : never;
6
- export interface ApDownLoadProps<FileNameType extends Record<string, string> = Record<string, string>> {
7
+ export type ApDownLoadProps<FileNameType extends Record<string, string> = Record<string, string>> = ButtonProps & {
7
8
  /**
8
9
  * 标签内容
9
10
  */
@@ -12,15 +13,6 @@ export interface ApDownLoadProps<FileNameType extends Record<string, string> = R
12
13
  * 标签颜色
13
14
  */
14
15
  color?: string;
15
- /**
16
- * 标签大小
17
- */
18
- size?: 'small' | 'middle' | 'large';
19
- /**
20
- * 是否禁用
21
- * @default false
22
- */
23
- disabled?: boolean;
24
16
  fileName: TypeToSingleAndArray<string | FileNameType>;
25
17
  /**
26
18
  * 是否需要fileName别名
@@ -30,7 +22,7 @@ export interface ApDownLoadProps<FileNameType extends Record<string, string> = R
30
22
  */
31
23
  needName?: ApDownLoadNeedNameModel;
32
24
  getOssAccess?: () => Promise<accessCreate>;
33
- }
25
+ };
34
26
  /**
35
27
  * 别名配置项
36
28
  */
@@ -45,4 +37,5 @@ export declare enum ApDownLoadNeedNameKeyDefault {
45
37
  nameKey = "name",
46
38
  pathKey = "path"
47
39
  }
40
+ export type actionResponse = Awaited<ReturnType<typeof client.downloadFile>>;
48
41
  export {};
@@ -9,11 +9,17 @@
9
9
  display: flex;
10
10
  align-items: center;
11
11
  }
12
+ .aplus-ap-download-inner-wrapper .spin {
13
+ margin-right: 5px;
14
+ }
12
15
  .aplus-ap-download-inner-wrapper .icon {
13
16
  position: relative;
14
17
  font-size: 18px;
15
18
  margin-right: 5px;
16
19
  }
20
+ .aplus-ap-download-inner-wrapper .text {
21
+ color: var(--download-main-color);
22
+ }
17
23
  .aplus-ap-download-inner-wrapper:hover {
18
24
  color: var(--download-main-color-opacity);
19
25
  }
@@ -1,11 +1,11 @@
1
- import { defineComponent as k, ref as f, onMounted as q, computed as m, unref as u, openBlock as v, createElementBlock as A, toDisplayString as M, createBlock as T, mergeProps as _, createSlots as R, renderList as z, withCtx as h, renderSlot as D, normalizeProps as U, guardReactiveProps as L, createVNode as K } from "vue";
2
- import { debounce as H, isFunction as y, isArray as $, isNil as j, omit as E } from "lodash-unified";
3
- import { Select as W, Spin as G } from "ant-design-vue";
1
+ import { defineComponent as T, ref as p, onMounted as _, computed as y, unref as u, openBlock as w, createElementBlock as R, toDisplayString as z, createBlock as D, mergeProps as U, createSlots as L, renderList as K, withCtx as S, renderSlot as H, normalizeProps as $, guardReactiveProps as j, createVNode as E } from "vue";
2
+ import { debounce as W, isFunction as g, isArray as G, isNil as J, omit as Q } from "lodash-unified";
3
+ import { Select as X, Spin as Y } from "ant-design-vue";
4
4
  import "../../hooks/index.mjs";
5
- import { omitUndefined as J } from "../../utils/index.mjs";
6
- import { useDefaultPlaceholder as Q } from "../hooks/use-default-placeholder.mjs";
7
- import { useControllableValue as X } from "../../hooks/useControllableValue.mjs";
8
- const Y = { key: 0 }, re = /* @__PURE__ */ k({
5
+ import { omitUndefined as Z } from "../../utils/index.mjs";
6
+ import { useDefaultPlaceholder as ee } from "../hooks/use-default-placeholder.mjs";
7
+ import { useControllableValue as oe } from "../../hooks/useControllableValue.mjs";
8
+ const te = { key: 0 }, se = /* @__PURE__ */ T({
9
9
  name: "ApFieldSelect",
10
10
  __name: "index",
11
11
  props: {
@@ -93,27 +93,27 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
93
93
  lazy: { type: Boolean, default: !1 }
94
94
  },
95
95
  emits: ["update:value"],
96
- setup(w, { expose: S, emit: g }) {
96
+ setup(B, { expose: F, emit: b }) {
97
97
  let n = 0;
98
- const B = H((o) => {
99
- if (!y(e.request))
98
+ const C = W((o) => {
99
+ if (!g(e.request))
100
100
  return;
101
101
  n += 1;
102
102
  const t = n;
103
- i.value = [], a.value = !0, e.request(o).then((l) => {
103
+ i.value = [], r.value = !0, e.request(o).then((l) => {
104
104
  n === t && (i.value = l);
105
105
  }).finally(() => {
106
- a.value = !1;
106
+ r.value = !1;
107
107
  });
108
- }, 300), e = w, F = (o, t) => {
109
- var r;
110
- const l = ((r = e.fieldNames) == null ? void 0 : r.label) || "label";
108
+ }, 300), e = B, N = (o, t) => {
109
+ var a;
110
+ const l = ((a = e.fieldNames) == null ? void 0 : a.label) || "label";
111
111
  return typeof (t == null ? void 0 : t[l]) == "string" && t[l].indexOf(o) > -1;
112
- }, i = f((e == null ? void 0 : e.options) || []), d = f(), a = f((e == null ? void 0 : e.loading) || !1), C = g;
113
- async function s(o = !0) {
114
- if (!y(e.request))
112
+ }, i = p((e == null ? void 0 : e.options) || []), s = p(), r = p((e == null ? void 0 : e.loading) || !1), x = b;
113
+ async function c(o = !0) {
114
+ if (!g(e.request))
115
115
  return;
116
- a.value = !0, n += 1;
116
+ r.value = !0, n += 1;
117
117
  const t = n;
118
118
  try {
119
119
  o && (i.value = []);
@@ -122,47 +122,49 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
122
122
  return;
123
123
  i.value = l;
124
124
  } finally {
125
- a.value = !1;
125
+ r.value = !1;
126
126
  }
127
127
  }
128
- function b(o) {
128
+ function I(o) {
129
129
  var t;
130
- (t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !a.value && s(!0);
130
+ (t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !r.value && c(!0);
131
131
  }
132
- q(() => {
132
+ _(() => {
133
133
  if (e.lazy) {
134
134
  n += 1;
135
135
  return;
136
136
  }
137
- s();
137
+ c();
138
138
  });
139
- const { value: p, updateValue: x } = X(e, C), I = Q("Select", e), O = m(() => {
140
- const o = u(p);
139
+ const { value: m, updateValue: O } = oe(e, x), P = ee("Select", e), V = y(() => {
140
+ var d, v;
141
+ const o = u(m);
141
142
  if (!o)
142
143
  return e.emptyText;
143
- if ($(o))
144
+ const t = ((d = e.fieldNames) == null ? void 0 : d.label) || "label", l = ((v = e.fieldNames) == null ? void 0 : v.value) || "value";
145
+ if (G(o))
144
146
  return o.map(
145
- (l) => {
146
- var r;
147
- return (r = u(i).find((c) => c.value === l)) == null ? void 0 : r.label;
147
+ (f) => {
148
+ var h;
149
+ return (h = u(i).find((M) => M[l] === f)) == null ? void 0 : h[t];
148
150
  }
149
151
  ).filter(Boolean).join("、") || e.emptyText;
150
- const t = u(i).find((l) => l.value === o);
151
- return (t == null ? void 0 : t.label) || e.emptyText;
152
- }), P = m(() => {
152
+ const a = u(i).find((f) => f.value === o);
153
+ return (a == null ? void 0 : a.label) || e.emptyText;
154
+ }), k = y(() => {
153
155
  const o = !!(e != null && e.showSearch), t = e.searchMode;
154
156
  let l = {};
155
157
  return o && (l = t === "request" ? {
156
158
  showArrow: !1,
157
159
  defaultActiveFirstOption: !1,
158
- onSearch: B,
159
- notFoundContent: a.value ? void 0 : null
160
+ onSearch: C,
161
+ notFoundContent: r.value ? void 0 : null
160
162
  } : {
161
163
  showArrow: !0,
162
- filterOption: j(e == null ? void 0 : e.filterOption) ? F : e == null ? void 0 : e.filterOption
164
+ filterOption: J(e == null ? void 0 : e.filterOption) ? N : e == null ? void 0 : e.filterOption
163
165
  }), {
164
- ...J(
165
- E(e, [
166
+ ...Z(
167
+ Q(e, [
166
168
  "mode",
167
169
  "value",
168
170
  "onUpdate:value",
@@ -172,45 +174,45 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
172
174
  "onFocus"
173
175
  ])
174
176
  ),
175
- placeholder: u(I),
177
+ placeholder: u(P),
176
178
  ...l
177
179
  };
178
180
  });
179
- function V() {
181
+ function q() {
180
182
  var o;
181
- (o = d.value) == null || o.focus();
183
+ (o = s.value) == null || o.focus();
182
184
  }
183
- function N() {
185
+ function A() {
184
186
  var o;
185
- (o = d.value) == null || o.blur();
187
+ (o = s.value) == null || o.blur();
186
188
  }
187
- return S({
188
- focus: V,
189
- blur: N,
190
- request: s
191
- }), (o, t) => o.mode === "read" ? (v(), A("span", Y, M(O.value), 1)) : (v(), T(u(W), _({
189
+ return F({
190
+ focus: q,
191
+ blur: A,
192
+ request: c
193
+ }), (o, t) => o.mode === "read" ? (w(), R("span", te, z(V.value), 1)) : (w(), D(u(X), U({
192
194
  key: 1,
193
195
  "allow-clear": "",
194
196
  ref_key: "selectRef",
195
- ref: d
196
- }, P.value, {
197
+ ref: s
198
+ }, k.value, {
197
199
  mode: o.multiple ? "multiple" : void 0,
198
- value: u(p),
199
- "onUpdate:value": u(x),
200
+ value: u(m),
201
+ "onUpdate:value": u(O),
200
202
  options: i.value,
201
- loading: a.value,
202
- onFocus: b
203
- }), R({ _: 2 }, [
204
- z(o.$slots, (l, r) => ({
205
- name: r,
206
- fn: h((c) => [
207
- D(o.$slots, r, U(L(c || {})))
203
+ loading: r.value,
204
+ onFocus: I
205
+ }), L({ _: 2 }, [
206
+ K(o.$slots, (l, a) => ({
207
+ name: a,
208
+ fn: S((d) => [
209
+ H(o.$slots, a, $(j(d || {})))
208
210
  ])
209
211
  })),
210
- a.value ? {
212
+ r.value ? {
211
213
  name: "notFoundContent",
212
- fn: h(() => [
213
- K(u(G), { size: "small" })
214
+ fn: S(() => [
215
+ E(u(Y), { size: "small" })
214
216
  ]),
215
217
  key: "0"
216
218
  } : void 0
@@ -218,5 +220,5 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
218
220
  }
219
221
  });
220
222
  export {
221
- re as default
223
+ se as default
222
224
  };