@king-one/antdv 2.3.4 → 2.4.0

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 (194) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/es/components/dept-selector/src/dept.mjs +34 -33
  3. package/dist/es/components/index.mjs +45 -42
  4. package/dist/es/components/pro-form-render/src/module/AioArrayInput.vue.mjs +42 -41
  5. package/dist/es/components/pro-form-render/src/module/AioDatePicker.vue.mjs +1 -1
  6. package/dist/es/components/pro-form-render/src/module/AioInput.vue.mjs +1 -1
  7. package/dist/es/components/pro-form-render/src/module/AioInputNumber.vue.mjs +1 -1
  8. package/dist/es/components/pro-form-render/src/module/AioSelect.vue.mjs +1 -1
  9. package/dist/es/components/pro-form-render/src/module/AioTextarea.vue.mjs +1 -1
  10. package/dist/es/components/pro-form-render/src/module/AioTimePicker.vue.mjs +1 -1
  11. package/dist/es/components/pro-selector/index.mjs +13 -10
  12. package/dist/es/components/pro-selector/src/components/org-tree.mjs +47 -47
  13. package/dist/es/components/pro-selector/src/components/user.mjs +22 -12
  14. package/dist/es/components/pro-selector/src/pro-user.mjs +22 -22
  15. package/dist/es/components/pro-selector-group/index.mjs +11 -0
  16. package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue.mjs +4 -0
  17. package/dist/es/components/pro-selector-group/src/compoents/dept-tree.vue2.mjs +124 -0
  18. package/dist/es/components/pro-selector-group/src/compoents/dept.vue.mjs +47 -0
  19. package/dist/es/components/pro-selector-group/src/compoents/dept.vue2.mjs +4 -0
  20. package/dist/es/components/pro-selector-group/src/compoents/index.mjs +3 -0
  21. package/dist/es/components/pro-selector-group/src/compoents/role.vue.mjs +134 -0
  22. package/dist/es/components/pro-selector-group/src/compoents/role.vue2.mjs +4 -0
  23. package/dist/es/components/pro-selector-group/src/compoents/select-box.vue.mjs +4 -0
  24. package/dist/es/components/pro-selector-group/src/compoents/select-box.vue2.mjs +95 -0
  25. package/dist/es/components/pro-selector-group/src/compoents/user.vue.mjs +152 -0
  26. package/dist/es/components/pro-selector-group/src/compoents/user.vue2.mjs +4 -0
  27. package/dist/es/components/pro-selector-group/src/hooks/useApi.mjs +60 -0
  28. package/dist/es/components/pro-selector-group/src/index.vue.mjs +4 -0
  29. package/dist/es/components/pro-selector-group/src/index.vue2.mjs +191 -0
  30. package/dist/es/components/pro-selector-group/src/style/index.mjs +2 -0
  31. package/dist/es/components/pro-selector-group/src/types.mjs +4 -0
  32. package/dist/es/components/pro-sign/src/components/add-signature.vue2.mjs +57 -49
  33. package/dist/es/components/pro-sign/src/components/batch.vue2.mjs +133 -125
  34. package/dist/es/components/pro-sign/src/components/date.vue.mjs +23 -23
  35. package/dist/es/components/pro-sign/src/components/loader.vue2.mjs +48 -48
  36. package/dist/es/components/pro-sign/src/components/middle.vue.mjs +151 -147
  37. package/dist/es/components/pro-sign/src/components/signature.vue.mjs +39 -39
  38. package/dist/es/components/pro-sign/src/components/verify.vue2.mjs +50 -42
  39. package/dist/es/components/pro-table/src/field/field.vue2.mjs +60 -60
  40. package/dist/es/components/pro-table/src/form-render.vue2.mjs +51 -45
  41. package/dist/es/components/pro-table/src/pro-table.vue2.mjs +96 -89
  42. package/dist/es/components/pro-user-avatar/src/index.vue2.mjs +52 -52
  43. package/dist/es/components/role-selector/src/role.mjs +23 -20
  44. package/dist/es/components/scale-virtual-list/component/scale-virtual-list.vue2.mjs +19 -19
  45. package/dist/es/index.mjs +93 -86
  46. package/dist/lib/components/dept-selector/src/dept.js +1 -1
  47. package/dist/lib/components/index.js +1 -1
  48. package/dist/lib/components/pro-form-render/src/module/AioArrayInput.vue.js +1 -1
  49. package/dist/lib/components/pro-form-render/src/module/AioDatePicker.vue.js +1 -1
  50. package/dist/lib/components/pro-form-render/src/module/AioInput.vue.js +1 -1
  51. package/dist/lib/components/pro-form-render/src/module/AioInputNumber.vue.js +1 -1
  52. package/dist/lib/components/pro-form-render/src/module/AioSelect.vue.js +1 -1
  53. package/dist/lib/components/pro-form-render/src/module/AioTextarea.vue.js +1 -1
  54. package/dist/lib/components/pro-form-render/src/module/AioTimePicker.vue.js +1 -1
  55. package/dist/lib/components/pro-selector/index.js +1 -1
  56. package/dist/lib/components/pro-selector/src/components/user.js +1 -1
  57. package/dist/lib/components/pro-selector-group/index.js +1 -0
  58. package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue.js +1 -0
  59. package/dist/lib/components/pro-selector-group/src/compoents/dept-tree.vue2.js +1 -0
  60. package/dist/lib/components/pro-selector-group/src/compoents/dept.vue.js +1 -0
  61. package/dist/lib/components/pro-selector-group/src/compoents/dept.vue2.js +1 -0
  62. package/dist/lib/components/pro-selector-group/src/compoents/index.js +1 -0
  63. package/dist/lib/components/pro-selector-group/src/compoents/role.vue.js +1 -0
  64. package/dist/lib/components/pro-selector-group/src/compoents/role.vue2.js +1 -0
  65. package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue.js +1 -0
  66. package/dist/lib/components/pro-selector-group/src/compoents/select-box.vue2.js +1 -0
  67. package/dist/lib/components/pro-selector-group/src/compoents/user.vue.js +1 -0
  68. package/dist/lib/components/pro-selector-group/src/compoents/user.vue2.js +1 -0
  69. package/dist/lib/components/pro-selector-group/src/hooks/useApi.js +1 -0
  70. package/dist/lib/components/pro-selector-group/src/index.vue.js +1 -0
  71. package/dist/lib/components/pro-selector-group/src/index.vue2.js +1 -0
  72. package/dist/lib/components/pro-selector-group/src/style/index.js +1 -0
  73. package/dist/lib/components/pro-selector-group/src/types.js +1 -0
  74. package/dist/lib/components/pro-sign/src/components/add-signature.vue2.js +1 -1
  75. package/dist/lib/components/pro-sign/src/components/batch.vue2.js +1 -1
  76. package/dist/lib/components/pro-sign/src/components/date.vue.js +1 -1
  77. package/dist/lib/components/pro-sign/src/components/loader.vue2.js +2 -2
  78. package/dist/lib/components/pro-sign/src/components/middle.vue.js +1 -1
  79. package/dist/lib/components/pro-sign/src/components/signature.vue.js +1 -1
  80. package/dist/lib/components/pro-sign/src/components/verify.vue2.js +1 -1
  81. package/dist/lib/components/pro-table/src/field/field.vue2.js +1 -1
  82. package/dist/lib/components/pro-table/src/form-render.vue2.js +1 -1
  83. package/dist/lib/components/pro-table/src/pro-table.vue2.js +1 -1
  84. package/dist/lib/components/pro-user-avatar/src/index.vue2.js +1 -1
  85. package/dist/lib/components/scale-virtual-list/component/scale-virtual-list.vue2.js +1 -1
  86. package/dist/lib/index.js +1 -1
  87. package/dist/theme-chalk/icon.css +1 -1
  88. package/dist/theme-chalk/index.css +1 -1
  89. package/dist/theme-chalk/pro-selector-group.css +1 -0
  90. package/dist/types/components/collapse-transtion/index.d.ts +5 -10
  91. package/dist/types/components/collapse-transtion/src/collapse-transtion.vue.d.ts +4 -4
  92. package/dist/types/components/cover-scroll-bar/hooks/use-has-scroll.d.ts +2 -2
  93. package/dist/types/components/cover-scroll-bar/index.d.ts +9 -9
  94. package/dist/types/components/cover-scroll-bar/src/cover-scroll-bar.d.ts +9 -9
  95. package/dist/types/components/dept-selector/index.d.ts +7 -7
  96. package/dist/types/components/dept-selector/src/dept.d.ts +7 -7
  97. package/dist/types/components/form/component/form-item.vue.d.ts +4 -4
  98. package/dist/types/components/form/component/form.vue.d.ts +2 -2
  99. package/dist/types/components/form/index.d.ts +8 -14
  100. package/dist/types/components/icon/index.d.ts +5 -5
  101. package/dist/types/components/icon/src/icon.vue.d.ts +5 -5
  102. package/dist/types/components/index.d.ts +1 -0
  103. package/dist/types/components/plus-upload/index.d.ts +12 -46
  104. package/dist/types/components/plus-upload/src/plus-upload.vue.d.ts +6 -6
  105. package/dist/types/components/pro-area/hooks/use-pro-area.d.ts +1 -1
  106. package/dist/types/components/pro-area/index.d.ts +8 -8
  107. package/dist/types/components/pro-area/src/ProArea.vue.d.ts +8 -8
  108. package/dist/types/components/pro-cell/index.d.ts +7 -254
  109. package/dist/types/components/pro-cell/src/index.vue.d.ts +3 -42
  110. package/dist/types/components/pro-cell-group/index.d.ts +5 -164
  111. package/dist/types/components/pro-cell-group/src/index.vue.d.ts +2 -11
  112. package/dist/types/components/pro-contract-view/hooks/use-contract-view.d.ts +20 -0
  113. package/dist/types/components/pro-contract-view/index.d.ts +76 -5
  114. package/dist/types/components/pro-contract-view/src/pro-contract-view.vue.d.ts +76 -5
  115. package/dist/types/components/pro-form-render/index.d.ts +651 -8
  116. package/dist/types/components/pro-form-render/src/index.vue.d.ts +651 -8
  117. package/dist/types/components/pro-form-render/src/module/AioArrayInput.vue.d.ts +7 -7
  118. package/dist/types/components/pro-form-render/src/module/AioDatePicker.vue.d.ts +7 -7
  119. package/dist/types/components/pro-form-render/src/module/AioInput.vue.d.ts +7 -7
  120. package/dist/types/components/pro-form-render/src/module/AioInputNumber.vue.d.ts +7 -7
  121. package/dist/types/components/pro-form-render/src/module/AioSelect.vue.d.ts +7 -7
  122. package/dist/types/components/pro-form-render/src/module/AioSubForm.vue.d.ts +687 -9
  123. package/dist/types/components/pro-form-render/src/module/AioSwitch.vue.d.ts +7 -7
  124. package/dist/types/components/pro-form-render/src/module/AioTextarea.vue.d.ts +7 -7
  125. package/dist/types/components/pro-form-render/src/module/AioTimePicker.vue.d.ts +7 -7
  126. package/dist/types/components/pro-modal/hooks/useProModal.d.ts +1 -1
  127. package/dist/types/components/pro-modal/index.d.ts +12 -28
  128. package/dist/types/components/pro-modal/src/Modal.d.ts +5 -5
  129. package/dist/types/components/pro-modal/src/ProModal.vue.d.ts +7 -5
  130. package/dist/types/components/pro-overlay/index.d.ts +4 -4
  131. package/dist/types/components/pro-overlay/src/pro-overlay.vue.d.ts +2 -2
  132. package/dist/types/components/pro-picker/index.d.ts +9 -8
  133. package/dist/types/components/pro-picker/src/ProPicker.vue.d.ts +9 -8
  134. package/dist/types/components/pro-selector/index.d.ts +48 -9
  135. package/dist/types/components/pro-selector/src/components/org-tree.d.ts +6 -6
  136. package/dist/types/components/pro-selector/src/components/user.d.ts +8 -8
  137. package/dist/types/components/pro-selector/src/pro-user.d.ts +13 -12
  138. package/dist/types/components/pro-selector-group/index.d.ts +27 -0
  139. package/dist/types/components/pro-selector-group/src/compoents/dept-tree.vue.d.ts +13 -0
  140. package/dist/types/components/pro-selector-group/src/compoents/dept.vue.d.ts +10 -0
  141. package/dist/types/components/pro-selector-group/src/compoents/index.d.ts +3 -0
  142. package/dist/types/components/pro-selector-group/src/compoents/role.vue.d.ts +12 -0
  143. package/dist/types/components/pro-selector-group/src/compoents/select-box.vue.d.ts +16 -0
  144. package/dist/types/components/pro-selector-group/src/compoents/user.vue.d.ts +13 -0
  145. package/dist/types/components/pro-selector-group/src/hooks/useApi.d.ts +102 -0
  146. package/dist/types/components/pro-selector-group/src/index.vue.d.ts +24 -0
  147. package/dist/types/components/pro-selector-group/src/types.d.ts +30 -0
  148. package/dist/types/components/pro-selector-group/src/utils/index.d.ts +2 -0
  149. package/dist/types/components/pro-sign/index.d.ts +4 -4
  150. package/dist/types/components/pro-sign/src/components/add-signature.vue.d.ts +121 -11
  151. package/dist/types/components/pro-sign/src/components/batch.vue.d.ts +6 -6
  152. package/dist/types/components/pro-sign/src/components/date.vue.d.ts +2 -2
  153. package/dist/types/components/pro-sign/src/components/files.vue.d.ts +2 -2
  154. package/dist/types/components/pro-sign/src/components/info.vue.d.ts +2 -2
  155. package/dist/types/components/pro-sign/src/components/loader.vue.d.ts +93 -62
  156. package/dist/types/components/pro-sign/src/components/middle.vue.d.ts +137 -2
  157. package/dist/types/components/pro-sign/src/components/pro-sign.vue.d.ts +4 -4
  158. package/dist/types/components/pro-sign/src/components/seals.vue.d.ts +2 -2
  159. package/dist/types/components/pro-sign/src/components/signature.vue.d.ts +2 -2
  160. package/dist/types/components/pro-sign/src/components/verify.vue.d.ts +6 -6
  161. package/dist/types/components/pro-sign/src/hook/useScrollDetection.d.ts +2 -2
  162. package/dist/types/components/pro-sign/src/hook/useSms.d.ts +2 -2
  163. package/dist/types/components/pro-signature/index.d.ts +9 -7
  164. package/dist/types/components/pro-signature/src/ProSignature.vue.d.ts +9 -7
  165. package/dist/types/components/pro-table/hooks/use-pro-table.d.ts +1 -1
  166. package/dist/types/components/pro-table/src/field/field-date-range/field-date-range.vue.d.ts +5 -14
  167. package/dist/types/components/pro-table/src/field/field-input/field-input.vue.d.ts +5 -14
  168. package/dist/types/components/pro-table/src/field/field-radio/field-radio.vue.d.ts +5 -14
  169. package/dist/types/components/pro-table/src/field/field-select/field-select.vue.d.ts +5 -14
  170. package/dist/types/components/pro-table/src/field/field.vue.d.ts +2 -11
  171. package/dist/types/components/pro-table/src/form-render.vue.d.ts +646 -3
  172. package/dist/types/components/pro-table/src/hooks/use-form.d.ts +1 -1
  173. package/dist/types/components/pro-table/src/pro-table.vue.d.ts +49 -3
  174. package/dist/types/components/pro-tag/index.d.ts +6 -6
  175. package/dist/types/components/pro-tag/src/ProTag.vue.d.ts +6 -6
  176. package/dist/types/components/pro-tag-group/index.d.ts +9 -7
  177. package/dist/types/components/pro-tag-group/src/ProTagGroup.vue.d.ts +9 -7
  178. package/dist/types/components/pro-title/index.d.ts +7 -24
  179. package/dist/types/components/pro-title/src/ProTitle.vue.d.ts +5 -5
  180. package/dist/types/components/pro-upload/index.d.ts +35 -107
  181. package/dist/types/components/pro-upload/src/file-list.d.ts +6 -6
  182. package/dist/types/components/pro-upload/src/gd-upload.d.ts +35 -107
  183. package/dist/types/components/pro-user-avatar/index.d.ts +18 -106
  184. package/dist/types/components/pro-user-avatar/src/index.vue.d.ts +9 -34
  185. package/dist/types/components/role-selector/index.d.ts +13 -13
  186. package/dist/types/components/role-selector/src/role.d.ts +7 -7
  187. package/dist/types/components/scale-virtual-list/component/scale-virtual-list.vue.d.ts +10 -29
  188. package/dist/types/components/scale-virtual-list/index.d.ts +21 -73
  189. package/dist/types/components/scroll-bar/index.d.ts +12 -12
  190. package/dist/types/components/scroll-bar/src/scroll-bar.d.ts +12 -12
  191. package/dist/types/hooks/useModelValue.d.ts +1 -1
  192. package/dist/types/hooks/useProForm.d.ts +2 -2
  193. package/global.d.ts +1 -0
  194. package/package.json +2 -2
