aibox-custom-component-packages 0.0.7 → 0.0.8

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 (182) hide show
  1. package/es/AddOrEditSupplierDialog.mjs +309 -259
  2. package/es/ApplicationTypeTag.mjs +14 -14
  3. package/es/AuthSection.mjs +11 -11
  4. package/es/AutoShowTooltip.mjs +1 -1
  5. package/es/AvailableRangePreview.mjs +1 -1
  6. package/es/AvailableRangeSetting.mjs +9 -5
  7. package/es/CodeView.mjs +1 -1
  8. package/es/CommonTagsList.mjs +5 -5
  9. package/es/CreateMcpForm.mjs +13 -12
  10. package/es/CustomSidebar.mjs +159 -154
  11. package/es/CustomTitle.mjs +1 -1
  12. package/es/CustomToggle.mjs +131 -77
  13. package/es/DocSyncSelect.mjs +2661 -0
  14. package/es/FileDisplay.mjs +2 -4
  15. package/es/FilePreview.mjs +16 -16
  16. package/es/FileUploader.mjs +71 -74
  17. package/es/Logo.mjs +72 -0
  18. package/es/McpFormDialog.mjs +1 -1
  19. package/es/McpParamsSet.mjs +34 -34
  20. package/es/MdEditor.mjs +2 -2
  21. package/es/PageContainer.mjs +438 -216
  22. package/es/ParameterTable.mjs +23 -21
  23. package/es/PublishRecord.mjs +58 -57
  24. package/es/RadioGroup.mjs +1 -1
  25. package/es/SourcePublish.mjs +95 -93
  26. package/es/Table.mjs +2 -2
  27. package/es/assets/AddOrEditSupplierDialog.css +1 -1
  28. package/es/assets/AiboxTable.css +1 -1
  29. package/es/assets/ApplicationTypeTag.css +1 -1
  30. package/es/assets/AuthSection.css +1 -1
  31. package/es/assets/AutoShowTooltip.css +1 -1
  32. package/es/assets/CommonTagsList.css +1 -1
  33. package/es/assets/CreateMcpForm.css +1 -1
  34. package/es/assets/CustomSidebar.css +1 -1
  35. package/es/assets/CustomToggle.css +1 -1
  36. package/es/assets/DocSyncSelect.css +1 -0
  37. package/es/assets/FilePreview.css +1 -1
  38. package/es/assets/Logo.css +1 -0
  39. package/es/assets/McpParamsSet.css +1 -1
  40. package/es/assets/MdEditor.css +1 -1
  41. package/es/assets/PageContainer.css +1 -1
  42. package/es/assets/ParameterTable.css +1 -1
  43. package/es/assets/PublishRecord.css +1 -1
  44. package/es/assets/RadioGroup.css +1 -1
  45. package/es/assets/SourcePublish.css +1 -1
  46. package/es/assets/index.css +1 -1
  47. package/es/assets/index2.css +1 -1
  48. package/es/assets/index3.css +1 -1
  49. package/es/assets/index4.css +1 -1
  50. package/es/assets/layout.css +1 -1
  51. package/es/chunks/{BackBar.B5Er8ZdJ.js → AiboxTable.CF4T_OCu.js} +122 -122
  52. package/es/chunks/enums.WrpwbF4w.js +14 -0
  53. package/es/chunks/index.BDd6hHiU.js +172 -0
  54. package/es/chunks/{index.CLyfh6p1.js → index.CF_YHLP5.js} +16 -16
  55. package/es/chunks/index.DdD1VsH1.js +396 -0
  56. package/es/chunks/index.Dx-mCS4E.js +1298 -0
  57. package/es/chunks/layout.CygCXa6s.js +26 -0
  58. package/es/chunks/{usePreview.C36fNlVd.js → usePreview.BHvXwaNi.js} +82 -78
  59. package/es/index.mjs +409 -325
  60. package/index.css +1 -1
  61. package/lib/AddOrEditSupplierDialog.js +1 -1
  62. package/lib/ApplicationTypeTag.js +1 -1
  63. package/lib/AuthSection.js +1 -1
  64. package/lib/AutoShowTooltip.js +1 -1
  65. package/lib/AvailableRangePreview.js +1 -1
  66. package/lib/AvailableRangeSetting.js +1 -1
  67. package/lib/CodeView.js +1 -1
  68. package/lib/CommonTagsList.js +1 -1
  69. package/lib/CreateMcpForm.js +1 -1
  70. package/lib/CustomSidebar.js +1 -1
  71. package/lib/CustomTitle.js +1 -1
  72. package/lib/CustomToggle.js +1 -1
  73. package/lib/DocSyncSelect.js +2 -0
  74. package/lib/FileDisplay.js +1 -1
  75. package/lib/FilePreview.js +1 -1
  76. package/lib/FileUploader.js +1 -1
  77. package/lib/Logo.js +1 -0
  78. package/lib/McpFormDialog.js +1 -1
  79. package/lib/McpParamsSet.js +1 -1
  80. package/lib/MdEditor.js +1 -1
  81. package/lib/PageContainer.js +1 -1
  82. package/lib/ParameterTable.js +1 -1
  83. package/lib/PublishRecord.js +2 -2
  84. package/lib/RadioGroup.js +1 -1
  85. package/lib/SourcePublish.js +1 -1
  86. package/lib/Table.js +1 -1
  87. package/lib/assets/AddOrEditSupplierDialog.css +1 -1
  88. package/lib/assets/AiboxTable.css +1 -1
  89. package/lib/assets/ApplicationTypeTag.css +1 -1
  90. package/lib/assets/AuthSection.css +1 -1
  91. package/lib/assets/AutoShowTooltip.css +1 -1
  92. package/lib/assets/CommonTagsList.css +1 -1
  93. package/lib/assets/CreateMcpForm.css +1 -1
  94. package/lib/assets/CustomSidebar.css +1 -1
  95. package/lib/assets/CustomToggle.css +1 -1
  96. package/lib/assets/DocSyncSelect.css +1 -0
  97. package/lib/assets/FilePreview.css +1 -1
  98. package/lib/assets/Logo.css +1 -0
  99. package/lib/assets/McpParamsSet.css +1 -1
  100. package/lib/assets/MdEditor.css +1 -1
  101. package/lib/assets/PageContainer.css +1 -1
  102. package/lib/assets/ParameterTable.css +1 -1
  103. package/lib/assets/PublishRecord.css +1 -1
  104. package/lib/assets/RadioGroup.css +1 -1
  105. package/lib/assets/SourcePublish.css +1 -1
  106. package/lib/assets/index.css +1 -1
  107. package/lib/assets/index2.css +1 -1
  108. package/lib/assets/index3.css +1 -1
  109. package/lib/assets/index4.css +1 -1
  110. package/lib/assets/layout.css +1 -1
  111. package/lib/chunks/AiboxTable.CJOPGJtU.js +1 -0
  112. package/lib/chunks/enums.DpU2er5r.js +1 -0
  113. package/lib/chunks/index.BNivYbtq.js +1 -0
  114. package/lib/chunks/{index.DME62Yfo.js → index.B_keI1Aq.js} +1 -1
  115. package/lib/chunks/index.C7aZx6RG.js +6 -0
  116. package/lib/chunks/index.CJFk1R2u.js +59 -0
  117. package/lib/chunks/layout.DbBSbLgm.js +1 -0
  118. package/lib/chunks/usePreview.BojIDW7Z.js +1 -0
  119. package/lib/index.js +2 -1
  120. package/package.json +2 -2
  121. package/es/ExampleComponent.mjs +0 -35
  122. package/es/assets/BackBar.css +0 -1
  123. package/es/assets/ExampleComponent.css +0 -1
  124. package/es/chunks/BackBar.Bc2NIuzk.js +0 -645
  125. package/es/chunks/BackBar.Cv1wxUcM.js +0 -645
  126. package/es/chunks/BackBar.DJV4JaUM.js +0 -645
  127. package/es/chunks/config.8htFF04x.js +0 -325
  128. package/es/chunks/config.BPp4hMBq.js +0 -325
  129. package/es/chunks/config.BU21Gda2.js +0 -49
  130. package/es/chunks/config.BzCGum_W.js +0 -49
  131. package/es/chunks/config.CFWGjEdA.js +0 -49
  132. package/es/chunks/config.CfWAdyUH.js +0 -325
  133. package/es/chunks/config.DTMcCH58.js +0 -325
  134. package/es/chunks/config.DqhQdkz7.js +0 -325
  135. package/es/chunks/enums.CfSBDD6u.js +0 -83
  136. package/es/chunks/enums.DuBbLcd-.js +0 -83
  137. package/es/chunks/i18n.DmqkiK-h.js +0 -444
  138. package/es/chunks/i18n.Vhq-tZPw.js +0 -94
  139. package/es/chunks/i18n.ro9yz7rE.js +0 -94
  140. package/es/chunks/index.BSA3IKSF.js +0 -111
  141. package/es/chunks/index.CgbxJCEU.js +0 -265
  142. package/es/chunks/index.CuDwuRO7.js +0 -265
  143. package/es/chunks/index.DB0ayMv8.js +0 -257
  144. package/es/chunks/index.DWR4lc30.js +0 -203
  145. package/es/chunks/index.GuEzdh6b.js +0 -257
  146. package/es/chunks/index.aMb6IVQD.js +0 -257
  147. package/es/chunks/index.ml5i7aB5.js +0 -257
  148. package/es/chunks/index.s-YxIOfq.js +0 -301
  149. package/es/chunks/index.uOZzvHrF.js +0 -135
  150. package/es/chunks/publish.BCb7nCo9.js +0 -50
  151. package/es/chunks/publish.D6friivo.js +0 -50
  152. package/es/chunks/publish.Dqzn7qEl.js +0 -50
  153. package/es/i18n.mjs +0 -17
  154. package/lib/ExampleComponent.js +0 -1
  155. package/lib/assets/BackBar.css +0 -1
  156. package/lib/assets/ExampleComponent.css +0 -1
  157. package/lib/chunks/BackBar.C8Xrc6qW.js +0 -1
  158. package/lib/chunks/BackBar.CZsNxoX1.js +0 -1
  159. package/lib/chunks/BackBar.s5_vN6jt.js +0 -1
  160. package/lib/chunks/config.B0XKkp1w.js +0 -1
  161. package/lib/chunks/config.BCAuBVxV.js +0 -1
  162. package/lib/chunks/config.Bs7sh3aP.js +0 -1
  163. package/lib/chunks/config.C1w4hgfw.js +0 -1
  164. package/lib/chunks/config.ClERt2RF.js +0 -1
  165. package/lib/chunks/enums.Dmq4PdUc.js +0 -1
  166. package/lib/chunks/i18n.CL5L6nx6.js +0 -1
  167. package/lib/chunks/i18n.aAXi5igh.js +0 -1
  168. package/lib/chunks/index.BNqTEn3K.js +0 -1
  169. package/lib/chunks/index.BZcSlgOO.js +0 -1
  170. package/lib/chunks/index.Bk-RwmaH.js +0 -1
  171. package/lib/chunks/index.BsN4urmi.js +0 -1
  172. package/lib/chunks/index.D7wBInWr.js +0 -1
  173. package/lib/chunks/index.DWohILMv.js +0 -1
  174. package/lib/chunks/index.LK2ulXTE.js +0 -1
  175. package/lib/chunks/index.qDAoOzk9.js +0 -1
  176. package/lib/chunks/index.s8vGOJKG.js +0 -1
  177. package/lib/chunks/publish.Bw1acrSu.js +0 -1
  178. package/lib/chunks/publish.CA1uSVnm.js +0 -1
  179. package/lib/chunks/usePreview.E5SeS2uw.js +0 -1
  180. package/lib/i18n.js +0 -1
  181. /package/es/assets/{index6.css → legacy.css} +0 -0
  182. /package/lib/assets/{index6.css → legacy.css} +0 -0
