@huyooo/ui 0.12.2 → 0.13.2

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.
package/dist/user.js CHANGED
@@ -1,4 +1,4 @@
1
- import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-9cF5hBYc.js";
1
+ import { U as a, a as n, b as r, c as t, d as U, _ as u, e as i, f as M, g as o, h as m, i as I, j as c, k as d, l as b, m as f } from "./UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-_BUbnxAH.js";
2
2
  export {
3
3
  a as UserAccountMenu,
4
4
  n as UserAvatar,
@@ -0,0 +1 @@
1
+ export declare function billingFetch<T>(path: string, body?: Record<string, unknown>): Promise<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huyooo/ui",
3
- "version": "0.12.2",
3
+ "version": "0.13.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -1,272 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- /* empty css */
4
- import "./index-D3Kp6R4z.js";
5
- /* empty css */
6
- /* empty css */
7
- /* empty css */
8
- import { defineComponent as P, ref as W, computed as z, onMounted as X, nextTick as $, watch as Y, onBeforeUnmount as Z, openBlock as i, createElementBlock as r, normalizeStyle as K, normalizeClass as C, renderSlot as R, useModel as q, createVNode as b, unref as c, withCtx as x, createElementVNode as g, createBlock as S, createCommentVNode as m, Fragment as w, renderList as E, toDisplayString as B, createTextVNode as I, mergeModels as A, useSlots as ee } from "vue";
9
- import { Spin as te, Checkbox as L, Tooltip as ne, Empty as le, Pagination as oe } from "@arco-design/web-vue";
10
- import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { g as N, a as T } from "./index-D56hUMeD.js";
12
- const ie = /* @__PURE__ */ P({
13
- __name: "Ellipsis",
14
- props: {
15
- open: {
16
- type: Boolean,
17
- required: !1,
18
- default: () => !0
19
- }
20
- },
21
- setup(h) {
22
- const y = h, t = W(null), v = W(0), d = z(() => {
23
- var _, k;
24
- if (!y.open || v.value === 0)
25
- return {};
26
- const s = (k = (_ = t.value) == null ? void 0 : _.parentElement) == null ? void 0 : k.style.width;
27
- return s && s !== "auto" ? {
28
- width: s
29
- } : {
30
- width: `${v.value}px`
31
- };
32
- });
33
- function f() {
34
- t.value && y.open && $(() => {
35
- t.value && (v.value = t.value.clientWidth);
36
- });
37
- }
38
- function p() {
39
- f();
40
- }
41
- return X(() => {
42
- y.open && $(() => {
43
- f(), window.addEventListener("resize", p);
44
- });
45
- }), Y(() => y.open, (s) => {
46
- s ? (f(), window.addEventListener("resize", p)) : window.removeEventListener("resize", p);
47
- }), Z(() => {
48
- window.removeEventListener("resize", p);
49
- }), (s, _) => (i(), r("div", {
50
- ref_key: "ellipsisContainer",
51
- ref: t,
52
- class: C({
53
- ellipsis: h.open
54
- }),
55
- style: K(h.open ? d.value : {})
56
- }, [R(s.$slots, "default", {}, void 0, !0)], 6));
57
- }
58
- }), ae = /* @__PURE__ */ j(ie, [["__scopeId", "data-v-4874d041"]]), se = {
59
- class: "CubeTableCom"
60
- }, re = {
61
- class: "tableContain"
62
- }, de = {
63
- class: "table-header"
64
- }, ue = {
65
- key: 0,
66
- class: "header-cell checkbox-cell"
67
- }, ce = {
68
- class: "table-body"
69
- }, pe = ["onMouseenter", "onMouseleave"], fe = {
70
- style: {
71
- width: "100%",
72
- overflow: "hidden"
73
- }
74
- }, ve = {
75
- key: 0,
76
- class: "contain"
77
- }, he = {
78
- class: "pagination"
79
- }, ge = /* @__PURE__ */ P({
80
- __name: "CustomTable",
81
- props: /* @__PURE__ */ A({
82
- loading: {
83
- type: Boolean,
84
- required: !1,
85
- default: () => !1
86
- },
87
- bordered: {
88
- type: Boolean,
89
- required: !1,
90
- default: () => !0
91
- },
92
- data: {
93
- type: Array,
94
- required: !0
95
- },
96
- pagination: {
97
- type: Object,
98
- required: !1,
99
- default: () => null
100
- },
101
- columns: {
102
- type: Array,
103
- required: !0
104
- },
105
- /** 行选择配置 */
106
- rowSelection: {
107
- type: Object,
108
- required: !1,
109
- default: void 0
110
- },
111
- /** 行数据的唯一标识字段,默认 'id' */
112
- rowKey: {
113
- type: String,
114
- required: !1,
115
- default: "id"
116
- }
117
- }, {
118
- selectedKeys: {
119
- default: () => []
120
- },
121
- selectedKeysModifiers: {},
122
- activeKey: {
123
- default: -1
124
- },
125
- activeKeyModifiers: {}
126
- }),
127
- emits: /* @__PURE__ */ A(["mouseenter", "mouseleave", "pageChange", "pageSizeChange"], ["update:selectedKeys", "update:activeKey"]),
128
- setup(h, {
129
- emit: y
130
- }) {
131
- const t = h, v = y, d = q(h, "selectedKeys"), f = q(h, "activeKey");
132
- function p(e, l) {
133
- return e[t.rowKey] ?? String(l);
134
- }
135
- function s(e, l) {
136
- const u = p(e, l);
137
- return d.value.includes(u);
138
- }
139
- const _ = z(() => t.data.length === 0 ? !1 : t.data.every((e, l) => s(e, l))), k = z(() => {
140
- if (t.data.length === 0) return !1;
141
- const e = t.data.filter((l, u) => s(l, u)).length;
142
- return e > 0 && e < t.data.length;
143
- });
144
- function H(e, l, u) {
145
- const n = p(e, l);
146
- u ? d.value.includes(n) || (d.value = [...d.value, n]) : d.value = d.value.filter((o) => o !== n);
147
- }
148
- function J(e) {
149
- if (Array.isArray(e) ? e.length > 0 : e) {
150
- const u = t.data.map((o, a) => p(o, a)), n = /* @__PURE__ */ new Set([...d.value, ...u]);
151
- d.value = Array.from(n);
152
- } else {
153
- const u = new Set(t.data.map((n, o) => p(n, o)));
154
- d.value = d.value.filter((n) => !u.has(n));
155
- }
156
- }
157
- const O = z(() => {
158
- const e = t.columns.map((l) => l.width ? `${l.width}px` : l.minWidth ? `minmax(${l.minWidth}px, 1fr)` : "1fr");
159
- return t.rowSelection && e.unshift("48px"), e.join(" ");
160
- });
161
- function M(e) {
162
- const l = {};
163
- return e.maxWidth && (l.maxWidth = `${e.maxWidth}px`), l;
164
- }
165
- function U(e) {
166
- console.log(e, "currentPage"), v("pageChange", e);
167
- }
168
- function D(e) {
169
- console.log(e, "pageSize"), v("pageSizeChange", e);
170
- }
171
- function F(e) {
172
- const l = ee();
173
- return e ? !!l[e] : !1;
174
- }
175
- function G(e) {
176
- f.value = e, v("mouseenter", e);
177
- }
178
- function Q(e) {
179
- f.value = -1, v("mouseleave", e);
180
- }
181
- return (e, l) => (i(), r("div", se, [b(c(te), {
182
- loading: t.loading,
183
- tip: "数据加载中"
184
- }, {
185
- default: x(() => {
186
- var u;
187
- return [g("div", re, [g("div", {
188
- class: "flex-table",
189
- style: K({
190
- "grid-template-columns": O.value
191
- })
192
- }, [g("div", de, [t.rowSelection ? (i(), r("div", ue, [t.rowSelection.showCheckedAll !== !1 ? (i(), S(c(L), {
193
- key: 0,
194
- "model-value": _.value,
195
- indeterminate: k.value,
196
- onChange: J
197
- }, null, 8, ["model-value", "indeterminate"])) : m("", !0)])) : m("", !0), (i(!0), r(w, null, E(t.columns, (n, o) => (i(), r("div", {
198
- key: o,
199
- class: C(["header-cell", {
200
- fixed: n.fixed,
201
- fixedBackground: n.fixed,
202
- lastBorder: o === t.columns.length - 1
203
- }]),
204
- style: K(M(n))
205
- }, B(n.title), 7))), 128))]), g("div", ce, [(i(!0), r(w, null, E(t.data, (n, o) => (i(), r("div", {
206
- key: p(n, o),
207
- class: C(["table-row", {
208
- trListHover: o === f.value,
209
- "row-selected": s(n, o)
210
- }]),
211
- onMouseenter: (a) => G(o),
212
- onMouseleave: (a) => Q(o)
213
- }, [t.rowSelection ? (i(), r("div", {
214
- key: 0,
215
- class: C(["body-cell checkbox-cell", {
216
- trListHover: o === f.value,
217
- "row-selected": s(n, o)
218
- }])
219
- }, [b(c(L), {
220
- "model-value": s(n, o),
221
- onChange: (a) => H(n, o, a)
222
- }, null, 8, ["model-value", "onChange"])], 2)) : m("", !0), (i(!0), r(w, null, E(t.columns, (a, V) => (i(), r("div", {
223
- key: V,
224
- class: C(["body-cell", {
225
- fixed: a.fixed,
226
- trListHover: o === f.value,
227
- "row-selected": s(n, o),
228
- lastBorder: V === t.columns.length - 1
229
- }]),
230
- style: K(M(a))
231
- }, [g("div", fe, [b(ae, {
232
- open: a.ellipsis
233
- }, {
234
- default: x(() => [F(a.slotName) ? R(e.$slots, a.slotName, {
235
- key: 0,
236
- record: n
237
- }, void 0, !0) : (i(), r(w, {
238
- key: 1
239
- }, [a.dataIndex ? (i(), r(w, {
240
- key: 0
241
- }, [a.tooltip ? (i(), S(c(ne), {
242
- key: 0,
243
- content: c(N)(c(T)(n, a.dataIndex)),
244
- position: "bottom"
245
- }, {
246
- default: x(() => [g("span", null, B(c(T)(n, a.dataIndex)), 1)]),
247
- _: 2
248
- }, 1032, ["content"])) : (i(), r(w, {
249
- key: 1
250
- }, [I(B(c(N)(c(T)(n, a.dataIndex))), 1)], 64))], 64)) : m("", !0)], 64))]),
251
- _: 2
252
- }, 1032, ["open"])])], 6))), 128))], 42, pe))), 128))])], 4), t.data.length === 0 ? (i(), r("div", ve, [b(c(le))])) : m("", !0)]), g("div", he, [t.pagination ? (i(), S(c(oe), {
253
- key: 0,
254
- modelValue: t.pagination.current,
255
- "onUpdate:modelValue": l[0] || (l[0] = (n) => t.pagination.current = n),
256
- total: ((u = t.pagination) == null ? void 0 : u.total) || 0,
257
- pageSize: t.pagination.pageSize,
258
- showTotal: t.pagination.showTotal,
259
- showJumper: t.pagination.showJumper,
260
- showPageSize: t.pagination.showPageSize,
261
- onChange: U,
262
- onPageSizeChange: D
263
- }, null, 8, ["modelValue", "total", "pageSize", "showTotal", "showJumper", "showPageSize"])) : m("", !0)])];
264
- }),
265
- _: 3
266
- }, 8, ["loading"])]));
267
- }
268
- }), Ee = /* @__PURE__ */ j(ge, [["__scopeId", "data-v-04760aac"]]);
269
- export {
270
- Ee as C,
271
- ae as E
272
- };