@@ -1,18 +1,18 @@
1
- import { defineComponent as $, useSlots as x, ref as c, reactive as C, watch as L, toRefs as O, provide as q, createElementBlock as s, openBlock as l, Fragment as T, createCommentVNode as r, createElementVNode as A, createBlock as g, createVNode as u, unref as t, withCtx as i, mergeProps as b, createSlots as j, renderSlot as y, normalizeProps as k, createTextVNode as I, toDisplayString as U } from "vue";
2
- import { Card as _, Table as K, Pagination as M } from "ant-design-vue";
3
- import { spitRender as X } from "../utils.mjs";
1
+ import { defineComponent as $, useSlots as O, ref as b, reactive as w, watch as q, toRefs as A, provide as j, createElementBlock as d, openBlock as a, Fragment as y, createCommentVNode as n, createElementVNode as I, createBlock as h, createVNode as p, unref as t, withCtx as u, mergeProps as v, createSlots as U, renderSlot as S, normalizeProps as z, createTextVNode as K, toDisplayString as M, renderList as X } from "vue";
2
+ import { Card as B, Table as Y, Pagination as G } from "ant-design-vue";
3
+ import { spitRender as H } from "../utils.mjs";
4
4
  import "./form-render.vue.mjs";
5
- import { TABLE_CONTEXT_PROVIDE_KEY as Y, ANTD_SLOT_NAMES as G } from "./constants.mjs";
6
- import { useForm as H } from "./hooks/use-form.mjs";
7
- import { useTable as J } from "./hooks/use-table.mjs";
8
- import Q from "./form-render.vue2.mjs";
9
- const W = { class: "pro-table" }, Z = {
5
+ import { TABLE_CONTEXT_PROVIDE_KEY as J, ANTD_SLOT_NAMES as Q } from "./constants.mjs";
6
+ import { useForm as W } from "./hooks/use-form.mjs";
7
+ import { useTable as Z } from "./hooks/use-table.mjs";
8
+ import ee from "./form-render.vue2.mjs";
9
+ const te = { class: "pro-table" }, oe = {
10
10
  key: 0,
11
11
  style: { width: "100%" }
12
- }, ee = {
12
+ }, ae = {
13
13
  key: 0,
14
14
  class: "toolbar-slot"
15
- }, oe = { key: 0 }, me = /* @__PURE__ */ $({
15
+ }, le = { key: 0 }, pe = /* @__PURE__ */ $({
16
16
  __name: "pro-table",
17
17
  props: {
18
18
  antdTableProps: {},
@@ -29,72 +29,72 @@ const W = { class: "pro-table" }, Z = {
29
29
  hidePage: { type: Boolean },
30
30
  buttonCol: {}
31
31
  },
32
- setup(w, { expose: z }) {
33
- const n = w, d = x(), { columns: B } = n, h = c(), p = c(!1), a = C({
34
- pageSize: n.pageSize,
32
+ setup(s, { expose: N }) {
33
+ const r = s, i = O(), { columns: P } = r, R = b(), c = b(!1), o = w({
34
+ pageSize: r.pageSize,
35
35
  pageNum: 1,
36
36
  total: 0
37
- }), v = c([]), { formState: S, genFormState: N } = H(n), {
38
- filteredColumns: P,
39
- handleRequest: f,
37
+ }), C = b([]), { formState: T, genFormState: x } = W(r), {
38
+ filteredColumns: _,
39
+ handleRequest: g,
40
40
  getLabelByValue: E,
41
41
  hasCurrentColBodySlot: F,
42
- bodyCellProps: R
43
- } = J(n, d, {
44
- loading: p,
45
- pageData: a,
46
- formState: S,
47
- dataSource: v
42
+ bodyCellProps: k
43
+ } = Z(r, i, {
44
+ loading: c,
45
+ pageData: o,
46
+ formState: T,
47
+ dataSource: C
48
48
  });
49
- L(
50
- () => B,
49
+ q(
50
+ () => P,
51
51
  () => {
52
- N();
52
+ x();
53
53
  },
54
54
  {
55
55
  immediate: !0,
56
56
  deep: !0
57
57
  }
58
58
  );
59
- const V = C({
60
- ...O(n),
61
- tableSlots: d,
62
- formState: S,
63
- loading: p,
64
- pageData: a,
65
- handleRequest: f
59
+ const V = w({
60
+ ...A(r),
61
+ tableSlots: i,
62
+ formState: T,
63
+ loading: c,
64
+ pageData: o,
65
+ handleRequest: g
66
66
  });
67
- q(
68
- Y,
67
+ j(
68
+ J,
69
69
  V
70
70
  );
71
- function D(o) {
72
- Object.assign(a, o);
71
+ function D(l) {
72
+ Object.assign(o, l);
73
73
  }
74
- return z({
75
- onRefresh: f,
74
+ return console.log("slots", i), N({
75
+ onRefresh: g,
76
76
  formRef: () => {
77
- var o;
78
- return (o = h.value) == null ? void 0 : o.formRef;
77
+ var l;
78
+ return (l = R.value) == null ? void 0 : l.formRef;
79
79
  },
80
- pageData: a,
80
+ pageData: o,
81
81
  setPageData: D
82
- }), (o, m) => (l(), s(
83
- T,
82
+ }), (l, m) => (a(), d(
83
+ y,
84
84
  null,
85
85
  [
86
- r(" eslint-disable vue/component-name-in-template-casing vue/no-use-v-if-with-v-for "),
87
- A("div", W, [
88
- o.hideForm ? r("v-if", !0) : (l(), g(t(_), {
86
+ n(" eslint-disable vue/component-name-in-template-casing vue/no-use-v-if-with-v-for "),
87
+ I("div", te, [
88
+ s.hideForm ? n("v-if", !0) : (a(), h(t(B), {
89
89
  key: 0,
90
90
  class: "pro-table-form"
91
91
  }, {
92
- default: i(() => [
93
- u(
94
- Q,
92
+ default: u(() => [
93
+ p(
94
+ ee,
95
95
  {
96
96
  ref_key: "formRenderRef",
97
- ref: h
97
+ ref: R
98
98
  },
99
99
  null,
100
100
  512
@@ -104,9 +104,9 @@ const W = { class: "pro-table" }, Z = {
104
104
  _: 1
105
105
  /* STABLE */
106
106
  })),
107
- u(t(_), {
107
+ p(t(B), {
108
108
  class: "pro-table-table",
109
- title: o.headerTitle,
109
+ title: s.headerTitle,
110
110
  "head-style": {
111
111
  borderBottom: "none",
112
112
  paddingLeft: "16px",
@@ -116,67 +116,74 @@ const W = { class: "pro-table" }, Z = {
116
116
  bordered: !1,
117
117
  shadow: "none!"
118
118
  }, {
119
- extra: i(() => [
120
- d.toolbar || n.toolbarRender ? (l(), s("div", Z, [
121
- d.toolbar ? (l(), s("div", ee, [
122
- y(o.$slots, "toolbar")
123
- ])) : (l(), g(n.toolbarRender, { key: 1 }))
124
- ])) : r("v-if", !0)
119
+ extra: u(() => [
120
+ i.toolbar || r.toolbarRender ? (a(), d("div", oe, [
121
+ i.toolbar ? (a(), d("div", ae, [
122
+ S(l.$slots, "toolbar")
123
+ ])) : (a(), h(r.toolbarRender, { key: 1 }))
124
+ ])) : n("v-if", !0)
125
125
  ]),
126
- default: i(() => [
127
- u(t(K), b(o.antdTableProps, {
128
- "data-source": v.value,
129
- columns: t(P),
126
+ default: u(() => [
127
+ p(t(Y), v(s.antdTableProps, {
128
+ "data-source": C.value,
129
+ columns: t(_),
130
130
  pagination: !1,
131
- loading: p.value
132
- }), j({
133
- bodyCell: i((e) => [
134
- t(F)(e) ? y(o.$slots, "bodyCell", k(b({ key: 0 }, t(R)(e)))) : e.column.customRender ? (l(), g(t(X), {
131
+ loading: c.value
132
+ }), U({
133
+ bodyCell: u((e) => [
134
+ t(F)(e) ? S(l.$slots, "bodyCell", z(v({ key: 0 }, t(k)(e)))) : e.column.customRender ? (a(), h(t(H), {
135
135
  key: 1,
136
136
  fn: e.column.customRender,
137
- scope: t(R)(e)
138
- }, null, 8, ["fn", "scope"])) : e.column.valueType === "select" || e.column.valueEnum ? (l(), s(
139
- T,
137
+ scope: t(k)(e)
138
+ }, null, 8, ["fn", "scope"])) : e.column.valueType === "select" || e.column.valueEnum ? (a(), d(
139
+ y,
140
140
  { key: 2 },
141
141
  [
142
- I(
143
- U(t(E)(e.text, e.column)),
142
+ K(
143
+ M(t(E)(e.text, e.column)),
144
144
  1
145
145
  /* TEXT */
146
146
  )
147
147
  ],
148
148
  64
149
149
  /* STABLE_FRAGMENT */
150
- )) : r("v-if", !0)
150
+ )) : n("v-if", !0)
151
151
  ]),
152
152
  _: 2
153
153
  /* DYNAMIC */
154
154
  }, [
155
- String(name) !== "bodyCell" ? {
156
- name,
157
- fn: i((e) => [
158
- t(G).includes(name) ? y(o.$slots, name, k(b({ key: 0 }, e))) : r("v-if", !0)
159
- ]),
160
- key: "0"
161
- } : void 0
155
+ X(i, (e, f) => ({
156
+ name: f,
157
+ fn: u((L) => [
158
+ String(f) !== "bodyCell" ? (a(), d(
159
+ y,
160
+ { key: 0 },
161
+ [
162
+ t(Q).includes(f) ? S(l.$slots, f, z(v({ key: 0 }, L))) : n("v-if", !0)
163
+ ],
164
+ 64
165
+ /* STABLE_FRAGMENT */
166
+ )) : n("v-if", !0)
167
+ ])
168
+ }))
162
169
  ]), 1040, ["data-source", "columns", "loading"]),
163
- o.hidePage ? r("v-if", !0) : (l(), s("div", oe, [
164
- u(t(M), {
165
- current: a.pageNum,
166
- "onUpdate:current": m[0] || (m[0] = (e) => a.pageNum = e),
167
- "page-size": a.pageSize,
168
- "onUpdate:pageSize": m[1] || (m[1] = (e) => a.pageSize = e),
170
+ s.hidePage ? n("v-if", !0) : (a(), d("div", le, [
171
+ p(t(G), {
172
+ current: o.pageNum,
173
+ "onUpdate:current": m[0] || (m[0] = (e) => o.pageNum = e),
174
+ "page-size": o.pageSize,
175
+ "onUpdate:pageSize": m[1] || (m[1] = (e) => o.pageSize = e),
169
176
  class: "pro-table-pagination",
170
177
  flex: "",
171
178
  "flex-wrap": "",
172
179
  "justify-end": "",
173
- total: a.total,
180
+ total: o.total,
174
181
  size: "small",
175
182
  "show-less-items": "",
176
183
  "show-size-changer": "",
177
184
  "page-size-options": ["5", "10", "20", "50", "100"],
178
- "show-total": o.pageShowTotal ? (e) => `共 ${e} 条` : void 0,
179
- onChange: t(f)
185
+ "show-total": s.pageShowTotal ? (e) => `共 ${e} 条` : void 0,
186
+ onChange: t(g)
180
187
  }, null, 8, ["current", "page-size", "total", "show-total", "onChange"])
181
188
  ]))
182
189
  ]),
@@ -191,5 +198,5 @@ const W = { class: "pro-table" }, Z = {
191
198
  }
192
199
  });
193
200
  export {
194
- me as default
201
+ pe as default
195
202
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, ref as s, computed as I, watch as B, nextTick as N, onMounted as R, onBeforeUnmount as V, createElementBlock as u, openBlock as i, normalizeClass as d, unref as o, createBlock as _, createCommentVNode as M, normalizeStyle as p, toDisplayString as O, createElementVNode as P } from "vue";
1
+ import { defineComponent as C, ref as u, computed as E, watch as I, nextTick as B, onMounted as N, onBeforeUnmount as R, createElementBlock as c, openBlock as l, normalizeClass as m, unref as i, createBlock as V, createCommentVNode as M, normalizeStyle as y, toDisplayString as O, createElementVNode as P } from "vue";
2
2
  import { useNamespace as T } from "../../../hooks/use-namespace/index.mjs";
3
3
  import { Image as U } from "ant-design-vue";
4
4
  import { getColorFromString as D } from "./util.mjs";
@@ -6,7 +6,7 @@ import F from "./load-error.png.mjs";
6
6
  const H = ["data-src", "alt"], $ = {
7
7
  key: 1,
8
8
  style: { width: "100%", height: "100%" }
9
- }, j = { key: 1 }, q = ["src"], W = /* @__PURE__ */ E({
9
+ }, j = { key: 1 }, q = ["src"], W = /* @__PURE__ */ C({
10
10
  name: "ProUserAvatar",
11
11
  __name: "index",
12
12
  props: {
@@ -18,32 +18,32 @@ const H = ["data-src", "alt"], $ = {
18
18
  preview: { type: Boolean, default: !0 }
19
19
  },
20
20
  emits: ["error"],
21
- setup(h, { expose: y, emit: b }) {
22
- const n = h, k = b, v = T("user-avatar"), l = s(!1), c = s(!1), a = s(null), L = s(!1), t = s(null), m = I(() => n.name.length >= 2 ? n.name.slice(n.name.length - 2) : n.name ? n.name : "unknown");
23
- function w(e) {
24
- c.value = e;
21
+ setup(t, { expose: b, emit: k }) {
22
+ const n = t, L = k, v = T("user-avatar"), s = u(!1), d = u(!1), a = u(null), w = u(!1), r = u(null), f = E(() => n.name.length >= 2 ? n.name.slice(n.name.length - 2) : n.name ? n.name : "unknown");
23
+ function z(e) {
24
+ d.value = e;
25
25
  }
26
- function f() {
27
- n.preview && !l.value && n.avatar && (c.value = !0);
26
+ function g() {
27
+ n.preview && !s.value && n.avatar && (d.value = !0);
28
28
  }
29
- function z(e) {
30
- l.value = !0, k("error", e);
29
+ function p(e) {
30
+ s.value = !0, L("error", e);
31
31
  }
32
- function S() {
32
+ function x() {
33
33
  if (a.value) {
34
- const e = "loading" in HTMLImageElement.prototype, r = a.value.complete || a.value.currentSrc !== "";
35
- return L.value = e, console.log("浏览器支持原生懒加载:", e), console.log("图片已开始加载:", r), { hasNativeLazyLoading: e, hasStartedLoading: r };
34
+ const e = "loading" in HTMLImageElement.prototype, o = a.value.complete || a.value.currentSrc !== "";
35
+ return w.value = e, console.log("浏览器支持原生懒加载:", e), console.log("图片已开始加载:", o), { hasNativeLazyLoading: e, hasStartedLoading: o };
36
36
  }
37
37
  return { hasNativeLazyLoading: !1, hasStartedLoading: !1 };
38
38
  }
39
- function C() {
39
+ function S() {
40
40
  if (!("IntersectionObserver" in window)) {
41
- g();
41
+ h();
42
42
  return;
43
43
  }
44
- t.value && t.value.disconnect(), t.value = new IntersectionObserver((e) => {
45
- e.forEach((r) => {
46
- r.isIntersecting && (g(), t.value && a.value && t.value.unobserve(a.value));
44
+ r.value && r.value.disconnect(), r.value = new IntersectionObserver((e) => {
45
+ e.forEach((o) => {
46
+ o.isIntersecting && (h(), r.value && a.value && r.value.unobserve(a.value));
47
47
  });
48
48
  }, {
49
49
  // 设置根元素为null表示相对于视口
@@ -52,70 +52,70 @@ const H = ["data-src", "alt"], $ = {
52
52
  rootMargin: "0px",
53
53
  // 设置阈值,当元素有50%进入视口时触发回调
54
54
  threshold: 0.5
55
- }), a.value && t.value.observe(a.value);
55
+ }), a.value && r.value.observe(a.value);
56
56
  }
57
- function g() {
57
+ function h() {
58
58
  if (a.value && n.avatar) {
59
59
  const e = a.value.getAttribute("data-src");
60
60
  e && (a.value.src = e);
61
61
  }
62
62
  }
63
- return B(() => n.avatar, async (e, r) => {
64
- e !== r && (l.value = !1, await N(), e && a.value && (a.value.src = e));
65
- }, { immediate: !0 }), R(() => {
66
- C();
67
- }), V(() => {
68
- t.value && (t.value.disconnect(), t.value = null);
69
- }), y({
70
- handlePreview: f,
71
- checkLazyLoading: S
72
- }), (e, r) => (i(), u(
63
+ return I(() => n.avatar, async (e, o) => {
64
+ e !== o && (s.value = !1, await B(), e && a.value && (a.value.src = e));
65
+ }, { immediate: !0 }), N(() => {
66
+ S();
67
+ }), R(() => {
68
+ r.value && (r.value.disconnect(), r.value = null);
69
+ }), b({
70
+ handlePreview: g,
71
+ checkLazyLoading: x
72
+ }), (e, o) => (l(), c(
73
73
  "div",
74
74
  {
75
- class: d([o(v).b(), o(v).b(e.size)]),
76
- onClick: f
75
+ class: m([i(v).b(), i(v).b(t.size)]),
76
+ onClick: g
77
77
  },
78
78
  [
79
- e.avatar && !l.value ? (i(), u("img", {
79
+ t.avatar && !s.value ? (l(), c("img", {
80
80
  key: 0,
81
81
  ref_key: "imgRef",
82
82
  ref: a,
83
- class: d([o(v).e("img")]),
84
- style: p({ borderRadius: e.round }),
85
- "data-src": e.avatar,
86
- alt: e.name,
87
- onError: z
88
- }, null, 46, H)) : (i(), u("div", $, [
89
- m.value !== "unknown" ? (i(), u(
83
+ class: m([i(v).e("img")]),
84
+ style: y({ borderRadius: t.round }),
85
+ "data-src": t.avatar,
86
+ alt: t.name,
87
+ onError: p
88
+ }, null, 46, H)) : (l(), c("div", $, [
89
+ f.value !== "unknown" ? (l(), c(
90
90
  "div",
91
91
  {
92
92
  key: 0,
93
- class: d([o(v).e("name")]),
94
- style: p({
95
- backgroundColor: o(D)(e.name),
96
- borderRadius: e.round,
97
- fontSize: `${e.fontSize} !important`
93
+ class: m([i(v).e("name")]),
94
+ style: y({
95
+ backgroundColor: i(D)(t.name),
96
+ borderRadius: t.round,
97
+ fontSize: `${t.fontSize} !important`
98
98
  })
99
99
  },
100
- O(m.value),
100
+ O(f.value),
101
101
  7
102
102
  /* TEXT, CLASS, STYLE */
103
- )) : (i(), u("div", j, [
103
+ )) : (l(), c("div", j, [
104
104
  P("img", {
105
- src: o(F),
105
+ src: i(F),
106
106
  style: { width: "100%", height: "100%", "max-width": "200px", "max-height": "200px" },
107
107
  alt: ""
108
108
  }, null, 8, q)
109
109
  ]))
110
110
  ])),
111
- e.avatar && !l.value && e.preview ? (i(), _(o(U), {
111
+ t.avatar && !s.value && t.preview ? (l(), V(i(U), {
112
112
  key: 2,
113
113
  style: { display: "none" },
114
114
  preview: {
115
- visible: c.value,
116
- onVisibleChange: w
115
+ visible: d.value,
116
+ onVisibleChange: z
117
117
  },
118
- src: e.avatar
118
+ src: t.avatar
119
119
  }, null, 8, ["preview", "src"])) : M("v-if", !0)
120
120
  ],
121
121
  2
@@ -181,26 +181,29 @@ const r = M("role-selector"), le = /* @__PURE__ */ D({
181
181
  return () => l(K, null, {
182
182
  default: () => [l("div", {
183
183
  class: r.b()
184
- }, [u.hideSlot ? null : S.default ? S.default() : l($, {
185
- style: "width: 100%;",
186
- readonly: !0,
187
- value: d.value,
188
- "onUpdate:value": (e) => d.value = e,
189
- onClick: () => i("update:visible", !0),
190
- placeholder: "请选择角色"
191
- }, {
192
- suffix: () => l("div", {
193
- onClick: () => i("update:visible", !0)
194
- }, [l(E, {
195
- style: {
196
- cursor: "pointer"
197
- },
198
- name: "a-jiaoseguanli2",
199
- size: 18,
200
- color: "#606266"
201
- }, null)], 8, ["onClick"]),
202
- _: 1
203
- }, 8, ["readonly", "value", "onUpdate:value", "onClick"]), P()], 2)]
184
+ }, [u.hideSlot ? null : S.default ? S.default() : (
185
+ // @ts-ignore
186
+ l($, {
187
+ style: "width: 100%;",
188
+ readonly: !0,
189
+ value: d.value,
190
+ "onUpdate:value": (e) => d.value = e,
191
+ onClick: () => i("update:visible", !0),
192
+ placeholder: "请选择角色"
193
+ }, {
194
+ suffix: () => l("div", {
195
+ onClick: () => i("update:visible", !0)
196
+ }, [l(E, {
197
+ style: {
198
+ cursor: "pointer"
199
+ },
200
+ name: "a-jiaoseguanli2",
201
+ size: 18,
202
+ color: "#606266"
203
+ }, null)], 8, ["onClick"]),
204
+ _: 1
205
+ }, 8, ["readonly", "value", "onUpdate:value", "onClick"])
206
+ ), P()], 2)]
204
207
  });
205
208
  }
206
209
  });
@@ -1,5 +1,5 @@
1
- import { defineComponent as h, ref as B, computed as E, toRefs as P, createElementBlock as a, openBlock as l, mergeProps as i, unref as e, createElementVNode as p, normalizeStyle as R, normalizeClass as c, Fragment as S, renderList as z, renderSlot as L } from "vue";
2
- import { defaultNamespace as s } from "../../../hooks/use-namespace/index.mjs";
1
+ import { defineComponent as h, ref as B, computed as E, toRefs as P, createElementBlock as a, openBlock as l, mergeProps as c, unref as e, createElementVNode as p, normalizeStyle as R, normalizeClass as m, Fragment as S, renderList as z, renderSlot as L } from "vue";
2
+ import { defaultNamespace as t } from "../../../hooks/use-namespace/index.mjs";
3
3
  import { useElementBounding as T } from "@vueuse/core";
4
4
  import { useVirtualList as V } from "../hooks/useVirtualList.mjs";
5
5
  const q = /* @__PURE__ */ h({
@@ -7,49 +7,49 @@ const q = /* @__PURE__ */ h({
7
7
  props: {
8
8
  list: {},
9
9
  option: {},
10
- itemClassName: { default: `${s}-scale-virtual-item` }
10
+ itemClassName: { default: `${t}-scale-virtual-item` }
11
11
  },
12
12
  emits: ["update:state"],
13
- setup(m, { expose: u, emit: d }) {
14
- const o = m, f = d, n = B(null), { width: v } = T(n), w = E(() => ({
13
+ setup(o, { expose: u, emit: d }) {
14
+ const n = o, f = d, i = B(null), { width: v } = T(i), w = E(() => ({
15
15
  width: `${v.value}px`
16
- })), { list: $ } = P(o), { list: x, containerProps: y, wrapperProps: _, scrollTo: k, scaleTo: C, state: N, onUpdate: g } = V($, o.option);
16
+ })), { list: x } = P(n), { list: $, containerProps: y, wrapperProps: k, scrollTo: C, scaleTo: N, state: _, onUpdate: g } = V(x, n.option);
17
17
  return u({
18
- scrollTo: k,
19
- scaleTo: C,
20
- state: N
21
- }), g((t) => f("update:state", t)), (t, F) => (l(), a(
18
+ scrollTo: C,
19
+ scaleTo: N,
20
+ state: _
21
+ }), g((s) => f("update:state", s)), (s, F) => (l(), a(
22
22
  "div",
23
- i({
24
- class: `${e(s)}-scale-virtual-list`
23
+ c({
24
+ class: `${e(t)}-scale-virtual-list`
25
25
  }, e(y)),
26
26
  [
27
27
  p(
28
28
  "div",
29
29
  {
30
- class: c(`${e(s)}-scale-virtual-list-container`),
30
+ class: m(`${e(t)}-scale-virtual-list-container`),
31
31
  style: R(w.value)
32
32
  },
33
33
  [
34
34
  p(
35
35
  "div",
36
- i(e(_), {
36
+ c(e(k), {
37
37
  ref_key: "wrapperRef",
38
- ref: n,
39
- class: `${e(s)}-scale-vittual-wrapper`
38
+ ref: i,
39
+ class: `${e(t)}-scale-vittual-wrapper`
40
40
  }),
41
41
  [
42
42
  (l(!0), a(
43
43
  S,
44
44
  null,
45
- z(e(x), (r) => (l(), a(
45
+ z(e($), (r) => (l(), a(
46
46
  "div",
47
47
  {
48
48
  key: r.index,
49
- class: c(t.itemClassName)
49
+ class: m(o.itemClassName)
50
50
  },
51
51
  [
52
- L(t.$slots, "default", {
52
+ L(s.$slots, "default", {
53
53
  item: r,
54
54
  index: r.index
55
55
  })