@@ -1,206 +1,423 @@
1
- import { w as ue } from "./chunks/index.bCzIhWFw.js";
2
- import { useSlots as ce, ref as h, watch as fe, computed as T, onMounted as pe, createElementBlock as c, openBlock as o, createCommentVNode as m, createElementVNode as g, createVNode as f, unref as l, withCtx as i, createBlock as p, resolveDynamicComponent as me, toDisplayString as z, normalizeClass as W, renderSlot as k, mergeProps as U, toHandlers as ye, createSlots as H, normalizeStyle as he, Fragment as P, renderList as S, withModifiers as B, createTextVNode as Y, normalizeProps as ge, guardReactiveProps as ve } from "vue";
3
- import { C as Z } from "./chunks/layout.BREUWPEJ.js";
4
- import { SearchBar as be, IconEmpty as we } from "color-star-custom-components";
5
- import { ElIcon as I, ElAutoResizer as ke, ElTable as xe, ElTableColumn as M, ElButton as Ce, ElDropdown as Se, ElDropdownMenu as Ee, ElDropdownItem as ze, ElScrollbar as Pe, ElPagination as Ie } from "element-plus";
6
- import { IconZuo as Oe, IconMore as Ae, IconZuoCopy as Re, IconYou as Te, Loading as Be } from "color-message-aibox-vue";
7
- import { D as Me, M as j, C as q } from "./chunks/field-types.CPnMOjle.js";
8
- import { useRouter as je } from "vue-router";
9
- import { _ as De } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
10
- import './assets/PageContainer.css';const $e = { class: "page-container flex flex-col overflow-hidden h-full" }, Ne = { class: "text-1f2329 pd-l-4" }, Ve = { class: "action-buttons flex items-center" }, Fe = { class: "flex items-center w-full" }, Ke = { class: "flex-1" }, Le = {
1
+ import { w as ke } from "./chunks/index.bCzIhWFw.js";
2
+ import { ref as y, useSlots as Ce, computed as D, watch as O, onMounted as Se, createElementBlock as m, openBlock as r, createCommentVNode as h, createElementVNode as x, renderSlot as z, createVNode as v, unref as o, withCtx as d, createBlock as g, resolveDynamicComponent as xe, toDisplayString as V, normalizeClass as ee, mergeProps as te, toHandlers as Ee, createSlots as ae, normalizeStyle as Pe, Fragment as j, renderList as N, withModifiers as U, createTextVNode as le, normalizeProps as ze, guardReactiveProps as Ie } from "vue";
3
+ import { C as ne } from "./chunks/layout.CygCXa6s.js";
4
+ import { SearchBar as Ae, IconEmpty as Re } from "color-star-custom-components";
5
+ import { IconZuo as De, IconMore as Oe, IconZuoCopy as Ne, IconYou as Te, Loading as Be } from "color-message-aibox-vue";
6
+ import { M as A, C as H, D as Ve } from "./chunks/field-types.CPnMOjle.js";
7
+ import { emitsMap as c, paginationConfig as $, pageParams as R, operationConfigMap as oe } from "color-star-custom-methods";
8
+ import { ElIcon as F, ElAutoResizer as je, ElTable as $e, ElTableColumn as Y, ElButton as Fe, ElDropdown as Me, ElDropdownMenu as Ke, ElDropdownItem as Le, ElScrollbar as We, ElPagination as qe } from "element-plus";
9
+ import { useRouter as Ue } from "vue-router";
10
+ import { _ as He } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
11
+ import './assets/PageContainer.css';const Ye = { class: "page-container flex flex-col overflow-hidden h-full" }, Ze = { class: "text-1f2329 pd-l-4" }, Ge = { class: "action-buttons flex items-center" }, Je = { class: "flex items-center w-full" }, Qe = { class: "flex-1" }, Xe = {
11
12
  key: 0,
12
13
  class: "flex items-center justify-center w-full"
13
- }, We = {
14
+ }, _e = {
14
15
  key: 1,
15
16
  class: "card-list"
16
- }, Ue = {
17
+ }, et = {
17
18
  key: 2,
18
19
  class: "loading-indicator flex items-center justify-center pd-t-20 pd-b-20"
19
- }, He = {
20
+ }, tt = {
20
21
  key: 3,
21
- class: "pagination-section flex items-center justify-end pd-t-16"
22
- }, Ye = /* @__PURE__ */ Object.assign({
22
+ class: "pagination-section pd-t-16 flex justify-center"
23
+ }, at = /* @__PURE__ */ Object.assign({
23
24
  name: "PageContainer"
24
25
  }, {
25
26
  __name: "layout",
26
27
  props: {
27
- title: { type: String, default: "" },
28
- columns: { type: Array, default: () => [] },
29
- api: { type: Function, default: null },
30
- apiParams: { type: Object, default: () => ({}) },
31
- searchModel: { type: Object, default: () => ({}) },
32
- searchFields: { type: Array, default: () => [] },
33
- minWidth: { type: Number, default: 220 },
34
- showPagination: { type: Boolean, default: !0 },
35
- pageSizes: { type: Array, default: () => [10, 20, 30, 50] },
36
- tableProps: { type: Object, default: () => ({}) },
37
- tableEvents: { type: Object, default: () => ({}) },
38
- mode: { type: String, default: j.TABLE },
39
- enableInfiniteScroll: { type: Boolean, default: !1 },
40
- direction: { type: String, default: Me.BOTTOM },
41
- showSelection: { type: Boolean, default: !1 },
42
- treeProps: { type: Object, default: () => ({ children: "children", hasChildren: "hasChildren", value: "" }) },
43
- breadcrumb: { type: Object, default: () => ({ show: !1, text: "", icon: null, to: null }) },
44
- isSeparate: { type: Boolean, default: !1 }
28
+ // 面包屑导航配置
29
+ breadcrumb: {
30
+ type: Object,
31
+ default: () => ({
32
+ show: !1,
33
+ text: ""
34
+ // icon: IconZuo,
35
+ })
36
+ },
37
+ // 页面标题
38
+ title: {
39
+ type: String,
40
+ default: ""
41
+ },
42
+ // 搜索字段配置
43
+ searchFields: {
44
+ type: Array,
45
+ default: () => []
46
+ },
47
+ // 搜索模型
48
+ modelValue: {
49
+ type: Object,
50
+ default: () => ({})
51
+ },
52
+ // 表格列配置
53
+ columns: {
54
+ type: Array,
55
+ default: () => []
56
+ },
57
+ // 表格数据
58
+ tableData: {
59
+ type: Array,
60
+ default: () => []
61
+ },
62
+ // 表格其他属性
63
+ tableProps: {
64
+ type: Object,
65
+ default: () => ({
66
+ stripe: !0,
67
+ border: !1
68
+ })
69
+ },
70
+ // 树表格配置
71
+ treeProps: {
72
+ type: Object,
73
+ default: () => ({})
74
+ },
75
+ // 表格事件
76
+ tableEvents: {
77
+ type: Object,
78
+ default: () => ({})
79
+ },
80
+ // 是否显示分页
81
+ showPagination: {
82
+ type: Boolean,
83
+ default: !0
84
+ },
85
+ // 分页配置
86
+ pagination: {
87
+ type: Object,
88
+ default: () => ({
89
+ page: R.pageNum,
90
+ size: R.pageSize,
91
+ total: 0,
92
+ pageSizes: $.pageSizes,
93
+ layout: $.layout
94
+ })
95
+ },
96
+ // 自定义插槽名称列表
97
+ customSlots: {
98
+ type: Array,
99
+ default: () => []
100
+ },
101
+ // 数据接口函数
102
+ api: {
103
+ type: Function,
104
+ default: null
105
+ },
106
+ // 是否自动加载数据
107
+ autoLoad: {
108
+ type: Boolean,
109
+ default: !0
110
+ },
111
+ // 接口自定义参数
112
+ apiParams: {
113
+ type: Object,
114
+ default: () => ({})
115
+ },
116
+ // 查询 跟 表格 是否 断开
117
+ isSeparate: {
118
+ type: Boolean,
119
+ default: !1
120
+ },
121
+ minWidth: {
122
+ type: Number,
123
+ default: 290
124
+ },
125
+ // 显示模式:MODES.TABLE(表格) | MODES.CARD_INFINITE(无限滚动卡片)
126
+ mode: {
127
+ type: String,
128
+ default: A.TABLE,
129
+ validator: (l) => Object.values(A).includes(l)
130
+ },
131
+ // 是否显示复选框
132
+ showSelection: {
133
+ type: Boolean,
134
+ default: !1
135
+ },
136
+ // 选中的行数据
137
+ selection: {
138
+ type: Array,
139
+ default: () => []
140
+ },
141
+ // 是否有展开
142
+ hasExpand: {
143
+ type: Boolean,
144
+ default: !1
145
+ },
146
+ // 请求参数处理回调
147
+ requestParamsCallback: {
148
+ type: Function,
149
+ default: null
150
+ }
45
151
  },
46
- emits: ["action-click", "selection-change", "search", "reset", "page-change", "size-change"],
47
- setup(n, { expose: G, emit: J }) {
48
- const v = J, y = n, Q = je(), O = ce(), D = h(null), $ = h(null), N = h(null), b = h({ ...y.searchModel });
49
- fe(
50
- () => y.searchModel,
152
+ emits: [
153
+ c.search,
154
+ c.reset,
155
+ c.actionClick,
156
+ c.paginationChange,
157
+ c.sizeChange,
158
+ c.dataLoaded,
159
+ c.dataError,
160
+ c.updateModelValue,
161
+ "selection-change",
162
+ "expand-change"
163
+ ],
164
+ setup(l, { expose: re, emit: ie }) {
165
+ const se = Ue(), n = l, w = ie, ue = y(null), M = y(null), de = y(null), fe = Ce(), K = y(!1), k = y([]), C = y({
166
+ page: R.pageNum,
167
+ size: R.pageSize,
168
+ total: 0,
169
+ pageSizes: $.pageSizes,
170
+ layout: $.layout
171
+ }), b = y({ ...n.modelValue }), E = y(!1), I = y(!0), L = y([...n.selection]), S = y([...n.tableProps?.expandRowKeys || []]), T = D(
172
+ () => n.api ? k.value : n.tableData
173
+ ), p = D(
174
+ () => n.api ? C.value : n.pagination
175
+ ), W = D(
176
+ () => n.api ? K.value || E.value : n.tableProps.loading || E.value || !1
177
+ ), B = D(() => n.mode === A.CARD_INFINITE), Z = D(() => n.columns?.map((e) => {
178
+ if (e.type === H.ACTION && (Array.isArray(e.actions) || typeof e.actions == "function"))
179
+ return {
180
+ ...e,
181
+ align: "center",
182
+ fixed: "right"
183
+ };
184
+ const { width: t, ...u } = e;
185
+ return {
186
+ ...u,
187
+ minWidth: t
188
+ };
189
+ })), ce = (e) => {
190
+ e === Ve.BOTTOM && (!B.value || !I.value || W.value || P({}, !0));
191
+ }, pe = (e, t) => e.id || e.bnid || e.key || `item-${t}`, me = () => {
192
+ se.back();
193
+ }, ve = (e) => {
194
+ const t = e[n.tableProps?.rowKey];
195
+ S.value.includes(t) ? S.value = S.value.filter(
196
+ (u) => u !== t
197
+ ) : S.value.push(t);
198
+ }, ge = (e, t) => t.formatter ? t.formatter(e[t.prop], e, t) : e[t.prop], ye = (e) => fe[e] !== void 0, q = (e, t) => typeof e.actions == "function" ? e.actions(t) || [] : e.actions || [], he = (e) => e.length < 3 ? e : e.slice(0, 1), G = (e) => e.length < 3 ? [] : e.slice(1), P = (e = {}, t = !1) => {
199
+ if (!n.api) return;
200
+ if (t) {
201
+ if (!I.value || E.value) return;
202
+ E.value = !0;
203
+ } else
204
+ K.value = !0, B.value && (I.value = !0, E.value = !1);
205
+ let u = {};
206
+ typeof n.requestParamsCallback == "function" && (u = n.requestParamsCallback(
207
+ b.value,
208
+ n.apiParams
209
+ ));
210
+ const a = {
211
+ ...e,
212
+ // 搜索参数等
213
+ ...n.apiParams,
214
+ ...b.value,
215
+ ...u
216
+ };
217
+ n.showPagination && (t ? a.page = p.value.page + 1 : a.page = p.value.page, a.size = p.value.size), console.log("requestParams", a?.publishStatus), n.api(a).then((f) => {
218
+ const i = f?.data?.memberSo?.data || f?.data?.data || f?.data || [];
219
+ if (console.log("newData", i), t) {
220
+ if (!i || i.length === 0) {
221
+ I.value = !1;
222
+ return;
223
+ }
224
+ k.value = [...k.value, ...i], C.value.page = a.page, C.value.total = f?.data?.memberSo?.total || f?.data?.total || k.value.length, i.length < p.value.size && (I.value = !1);
225
+ } else
226
+ k.value = i, C.value.total = f?.data?.memberSo?.total || f?.data?.total || 0;
227
+ w(c.dataLoaded, {
228
+ data: k.value,
229
+ pagination: C.value,
230
+ params: a,
231
+ response: f?.data,
232
+ isLoadMore: t
233
+ });
234
+ }).catch((f) => {
235
+ t ? I.value = !1 : (k.value = [], C.value.total = 0), w(c.dataError, f);
236
+ }).finally(() => {
237
+ t ? E.value = !1 : K.value = !1;
238
+ });
239
+ }, J = () => {
240
+ n.mode === A.CARD_INFINITE && (k.value = []);
241
+ }, Q = () => {
242
+ n.api ? (J(), C.value.page = R.pageNum, P()) : w(c.search, b.value);
243
+ }, X = () => {
244
+ const e = {};
245
+ Object.keys(b.value).forEach((t) => {
246
+ e[t] = void 0;
247
+ }), b.value = e, n.api ? (J(), C.value.page = R.pageNum, P()) : w(c.reset);
248
+ }, _ = (e, t, u) => {
249
+ w(c.actionClick, { action: e, row: t, index: u });
250
+ }, be = (e) => {
251
+ L.value = e, w("selection-change", e);
252
+ }, we = (e, t) => {
253
+ switch (e) {
254
+ case oe.search:
255
+ Q();
256
+ break;
257
+ case oe.reset:
258
+ X();
259
+ break;
260
+ }
261
+ };
262
+ return O(
263
+ () => n.modelValue,
264
+ (e) => {
265
+ b.value = { ...e };
266
+ },
267
+ { deep: !0, immediate: !0 }
268
+ ), O(
269
+ () => n.selection,
51
270
  (e) => {
52
- b.value = { ...e || {} };
271
+ L.value = [...e];
272
+ },
273
+ { deep: !0, immediate: !0 }
274
+ ), O(
275
+ () => n.tableProps?.expandRowKeys,
276
+ (e) => {
277
+ e && (S.value = [...e]);
278
+ },
279
+ { deep: !0, immediate: !0 }
280
+ ), O(
281
+ () => S.value,
282
+ (e) => {
283
+ w("expand-change", e);
53
284
  },
54
285
  { deep: !0 }
55
- );
56
- const u = h({ current: 1, size: 10, total: 0 }), E = h(!1), x = h([]), V = T(() => typeof O.expand == "function"), C = h([]), X = T(() => Object.keys(O).filter((e) => !["default", "title", "title-actions", "expand", "card"].includes(e))), _ = (e) => !!O[e], ee = (e, t) => {
57
- const r = t.prop;
58
- return r ? e?.[r] ?? "" : "";
59
- }, A = (e, t) => typeof e.config == "function" ? e.config(t) || [] : e.actions || [], te = (e) => e.filter((t) => !t.dropdown && (t.permission === void 0 || t.permission)), F = (e) => e.filter((t) => t.dropdown && (t.permission === void 0 || t.permission)), K = (e, t, r) => {
60
- typeof e.fn == "function" && e.fn(t, r), v("action-click", { action: e, row: t, index: r });
61
- }, le = (e) => {
62
- v("selection-change", e);
63
- }, ae = (e) => {
64
- e === "search" ? (u.value.current = 1, v("search", b.value), w()) : e === "reset" && (b.value = {}, u.value.current = 1, v("reset"), w());
65
- }, ne = (e) => {
66
- u.value.current = e, v("page-change", e), w();
67
- }, oe = (e) => {
68
- u.value.size = e, u.value.current = 1, v("size-change", e), w();
69
- }, w = async () => {
70
- if (y.api) {
71
- E.value = !0;
72
- try {
73
- const e = {
74
- ...y.apiParams || {},
75
- ...b.value || {},
76
- page: u.value.current,
77
- size: u.value.size
78
- }, t = await y.api(e), r = t?.data?.data || t?.data || [], a = t?.data?.total ?? t?.total ?? 0;
79
- x.value = Array.isArray(r) ? r : [], u.value.total = a;
80
- } finally {
81
- E.value = !1;
82
- }
83
- }
84
- }, re = () => {
85
- }, se = (e, t) => e?.bnid || e?.id || t, ie = (e) => {
86
- const t = y.tableProps?.rowKey, r = t ? e?.[t] : void 0;
87
- if (!r) return;
88
- const a = C.value.indexOf(r);
89
- a >= 0 ? C.value.splice(a, 1) : C.value.push(r);
90
- }, de = () => {
91
- y.breadcrumb?.to && Q.push(y.breadcrumb.to);
92
- }, L = T(() => y.columns || []);
93
- return pe(() => {
94
- w();
95
- }), G({
96
- fetchData: w,
97
- tableRef: $,
98
- searchFormRef: D,
99
- scrollbarRef: N
100
- }), (e, t) => (o(), c("div", $e, [
101
- n.breadcrumb.show ? (o(), c("div", {
286
+ ), O(
287
+ () => b.value,
288
+ (e) => {
289
+ w(c.updateModelValue, { ...e });
290
+ },
291
+ { deep: !0 }
292
+ ), Se(() => {
293
+ n.autoLoad && n.api && P();
294
+ }), re({
295
+ loadData: P,
296
+ handleSearch: Q,
297
+ handleReset: X,
298
+ // 复选框相关方法
299
+ clearSelection: () => M.value?.clearSelection?.(),
300
+ toggleAllSelection: () => M.value?.toggleAllSelection?.(),
301
+ getSelectionRows: () => L.value
302
+ // SearchBar相关方法
303
+ // validate: () => searchFormRef.value?.validate?.(),
304
+ // getFormData: () =>
305
+ // searchFormRef.value?.getFormData?.() || internalSearchModel.value,
306
+ // resetFields: () => {
307
+ // if (searchFormRef.value?.resetFields) {
308
+ // searchFormRef.value.resetFields()
309
+ // } else {
310
+ // handleReset()
311
+ // }
312
+ // },
313
+ }), (e, t) => (r(), m("div", Ye, [
314
+ l.breadcrumb.show ? (r(), m("div", {
102
315
  key: 0,
103
316
  class: "flex items-center fz-14 pd-b-20 pointer",
104
- onClick: de
317
+ onClick: me
105
318
  }, [
106
- f(l(I), { size: 16 }, {
107
- default: i(() => [
108
- (o(), p(me(n.breadcrumb.icon || l(Oe))))
319
+ v(o(F), { size: 16 }, {
320
+ default: d(() => [
321
+ (r(), g(xe(l.breadcrumb.icon || o(De))))
109
322
  ]),
110
323
  _: 1
111
324
  }),
112
- g("span", Ne, z(n.breadcrumb.text), 1)
113
- ])) : m("", !0),
114
- n.searchFields?.length ? (o(), c("div", {
325
+ x("span", Ze, V(l.breadcrumb.text), 1)
326
+ ])) : h("", !0),
327
+ l.searchFields?.length ? (r(), m("div", {
115
328
  key: 1,
116
- class: W({
117
- "search-section pd-b-16 mg-b-16": !n.isSeparate,
118
- "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16": n.isSeparate
329
+ class: ee({
330
+ "search-section pd-b-16 mg-b-16": !l.isSeparate,
331
+ "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16": l.isSeparate
119
332
  })
120
333
  }, [
121
- f(Z, { title: "查询" }),
122
- f(l(be), {
334
+ v(ne, { title: "查询" }),
335
+ v(o(Ae), {
123
336
  ref_key: "searchFormRef",
124
- ref: D,
125
- items: n.searchFields,
337
+ ref: ue,
338
+ items: l.searchFields,
126
339
  "filter-mode": !1,
127
- minWidth: n.minWidth,
340
+ minWidth: l.minWidth,
128
341
  hideExpandButton: !1,
129
342
  fixedWidth: !0,
130
343
  maxHeight: 32,
131
344
  modelValue: b.value,
132
- "onUpdate:modelValue": t[0] || (t[0] = (r) => b.value = r),
133
- onOperation: ae
345
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => b.value = u),
346
+ onOperation: we
134
347
  }, null, 8, ["items", "minWidth", "modelValue"])
135
- ], 2)) : m("", !0),
136
- g("div", {
137
- class: W(["data-section flex-1 overflow-hidden flex flex-col", { "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16": n.isSeparate }])
348
+ ], 2)) : h("", !0),
349
+ x("div", {
350
+ class: ee(["data-section flex-1 overflow-hidden flex flex-col", {
351
+ "bg-fff radius-4 pd-l-16 pd-r-16 pd-t-16 pd-b-16 mg-t-16": l.isSeparate
352
+ }])
138
353
  }, [
139
- n.title ? k(e.$slots, "title", { key: 0 }, () => [
140
- f(Z, { title: n.title }, {
141
- default: i(() => [
142
- k(e.$slots, "title-actions", {}, void 0, !0)
354
+ l.title ? z(e.$slots, "title", { key: 0 }, () => [
355
+ v(ne, { title: l.title }, {
356
+ default: d(() => [
357
+ z(e.$slots, "title-actions", {}, void 0, !0)
143
358
  ]),
144
359
  _: 3
145
360
  }, 8, ["title"])
146
- ], !0) : m("", !0),
147
- n.mode === l(j).TABLE ? (o(), p(l(ke), {
361
+ ], !0) : h("", !0),
362
+ l.mode === o(A).TABLE ? (r(), g(o(je), {
148
363
  key: 1,
149
364
  class: "flex-1 overflow-hidden"
150
365
  }, {
151
- default: i(({ width: r }) => [
152
- f(l(xe), U({
366
+ default: d(({ width: u }) => [
367
+ v(o($e), te({
153
368
  ref_key: "tableRef",
154
- ref: $,
155
- data: x.value,
156
- columns: L.value,
157
- "tree-props": n.treeProps,
369
+ ref: M,
370
+ data: T.value,
371
+ columns: Z.value,
372
+ "tree-props": l.treeProps,
158
373
  "show-overflow-tooltip": !0,
159
- "row-key": n.treeProps.value || n.tableProps?.rowKey
374
+ "row-key": l.treeProps.value || l.tableProps?.rowKey
160
375
  }, {
161
- loading: E.value,
162
- expandRowKeys: C.value,
163
- ...n.tableProps
164
- }, ye(n.tableEvents), {
376
+ loading: W.value,
377
+ expandRowKeys: S.value,
378
+ ...l.tableProps
379
+ }, Ee(l.tableEvents), {
165
380
  class: "w-full h-full admin-dashboard-table",
166
381
  border: "",
167
- onSelectionChange: le
168
- }), H({
169
- default: i(() => [
170
- n.showSelection ? (o(), p(l(M), {
382
+ onSelectionChange: be
383
+ }), ae({
384
+ default: d(() => [
385
+ l.showSelection ? (r(), g(o(Y), {
171
386
  key: 0,
172
387
  type: "selection",
173
388
  width: "55",
174
389
  fixed: "left"
175
- })) : m("", !0),
176
- V.value ? (o(), p(l(M), {
390
+ })) : h("", !0),
391
+ l.hasExpand ? (r(), g(o(Y), {
177
392
  key: 1,
178
393
  width: "1",
179
394
  type: "expand",
180
395
  fixed: "left"
181
396
  }, {
182
- default: i((a) => [
183
- g("div", {
397
+ default: d((a) => [
398
+ x("div", {
184
399
  class: "sticky-left",
185
- style: he({ width: r + "px" })
400
+ style: Pe({ width: u + "px" })
186
401
  }, [
187
- k(e.$slots, "expand", {
402
+ z(e.$slots, "expand", {
188
403
  row: a.row
189
404
  }, void 0, !0)
190
405
  ], 4)
191
406
  ]),
192
407
  _: 2
193
- }, 1024)) : m("", !0),
194
- (o(!0), c(P, null, S(L.value, (a, R) => (o(), p(l(M), U({
408
+ }, 1024)) : h("", !0),
409
+ (r(!0), m(j, null, N(Z.value, (a, f) => (r(), g(o(Y), te({
195
410
  key: a.prop
196
411
  }, { ref_for: !0 }, a, {
197
- "show-overflow-tooltip": a.type === l(q).ACTION ? !1 : a?.showOverflowTooltip
198
- }), H({ _: 2 }, [
199
- a.type === l(q).ACTION ? {
412
+ "show-overflow-tooltip": a.type === o(H).ACTION ? !1 : a?.showOverflowTooltip
413
+ }), ae({ _: 2 }, [
414
+ a.type === o(H).ACTION ? {
200
415
  name: "default",
201
- fn: i((d) => [
202
- g("div", Ve, [
203
- (o(!0), c(P, null, S(te(A(a, d.row)), (s) => (o(), p(l(Ce), {
416
+ fn: d((i) => [
417
+ x("div", Ge, [
418
+ (r(!0), m(j, null, N(he(
419
+ q(a, i.row)
420
+ ), (s) => (r(), g(o(Fe), {
204
421
  key: s.key || s.label,
205
422
  type: s.type || "primary",
206
423
  size: s.size || "small",
@@ -209,31 +426,33 @@ import './assets/PageContainer.css';const $e = { class: "page-container flex fle
209
426
  text: s.text,
210
427
  link: s.link,
211
428
  icon: s.icon,
212
- onClick: B((qe) => K(s, d.row, d.$index), ["stop"]),
429
+ onClick: U((nt) => _(s, i.row, i.$index), ["stop"]),
213
430
  style: { "margin-left": "0" }
214
431
  }, {
215
- default: i(() => [
216
- Y(z(s.label), 1)
432
+ default: d(() => [
433
+ le(V(s.label), 1)
217
434
  ]),
218
435
  _: 2
219
436
  }, 1032, ["type", "size", "disabled", "loading", "text", "link", "icon", "onClick"]))), 128)),
220
- F(A(a, d.row)).length > 0 ? (o(), p(l(Se), {
437
+ G(q(a, i.row)).length > 0 ? (r(), g(o(Me), {
221
438
  key: 0,
222
- onCommand: (s) => K(s, d.row, d.$index),
223
- onClick: t[1] || (t[1] = B(() => {
439
+ onCommand: (s) => _(s, i.row, i.$index),
440
+ onClick: t[1] || (t[1] = U(() => {
224
441
  }, ["stop"])),
225
442
  trigger: "click"
226
443
  }, {
227
- dropdown: i(() => [
228
- f(l(Ee), null, {
229
- default: i(() => [
230
- (o(!0), c(P, null, S(F(A(a, d.row)), (s) => (o(), p(l(ze), {
444
+ dropdown: d(() => [
445
+ v(o(Ke), null, {
446
+ default: d(() => [
447
+ (r(!0), m(j, null, N(G(
448
+ q(a, i.row)
449
+ ), (s) => (r(), g(o(Le), {
231
450
  key: s.key || s.label,
232
451
  command: s,
233
452
  disabled: s.disabled
234
453
  }, {
235
- default: i(() => [
236
- Y(z(s.label), 1)
454
+ default: d(() => [
455
+ le(V(s.label), 1)
237
456
  ]),
238
457
  _: 2
239
458
  }, 1032, ["command", "disabled"]))), 128))
@@ -241,37 +460,39 @@ import './assets/PageContainer.css';const $e = { class: "page-container flex fle
241
460
  _: 2
242
461
  }, 1024)
243
462
  ]),
244
- default: i(() => [
245
- f(l(I), null, {
246
- default: i(() => [
247
- f(l(Ae))
463
+ default: d(() => [
464
+ v(o(F), null, {
465
+ default: d(() => [
466
+ v(o(Oe))
248
467
  ]),
249
468
  _: 1
250
469
  })
251
470
  ]),
252
471
  _: 2
253
- }, 1032, ["onCommand"])) : m("", !0)
472
+ }, 1032, ["onCommand"])) : h("", !0)
254
473
  ])
255
474
  ]),
256
475
  key: "0"
257
- } : _(a.prop) ? {
476
+ } : ye(a.prop) ? {
258
477
  name: "default",
259
- fn: i((d) => [
260
- g("div", Fe, [
261
- R === 0 && V.value ? (o(), p(l(I), {
478
+ fn: d((i) => [
479
+ x("div", Je, [
480
+ f === 0 && l.hasExpand ? (r(), g(o(F), {
262
481
  key: 0,
263
482
  class: "mg-r-10",
264
- onClick: B((s) => ie(d.row), ["stop"])
483
+ onClick: U((s) => ve(i.row), ["stop"])
265
484
  }, {
266
- default: i(() => [
267
- C.value.includes(d.row?.[n.tableProps?.rowKey]) ? (o(), p(l(Re), { key: 0 })) : (o(), p(l(Te), { key: 1 }))
485
+ default: d(() => [
486
+ S.value.includes(
487
+ i.row?.[l.tableProps?.rowKey]
488
+ ) ? (r(), g(o(Ne), { key: 0 })) : (r(), g(o(Te), { key: 1 }))
268
489
  ]),
269
490
  _: 2
270
- }, 1032, ["onClick"])) : m("", !0),
271
- g("div", Ke, [
272
- k(e.$slots, a.prop, {
273
- row: d.row,
274
- index: d.$index,
491
+ }, 1032, ["onClick"])) : h("", !0),
492
+ x("div", Qe, [
493
+ z(e.$slots, a.prop, {
494
+ row: i.row,
495
+ index: i.$index,
275
496
  column: a
276
497
  }, void 0, !0)
277
498
  ])
@@ -280,8 +501,8 @@ import './assets/PageContainer.css';const $e = { class: "page-container flex fle
280
501
  key: "1"
281
502
  } : {
282
503
  name: "default",
283
- fn: i((d) => [
284
- g("span", null, z(ee(d.row, a)), 1)
504
+ fn: d((i) => [
505
+ x("span", null, V(ge(i.row, a)), 1)
285
506
  ]),
286
507
  key: "2"
287
508
  }
@@ -289,74 +510,75 @@ import './assets/PageContainer.css';const $e = { class: "page-container flex fle
289
510
  ]),
290
511
  _: 2
291
512
  }, [
292
- S(X.value, (a) => ({
513
+ N(l.customSlots, (a) => ({
293
514
  name: a,
294
- fn: i((R) => [
295
- k(e.$slots, a, ge(ve(R)), void 0, !0)
515
+ fn: d((f) => [
516
+ z(e.$slots, a, ze(Ie(f)), void 0, !0)
296
517
  ])
297
518
  }))
298
519
  ]), 1040, ["data", "columns", "tree-props", "row-key"])
299
520
  ]),
300
521
  _: 3
301
- })) : n.mode === l(j).CARD_INFINITE ? (o(), p(l(Pe), {
522
+ })) : l.mode === o(A).CARD_INFINITE ? (r(), g(o(We), {
302
523
  key: 2,
303
524
  ref_key: "scrollbarRef",
304
- ref: N,
525
+ ref: de,
305
526
  class: "card-container flex-1",
306
- onEndReached: re
527
+ onEndReached: ce
307
528
  }, {
308
- default: i(() => [
309
- x.value.length === 0 ? (o(), c("div", Le, [
310
- f(l(we))
311
- ])) : (o(), c("div", We, [
312
- (o(!0), c(P, null, S(x.value, (r, a) => (o(), c("div", {
313
- key: se(r, a),
529
+ default: d(() => [
530
+ T.value.length === 0 ? (r(), m("div", Xe, [
531
+ v(o(Re))
532
+ ])) : (r(), m("div", _e, [
533
+ (r(!0), m(j, null, N(T.value, (u, a) => (r(), m("div", {
534
+ key: pe(u, a),
314
535
  class: "card-item"
315
536
  }, [
316
- k(e.$slots, "card", {
317
- item: r,
537
+ z(e.$slots, "card", {
538
+ item: u,
318
539
  index: a,
319
- data: x.value,
320
- loading: E.value
540
+ data: T.value,
541
+ loading: W.value
321
542
  }, void 0, !0)
322
543
  ]))), 128))
323
544
  ])),
324
- n.enableInfiniteScroll && e.isLoadingMore ? (o(), c("div", Ue, [
325
- f(l(I), {
545
+ B.value && E.value ? (r(), m("div", et, [
546
+ v(o(F), {
326
547
  class: "is-loading",
327
548
  color: "var(--primary-color-1)"
328
549
  }, {
329
- default: i(() => [
330
- f(l(Be))
550
+ default: d(() => [
551
+ v(o(Be))
331
552
  ]),
332
553
  _: 1
333
- })
334
- ])) : m("", !0)
554
+ }),
555
+ t[4] || (t[4] = x("span", { class: "fz-14 text-3271fe pd-l-8" }, "加载中...", -1))
556
+ ])) : h("", !0)
335
557
  ]),
336
558
  _: 3
337
- }, 512)) : m("", !0),
338
- n.showPagination ? (o(), c("div", He, [
339
- f(l(Ie), {
340
- "current-page": u.value.current,
341
- "onUpdate:currentPage": t[2] || (t[2] = (r) => u.value.current = r),
342
- "page-size": u.value.size,
343
- "onUpdate:pageSize": t[3] || (t[3] = (r) => u.value.size = r),
344
- total: u.value.total,
345
- "page-sizes": n.pageSizes,
346
- background: "",
347
- layout: "total, sizes, prev, pager, next, jumper",
348
- onCurrentChange: ne,
349
- onSizeChange: oe
350
- }, null, 8, ["current-page", "page-size", "total", "page-sizes"])
351
- ])) : m("", !0)
352
- ], 2)
559
+ }, 512)) : h("", !0),
560
+ l.showPagination && !B.value && p.value?.total ? (r(), m("div", tt, [
561
+ v(o(qe), {
562
+ "current-page": p.value.page,
563
+ "onUpdate:currentPage": t[2] || (t[2] = (u) => p.value.page = u),
564
+ "page-size": p.value.size,
565
+ "onUpdate:pageSize": t[3] || (t[3] = (u) => p.value.size = u),
566
+ "page-sizes": p.value.pageSizes,
567
+ total: p.value.total,
568
+ layout: p.value.layout,
569
+ onSizeChange: P,
570
+ onCurrentChange: P
571
+ }, null, 8, ["current-page", "page-size", "page-sizes", "total", "layout"])
572
+ ])) : h("", !0)
573
+ ], 2),
574
+ z(e.$slots, "default", {}, void 0, !0)
353
575
  ]));
354
576
  }
355
- }), Ze = /* @__PURE__ */ De(Ye, [["__scopeId", "data-v-1b7e7423"]]), nt = ue(Ze);
577
+ }), lt = /* @__PURE__ */ He(at, [["__scopeId", "data-v-a804a996"]]), vt = ke(lt);
356
578
  export {
357
- q as COLUMN_TYPES,
358
- Me as DIRECTION,
359
- j as MODES,
360
- nt as PageContainer,
361
- nt as default
579
+ H as COLUMN_TYPES,
580
+ Ve as DIRECTION,
581
+ A as MODES,
582
+ vt as PageContainer,
583
+ vt as default
362
584
  };