yc-agent-ui 1.0.0 → 1.1.1

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 (238) hide show
  1. package/README.md +22 -0
  2. package/es/components/dialog-form/index.d.ts +4 -4
  3. package/es/components/dialog-form/src/index.vue.d.ts +4 -4
  4. package/es/components/display-item/index.d.ts +15 -15
  5. package/es/components/display-item/src/index.vue.d.ts +13 -13
  6. package/es/components/drawer-form/index.d.ts +4 -4
  7. package/es/components/drawer-form/src/index.vue.d.ts +4 -4
  8. package/es/components/form/index.d.ts +8 -8
  9. package/es/components/form/src/form-content.vue.d.ts +8 -8
  10. package/es/components/form/src/index.vue.d.ts +8 -8
  11. package/es/components/form-item/index.d.ts +6 -6
  12. package/es/components/form-item/src/index.vue.d.ts +6 -6
  13. package/es/components/index.d.ts +4 -0
  14. package/es/components/page/index.d.ts +172 -172
  15. package/es/components/page/src/index.vue.d.ts +60 -60
  16. package/es/components/search/index.d.ts +52 -52
  17. package/es/components/search/src/index.vue.d.ts +20 -20
  18. package/es/components/table/src/table-column.vue.d.ts +34 -34
  19. package/es/components/yc-controls/capability.d.ts +4 -0
  20. package/es/components/yc-controls/index.d.ts +17 -0
  21. package/es/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
  22. package/es/components/yc-controls/src/segmented.vue.d.ts +16 -0
  23. package/es/components/yc-controls/src/switch-row.vue.d.ts +13 -0
  24. package/es/components/yc-controls/src/type.d.ts +39 -0
  25. package/es/components/yc-feedback/capability.d.ts +4 -0
  26. package/es/components/yc-feedback/index.d.ts +21 -0
  27. package/es/components/yc-feedback/src/banner.vue.d.ts +22 -0
  28. package/es/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
  29. package/es/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
  30. package/es/components/yc-feedback/src/timeline.vue.d.ts +7 -0
  31. package/es/components/yc-feedback/src/type.d.ts +46 -0
  32. package/es/components/yc-input/capability.d.ts +4 -0
  33. package/es/components/yc-input/index.d.ts +21 -0
  34. package/es/components/yc-input/src/input.vue.d.ts +50 -0
  35. package/es/components/yc-input/src/money-input.vue.d.ts +26 -0
  36. package/es/components/yc-input/src/stepper-input.vue.d.ts +18 -0
  37. package/es/components/yc-input/src/textarea.vue.d.ts +35 -0
  38. package/es/components/yc-input/src/type.d.ts +82 -0
  39. package/es/components/yc-plus-page/src/index.vue.d.ts +176 -176
  40. package/es/components/yc-property-table/capability.d.ts +4 -0
  41. package/es/components/yc-property-table/index.d.ts +30 -0
  42. package/es/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
  43. package/es/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
  44. package/es/components/yc-property-table/src/device-table.vue.d.ts +17 -0
  45. package/es/components/yc-property-table/src/order-table.vue.d.ts +18 -0
  46. package/es/components/yc-property-table/src/property-table.vue.d.ts +91 -0
  47. package/es/components/yc-property-table/src/type.d.ts +214 -0
  48. package/es/hooks/usePlusFormReset.d.ts +48 -48
  49. package/es/index.css +16 -16
  50. package/es/index.mjs +4 -0
  51. package/es/packages/components/chart/index.mjs +36 -36
  52. package/es/packages/components/index.mjs +4 -0
  53. package/es/packages/components/table/capability.mjs +10 -29
  54. package/es/packages/components/utils/index.mjs +1 -1
  55. package/es/packages/components/yc-card/capability.mjs +53 -13
  56. package/es/packages/components/yc-controls/capability.mjs +100 -0
  57. package/es/packages/components/yc-controls/index.mjs +13 -0
  58. package/es/packages/components/yc-controls/src/choice-cards.vue.mjs +5 -0
  59. package/es/packages/components/yc-controls/src/choice-cards2.vue.mjs +157 -0
  60. package/es/packages/components/yc-controls/src/segmented.vue.mjs +5 -0
  61. package/es/packages/components/yc-controls/src/segmented2.vue.mjs +78 -0
  62. package/es/packages/components/yc-controls/src/switch-row.vue.mjs +5 -0
  63. package/es/packages/components/yc-controls/src/switch-row2.vue.mjs +95 -0
  64. package/es/packages/components/yc-controls/src/type.mjs +1 -0
  65. package/es/packages/components/yc-feedback/capability.mjs +109 -0
  66. package/es/packages/components/yc-feedback/index.mjs +16 -0
  67. package/es/packages/components/yc-feedback/src/banner.vue.mjs +5 -0
  68. package/es/packages/components/yc-feedback/src/banner2.vue.mjs +230 -0
  69. package/es/packages/components/yc-feedback/src/empty-state.vue.mjs +5 -0
  70. package/es/packages/components/yc-feedback/src/empty-state2.vue.mjs +97 -0
  71. package/es/packages/components/yc-feedback/src/key-value-list.vue.mjs +5 -0
  72. package/es/packages/components/yc-feedback/src/key-value-list2.vue.mjs +194 -0
  73. package/es/packages/components/yc-feedback/src/timeline.vue.mjs +5 -0
  74. package/es/packages/components/yc-feedback/src/timeline2.vue.mjs +134 -0
  75. package/es/packages/components/yc-feedback/src/type.mjs +1 -0
  76. package/es/packages/components/yc-input/capability.mjs +112 -0
  77. package/es/packages/components/yc-input/index.mjs +16 -0
  78. package/es/packages/components/yc-input/src/input.vue.mjs +5 -0
  79. package/es/packages/components/yc-input/src/input2.vue.mjs +427 -0
  80. package/es/packages/components/yc-input/src/money-input.vue.mjs +5 -0
  81. package/es/packages/components/yc-input/src/money-input2.vue.mjs +242 -0
  82. package/es/packages/components/yc-input/src/stepper-input.vue.mjs +5 -0
  83. package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +211 -0
  84. package/es/packages/components/yc-input/src/textarea.vue.mjs +5 -0
  85. package/es/packages/components/yc-input/src/textarea2.vue.mjs +158 -0
  86. package/es/packages/components/yc-input/src/type.mjs +1 -0
  87. package/es/packages/components/yc-property-table/capability.mjs +350 -0
  88. package/es/packages/components/yc-property-table/index.mjs +24 -0
  89. package/es/packages/components/yc-property-table/src/asset-table.vue.mjs +5 -0
  90. package/es/packages/components/yc-property-table/src/asset-table2.vue.mjs +405 -0
  91. package/es/packages/components/yc-property-table/src/bill-table.vue.mjs +5 -0
  92. package/es/packages/components/yc-property-table/src/bill-table2.vue.mjs +654 -0
  93. package/es/packages/components/yc-property-table/src/device-table.vue.mjs +5 -0
  94. package/es/packages/components/yc-property-table/src/device-table2.vue.mjs +324 -0
  95. package/es/packages/components/yc-property-table/src/order-table.vue.mjs +5 -0
  96. package/es/packages/components/yc-property-table/src/order-table2.vue.mjs +363 -0
  97. package/es/packages/components/yc-property-table/src/property-table.vue.mjs +5 -0
  98. package/es/packages/components/yc-property-table/src/property-table2.vue.mjs +1228 -0
  99. package/es/packages/components/yc-property-table/src/type.mjs +1 -0
  100. package/es/packages/registry/load.mjs +21 -5
  101. package/es/version.d.ts +1 -1
  102. package/es/version.mjs +1 -1
  103. package/index.css +6 -6
  104. package/index.js +64731 -57876
  105. package/index.min.css +5 -5
  106. package/index.min.js +32 -32
  107. package/index.min.mjs +33 -33
  108. package/index.mjs +64681 -57863
  109. package/lib/components/dialog-form/index.d.ts +4 -4
  110. package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
  111. package/lib/components/display-item/index.d.ts +15 -15
  112. package/lib/components/display-item/src/index.vue.d.ts +13 -13
  113. package/lib/components/drawer-form/index.d.ts +4 -4
  114. package/lib/components/drawer-form/src/index.vue.d.ts +4 -4
  115. package/lib/components/form/index.d.ts +8 -8
  116. package/lib/components/form/src/form-content.vue.d.ts +8 -8
  117. package/lib/components/form/src/index.vue.d.ts +8 -8
  118. package/lib/components/form-item/index.d.ts +6 -6
  119. package/lib/components/form-item/src/index.vue.d.ts +6 -6
  120. package/lib/components/index.d.ts +4 -0
  121. package/lib/components/page/index.d.ts +172 -172
  122. package/lib/components/page/src/index.vue.d.ts +60 -60
  123. package/lib/components/search/index.d.ts +52 -52
  124. package/lib/components/search/src/index.vue.d.ts +20 -20
  125. package/lib/components/table/src/table-column.vue.d.ts +34 -34
  126. package/lib/components/yc-controls/capability.d.ts +4 -0
  127. package/lib/components/yc-controls/index.d.ts +17 -0
  128. package/lib/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
  129. package/lib/components/yc-controls/src/segmented.vue.d.ts +16 -0
  130. package/lib/components/yc-controls/src/switch-row.vue.d.ts +13 -0
  131. package/lib/components/yc-controls/src/type.d.ts +39 -0
  132. package/lib/components/yc-feedback/capability.d.ts +4 -0
  133. package/lib/components/yc-feedback/index.d.ts +21 -0
  134. package/lib/components/yc-feedback/src/banner.vue.d.ts +22 -0
  135. package/lib/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
  136. package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
  137. package/lib/components/yc-feedback/src/timeline.vue.d.ts +7 -0
  138. package/lib/components/yc-feedback/src/type.d.ts +46 -0
  139. package/lib/components/yc-input/capability.d.ts +4 -0
  140. package/lib/components/yc-input/index.d.ts +21 -0
  141. package/lib/components/yc-input/src/input.vue.d.ts +50 -0
  142. package/lib/components/yc-input/src/money-input.vue.d.ts +26 -0
  143. package/lib/components/yc-input/src/stepper-input.vue.d.ts +18 -0
  144. package/lib/components/yc-input/src/textarea.vue.d.ts +35 -0
  145. package/lib/components/yc-input/src/type.d.ts +82 -0
  146. package/lib/components/yc-plus-page/src/index.vue.d.ts +176 -176
  147. package/lib/components/yc-property-table/capability.d.ts +4 -0
  148. package/lib/components/yc-property-table/index.d.ts +30 -0
  149. package/lib/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
  150. package/lib/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
  151. package/lib/components/yc-property-table/src/device-table.vue.d.ts +17 -0
  152. package/lib/components/yc-property-table/src/order-table.vue.d.ts +18 -0
  153. package/lib/components/yc-property-table/src/property-table.vue.d.ts +91 -0
  154. package/lib/components/yc-property-table/src/type.d.ts +214 -0
  155. package/lib/hooks/usePlusFormReset.d.ts +48 -48
  156. package/lib/index.css +13 -13
  157. package/lib/index.js +176 -135
  158. package/lib/packages/components/index.js +172 -131
  159. package/lib/packages/components/table/capability.js +10 -29
  160. package/lib/packages/components/yc-card/capability.js +53 -13
  161. package/lib/packages/components/yc-controls/capability.js +104 -0
  162. package/lib/packages/components/yc-controls/index.js +23 -0
  163. package/lib/packages/components/yc-controls/src/choice-cards.vue.js +9 -0
  164. package/lib/packages/components/yc-controls/src/choice-cards2.vue.js +161 -0
  165. package/lib/packages/components/yc-controls/src/segmented.vue.js +9 -0
  166. package/lib/packages/components/yc-controls/src/segmented2.vue.js +82 -0
  167. package/lib/packages/components/yc-controls/src/switch-row.vue.js +9 -0
  168. package/lib/packages/components/yc-controls/src/switch-row2.vue.js +99 -0
  169. package/lib/packages/components/yc-controls/src/type.js +2 -0
  170. package/lib/packages/components/yc-feedback/capability.js +113 -0
  171. package/lib/packages/components/yc-feedback/index.js +28 -0
  172. package/lib/packages/components/yc-feedback/src/banner.vue.js +9 -0
  173. package/lib/packages/components/yc-feedback/src/banner2.vue.js +234 -0
  174. package/lib/packages/components/yc-feedback/src/empty-state.vue.js +9 -0
  175. package/lib/packages/components/yc-feedback/src/empty-state2.vue.js +101 -0
  176. package/lib/packages/components/yc-feedback/src/key-value-list.vue.js +9 -0
  177. package/lib/packages/components/yc-feedback/src/key-value-list2.vue.js +198 -0
  178. package/lib/packages/components/yc-feedback/src/timeline.vue.js +9 -0
  179. package/lib/packages/components/yc-feedback/src/timeline2.vue.js +138 -0
  180. package/lib/packages/components/yc-feedback/src/type.js +2 -0
  181. package/lib/packages/components/yc-input/capability.js +116 -0
  182. package/lib/packages/components/yc-input/index.js +28 -0
  183. package/lib/packages/components/yc-input/src/input.vue.js +9 -0
  184. package/lib/packages/components/yc-input/src/input2.vue.js +431 -0
  185. package/lib/packages/components/yc-input/src/money-input.vue.js +9 -0
  186. package/lib/packages/components/yc-input/src/money-input2.vue.js +246 -0
  187. package/lib/packages/components/yc-input/src/stepper-input.vue.js +9 -0
  188. package/lib/packages/components/yc-input/src/stepper-input2.vue.js +215 -0
  189. package/lib/packages/components/yc-input/src/textarea.vue.js +9 -0
  190. package/lib/packages/components/yc-input/src/textarea2.vue.js +162 -0
  191. package/lib/packages/components/yc-input/src/type.js +2 -0
  192. package/lib/packages/components/yc-property-table/capability.js +354 -0
  193. package/lib/packages/components/yc-property-table/index.js +43 -0
  194. package/lib/packages/components/yc-property-table/src/asset-table.vue.js +9 -0
  195. package/lib/packages/components/yc-property-table/src/asset-table2.vue.js +409 -0
  196. package/lib/packages/components/yc-property-table/src/bill-table.vue.js +9 -0
  197. package/lib/packages/components/yc-property-table/src/bill-table2.vue.js +658 -0
  198. package/lib/packages/components/yc-property-table/src/device-table.vue.js +9 -0
  199. package/lib/packages/components/yc-property-table/src/device-table2.vue.js +328 -0
  200. package/lib/packages/components/yc-property-table/src/order-table.vue.js +9 -0
  201. package/lib/packages/components/yc-property-table/src/order-table2.vue.js +367 -0
  202. package/lib/packages/components/yc-property-table/src/property-table.vue.js +9 -0
  203. package/lib/packages/components/yc-property-table/src/property-table2.vue.js +1232 -0
  204. package/lib/packages/components/yc-property-table/src/type.js +2 -0
  205. package/lib/packages/registry/load.js +21 -5
  206. package/lib/version.d.ts +1 -1
  207. package/lib/version.js +1 -1
  208. package/locale/en.js +1 -1
  209. package/locale/en.min.js +1 -1
  210. package/locale/en.min.mjs +1 -1
  211. package/locale/en.mjs +1 -1
  212. package/locale/ja.js +1 -1
  213. package/locale/ja.min.js +1 -1
  214. package/locale/ja.min.mjs +1 -1
  215. package/locale/ja.mjs +1 -1
  216. package/locale/ko.js +1 -1
  217. package/locale/ko.min.js +1 -1
  218. package/locale/ko.min.mjs +1 -1
  219. package/locale/ko.mjs +1 -1
  220. package/locale/zh-cn.js +1 -1
  221. package/locale/zh-cn.min.js +1 -1
  222. package/locale/zh-cn.min.mjs +1 -1
  223. package/locale/zh-cn.mjs +1 -1
  224. package/locale/zh-tw.js +1 -1
  225. package/locale/zh-tw.min.js +1 -1
  226. package/locale/zh-tw.min.mjs +1 -1
  227. package/locale/zh-tw.mjs +1 -1
  228. package/package.json +1 -1
  229. package/theme-chalk/index.css +6 -6
  230. package/theme-chalk/plus-yc-controls.css +1 -0
  231. package/theme-chalk/plus-yc-feedback.css +1 -0
  232. package/theme-chalk/plus-yc-input.css +1 -0
  233. package/theme-chalk/plus-yc-property-table.css +1 -0
  234. package/theme-chalk/src/index.scss +4 -0
  235. package/theme-chalk/src/yc-controls.scss +316 -0
  236. package/theme-chalk/src/yc-feedback.scss +452 -0
  237. package/theme-chalk/src/yc-input.scss +473 -0
  238. package/theme-chalk/src/yc-property-table.scss +1700 -0
