@fangzhongya/fang-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 (281) hide show
  1. package/dist/components/array/index.css +9 -0
  2. package/dist/components/array/src/index2.cjs +5 -6
  3. package/dist/components/array/src/index2.js +2 -3
  4. package/dist/components/audios/index.css +9 -0
  5. package/dist/components/box/index.css +9 -0
  6. package/dist/components/box-adjust/index.css +9 -0
  7. package/dist/components/box-fun/index.cjs +7 -0
  8. package/dist/components/box-fun/index.d.ts +7 -0
  9. package/dist/components/box-fun/index.js +7 -0
  10. package/dist/components/box-fun/src/data.cjs +34 -0
  11. package/dist/components/box-fun/src/data.d.ts +35 -0
  12. package/dist/components/box-fun/src/data.js +34 -0
  13. package/dist/components/box-fun/src/function.cjs +97 -0
  14. package/dist/components/box-fun/src/function.d.ts +8 -0
  15. package/dist/components/box-fun/src/function.js +97 -0
  16. package/dist/components/box-fun/src/index.cjs +5 -0
  17. package/dist/components/box-fun/src/index.d.ts +2 -0
  18. package/dist/components/box-fun/src/index.js +5 -0
  19. package/dist/components/box-local/index.css +9 -0
  20. package/dist/components/box-mask/index.css +9 -0
  21. package/dist/components/box-teleport/src/index2.cjs +2 -11
  22. package/dist/components/box-teleport/src/index2.js +2 -11
  23. package/dist/components/box-title/index.css +9 -0
  24. package/dist/components/buttons/index.css +9 -0
  25. package/dist/components/cascaders/index.css +9 -0
  26. package/dist/components/checks/index.css +9 -0
  27. package/dist/components/common/compons/components.cjs +52 -0
  28. package/dist/components/common/compons/components.d.ts +27 -0
  29. package/dist/components/common/compons/components.js +52 -0
  30. package/dist/components/common/compons/index.scss +23 -0
  31. package/dist/components/common/compons/index2.scss +23 -0
  32. package/dist/components/common/use.cjs +29 -3
  33. package/dist/components/common/use.d.ts +2 -2
  34. package/dist/components/common/use.js +29 -3
  35. package/dist/components/dates/index.css +9 -0
  36. package/dist/components/dates-divide/index.css +9 -0
  37. package/dist/components/dates-picker/index.css +9 -0
  38. package/dist/components/dates2/index.css +9 -0
  39. package/dist/components/dialogs/index.css +9 -0
  40. package/dist/components/draggable/index.cjs +9 -0
  41. package/dist/components/draggable/index.d.ts +4 -0
  42. package/dist/components/draggable/index.js +9 -0
  43. package/dist/components/draggable/index.scss +5 -0
  44. package/dist/components/draggable/src/data.cjs +37 -0
  45. package/dist/components/draggable/src/data.d.ts +60 -0
  46. package/dist/components/draggable/src/data.js +37 -0
  47. package/dist/components/draggable/src/index.cjs +4 -0
  48. package/dist/components/draggable/src/index.js +4 -0
  49. package/dist/components/draggable/src/index2.cjs +101 -0
  50. package/dist/components/draggable/src/index2.js +101 -0
  51. package/dist/components/edit/index.css +9 -0
  52. package/dist/components/edit-float/index.css +9 -0
  53. package/dist/components/forms/common/config.cjs +17 -0
  54. package/dist/components/forms/common/config.d.ts +5 -0
  55. package/dist/components/forms/common/config.js +17 -0
  56. package/dist/components/forms/index.css +15 -6
  57. package/dist/components/forms/index.scss +2 -1
  58. package/dist/components/forms/src/data.cjs +7 -5
  59. package/dist/components/forms/src/data.d.ts +7 -4
  60. package/dist/components/forms/src/data.js +8 -6
  61. package/dist/components/forms/src/setup.cjs +5 -13
  62. package/dist/components/forms/src/setup.d.ts +1 -1
  63. package/dist/components/forms/src/setup.js +5 -13
  64. package/dist/components/forms/style/index2.scss +3 -1
  65. package/dist/components/forms-div/index.css +9 -0
  66. package/dist/components/forms-div/src/index2.cjs +5 -5
  67. package/dist/components/forms-div/src/index2.js +3 -3
  68. package/dist/components/forms-drag/src/index2.cjs +12 -12
  69. package/dist/components/forms-drag/src/index2.js +1 -1
  70. package/dist/components/{forms-items → forms-item}/index.css +9 -0
  71. package/dist/components/forms-item/src/index2.cjs +2 -2
  72. package/dist/components/forms-item/src/index2.js +1 -1
  73. package/dist/components/forms-item/src/indexts.d.ts +1 -1
  74. package/dist/components/forms-item/src/label.cjs +17 -30
  75. package/dist/components/forms-item/src/label.js +17 -30
  76. package/dist/components/forms-items/src/index2.cjs +9 -9
  77. package/dist/components/forms-items/src/index2.js +1 -1
  78. package/dist/components/full-screen/index.css +9 -0
  79. package/dist/components/global-config/index.d.ts +1 -1
  80. package/dist/components/global-config/src/index.d.ts +1 -1
  81. package/dist/components/history/index.css +9 -0
  82. package/dist/components/icon/index.css +9 -0
  83. package/dist/components/icon-picker/index.css +9 -0
  84. package/dist/components/iframe/index.css +9 -0
  85. package/dist/components/images/index.css +9 -0
  86. package/dist/components/index.cjs +413 -407
  87. package/dist/components/index.d.ts +3 -0
  88. package/dist/components/index.js +6 -0
  89. package/dist/components/index.scss +4 -1
  90. package/dist/components/index2.scss +4 -1
  91. package/dist/components/input-array/index.css +9 -0
  92. package/dist/components/input-history/index.css +9 -0
  93. package/dist/components/input-num/index.css +9 -0
  94. package/dist/components/input-select/index.css +9 -0
  95. package/dist/components/inputs/index.css +9 -0
  96. package/dist/components/keep-com/index.css +9 -0
  97. package/dist/components/labels/index.css +9 -0
  98. package/dist/components/list/index.css +9 -0
  99. package/dist/components/list/src/data.cjs +6 -0
  100. package/dist/components/list/src/data.d.ts +6 -0
  101. package/dist/components/list/src/data.js +6 -0
  102. package/dist/components/list/src/index2.cjs +6 -6
  103. package/dist/components/list/src/index2.js +2 -2
  104. package/dist/components/lists/index.css +9 -0
  105. package/dist/components/lists/src/index2.cjs +9 -9
  106. package/dist/components/lists/src/index2.js +9 -9
  107. package/dist/components/listsp/index.css +9 -0
  108. package/dist/components/listspd/index.css +9 -0
  109. package/dist/components/loading/src/data.cjs +13 -0
  110. package/dist/components/loading/src/data.d.ts +17 -0
  111. package/dist/components/loading/src/data.js +13 -0
  112. package/dist/components/loading/src/index.cjs +1 -0
  113. package/dist/components/loading/src/index.d.ts +0 -4
  114. package/dist/components/loading/src/index.js +1 -0
  115. package/dist/components/menus/index.css +9 -0
  116. package/dist/components/message/src/data.cjs +13 -0
  117. package/dist/components/message/src/data.d.ts +17 -0
  118. package/dist/components/message/src/data.js +13 -0
  119. package/dist/components/message/src/index.cjs +1 -0
  120. package/dist/components/message/src/index.d.ts +0 -4
  121. package/dist/components/message/src/index.js +1 -0
  122. package/dist/components/message-box/src/data.cjs +13 -0
  123. package/dist/components/message-box/src/data.d.ts +17 -0
  124. package/dist/components/message-box/src/data.js +13 -0
  125. package/dist/components/message-box/src/index.cjs +1 -0
  126. package/dist/components/message-box/src/index.d.ts +0 -4
  127. package/dist/components/message-box/src/index.js +1 -0
  128. package/dist/components/no-data/index.css +9 -0
  129. package/dist/components/page/index.css +15 -6
  130. package/dist/components/page/src/set-column2.cjs +2 -2
  131. package/dist/components/page/src/set-column2.js +1 -1
  132. package/dist/components/paging/index.css +9 -0
  133. package/dist/components/popup/index.css +9 -0
  134. package/dist/components/retract/index.css +9 -0
  135. package/dist/components/right-key/index.css +9 -0
  136. package/dist/components/scss/common.scss +9 -0
  137. package/dist/components/seamless-scroll/index.css +9 -0
  138. package/dist/components/select-scroll/index.css +9 -0
  139. package/dist/components/selector/index.css +9 -0
  140. package/dist/components/selects/index.css +9 -0
  141. package/dist/components/sliders/index.css +9 -0
  142. package/dist/components/switchs/index.css +9 -0
  143. package/dist/components/tables/common/config.cjs +1 -1
  144. package/dist/components/tables/common/config.js +1 -1
  145. package/dist/components/tables/common/pagin.cjs +123 -52
  146. package/dist/components/tables/common/pagin.d.ts +40 -9
  147. package/dist/components/tables/common/pagin.js +123 -52
  148. package/dist/components/tables/index.css +9 -0
  149. package/dist/components/tables/src/column.cjs +23 -22
  150. package/dist/components/tables/src/column.d.ts +3 -0
  151. package/dist/components/tables/src/column.js +15 -14
  152. package/dist/components/tables/src/data.cjs +15 -0
  153. package/dist/components/tables/src/data.d.ts +14 -1
  154. package/dist/components/tables/src/data.js +15 -0
  155. package/dist/components/tables/src/index2.cjs +29 -10
  156. package/dist/components/tables/src/index2.js +23 -4
  157. package/dist/components/tablesp/index.css +9 -0
  158. package/dist/components/tablesp/src/index2.cjs +9 -5
  159. package/dist/components/tablesp/src/index2.js +9 -5
  160. package/dist/components/tablespd/index.css +9 -0
  161. package/dist/components/tabless/index.css +9 -0
  162. package/dist/components/tablesv/index.css +9 -0
  163. package/dist/components/tablesv/src/column.cjs +116 -112
  164. package/dist/components/tablesv/src/column.d.ts +3 -1
  165. package/dist/components/tablesv/src/column.js +110 -106
  166. package/dist/components/tablesv/src/data.cjs +44 -0
  167. package/dist/components/tablesv/src/data.d.ts +43 -1
  168. package/dist/components/tablesv/src/data.js +44 -0
  169. package/dist/components/tablesv/src/index2.cjs +37 -14
  170. package/dist/components/tablesv/src/index2.js +36 -13
  171. package/dist/components/tablesv/style/index2.scss +3 -1
  172. package/dist/components/tablesvp/index.css +15 -0
  173. package/dist/components/tablesvp/index.scss +8 -0
  174. package/dist/components/tablesvp/src/index2.cjs +15 -5
  175. package/dist/components/tablesvp/src/index2.js +15 -5
  176. package/dist/components/tablesvpd/index.cjs +9 -0
  177. package/dist/components/tablesvpd/index.css +157 -0
  178. package/dist/components/tablesvpd/index.d.ts +4 -0
  179. package/dist/components/tablesvpd/index.js +9 -0
  180. package/dist/components/tablesvpd/index.scss +41 -0
  181. package/dist/components/tablesvpd/src/data.cjs +13 -0
  182. package/dist/components/tablesvpd/src/data.d.ts +18 -0
  183. package/dist/components/tablesvpd/src/data.js +13 -0
  184. package/dist/components/tablesvpd/src/index.cjs +4 -0
  185. package/dist/components/tablesvpd/src/index.js +4 -0
  186. package/dist/components/tablesvpd/src/index2.cjs +107 -0
  187. package/dist/components/tablesvpd/src/index2.js +107 -0
  188. package/dist/components/tablesvpd/style/index2.scss +4 -0
  189. package/dist/components/uploads/index.css +9 -0
  190. package/dist/components/videos/index.css +9 -0
  191. package/dist/components/window/index.css +9 -0
  192. package/dist/css/array.css +9 -0
  193. package/dist/css/audios.css +9 -0
  194. package/dist/css/box-adjust.css +9 -0
  195. package/dist/css/box-local.css +9 -0
  196. package/dist/css/box-mask.css +9 -0
  197. package/dist/css/box-title.css +9 -0
  198. package/dist/css/box.css +9 -0
  199. package/dist/css/buttons.css +9 -0
  200. package/dist/css/cascaders.css +9 -0
  201. package/dist/css/checks.css +9 -0
  202. package/dist/css/dates-divide.css +9 -0
  203. package/dist/css/dates-picker.css +9 -0
  204. package/dist/css/dates.css +9 -0
  205. package/dist/css/dates2.css +9 -0
  206. package/dist/css/dialogs.css +9 -0
  207. package/dist/css/edit-float.css +9 -0
  208. package/dist/css/edit.css +9 -0
  209. package/dist/css/forms-div.css +9 -0
  210. package/dist/css/{forms-items.css → forms-item.css} +9 -0
  211. package/dist/css/forms.css +15 -6
  212. package/dist/css/full-screen.css +9 -0
  213. package/dist/css/history.css +9 -0
  214. package/dist/css/icon-picker.css +9 -0
  215. package/dist/css/icon.css +9 -0
  216. package/dist/css/iframe.css +9 -0
  217. package/dist/css/images.css +9 -0
  218. package/dist/css/index.css +71 -6
  219. package/dist/css/input-array.css +9 -0
  220. package/dist/css/input-history.css +9 -0
  221. package/dist/css/input-num.css +9 -0
  222. package/dist/css/input-select.css +9 -0
  223. package/dist/css/inputs.css +9 -0
  224. package/dist/css/keep-com.css +9 -0
  225. package/dist/css/labels.css +9 -0
  226. package/dist/css/list.css +9 -0
  227. package/dist/css/lists.css +9 -0
  228. package/dist/css/listsp.css +9 -0
  229. package/dist/css/listspd.css +9 -0
  230. package/dist/css/menus.css +9 -0
  231. package/dist/css/no-data.css +9 -0
  232. package/dist/css/page.css +15 -6
  233. package/dist/css/paging.css +9 -0
  234. package/dist/css/popup.css +9 -0
  235. package/dist/css/retract.css +9 -0
  236. package/dist/css/right-key.css +9 -0
  237. package/dist/css/seamless-scroll.css +9 -0
  238. package/dist/css/select-scroll.css +9 -0
  239. package/dist/css/selector.css +9 -0
  240. package/dist/css/selects.css +9 -0
  241. package/dist/css/sliders.css +9 -0
  242. package/dist/css/switchs.css +9 -0
  243. package/dist/css/tables.css +9 -0
  244. package/dist/css/tablesp.css +9 -0
  245. package/dist/css/tablespd.css +9 -0
  246. package/dist/css/tabless.css +9 -0
  247. package/dist/css/tablesv.css +9 -0
  248. package/dist/css/tablesvp.css +15 -0
  249. package/dist/css/tablesvpd.css +157 -0
  250. package/dist/css/uploads.css +9 -0
  251. package/dist/css/videos.css +9 -0
  252. package/dist/css/window.css +9 -0
  253. package/dist/expand/{chunk-2L4PC7LZ.cjs → chunk-3HP2ZDNG.cjs} +6 -1
  254. package/dist/expand/{chunk-RBGCE6BS.js → chunk-7C25SBCF.js} +6 -1
  255. package/dist/expand/components.cjs +5 -5
  256. package/dist/expand/components.js +1 -1
  257. package/dist/expand/config.cjs +2 -2
  258. package/dist/expand/config.js +1 -1
  259. package/dist/hooks/compons/index.cjs +44 -0
  260. package/dist/hooks/compons/index.d.ts +7 -0
  261. package/dist/hooks/compons/index.js +44 -0
  262. package/dist/hooks/props-default/index.cjs +0 -12
  263. package/dist/hooks/props-default/index.d.ts +1 -1
  264. package/dist/hooks/props-default/index.js +0 -12
  265. package/dist/icons/index.json +1 -1
  266. package/dist/index.cjs +437 -431
  267. package/dist/index.css +71 -6
  268. package/dist/index.js +6 -0
  269. package/dist/type.d.ts +10 -5
  270. package/dist/utils/vues/getBoxDom.cjs +22 -0
  271. package/dist/utils/vues/getBoxDom.d.ts +1 -0
  272. package/dist/utils/vues/getBoxDom.js +22 -0
  273. package/dist/utils/vues/index.cjs +2 -0
  274. package/dist/utils/vues/index.d.ts +1 -0
  275. package/dist/utils/vues/index.js +2 -0
  276. package/package.json +14 -15
  277. package/dist/components/common/compons.cjs +0 -76
  278. package/dist/components/common/compons.d.ts +0 -9
  279. package/dist/components/common/compons.js +0 -76
  280. package/dist/components/common/compons.scss +0 -26
  281. package/dist/components/common/compons2.scss +0 -26
@@ -1,16 +1,29 @@
1
1
  import { Ref, Component, ExtractPropTypes, ComputedRef } from 'vue';
2
2
  import { Translator } from '../../types/locale';
3
3
  export declare const dataProps: {
4
+ /**
5
+ * @props { Boolean } isValue 用value数据
6
+ */
4
7
  isValue: {
5
8
  type: BooleanConstructor;
6
9
  };
10
+ /**
11
+ * @props { Object } configs 总表格的配置
12
+ * config 和 list 的结合
13
+ */
7
14
  configs: {
8
15
  type: () => Config;
9
16
  };
17
+ /**
18
+ * @props { Object } config={} 表格的配置
19
+ */
10
20
  config: {
11
21
  type: () => TableConfig;
12
22
  default(): {};
13
23
  };
24
+ /**
25
+ * @props { Array<ListObj> } list=[] 展示列的数组
26
+ */
14
27
  list: {
15
28
  type: {
16
29
  (arrayLength: number): ListObj[];
@@ -30,6 +43,9 @@ export declare const dataProps: {
30
43
  };
31
44
  default(): never[];
32
45
  };
46
+ /**
47
+ * @props { Boolean } load=true 默认加载
48
+ */
33
49
  load: {
34
50
  type: BooleanConstructor;
35
51
  default: boolean;
@@ -41,6 +57,12 @@ export declare const dataProps: {
41
57
  type: ObjectConstructor;
42
58
  default(): {};
43
59
  };
60
+ /**
61
+ * @props { Boolean } isCompons 是否使用默认的配置
62
+ */
63
+ isCompons: {
64
+ type: BooleanConstructor;
65
+ };
44
66
  /**
45
67
  * @props { Object } compons 外部组件集合
46
68
  */
@@ -86,7 +108,6 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
86
108
  border?: boolean | undefined;
87
109
  align?: string | undefined;
88
110
  resizable?: boolean | undefined;
89
- sort?: boolean | undefined;
90
111
  fit?: boolean | undefined;
91
112
  showHeader?: boolean | undefined;
92
113
  highlightCurrentRow?: boolean | undefined;
@@ -98,9 +119,14 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
98
119
  events?: {
99
120
  [key: string]: string | Function;
100
121
  } | undefined;
101
- defaultSort?: {
102
- prop?: string | undefined;
103
- order?: "asc" | "ascending" | "desc" | "descending" | "" | undefined;
122
+ sort?: {
123
+ is?: boolean | undefined;
124
+ front?: boolean | undefined;
125
+ frontSort?: Function | undefined;
126
+ default?: {
127
+ prop?: string | undefined;
128
+ order?: "asc" | "ascending" | "desc" | "descending" | "" | undefined;
129
+ } | undefined;
104
130
  } | undefined;
105
131
  paginat?: {
106
132
  is?: boolean | undefined;
@@ -142,7 +168,6 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
142
168
  border?: boolean | undefined;
143
169
  align?: string | undefined;
144
170
  resizable?: boolean | undefined;
145
- sort?: boolean | undefined;
146
171
  fit?: boolean | undefined;
147
172
  showHeader?: boolean | undefined;
148
173
  highlightCurrentRow?: boolean | undefined;
@@ -154,9 +179,14 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
154
179
  events?: {
155
180
  [key: string]: string | Function;
156
181
  } | undefined;
157
- defaultSort?: {
158
- prop?: string | undefined;
159
- order?: "asc" | "ascending" | "desc" | "descending" | "" | undefined;
182
+ sort?: {
183
+ is?: boolean | undefined;
184
+ front?: boolean | undefined;
185
+ frontSort?: Function | undefined;
186
+ default?: {
187
+ prop?: string | undefined;
188
+ order?: "asc" | "ascending" | "desc" | "descending" | "" | undefined;
189
+ } | undefined;
160
190
  } | undefined;
161
191
  paginat?: {
162
192
  is?: boolean | undefined;
@@ -252,7 +282,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
252
282
  type?: string | undefined;
253
283
  }[]>;
254
284
  onRadioChange: (obj: ObjAny) => void;
255
- getSelection: () => any;
285
+ getSelection: () => ObjStr[];
256
286
  initData: (callback?: () => void) => void;
257
287
  getData: (p?: ObjAny, callback?: (d?: ObjAny) => void) => void;
258
288
  clean: () => void;
@@ -277,6 +307,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
277
307
  onListEvents: (...arr: any) => void;
278
308
  onSelect: (s: ObjAny, row: ObjStr) => void;
279
309
  onRowClick: (row: ObjAny) => void;
310
+ onCellClick: (row: ObjAny) => void;
280
311
  onChange: (arr: ObjStr[]) => void;
281
312
  pagconfig: Ref<{
282
313
  pageSize: number;
@@ -7,26 +7,40 @@ import { executionMethod } from "../../../utils/util.js";
7
7
  import { setObjValue, getObjValue } from "@fangzhongya/utils/basic/object/objValue";
8
8
  const dataProps = {
9
9
  ...props,
10
+ /**
11
+ * @props { Boolean } isValue 用value数据
12
+ */
10
13
  isValue: {
11
14
  type: Boolean
12
15
  },
13
- // 总表格的配置
16
+ /**
17
+ * @props { Object } configs 总表格的配置
18
+ * config 和 list 的结合
19
+ */
14
20
  configs: {
15
21
  type: Object
16
22
  },
17
- // 表格的配置
23
+ /**
24
+ * @props { Object } config={} 表格的配置
25
+ */
18
26
  config: {
19
27
  type: Object,
20
28
  default() {
21
29
  return {};
22
30
  }
23
31
  },
32
+ /**
33
+ * @props { Array<ListObj> } list=[] 展示列的数组
34
+ */
24
35
  list: {
25
36
  type: Array,
26
37
  default() {
27
38
  return [];
28
39
  }
29
40
  },
41
+ /**
42
+ * @props { Boolean } load=true 默认加载
43
+ */
30
44
  load: {
31
45
  type: Boolean,
32
46
  default: true
@@ -40,6 +54,12 @@ const dataProps = {
40
54
  return {};
41
55
  }
42
56
  },
57
+ /**
58
+ * @props { Boolean } isCompons 是否使用默认的配置
59
+ */
60
+ isCompons: {
61
+ type: Boolean
62
+ },
43
63
  /**
44
64
  * @props { Object } compons 外部组件集合
45
65
  */
@@ -169,13 +189,13 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
169
189
  tableList.value = list;
170
190
  };
171
191
  const setConfig = () => {
172
- var _a2;
192
+ var _a2, _b2;
173
193
  const configs = props2.configs;
174
194
  const config = (configs == null ? void 0 : configs.config) ?? props2.config;
175
- if ((_a2 = config.config) == null ? void 0 : _a2.defaultSort) {
176
- const v = config.config.defaultSort;
177
- paginat.order = orderMap[v.order] ?? "";
178
- paginat.prop = v.prop;
195
+ if ((_a2 = config.sort) == null ? void 0 : _a2.default) {
196
+ const v = ((_b2 = config.sort) == null ? void 0 : _b2.default) || {};
197
+ paginat.order = orderMap[v.order || ""] ?? "";
198
+ paginat.prop = v.prop ?? "";
179
199
  }
180
200
  const pagin = config.paginat ?? {};
181
201
  paginat.is = pagin.is || false;
@@ -336,88 +356,137 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
336
356
  return arr;
337
357
  }
338
358
  }
359
+ const selections = ref([]);
339
360
  function getSelection() {
340
- return refTable.value.getSelections();
361
+ return selections.value;
362
+ }
363
+ function setSelection(array) {
364
+ selections.value = array;
365
+ emit("selection", selections.value);
341
366
  }
342
367
  function onChange(arr) {
343
368
  var _a2;
369
+ console.log("onChange");
344
370
  if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
345
- console.log("onChange");
346
- emit("selection", getSelectionValue(arr, paginat.current));
371
+ setSelection(getSelectionValue(arr, paginat.current));
372
+ }
373
+ }
374
+ const isHighlight = computed(() => {
375
+ const c = tableConfig.value.config || {};
376
+ if ((c == null ? void 0 : c.highlightCurrentRow) || c["highlight-current-row"]) {
377
+ return true;
378
+ } else {
379
+ return false;
380
+ }
381
+ });
382
+ function setSelectRow(row, is) {
383
+ var _a2, _b2;
384
+ if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
385
+ if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
386
+ if (selections.value[0] == row) {
387
+ refTable.value.clearSelection();
388
+ refTable.value.clearCurrentRow();
389
+ setSelection([]);
390
+ } else {
391
+ refTable.value.clearSelection();
392
+ refTable.value.toggleRowSelection(row, true);
393
+ setSelection([row]);
394
+ }
395
+ } else {
396
+ refTable.value.clearSelection();
397
+ refTable.value.toggleRowSelection(row, true);
398
+ setSelection([row]);
399
+ }
400
+ } else {
401
+ if (is) {
402
+ refTable.value.toggleRowSelection(row);
403
+ }
347
404
  }
348
405
  }
349
406
  function onRowClick(row) {
350
- var _a2, _b2, _c, _d;
351
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.noRowSelect)) {
407
+ var _a2, _b2;
408
+ if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isRowSelect) {
352
409
  const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
353
410
  if (selectable) {
354
411
  const index = data.list.findIndex((obj) => {
355
412
  obj === row;
356
413
  });
357
414
  if (selectable(row, index)) {
358
- if ((_c = tableConfig.value.config) == null ? void 0 : _c.isradio) {
359
- refTable.value.clearSelection();
360
- refTable.value.toggleRowSelection(row, true);
361
- console.log("onRowClick");
362
- emit("selection", [row]);
363
- } else {
364
- refTable.value.toggleRowSelection(row);
365
- }
415
+ setSelectRow(row, true);
366
416
  }
367
417
  } else {
368
- if ((_d = tableConfig.value.config) == null ? void 0 : _d.isradio) {
369
- refTable.value.clearSelection();
370
- refTable.value.toggleRowSelection(row, true);
371
- console.log("onRowClick");
372
- emit("selection", [row]);
373
- } else {
374
- refTable.value.toggleRowSelection(row);
375
- }
418
+ setSelectRow(row, true);
419
+ }
420
+ } else {
421
+ if (!isHighlight.value) {
422
+ refTable.value.clearCurrentRow();
376
423
  }
377
424
  }
378
425
  }
379
426
  function empty() {
380
- var _a2, _b2, _c;
427
+ var _a2, _b2, _c, _d;
381
428
  if (istype.value && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
382
429
  (_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
383
430
  }
384
431
  (_c = refTable.value) == null ? void 0 : _c.clearSelection();
385
- console.log("empty");
386
- emit("selection", []);
432
+ (_d = refTable.value) == null ? void 0 : _d.clearCurrentRow();
433
+ setSelection([]);
387
434
  }
388
435
  function onSelect(s, row) {
389
- var _a2;
436
+ setSelectRow(row, false);
437
+ }
438
+ function onCellClick(row) {
439
+ var _a2, _b2;
390
440
  if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
391
- refTable.value.clearSelection();
392
- refTable.value.toggleRowSelection(row, true);
393
- console.log("onSelect");
394
- emit("selection", [row]);
441
+ if ((_b2 = tableConfig.value.config) == null ? void 0 : _b2.isCancelAgain) {
442
+ if (selections.value[0] == row) {
443
+ console.log("onCellClick", row);
444
+ refTable.value.clearSelection();
445
+ refTable.value.clearCurrentRow();
446
+ setSelection([]);
447
+ }
448
+ }
395
449
  }
396
450
  }
397
451
  function onRadioChange(obj) {
398
452
  var _a2;
399
453
  if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio) {
400
- console.log("onRadioChange");
401
- emit("selection", [obj.row]);
454
+ nextTick(() => {
455
+ onRowClick(obj.row);
456
+ });
402
457
  }
403
458
  }
459
+ function getFrontSort(ao, bo, prop) {
460
+ var _a2, _b2;
461
+ if ((_a2 = tableConfig.value.sort) == null ? void 0 : _a2.frontSort) {
462
+ return (_b2 = tableConfig.value.sort) == null ? void 0 : _b2.frontSort(ao, bo, prop);
463
+ } else {
464
+ const a = ao[prop];
465
+ const b = bo[prop];
466
+ const c = Number(a) - Number(b);
467
+ if (isNaN(c)) {
468
+ return (a + "").length - (b + "").length;
469
+ } else {
470
+ return c;
471
+ }
472
+ }
473
+ }
474
+ function clearSort() {
475
+ var _a2, _b2;
476
+ paginat.prop = "";
477
+ paginat.order = "";
478
+ (_b2 = (_a2 = refTable.value).clearSort) == null ? void 0 : _b2.call(_a2);
479
+ }
404
480
  function defaultSort(arr) {
405
- var _a2, _b2, _c, _d, _e;
406
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.sort)) {
481
+ var _a2, _b2;
482
+ if (!((_b2 = (_a2 = tableConfig.value) == null ? void 0 : _a2.sort) == null ? void 0 : _b2.front)) {
407
483
  return arr;
408
484
  } else {
409
- const prop = (_c = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.defaultSort) == null ? void 0 : _c.prop;
410
- const order = orderMap[(_e = (_d = tableConfig.value.config) == null ? void 0 : _d.defaultSort) == null ? void 0 : _e.order] || "";
485
+ const prop = paginat.prop;
486
+ const order = paginat.order;
411
487
  if (prop && order) {
412
488
  const vs = arr.sort((ao, bo) => {
413
- const a = ao[prop];
414
- const b = bo[prop];
415
- const c = Number(a) - Number(b);
416
- if (isNaN(c)) {
417
- return (a + "").length - (b + "").length;
418
- } else {
419
- return c;
420
- }
489
+ return getFrontSort(ao, bo, prop);
421
490
  });
422
491
  if (order == "asc") {
423
492
  return vs;
@@ -431,7 +500,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
431
500
  }
432
501
  function onSortChange(obj) {
433
502
  var _a2;
434
- if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.sort)) {
503
+ if ((_a2 = tableConfig.value.sort) == null ? void 0 : _a2.is) {
435
504
  paginat.order = orderMap[obj.order] || "";
436
505
  paginat.prop = obj.field || obj.prop;
437
506
  paginat.current = 1;
@@ -468,7 +537,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
468
537
  console.log("clean");
469
538
  (_a2 = refTable.value) == null ? void 0 : _a2.clearSelection();
470
539
  crossPageData.value = [];
471
- emit("selection", []);
540
+ setSelection([]);
472
541
  }
473
542
  function getParam(param) {
474
543
  var _a2;
@@ -647,6 +716,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
647
716
  newIndex
648
717
  }) {
649
718
  if (oldIndex === newIndex) return;
719
+ clearSort();
650
720
  const movedItem = data.list.splice(oldIndex, 1)[0];
651
721
  data.list.splice(newIndex, 0, movedItem);
652
722
  if (paginat.is && paginat.front) {
@@ -695,6 +765,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
695
765
  onListEvents,
696
766
  onSelect,
697
767
  onRowClick,
768
+ onCellClick,
698
769
  onChange,
699
770
  pagconfig,
700
771
  formEvent,
@@ -12,6 +12,15 @@
12
12
  --g-main-bg: var(--bg-color-page);
13
13
  }
14
14
 
15
+ .com-footer {
16
+ border-top: 1px solid var(--border);
17
+ padding: 20px 20px;
18
+ }
19
+
20
+ .com-lable-array {
21
+ line-height: 18px;
22
+ }
23
+
15
24
  .tables {
16
25
  width: 100%;
17
26
  min-height: var(--tables-min-height, 70px);
@@ -1,36 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("vue");
4
- const util = require("../common/util.cjs");
5
- const index = require("../../table-column/index.cjs");
6
4
  const use = require("../../common/use.cjs");
7
5
  const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
8
- const compons = require("../../common/compons.cjs");
6
+ const index = require("../../../hooks/compons/index.cjs");
9
7
  const config = require("../common/config.cjs");
8
+ const util = require("../common/util.cjs");
9
+ const index$1 = require("../../table-column/index.cjs");
10
10
  const noProps = ["children", "class", "minWidth", "label"];
11
11
  function setProps(obj, props) {
12
12
  const table = props.table;
13
13
  const robj = {};
14
- const issort = table["sort"];
15
14
  robj["showOverflowTooltip"] = Boolean(getAttrValue.getAttrValue(obj, "showOverflow")) || getAttrValue.getAttrValue(table, "showOverflowTooltip") || Boolean(getAttrValue.getAttrValue(table, "showOverflow"));
16
15
  robj["header-align"] = table["align"];
17
16
  robj["align"] = getAttrValue.getAttrValue(obj, "headerAlign") || table["align"];
18
17
  Object.keys(obj).forEach((key) => {
19
18
  if (!noProps.includes(key)) {
20
19
  if (obj[key] !== "") {
21
- robj[key] = obj[key];
22
20
  if (key == "sortable") {
23
- if (issort && obj[key]) {
21
+ if (obj[key]) {
24
22
  robj[key] = "custom";
25
23
  }
24
+ } else {
25
+ robj[key] = obj[key];
26
26
  }
27
27
  }
28
28
  }
29
29
  });
30
30
  return robj;
31
31
  }
32
- function setSslot(obj, scope, emit, slots, props, index2) {
33
- const slot = use.useSetSlot(obj, scope.row, slots, index2, scope);
32
+ function setSslot(obj, scope, emit, slots, props, index$12) {
33
+ const slot = use.useSetSlot(obj, scope.row, slots, index$12, scope);
34
34
  if (slot) {
35
35
  return slot;
36
36
  }
@@ -42,9 +42,9 @@ function setSslot(obj, scope, emit, slots, props, index2) {
42
42
  obj,
43
43
  scope.row,
44
44
  optionss,
45
- compons.useGetCompons(config.provides.compons),
45
+ index.useComponsGet(config.provides.compons),
46
46
  emit,
47
- index2,
47
+ index$12,
48
48
  scope
49
49
  );
50
50
  if (column) {
@@ -52,7 +52,7 @@ function setSslot(obj, scope, emit, slots, props, index2) {
52
52
  }
53
53
  }
54
54
  }
55
- return defaultDom(obj, scope, props, index2);
55
+ return defaultDom(obj, scope, props, index$12);
56
56
  }
57
57
  function defaultDom(obj, scope, props, index2) {
58
58
  var _a;
@@ -86,7 +86,7 @@ function defaultDom(obj, scope, props, index2) {
86
86
  domValue ?? table.emptyDisplay ?? ""
87
87
  );
88
88
  }
89
- function setHeader(obj, scope, slots, emit, props, index2) {
89
+ function setHeader(obj, scope, slots, emit, props, index$12) {
90
90
  const optionss = props.options || {};
91
91
  return use.useGetDomLabel(
92
92
  obj.label,
@@ -94,17 +94,22 @@ function setHeader(obj, scope, slots, emit, props, index2) {
94
94
  scope.row,
95
95
  slots,
96
96
  optionss,
97
- compons.useGetCompons(config.provides.compons),
97
+ index.useComponsGet(config.provides.compons),
98
98
  emit,
99
- index2
99
+ index$12
100
100
  );
101
101
  }
102
- function getTableColumn(obj, emit, props, slots, index$1, def) {
102
+ function getDom(obj, emit, propss, slots, index2) {
103
+ return getTableColumn(obj, emit, propss, slots, index2, (scope) => {
104
+ return setSslot(obj, scope, emit, slots, propss, index2);
105
+ });
106
+ }
107
+ function getTableColumn(obj, emit, props, slots, index2, def) {
103
108
  if (obj.type == "selection") {
104
109
  def = void 0;
105
110
  }
106
111
  return vue.h(
107
- index.TableColumn,
112
+ index$1.TableColumn,
108
113
  {
109
114
  ...setProps(obj, props),
110
115
  className: obj.class,
@@ -113,18 +118,14 @@ function getTableColumn(obj, emit, props, slots, index$1, def) {
113
118
  {
114
119
  default: def,
115
120
  header: (scope) => {
116
- return setHeader(obj, scope, slots, emit, props, index$1);
121
+ return setHeader(obj, scope, slots, emit, props, index2);
117
122
  }
118
123
  }
119
124
  );
120
125
  }
121
- function getDom(obj, emit, props, slots, index2) {
122
- return getTableColumn(obj, emit, props, slots, index2, (scope) => {
123
- return setSslot(obj, scope, emit, slots, props, index2);
124
- });
125
- }
126
126
  function columnRender(obj, emit, props, slots, index2) {
127
127
  return getDom(obj, emit, props, slots, index2);
128
128
  }
129
129
  exports.columnRender = columnRender;
130
130
  exports.getTableColumn = getTableColumn;
131
+ exports.setHeader = setHeader;
@@ -1,4 +1,7 @@
1
1
  import { VNode, RendererNode, RendererElement } from 'vue';
2
+ export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): string | VNode<RendererNode, RendererElement, {
3
+ [key: string]: any;
4
+ }>;
2
5
  export declare function getTableColumn(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number, def?: Function): VNode<RendererNode, RendererElement, {
3
6
  [key: string]: any;
4
7
  }>;
@@ -1,26 +1,26 @@
1
1
  import { h } from "vue";
2
- import { setMinWidth } from "../common/util.js";
3
- import { TableColumn } from "../../table-column/index.js";
4
2
  import { useSetSlot, useSetCompon, useGetDomValue, useGetDomLabel } from "../../common/use.js";
5
3
  import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
6
- import { useGetCompons } from "../../common/compons.js";
4
+ import { useComponsGet } from "../../../hooks/compons/index.js";
7
5
  import { provides } from "../common/config.js";
6
+ import { setMinWidth } from "../common/util.js";
7
+ import { TableColumn } from "../../table-column/index.js";
8
8
  const noProps = ["children", "class", "minWidth", "label"];
9
9
  function setProps(obj, props) {
10
10
  const table = props.table;
11
11
  const robj = {};
12
- const issort = table["sort"];
13
12
  robj["showOverflowTooltip"] = Boolean(getAttrValue(obj, "showOverflow")) || getAttrValue(table, "showOverflowTooltip") || Boolean(getAttrValue(table, "showOverflow"));
14
13
  robj["header-align"] = table["align"];
15
14
  robj["align"] = getAttrValue(obj, "headerAlign") || table["align"];
16
15
  Object.keys(obj).forEach((key) => {
17
16
  if (!noProps.includes(key)) {
18
17
  if (obj[key] !== "") {
19
- robj[key] = obj[key];
20
18
  if (key == "sortable") {
21
- if (issort && obj[key]) {
19
+ if (obj[key]) {
22
20
  robj[key] = "custom";
23
21
  }
22
+ } else {
23
+ robj[key] = obj[key];
24
24
  }
25
25
  }
26
26
  }
@@ -40,7 +40,7 @@ function setSslot(obj, scope, emit, slots, props, index) {
40
40
  obj,
41
41
  scope.row,
42
42
  optionss,
43
- useGetCompons(provides.compons),
43
+ useComponsGet(provides.compons),
44
44
  emit,
45
45
  index,
46
46
  scope
@@ -92,11 +92,16 @@ function setHeader(obj, scope, slots, emit, props, index) {
92
92
  scope.row,
93
93
  slots,
94
94
  optionss,
95
- useGetCompons(provides.compons),
95
+ useComponsGet(provides.compons),
96
96
  emit,
97
97
  index
98
98
  );
99
99
  }
100
+ function getDom(obj, emit, propss, slots, index) {
101
+ return getTableColumn(obj, emit, propss, slots, index, (scope) => {
102
+ return setSslot(obj, scope, emit, slots, propss, index);
103
+ });
104
+ }
100
105
  function getTableColumn(obj, emit, props, slots, index, def) {
101
106
  if (obj.type == "selection") {
102
107
  def = void 0;
@@ -116,15 +121,11 @@ function getTableColumn(obj, emit, props, slots, index, def) {
116
121
  }
117
122
  );
118
123
  }
119
- function getDom(obj, emit, props, slots, index) {
120
- return getTableColumn(obj, emit, props, slots, index, (scope) => {
121
- return setSslot(obj, scope, emit, slots, props, index);
122
- });
123
- }
124
124
  function columnRender(obj, emit, props, slots, index) {
125
125
  return getDom(obj, emit, props, slots, index);
126
126
  }
127
127
  export {
128
128
  columnRender,
129
- getTableColumn
129
+ getTableColumn,
130
+ setHeader
130
131
  };
@@ -73,12 +73,21 @@ const dataProps = {
73
73
  return [];
74
74
  }
75
75
  },
76
+ rowKey: {
77
+ type: String
78
+ },
76
79
  /**
77
80
  * 行高度
78
81
  */
79
82
  lineHeight: {
80
83
  type: [String, Number]
81
84
  },
85
+ size: {
86
+ type: String,
87
+ default() {
88
+ return "default";
89
+ }
90
+ },
82
91
  /**
83
92
  * @props { Object } options 选择数据集合
84
93
  */
@@ -88,6 +97,12 @@ const dataProps = {
88
97
  return {};
89
98
  }
90
99
  },
100
+ /**
101
+ * @props { Boolean } isCompons 是否使用默认的配置
102
+ */
103
+ isCompons: {
104
+ type: Boolean
105
+ },
91
106
  /**
92
107
  * @props { Object } compons 外部组件集合
93
108
  */