@@ -0,0 +1,1228 @@
1
+ import { defineComponent, ref, onMounted, onBeforeUnmount, computed, watch, openBlock, createElementBlock, normalizeStyle, normalizeClass, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList, createElementVNode, withDirectives, vModelText, withModifiers, createTextVNode } from 'vue';
2
+
3
+ const _hoisted_1 = {
4
+ key: 0,
5
+ class: "yc-property-header"
6
+ };
7
+ const _hoisted_2 = {
8
+ key: 0,
9
+ class: "yc-property-header__titles"
10
+ };
11
+ const _hoisted_3 = {
12
+ key: 0,
13
+ class: "yc-property-header__title"
14
+ };
15
+ const _hoisted_4 = {
16
+ key: 1,
17
+ class: "yc-property-header__subtitle"
18
+ };
19
+ const _hoisted_5 = {
20
+ key: 0,
21
+ class: "yc-property-header__toolbar"
22
+ };
23
+ const _hoisted_6 = {
24
+ key: 0,
25
+ class: "yc-property-tabs"
26
+ };
27
+ const _hoisted_7 = ["onClick"];
28
+ const _hoisted_8 = {
29
+ key: 0,
30
+ class: "yc-property-tab__count"
31
+ };
32
+ const _hoisted_9 = {
33
+ key: 0,
34
+ class: "yc-property-search"
35
+ };
36
+ const _hoisted_10 = ["placeholder"];
37
+ const _hoisted_11 = {
38
+ key: 1,
39
+ class: "yc-property-loading"
40
+ };
41
+ const _hoisted_12 = { class: "yc-property-loading__text" };
42
+ const _hoisted_13 = { class: "yc-property-table-container" };
43
+ const _hoisted_14 = {
44
+ key: 0,
45
+ class: "yc-property-th is-selection",
46
+ width: "48px"
47
+ };
48
+ const _hoisted_15 = ["checked", "indeterminate"];
49
+ const _hoisted_16 = ["onClick"];
50
+ const _hoisted_17 = { class: "yc-property-th__inner" };
51
+ const _hoisted_18 = {
52
+ key: 1,
53
+ class: "yc-property-th align-right",
54
+ width: "140px"
55
+ };
56
+ const _hoisted_19 = ["onClick"];
57
+ const _hoisted_20 = ["checked", "onChange"];
58
+ const _hoisted_21 = {
59
+ key: 1,
60
+ class: "yc-property-money"
61
+ };
62
+ const _hoisted_22 = { class: "yc-property-money__num" };
63
+ const _hoisted_23 = ["href"];
64
+ const _hoisted_24 = {
65
+ key: 1,
66
+ class: "yc-property-muted"
67
+ };
68
+ const _hoisted_25 = { class: "yc-property-actions" };
69
+ const _hoisted_26 = ["disabled", "onClick"];
70
+ const _hoisted_27 = { class: "yc-property-tr is-empty" };
71
+ const _hoisted_28 = ["colspan"];
72
+ const _hoisted_29 = { class: "yc-property-empty" };
73
+ const _hoisted_30 = { class: "yc-property-empty__text" };
74
+ const _hoisted_31 = { class: "yc-property-card-list" };
75
+ const _hoisted_32 = ["onClick"];
76
+ const _hoisted_33 = { class: "yc-property-card-header" };
77
+ const _hoisted_34 = { class: "yc-property-card-header__left" };
78
+ const _hoisted_35 = ["checked", "onChange"];
79
+ const _hoisted_36 = { class: "yc-property-card-title" };
80
+ const _hoisted_37 = {
81
+ key: 0,
82
+ class: "yc-property-card-header__right"
83
+ };
84
+ const _hoisted_38 = {
85
+ key: 0,
86
+ class: "yc-property-card-subtitle"
87
+ };
88
+ const _hoisted_39 = { class: "yc-property-card-body" };
89
+ const _hoisted_40 = { class: "yc-property-card-grid" };
90
+ const _hoisted_41 = { class: "yc-property-card-field__label" };
91
+ const _hoisted_42 = { class: "yc-property-card-field__value" };
92
+ const _hoisted_43 = {
93
+ key: 1,
94
+ class: "yc-property-money"
95
+ };
96
+ const _hoisted_44 = { class: "yc-property-money__num" };
97
+ const _hoisted_45 = ["href"];
98
+ const _hoisted_46 = {
99
+ key: 1,
100
+ class: "yc-property-muted"
101
+ };
102
+ const _hoisted_47 = ["disabled", "onClick"];
103
+ const _hoisted_48 = { class: "yc-property-empty is-card" };
104
+ const _hoisted_49 = { class: "yc-property-empty__text" };
105
+ const _hoisted_50 = {
106
+ key: 4,
107
+ class: "yc-property-footer"
108
+ };
109
+ const _hoisted_51 = { class: "yc-property-footer__summary" };
110
+ const _hoisted_52 = { class: "yc-property-footer__count" };
111
+ const _hoisted_53 = { class: "yc-property-footer__selected" };
112
+ const _hoisted_54 = { class: "yc-property-pagination" };
113
+ const _hoisted_55 = ["disabled"];
114
+ const _hoisted_56 = { class: "yc-property-pagination__info" };
115
+ const _hoisted_57 = ["disabled"];
116
+ var _sfc_main = /* @__PURE__ */ defineComponent({
117
+ ...{
118
+ name: "YcPropertyTable"
119
+ },
120
+ __name: "property-table",
121
+ props: {
122
+ data: { default: () => [] },
123
+ columns: { default: () => [] },
124
+ layout: { default: "auto" },
125
+ breakpoint: { default: 768 },
126
+ title: {},
127
+ subtitle: {},
128
+ card: { type: Boolean, default: true },
129
+ bordered: { type: Boolean, default: true },
130
+ striped: { type: Boolean, default: false },
131
+ hoverable: { type: Boolean, default: true },
132
+ density: { default: "default" },
133
+ searchable: { type: Boolean, default: true },
134
+ searchPlaceholder: { default: "\u641C\u7D22\u623F\u53F7\u3001\u5DE5\u5355\u3001\u8D23\u4EFB\u4EBA..." },
135
+ tabs: {},
136
+ activeTab: {},
137
+ tabKey: {},
138
+ selectable: { type: Boolean, default: false },
139
+ selectedRows: {},
140
+ rowKey: { default: "id" },
141
+ pagination: { type: [Boolean, Object] },
142
+ loading: { type: Boolean, default: false },
143
+ loadingText: { default: "\u52A0\u8F7D\u4E2D..." },
144
+ emptyText: { default: "\u6682\u65E0\u6570\u636E\u8BB0\u5F55" },
145
+ actions: { default: () => [] },
146
+ customClass: {},
147
+ customStyle: {}
148
+ },
149
+ emits: ["action", "update:selectedRows", "rowClick", "tabChange", "search", "pageChange"],
150
+ setup(__props, { emit: __emit }) {
151
+ var _a;
152
+ const props = __props;
153
+ const emit = __emit;
154
+ const rootRef = ref(null);
155
+ const containerWidth = ref(0);
156
+ let resizeObserver = null;
157
+ onMounted(() => {
158
+ const root = rootRef.value;
159
+ if (!root || typeof ResizeObserver === "undefined") return;
160
+ resizeObserver = new ResizeObserver((entries) => {
161
+ var _a2, _b;
162
+ containerWidth.value = (_b = (_a2 = entries[0]) == null ? void 0 : _a2.contentRect.width) != null ? _b : 0;
163
+ });
164
+ resizeObserver.observe(root);
165
+ });
166
+ onBeforeUnmount(() => {
167
+ resizeObserver == null ? void 0 : resizeObserver.disconnect();
168
+ });
169
+ const currentLayout = computed(() => {
170
+ if (props.layout === "table") return "table";
171
+ if (props.layout === "card") return "card";
172
+ return containerWidth.value > 0 && containerWidth.value <= props.breakpoint ? "card" : "table";
173
+ });
174
+ const activeTabKey = ref(props.activeTab || props.tabs && ((_a = props.tabs[0]) == null ? void 0 : _a.key) || "");
175
+ watch(() => props.activeTab, (val) => {
176
+ if (val) activeTabKey.value = val;
177
+ });
178
+ const handleTabChange = (tab) => {
179
+ activeTabKey.value = tab.key;
180
+ emit("tabChange", tab);
181
+ };
182
+ const searchQuery = ref("");
183
+ const activeSortProp = ref("");
184
+ const activeSortOrder = ref(null);
185
+ const handleSearchInput = () => {
186
+ currentPage.value = 1;
187
+ emit("search", searchQuery.value);
188
+ };
189
+ const handleSearchClear = () => {
190
+ searchQuery.value = "";
191
+ currentPage.value = 1;
192
+ emit("search", "");
193
+ };
194
+ const handleSort = (prop) => {
195
+ if (activeSortProp.value === prop) {
196
+ if (activeSortOrder.value === "asc") {
197
+ activeSortOrder.value = "desc";
198
+ } else if (activeSortOrder.value === "desc") {
199
+ activeSortProp.value = "";
200
+ activeSortOrder.value = null;
201
+ }
202
+ } else {
203
+ activeSortProp.value = prop;
204
+ activeSortOrder.value = "asc";
205
+ }
206
+ };
207
+ const internalColumns = computed(() => props.columns || []);
208
+ const primaryCol = computed(() => {
209
+ const customPrimary = internalColumns.value.find((c) => c.primary);
210
+ if (customPrimary) return customPrimary;
211
+ return internalColumns.value[0];
212
+ });
213
+ const subPrimaryCol = computed(() => {
214
+ return internalColumns.value.find((c) => c.subPrimary);
215
+ });
216
+ const statusCol = computed(() => {
217
+ return internalColumns.value.find((c) => c.type === "tag" && !c.primary);
218
+ });
219
+ const cardVisibleColumns = computed(() => {
220
+ return internalColumns.value.filter((c) => {
221
+ if (c.hideOnMobile) return false;
222
+ if (c === primaryCol.value) return false;
223
+ if (c === subPrimaryCol.value) return false;
224
+ if (c === statusCol.value) return false;
225
+ return true;
226
+ });
227
+ });
228
+ const filteredData = computed(() => {
229
+ let list = [...props.data || []];
230
+ if (props.tabs && props.tabs.length > 0 && activeTabKey.value && activeTabKey.value !== "all") {
231
+ const currentTab = props.tabs.find((t) => t.key === activeTabKey.value);
232
+ if (currentTab && currentTab.value !== void 0) {
233
+ list = list.filter((item) => {
234
+ const key = props.tabKey || "status";
235
+ return item[key] === currentTab.value;
236
+ });
237
+ }
238
+ }
239
+ const q = searchQuery.value.trim().toLowerCase();
240
+ if (q) {
241
+ list = list.filter((row) => {
242
+ return Object.values(row).some((val) => {
243
+ if (val === null || val === void 0) return false;
244
+ return String(val).toLowerCase().includes(q);
245
+ });
246
+ });
247
+ }
248
+ if (activeSortProp.value && activeSortOrder.value) {
249
+ const prop = activeSortProp.value;
250
+ const isAsc = activeSortOrder.value === "asc";
251
+ list.sort((a, b) => {
252
+ const va = a[prop];
253
+ const vb = b[prop];
254
+ if (typeof va === "number" && typeof vb === "number") {
255
+ return isAsc ? va - vb : vb - va;
256
+ }
257
+ return isAsc ? String(va).localeCompare(String(vb)) : String(vb).localeCompare(String(va));
258
+ });
259
+ }
260
+ return list;
261
+ });
262
+ const currentPage = ref(1);
263
+ const paginationConfig = computed(() => {
264
+ if (typeof props.pagination === "object") {
265
+ return {
266
+ pageSize: props.pagination.pageSize || 10,
267
+ enabled: true
268
+ };
269
+ }
270
+ if (props.pagination === false) {
271
+ return { pageSize: 9999, enabled: false };
272
+ }
273
+ return { pageSize: 10, enabled: true };
274
+ });
275
+ const showPagination = computed(() => {
276
+ return paginationConfig.value.enabled && filteredData.value.length > 0;
277
+ });
278
+ const totalItems = computed(() => filteredData.value.length);
279
+ const totalPages = computed(() => Math.ceil(totalItems.value / paginationConfig.value.pageSize));
280
+ const paginatedData = computed(() => {
281
+ if (!paginationConfig.value.enabled) return filteredData.value;
282
+ const start = (currentPage.value - 1) * paginationConfig.value.pageSize;
283
+ return filteredData.value.slice(start, start + paginationConfig.value.pageSize);
284
+ });
285
+ const changePage = (page) => {
286
+ if (page < 1 || page > totalPages.value) return;
287
+ currentPage.value = page;
288
+ emit("pageChange", page);
289
+ };
290
+ const selectedRowsList = ref(props.selectedRows || []);
291
+ watch(() => props.selectedRows, (rows) => {
292
+ if (rows) selectedRowsList.value = rows;
293
+ });
294
+ const getRowKey = (row, index) => {
295
+ var _a2;
296
+ return (_a2 = row[props.rowKey]) != null ? _a2 : index;
297
+ };
298
+ const isRowSelected = (row) => {
299
+ const key = props.rowKey;
300
+ return selectedRowsList.value.some((r) => r[key] === row[key]);
301
+ };
302
+ const handleToggleSelectRow = (row) => {
303
+ const key = props.rowKey;
304
+ const idx = selectedRowsList.value.findIndex((r) => r[key] === row[key]);
305
+ if (idx > -1) {
306
+ selectedRowsList.value.splice(idx, 1);
307
+ } else {
308
+ selectedRowsList.value.push(row);
309
+ }
310
+ emit("update:selectedRows", [...selectedRowsList.value]);
311
+ };
312
+ const isAllSelected = computed(() => {
313
+ if (paginatedData.value.length === 0) return false;
314
+ return paginatedData.value.every((row) => isRowSelected(row));
315
+ });
316
+ const isIndeterminate = computed(() => {
317
+ if (isAllSelected.value) return false;
318
+ return paginatedData.value.some((row) => isRowSelected(row));
319
+ });
320
+ const handleToggleSelectAll = () => {
321
+ const key = props.rowKey;
322
+ if (isAllSelected.value) {
323
+ const currentKeys = new Set(paginatedData.value.map((r) => r[key]));
324
+ selectedRowsList.value = selectedRowsList.value.filter((r) => !currentKeys.has(r[key]));
325
+ } else {
326
+ const currentKeys = new Set(selectedRowsList.value.map((r) => r[key]));
327
+ paginatedData.value.forEach((row) => {
328
+ if (!currentKeys.has(row[key])) {
329
+ selectedRowsList.value.push(row);
330
+ }
331
+ });
332
+ }
333
+ emit("update:selectedRows", [...selectedRowsList.value]);
334
+ };
335
+ const handleRowClick = (row, index) => {
336
+ emit("rowClick", row, index);
337
+ };
338
+ const getCellValue = (row, col) => {
339
+ return row[col.prop];
340
+ };
341
+ const formatCellValue = (row, col, index) => {
342
+ const val = getCellValue(row, col);
343
+ if (col.formatter) {
344
+ return col.formatter(val, row, index);
345
+ }
346
+ if (val === null || val === void 0 || val === "") return "-";
347
+ return val;
348
+ };
349
+ const formatMoney = (val) => {
350
+ const num = Number(val);
351
+ if (isNaN(num)) return val || "0.00";
352
+ return num.toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
353
+ };
354
+ const getTagConfig = (col, value) => {
355
+ if (col.tagMap && col.tagMap[value]) {
356
+ return col.tagMap[value];
357
+ }
358
+ return {
359
+ label: String(value != null ? value : "-"),
360
+ type: "info"
361
+ };
362
+ };
363
+ const getVisibleActions = (row) => {
364
+ return (props.actions || []).filter((act) => {
365
+ if (typeof act.visible === "function") return act.visible(row);
366
+ if (typeof act.visible === "boolean") return act.visible;
367
+ return true;
368
+ });
369
+ };
370
+ const isActionDisabled = (act, row) => {
371
+ if (typeof act.disabled === "function") return act.disabled(row);
372
+ if (typeof act.disabled === "boolean") return act.disabled;
373
+ return false;
374
+ };
375
+ const handleAction = (name, row) => {
376
+ emit("action", name, row);
377
+ };
378
+ return (_ctx, _cache) => {
379
+ return openBlock(), createElementBlock(
380
+ "div",
381
+ {
382
+ ref_key: "rootRef",
383
+ ref: rootRef,
384
+ class: normalizeClass(["yc-property-table-wrapper", [
385
+ `is-${currentLayout.value}`,
386
+ `density-${__props.density}`,
387
+ { "is-card-container": __props.card, "is-bordered": __props.bordered },
388
+ __props.customClass
389
+ ]]),
390
+ style: normalizeStyle(__props.customStyle)
391
+ },
392
+ [
393
+ createCommentVNode(" \u5934\u90E8\u533A\u57DF (\u6807\u9898\u3001\u526F\u6807\u9898\u3001\u64CD\u4F5C\u63D2\u69FD) "),
394
+ __props.title || __props.subtitle || _ctx.$slots.header || _ctx.$slots.toolbar || __props.searchable || __props.tabs && __props.tabs.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
395
+ renderSlot(_ctx.$slots, "header", {}, () => [
396
+ __props.title || __props.subtitle ? (openBlock(), createElementBlock("div", _hoisted_2, [
397
+ __props.title ? (openBlock(), createElementBlock(
398
+ "h3",
399
+ _hoisted_3,
400
+ toDisplayString(__props.title),
401
+ 1
402
+ /* TEXT */
403
+ )) : createCommentVNode("v-if", true),
404
+ __props.subtitle ? (openBlock(), createElementBlock(
405
+ "p",
406
+ _hoisted_4,
407
+ toDisplayString(__props.subtitle),
408
+ 1
409
+ /* TEXT */
410
+ )) : createCommentVNode("v-if", true)
411
+ ])) : createCommentVNode("v-if", true)
412
+ ]),
413
+ createCommentVNode(" \u641C\u7D22\u4E0E\u7B5B\u9009\u5DE5\u5177\u680F "),
414
+ __props.searchable || _ctx.$slots.toolbar || __props.tabs && __props.tabs.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5, [
415
+ createCommentVNode(" \u72B6\u6001\u5207\u6362 Tab \u680F (\u79FB\u52A8\u7AEF\u652F\u6301\u6A2A\u5411\u6ED1\u52A8) "),
416
+ __props.tabs && __props.tabs.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_6, [
417
+ (openBlock(true), createElementBlock(
418
+ Fragment,
419
+ null,
420
+ renderList(__props.tabs, (tab) => {
421
+ return openBlock(), createElementBlock("button", {
422
+ key: tab.key,
423
+ type: "button",
424
+ class: normalizeClass(["yc-property-tab", { "is-active": activeTabKey.value === tab.key }]),
425
+ onClick: ($event) => handleTabChange(tab)
426
+ }, [
427
+ createElementVNode(
428
+ "span",
429
+ null,
430
+ toDisplayString(tab.label),
431
+ 1
432
+ /* TEXT */
433
+ ),
434
+ tab.count !== void 0 ? (openBlock(), createElementBlock(
435
+ "span",
436
+ _hoisted_8,
437
+ toDisplayString(tab.count),
438
+ 1
439
+ /* TEXT */
440
+ )) : createCommentVNode("v-if", true)
441
+ ], 10, _hoisted_7);
442
+ }),
443
+ 128
444
+ /* KEYED_FRAGMENT */
445
+ ))
446
+ ])) : createCommentVNode("v-if", true),
447
+ renderSlot(_ctx.$slots, "toolbar", {}, () => [
448
+ __props.searchable ? (openBlock(), createElementBlock("div", _hoisted_9, [
449
+ _cache[9] || (_cache[9] = createElementVNode(
450
+ "svg",
451
+ {
452
+ class: "yc-property-search__icon",
453
+ viewBox: "0 0 24 24",
454
+ width: "15",
455
+ height: "15",
456
+ fill: "none",
457
+ stroke: "currentColor",
458
+ "stroke-width": "2"
459
+ },
460
+ [
461
+ createElementVNode("circle", {
462
+ cx: "11",
463
+ cy: "11",
464
+ r: "8"
465
+ }),
466
+ createElementVNode("line", {
467
+ x1: "21",
468
+ y1: "21",
469
+ x2: "16.65",
470
+ y2: "16.65"
471
+ })
472
+ ],
473
+ -1
474
+ /* CACHED */
475
+ )),
476
+ withDirectives(createElementVNode("input", {
477
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
478
+ type: "text",
479
+ class: "yc-property-search__input",
480
+ placeholder: __props.searchPlaceholder,
481
+ onInput: handleSearchInput
482
+ }, null, 40, _hoisted_10), [
483
+ [vModelText, searchQuery.value]
484
+ ]),
485
+ searchQuery.value ? (openBlock(), createElementBlock("button", {
486
+ key: 0,
487
+ type: "button",
488
+ class: "yc-property-search__clear",
489
+ onClick: handleSearchClear
490
+ }, " \xD7 ")) : createCommentVNode("v-if", true)
491
+ ])) : createCommentVNode("v-if", true)
492
+ ])
493
+ ])) : createCommentVNode("v-if", true)
494
+ ])) : createCommentVNode("v-if", true),
495
+ createCommentVNode(" \u52A0\u8F7D\u4E2D\u906E\u7F69 "),
496
+ __props.loading ? (openBlock(), createElementBlock("div", _hoisted_11, [
497
+ _cache[10] || (_cache[10] = createElementVNode(
498
+ "div",
499
+ { class: "yc-property-loading__spinner" },
500
+ null,
501
+ -1
502
+ /* CACHED */
503
+ )),
504
+ createElementVNode(
505
+ "span",
506
+ _hoisted_12,
507
+ toDisplayString(__props.loadingText),
508
+ 1
509
+ /* TEXT */
510
+ )
511
+ ])) : currentLayout.value === "table" ? (openBlock(), createElementBlock(
512
+ Fragment,
513
+ { key: 2 },
514
+ [
515
+ createCommentVNode(" 1. PC \u684C\u9762\u7AEF\u591A\u5217\u5B8C\u6574\u8868\u683C\u89C6\u56FE (layout === 'table') "),
516
+ createElementVNode("div", _hoisted_13, [
517
+ createElementVNode(
518
+ "table",
519
+ {
520
+ class: normalizeClass(["yc-property-table", { "is-striped": __props.striped, "is-hoverable": __props.hoverable }])
521
+ },
522
+ [
523
+ createElementVNode("thead", null, [
524
+ createElementVNode("tr", null, [
525
+ createCommentVNode(" \u591A\u9009\u52FE\u9009\u5217 "),
526
+ __props.selectable ? (openBlock(), createElementBlock("th", _hoisted_14, [
527
+ createElementVNode("input", {
528
+ type: "checkbox",
529
+ class: "yc-property-checkbox",
530
+ checked: isAllSelected.value,
531
+ indeterminate: isIndeterminate.value,
532
+ onChange: handleToggleSelectAll
533
+ }, null, 40, _hoisted_15)
534
+ ])) : createCommentVNode("v-if", true),
535
+ createCommentVNode(" \u6570\u636E\u5217\u5934 "),
536
+ (openBlock(true), createElementBlock(
537
+ Fragment,
538
+ null,
539
+ renderList(internalColumns.value, (col) => {
540
+ return openBlock(), createElementBlock("th", {
541
+ key: col.prop,
542
+ class: normalizeClass(["yc-property-th", [
543
+ `align-${col.align || "left"}`,
544
+ { "is-sortable": col.sortable },
545
+ col.className
546
+ ]]),
547
+ style: normalizeStyle({ width: typeof col.width === "number" ? `${col.width}px` : col.width, minWidth: typeof col.minWidth === "number" ? `${col.minWidth}px` : col.minWidth }),
548
+ onClick: ($event) => col.sortable ? handleSort(col.prop) : void 0
549
+ }, [
550
+ createElementVNode("div", _hoisted_17, [
551
+ renderSlot(_ctx.$slots, `header-${col.prop}`, { column: col }, () => [
552
+ createElementVNode(
553
+ "span",
554
+ null,
555
+ toDisplayString(col.label),
556
+ 1
557
+ /* TEXT */
558
+ )
559
+ ]),
560
+ createCommentVNode(" \u6392\u5E8F\u7BAD\u5934 "),
561
+ col.sortable ? (openBlock(), createElementBlock(
562
+ "span",
563
+ {
564
+ key: 0,
565
+ class: normalizeClass(["yc-property-sort-arrows", { "is-sorted": activeSortProp.value === col.prop }])
566
+ },
567
+ [
568
+ createElementVNode(
569
+ "span",
570
+ {
571
+ class: normalizeClass(["yc-property-sort-arrow is-asc", { "is-active": activeSortProp.value === col.prop && activeSortOrder.value === "asc" }])
572
+ },
573
+ "\u25B2",
574
+ 2
575
+ /* CLASS */
576
+ ),
577
+ createElementVNode(
578
+ "span",
579
+ {
580
+ class: normalizeClass(["yc-property-sort-arrow is-desc", { "is-active": activeSortProp.value === col.prop && activeSortOrder.value === "desc" }])
581
+ },
582
+ "\u25BC",
583
+ 2
584
+ /* CLASS */
585
+ )
586
+ ],
587
+ 2
588
+ /* CLASS */
589
+ )) : createCommentVNode("v-if", true)
590
+ ])
591
+ ], 14, _hoisted_16);
592
+ }),
593
+ 128
594
+ /* KEYED_FRAGMENT */
595
+ )),
596
+ createCommentVNode(" \u64CD\u4F5C\u5217\u5934 "),
597
+ __props.actions && __props.actions.length > 0 ? (openBlock(), createElementBlock("th", _hoisted_18, [..._cache[11] || (_cache[11] = [
598
+ createElementVNode(
599
+ "span",
600
+ null,
601
+ "\u64CD\u4F5C",
602
+ -1
603
+ /* CACHED */
604
+ )
605
+ ])])) : createCommentVNode("v-if", true)
606
+ ])
607
+ ]),
608
+ createElementVNode("tbody", null, [
609
+ createCommentVNode(" \u6709\u6570\u636E\u884C "),
610
+ paginatedData.value.length > 0 ? (openBlock(true), createElementBlock(
611
+ Fragment,
612
+ { key: 0 },
613
+ renderList(paginatedData.value, (row, rIdx) => {
614
+ return openBlock(), createElementBlock("tr", {
615
+ key: getRowKey(row, rIdx),
616
+ class: normalizeClass(["yc-property-tr", { "is-selected": isRowSelected(row) }]),
617
+ onClick: ($event) => handleRowClick(row, rIdx)
618
+ }, [
619
+ createCommentVNode(" \u52FE\u9009\u5355\u5143\u683C "),
620
+ __props.selectable ? (openBlock(), createElementBlock("td", {
621
+ key: 0,
622
+ class: "yc-property-td is-selection",
623
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
624
+ }, ["stop"]))
625
+ }, [
626
+ createElementVNode("input", {
627
+ type: "checkbox",
628
+ class: "yc-property-checkbox",
629
+ checked: isRowSelected(row),
630
+ onChange: ($event) => handleToggleSelectRow(row)
631
+ }, null, 40, _hoisted_20)
632
+ ])) : createCommentVNode("v-if", true),
633
+ createCommentVNode(" \u6570\u636E\u5355\u5143\u683C "),
634
+ (openBlock(true), createElementBlock(
635
+ Fragment,
636
+ null,
637
+ renderList(internalColumns.value, (col) => {
638
+ return openBlock(), createElementBlock(
639
+ "td",
640
+ {
641
+ key: col.prop,
642
+ class: normalizeClass(["yc-property-td", [`align-${col.align || "left"}`, col.className]])
643
+ },
644
+ [
645
+ createCommentVNode(" \u81EA\u5B9A\u4E49\u5217\u63D2\u69FD "),
646
+ renderSlot(_ctx.$slots, col.prop, {
647
+ row,
648
+ column: col,
649
+ index: rIdx,
650
+ value: getCellValue(row, col)
651
+ }, () => [
652
+ createCommentVNode(" \u9884\u7F6E\u6E32\u67D3\u903B\u8F91 "),
653
+ col.type === "tag" ? (openBlock(), createElementBlock(
654
+ "span",
655
+ {
656
+ key: 0,
657
+ class: normalizeClass(["yc-property-tag", `type-${getTagConfig(col, getCellValue(row, col)).type || "info"}`])
658
+ },
659
+ [
660
+ getTagConfig(col, getCellValue(row, col)).dot ? (openBlock(), createElementBlock(
661
+ "span",
662
+ {
663
+ key: 0,
664
+ class: normalizeClass(["yc-property-tag__dot", { "is-pulsing": getTagConfig(col, getCellValue(row, col)).pulse }])
665
+ },
666
+ null,
667
+ 2
668
+ /* CLASS */
669
+ )) : createCommentVNode("v-if", true),
670
+ createTextVNode(
671
+ " " + toDisplayString(getTagConfig(col, getCellValue(row, col)).label),
672
+ 1
673
+ /* TEXT */
674
+ )
675
+ ],
676
+ 2
677
+ /* CLASS */
678
+ )) : col.type === "money" ? (openBlock(), createElementBlock("span", _hoisted_21, [
679
+ _cache[12] || (_cache[12] = createElementVNode(
680
+ "span",
681
+ { class: "yc-property-money__symbol" },
682
+ "\xA5",
683
+ -1
684
+ /* CACHED */
685
+ )),
686
+ createElementVNode(
687
+ "span",
688
+ _hoisted_22,
689
+ toDisplayString(formatMoney(getCellValue(row, col))),
690
+ 1
691
+ /* TEXT */
692
+ )
693
+ ])) : col.type === "phone" ? (openBlock(), createElementBlock(
694
+ Fragment,
695
+ { key: 2 },
696
+ [
697
+ getCellValue(row, col) ? (openBlock(), createElementBlock("a", {
698
+ key: 0,
699
+ href: `tel:${getCellValue(row, col)}`,
700
+ class: "yc-property-phone",
701
+ onClick: _cache[2] || (_cache[2] = withModifiers(() => {
702
+ }, ["stop"]))
703
+ }, [
704
+ _cache[13] || (_cache[13] = createElementVNode(
705
+ "svg",
706
+ {
707
+ class: "yc-property-phone__icon",
708
+ viewBox: "0 0 24 24",
709
+ width: "13",
710
+ height: "13",
711
+ fill: "none",
712
+ stroke: "currentColor",
713
+ "stroke-width": "2"
714
+ },
715
+ [
716
+ createElementVNode("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" })
717
+ ],
718
+ -1
719
+ /* CACHED */
720
+ )),
721
+ createElementVNode(
722
+ "span",
723
+ null,
724
+ toDisplayString(getCellValue(row, col)),
725
+ 1
726
+ /* TEXT */
727
+ )
728
+ ], 8, _hoisted_23)) : (openBlock(), createElementBlock("span", _hoisted_24, "-"))
729
+ ],
730
+ 64
731
+ /* STABLE_FRAGMENT */
732
+ )) : (openBlock(), createElementBlock(
733
+ Fragment,
734
+ { key: 3 },
735
+ [
736
+ createTextVNode(
737
+ toDisplayString(formatCellValue(row, col, rIdx)),
738
+ 1
739
+ /* TEXT */
740
+ )
741
+ ],
742
+ 64
743
+ /* STABLE_FRAGMENT */
744
+ ))
745
+ ])
746
+ ],
747
+ 2
748
+ /* CLASS */
749
+ );
750
+ }),
751
+ 128
752
+ /* KEYED_FRAGMENT */
753
+ )),
754
+ createCommentVNode(" \u64CD\u4F5C\u680F\u5355\u5143\u683C "),
755
+ __props.actions && __props.actions.length > 0 ? (openBlock(), createElementBlock("td", {
756
+ key: 1,
757
+ class: "yc-property-td align-right is-actions",
758
+ onClick: _cache[3] || (_cache[3] = withModifiers(() => {
759
+ }, ["stop"]))
760
+ }, [
761
+ renderSlot(_ctx.$slots, "actions", {
762
+ row,
763
+ index: rIdx
764
+ }, () => [
765
+ createElementVNode("div", _hoisted_25, [
766
+ (openBlock(true), createElementBlock(
767
+ Fragment,
768
+ null,
769
+ renderList(getVisibleActions(row), (act) => {
770
+ return openBlock(), createElementBlock("button", {
771
+ key: act.name,
772
+ type: "button",
773
+ class: normalizeClass(["yc-property-btn", [`type-${act.type || "primary"}`, { "is-plain": act.plain }]]),
774
+ disabled: isActionDisabled(act, row),
775
+ onClick: ($event) => handleAction(act.name, row)
776
+ }, toDisplayString(act.label), 11, _hoisted_26);
777
+ }),
778
+ 128
779
+ /* KEYED_FRAGMENT */
780
+ ))
781
+ ])
782
+ ])
783
+ ])) : createCommentVNode("v-if", true)
784
+ ], 10, _hoisted_19);
785
+ }),
786
+ 128
787
+ /* KEYED_FRAGMENT */
788
+ )) : (openBlock(), createElementBlock(
789
+ Fragment,
790
+ { key: 1 },
791
+ [
792
+ createCommentVNode(" \u7A7A\u6570\u636E\u72B6\u6001 "),
793
+ createElementVNode("tr", _hoisted_27, [
794
+ createElementVNode("td", {
795
+ colspan: internalColumns.value.length + (__props.selectable ? 1 : 0) + (__props.actions && __props.actions.length ? 1 : 0),
796
+ class: "yc-property-td is-empty"
797
+ }, [
798
+ renderSlot(_ctx.$slots, "empty", {}, () => [
799
+ createElementVNode("div", _hoisted_29, [
800
+ _cache[14] || (_cache[14] = createElementVNode(
801
+ "svg",
802
+ {
803
+ class: "yc-property-empty__icon",
804
+ viewBox: "0 0 64 64",
805
+ width: "48",
806
+ height: "48",
807
+ fill: "none",
808
+ stroke: "currentColor"
809
+ },
810
+ [
811
+ createElementVNode("rect", {
812
+ x: "12",
813
+ y: "14",
814
+ width: "40",
815
+ height: "36",
816
+ rx: "4",
817
+ "stroke-width": "2",
818
+ "stroke-dasharray": "4 4"
819
+ }),
820
+ createElementVNode("line", {
821
+ x1: "20",
822
+ y1: "26",
823
+ x2: "44",
824
+ y2: "26",
825
+ "stroke-width": "2"
826
+ }),
827
+ createElementVNode("line", {
828
+ x1: "20",
829
+ y1: "36",
830
+ x2: "36",
831
+ y2: "36",
832
+ "stroke-width": "2"
833
+ })
834
+ ],
835
+ -1
836
+ /* CACHED */
837
+ )),
838
+ createElementVNode(
839
+ "p",
840
+ _hoisted_30,
841
+ toDisplayString(__props.emptyText),
842
+ 1
843
+ /* TEXT */
844
+ )
845
+ ])
846
+ ])
847
+ ], 8, _hoisted_28)
848
+ ])
849
+ ],
850
+ 2112
851
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
852
+ ))
853
+ ])
854
+ ],
855
+ 2
856
+ /* CLASS */
857
+ )
858
+ ])
859
+ ],
860
+ 2112
861
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
862
+ )) : (openBlock(), createElementBlock(
863
+ Fragment,
864
+ { key: 3 },
865
+ [
866
+ createCommentVNode(" 2. \u79FB\u52A8\u7AEF\u4E0E H5 \u4E13\u5C5E\u81EA\u9002\u5E94\u7CBE\u81F4\u5361\u7247\u6D41\u89C6\u56FE (layout === 'card') "),
867
+ createElementVNode("div", _hoisted_31, [
868
+ paginatedData.value.length > 0 ? (openBlock(true), createElementBlock(
869
+ Fragment,
870
+ { key: 0 },
871
+ renderList(paginatedData.value, (row, rIdx) => {
872
+ return openBlock(), createElementBlock("div", {
873
+ key: getRowKey(row, rIdx),
874
+ class: normalizeClass(["yc-property-card-item", { "is-selected": isRowSelected(row) }]),
875
+ onClick: ($event) => handleRowClick(row, rIdx)
876
+ }, [
877
+ createCommentVNode(" \u5141\u8BB8\u5B8C\u6574\u81EA\u5B9A\u4E49\u5361\u7247\u63D2\u69FD "),
878
+ renderSlot(_ctx.$slots, "card", {
879
+ row,
880
+ index: rIdx,
881
+ columns: internalColumns.value
882
+ }, () => [
883
+ createCommentVNode(" \u9ED8\u8BA4\u7ED3\u6784\u5316\u5361\u7247 "),
884
+ createCommentVNode(" \u5361\u7247\u5934\u90E8 (\u4E3B\u6807 + \u72B6\u6001 Badge) "),
885
+ createElementVNode("div", _hoisted_33, [
886
+ renderSlot(_ctx.$slots, "card-header", {
887
+ row,
888
+ index: rIdx
889
+ }, () => {
890
+ var _a2;
891
+ return [
892
+ createElementVNode("div", _hoisted_34, [
893
+ createCommentVNode(" \u53EF\u9009\u591A\u9009\u6846 "),
894
+ __props.selectable ? (openBlock(), createElementBlock("input", {
895
+ key: 0,
896
+ type: "checkbox",
897
+ class: "yc-property-checkbox",
898
+ checked: isRowSelected(row),
899
+ onClick: _cache[4] || (_cache[4] = withModifiers(() => {
900
+ }, ["stop"])),
901
+ onChange: ($event) => handleToggleSelectRow(row)
902
+ }, null, 40, _hoisted_35)) : createCommentVNode("v-if", true),
903
+ createCommentVNode(" \u4E3B\u6807\u9898 "),
904
+ createElementVNode("div", _hoisted_36, [
905
+ renderSlot(_ctx.$slots, (_a2 = primaryCol.value) == null ? void 0 : _a2.prop, {
906
+ row,
907
+ column: primaryCol.value,
908
+ index: rIdx,
909
+ value: primaryCol.value ? getCellValue(row, primaryCol.value) : ""
910
+ }, () => [
911
+ createElementVNode(
912
+ "span",
913
+ null,
914
+ toDisplayString(primaryCol.value ? formatCellValue(row, primaryCol.value, rIdx) : `\u8BB0\u5F55 #${rIdx + 1}`),
915
+ 1
916
+ /* TEXT */
917
+ )
918
+ ])
919
+ ])
920
+ ]),
921
+ createCommentVNode(" \u72B6\u6001\u6807\u7B7E Badge (\u5982\u679C\u6709 tag \u5217) "),
922
+ statusCol.value ? (openBlock(), createElementBlock("div", _hoisted_37, [
923
+ createElementVNode(
924
+ "span",
925
+ {
926
+ class: normalizeClass(["yc-property-tag", `type-${getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).type || "info"}`])
927
+ },
928
+ [
929
+ getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).dot ? (openBlock(), createElementBlock(
930
+ "span",
931
+ {
932
+ key: 0,
933
+ class: normalizeClass(["yc-property-tag__dot", { "is-pulsing": getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).pulse }])
934
+ },
935
+ null,
936
+ 2
937
+ /* CLASS */
938
+ )) : createCommentVNode("v-if", true),
939
+ createTextVNode(
940
+ " " + toDisplayString(getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).label),
941
+ 1
942
+ /* TEXT */
943
+ )
944
+ ],
945
+ 2
946
+ /* CLASS */
947
+ )
948
+ ])) : createCommentVNode("v-if", true)
949
+ ];
950
+ })
951
+ ]),
952
+ createCommentVNode(" \u5361\u7247\u526F\u6807\u9898 (subPrimary) "),
953
+ subPrimaryCol.value ? (openBlock(), createElementBlock("div", _hoisted_38, [
954
+ renderSlot(_ctx.$slots, subPrimaryCol.value.prop, {
955
+ row,
956
+ column: subPrimaryCol.value,
957
+ index: rIdx,
958
+ value: getCellValue(row, subPrimaryCol.value)
959
+ }, () => [
960
+ createTextVNode(
961
+ toDisplayString(formatCellValue(row, subPrimaryCol.value, rIdx)),
962
+ 1
963
+ /* TEXT */
964
+ )
965
+ ])
966
+ ])) : createCommentVNode("v-if", true),
967
+ createCommentVNode(" \u5361\u7247\u4E3B\u4F53\u591A\u5B57\u6BB5\u7F51\u683C (\u81EA\u52A8\u7D27\u51D1\u6392\u7248) "),
968
+ createElementVNode("div", _hoisted_39, [
969
+ renderSlot(_ctx.$slots, "card-body", {
970
+ row,
971
+ index: rIdx
972
+ }, () => [
973
+ createElementVNode("div", _hoisted_40, [
974
+ (openBlock(true), createElementBlock(
975
+ Fragment,
976
+ null,
977
+ renderList(cardVisibleColumns.value, (col) => {
978
+ return openBlock(), createElementBlock("div", {
979
+ key: col.prop,
980
+ class: "yc-property-card-field"
981
+ }, [
982
+ createElementVNode(
983
+ "span",
984
+ _hoisted_41,
985
+ toDisplayString(col.label),
986
+ 1
987
+ /* TEXT */
988
+ ),
989
+ createElementVNode("span", _hoisted_42, [
990
+ renderSlot(_ctx.$slots, col.prop, {
991
+ row,
992
+ column: col,
993
+ index: rIdx,
994
+ value: getCellValue(row, col)
995
+ }, () => [
996
+ col.type === "tag" ? (openBlock(), createElementBlock(
997
+ "span",
998
+ {
999
+ key: 0,
1000
+ class: normalizeClass(["yc-property-tag", `type-${getTagConfig(col, getCellValue(row, col)).type || "info"}`])
1001
+ },
1002
+ toDisplayString(getTagConfig(col, getCellValue(row, col)).label),
1003
+ 3
1004
+ /* TEXT, CLASS */
1005
+ )) : col.type === "money" ? (openBlock(), createElementBlock("span", _hoisted_43, [
1006
+ _cache[15] || (_cache[15] = createElementVNode(
1007
+ "span",
1008
+ { class: "yc-property-money__symbol" },
1009
+ "\xA5",
1010
+ -1
1011
+ /* CACHED */
1012
+ )),
1013
+ createElementVNode(
1014
+ "span",
1015
+ _hoisted_44,
1016
+ toDisplayString(formatMoney(getCellValue(row, col))),
1017
+ 1
1018
+ /* TEXT */
1019
+ )
1020
+ ])) : col.type === "phone" ? (openBlock(), createElementBlock(
1021
+ Fragment,
1022
+ { key: 2 },
1023
+ [
1024
+ getCellValue(row, col) ? (openBlock(), createElementBlock("a", {
1025
+ key: 0,
1026
+ href: `tel:${getCellValue(row, col)}`,
1027
+ class: "yc-property-phone",
1028
+ onClick: _cache[5] || (_cache[5] = withModifiers(() => {
1029
+ }, ["stop"]))
1030
+ }, toDisplayString(getCellValue(row, col)), 9, _hoisted_45)) : (openBlock(), createElementBlock("span", _hoisted_46, "-"))
1031
+ ],
1032
+ 64
1033
+ /* STABLE_FRAGMENT */
1034
+ )) : (openBlock(), createElementBlock(
1035
+ Fragment,
1036
+ { key: 3 },
1037
+ [
1038
+ createTextVNode(
1039
+ toDisplayString(formatCellValue(row, col, rIdx)),
1040
+ 1
1041
+ /* TEXT */
1042
+ )
1043
+ ],
1044
+ 64
1045
+ /* STABLE_FRAGMENT */
1046
+ ))
1047
+ ])
1048
+ ])
1049
+ ]);
1050
+ }),
1051
+ 128
1052
+ /* KEYED_FRAGMENT */
1053
+ ))
1054
+ ])
1055
+ ])
1056
+ ]),
1057
+ createCommentVNode(" \u79FB\u52A8\u7AEF\u5E95\u90E8\u5FEB\u6377\u64CD\u4F5C\u680F (\u5927\u89E6\u63A7\u533A\uFF0C\u9002\u5408\u624B\u673A\u5355\u624B\u64CD\u4F5C) "),
1058
+ __props.actions && __props.actions.length > 0 ? (openBlock(), createElementBlock("div", {
1059
+ key: 1,
1060
+ class: "yc-property-card-actions",
1061
+ onClick: _cache[6] || (_cache[6] = withModifiers(() => {
1062
+ }, ["stop"]))
1063
+ }, [
1064
+ renderSlot(_ctx.$slots, "card-actions", {
1065
+ row,
1066
+ index: rIdx
1067
+ }, () => [
1068
+ (openBlock(true), createElementBlock(
1069
+ Fragment,
1070
+ null,
1071
+ renderList(getVisibleActions(row), (act) => {
1072
+ return openBlock(), createElementBlock("button", {
1073
+ key: act.name,
1074
+ type: "button",
1075
+ class: normalizeClass(["yc-property-card-btn", [`type-${act.type || "primary"}`, { "is-plain": act.plain }]]),
1076
+ disabled: isActionDisabled(act, row),
1077
+ onClick: ($event) => handleAction(act.name, row)
1078
+ }, toDisplayString(act.label), 11, _hoisted_47);
1079
+ }),
1080
+ 128
1081
+ /* KEYED_FRAGMENT */
1082
+ ))
1083
+ ])
1084
+ ])) : createCommentVNode("v-if", true)
1085
+ ])
1086
+ ], 10, _hoisted_32);
1087
+ }),
1088
+ 128
1089
+ /* KEYED_FRAGMENT */
1090
+ )) : (openBlock(), createElementBlock(
1091
+ Fragment,
1092
+ { key: 1 },
1093
+ [
1094
+ createCommentVNode(" \u79FB\u52A8\u7AEF\u7A7A\u6570\u636E\u72B6\u6001 "),
1095
+ createElementVNode("div", _hoisted_48, [
1096
+ _cache[16] || (_cache[16] = createElementVNode(
1097
+ "svg",
1098
+ {
1099
+ class: "yc-property-empty__icon",
1100
+ viewBox: "0 0 64 64",
1101
+ width: "48",
1102
+ height: "48",
1103
+ fill: "none",
1104
+ stroke: "currentColor"
1105
+ },
1106
+ [
1107
+ createElementVNode("rect", {
1108
+ x: "12",
1109
+ y: "14",
1110
+ width: "40",
1111
+ height: "36",
1112
+ rx: "4",
1113
+ "stroke-width": "2",
1114
+ "stroke-dasharray": "4 4"
1115
+ }),
1116
+ createElementVNode("line", {
1117
+ x1: "20",
1118
+ y1: "26",
1119
+ x2: "44",
1120
+ y2: "26",
1121
+ "stroke-width": "2"
1122
+ }),
1123
+ createElementVNode("line", {
1124
+ x1: "20",
1125
+ y1: "36",
1126
+ x2: "36",
1127
+ y2: "36",
1128
+ "stroke-width": "2"
1129
+ })
1130
+ ],
1131
+ -1
1132
+ /* CACHED */
1133
+ )),
1134
+ createElementVNode(
1135
+ "p",
1136
+ _hoisted_49,
1137
+ toDisplayString(__props.emptyText),
1138
+ 1
1139
+ /* TEXT */
1140
+ )
1141
+ ])
1142
+ ],
1143
+ 2112
1144
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1145
+ ))
1146
+ ])
1147
+ ],
1148
+ 2112
1149
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
1150
+ )),
1151
+ createCommentVNode(" \u5206\u9875\u4E0E\u5E95\u90E8\u7EDF\u8BA1\u680F "),
1152
+ showPagination.value ? (openBlock(), createElementBlock("div", _hoisted_50, [
1153
+ createElementVNode("div", _hoisted_51, [
1154
+ _cache[19] || (_cache[19] = createTextVNode(
1155
+ " \u5171 ",
1156
+ -1
1157
+ /* CACHED */
1158
+ )),
1159
+ createElementVNode(
1160
+ "span",
1161
+ _hoisted_52,
1162
+ toDisplayString(totalItems.value),
1163
+ 1
1164
+ /* TEXT */
1165
+ ),
1166
+ _cache[20] || (_cache[20] = createTextVNode(
1167
+ " \u6761\u8BB0\u5F55 ",
1168
+ -1
1169
+ /* CACHED */
1170
+ )),
1171
+ selectedRowsList.value.length > 0 ? (openBlock(), createElementBlock(
1172
+ Fragment,
1173
+ { key: 0 },
1174
+ [
1175
+ _cache[17] || (_cache[17] = createTextVNode(
1176
+ " \uFF0C\u5DF2\u9009\u4E2D ",
1177
+ -1
1178
+ /* CACHED */
1179
+ )),
1180
+ createElementVNode(
1181
+ "span",
1182
+ _hoisted_53,
1183
+ toDisplayString(selectedRowsList.value.length),
1184
+ 1
1185
+ /* TEXT */
1186
+ ),
1187
+ _cache[18] || (_cache[18] = createTextVNode(
1188
+ " \u9879 ",
1189
+ -1
1190
+ /* CACHED */
1191
+ ))
1192
+ ],
1193
+ 64
1194
+ /* STABLE_FRAGMENT */
1195
+ )) : createCommentVNode("v-if", true)
1196
+ ]),
1197
+ createCommentVNode(" \u5206\u9875\u63A7\u5236 "),
1198
+ createElementVNode("div", _hoisted_54, [
1199
+ createElementVNode("button", {
1200
+ type: "button",
1201
+ class: "yc-property-pagination__btn",
1202
+ disabled: currentPage.value <= 1,
1203
+ onClick: _cache[7] || (_cache[7] = ($event) => changePage(currentPage.value - 1))
1204
+ }, " \u4E0A\u4E00\u9875 ", 8, _hoisted_55),
1205
+ createElementVNode(
1206
+ "span",
1207
+ _hoisted_56,
1208
+ toDisplayString(currentPage.value) + " / " + toDisplayString(totalPages.value || 1),
1209
+ 1
1210
+ /* TEXT */
1211
+ ),
1212
+ createElementVNode("button", {
1213
+ type: "button",
1214
+ class: "yc-property-pagination__btn",
1215
+ disabled: currentPage.value >= totalPages.value,
1216
+ onClick: _cache[8] || (_cache[8] = ($event) => changePage(currentPage.value + 1))
1217
+ }, " \u4E0B\u4E00\u9875 ", 8, _hoisted_57)
1218
+ ])
1219
+ ])) : createCommentVNode("v-if", true)
1220
+ ],
1221
+ 6
1222
+ /* CLASS, STYLE */
1223
+ );
1224
+ };
1225
+ }
1226
+ });
1227
+
1228
+ export { _sfc_main as default };