@done-coding/admin-core 0.13.1-alpha.0 → 0.14.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/es/components/form/FormSearch.vue.mjs +2 -2
  2. package/es/components/form/FormSearch.vue2.mjs +94 -84
  3. package/es/components/form/form-search-utils.mjs +27 -18
  4. package/es/components/list-page/ListPage.vue.mjs +2 -2
  5. package/es/components/list-page/ListPage.vue2.mjs +157 -135
  6. package/es/components/modal/ConfirmModal.vue.mjs +3 -3
  7. package/es/components/modal/ConfirmModal.vue2.mjs +44 -43
  8. package/es/components/slot-layout/SlotLayoutFlowAside.vue.mjs +7 -0
  9. package/es/components/slot-layout/SlotLayoutFlowAside.vue2.mjs +55 -0
  10. package/es/components/slot-layout/SlotLayoutTemplate.vue.mjs +28 -0
  11. package/es/components/slot-layout/SlotLayoutTemplate.vue2.mjs +4 -0
  12. package/es/hooks/use-custom-breakpoint.mjs +42 -0
  13. package/es/index.mjs +190 -182
  14. package/es/style.css +1 -1
  15. package/package.json +2 -2
  16. package/types/components/form/form-search-utils.d.ts +8 -0
  17. package/types/components/form/types.d.ts +1 -0
  18. package/types/components/list-page/ListPage.vue.d.ts +3 -1
  19. package/types/components/list-page/types.d.ts +4 -1
  20. package/types/components/modal/ConfirmModal.vue.d.ts +4 -0
  21. package/types/components/slot-layout/SlotLayoutFlowAside.vue.d.ts +32 -0
  22. package/types/components/slot-layout/SlotLayoutTemplate.vue.d.ts +27 -0
  23. package/types/components/slot-layout/index.d.ts +4 -0
  24. package/types/components/slot-layout/types.d.ts +6 -0
  25. package/types/hooks/index.d.ts +1 -0
  26. package/types/hooks/use-custom-breakpoint.d.ts +9 -0
  27. package/types/index.d.ts +1 -0
  28. package/types/injectInfo.json.d.ts +1 -1
@@ -1,18 +1,16 @@
1
- import { defineComponent as ge, useCssVars as de, useSlots as me, computed as a, useModel as p, ref as i, shallowRef as q, watch as pe, withDirectives as we, openBlock as w, createElementBlock as Se, createBlock as x, unref as v, withCtx as c, renderSlot as h, createCommentVNode as L, createVNode as E, mergeProps as S, createSlots as N, renderList as y, normalizeProps as C, guardReactiveProps as H, mergeModels as U } from "vue";
2
- import { vLoading as ye } from "element-plus";
3
- import Ce from "../form/FormSearch.vue.mjs";
4
- import { generateFormData as He, stringifyFormData as be } from "../form/utils.mjs";
5
- import J from "../display/WatchSize.vue.mjs";
6
- import Ve from "../table/TableMain.vue.mjs";
7
- import Ie from "lodash/pick";
8
- import Re from "lodash/cloneDeep";
9
- import { useChannelViewportHeight as Me } from "../../hooks/use-channel-viewport-height.mjs";
10
- const ke = {
11
- "element-loading-background": "rgba(122, 122, 122, 0.5)",
12
- class: "dc-list-page list-page"
13
- }, Te = /* @__PURE__ */ ge({
1
+ import { defineComponent as pe, useCssVars as we, useSlots as Se, computed as o, useModel as y, ref as l, shallowRef as N, watch as ye, withDirectives as Ce, openBlock as C, createBlock as H, unref as h, withCtx as i, createVNode as E, mergeProps as b, createSlots as U, renderSlot as f, normalizeProps as V, guardReactiveProps as I, renderList as R, createCommentVNode as J, mergeModels as Q } from "vue";
2
+ import { vLoading as He } from "element-plus";
3
+ import be from "../form/FormSearch.vue.mjs";
4
+ import { generateFormData as Ve, stringifyFormData as Ie } from "../form/utils.mjs";
5
+ import z from "../display/WatchSize.vue.mjs";
6
+ import Re from "../table/TableMain.vue.mjs";
7
+ import Me from "../slot-layout/SlotLayoutFlowAside.vue.mjs";
8
+ import $e from "lodash/pick";
9
+ import Ae from "lodash/cloneDeep";
10
+ import { useChannelViewportHeight as Fe } from "../../hooks/use-channel-viewport-height.mjs";
11
+ const qe = /* @__PURE__ */ pe({
14
12
  __name: "ListPage",
15
- props: /* @__PURE__ */ U({
13
+ props: /* @__PURE__ */ Q({
16
14
  staticQuery: { default: () => ({}) },
17
15
  formSearchProps: {},
18
16
  columns: {},
@@ -29,7 +27,9 @@ const ke = {
29
27
  query: {},
30
28
  injectInfo: {},
31
29
  beforeSearch: {},
32
- clearTableFilterOnReset: { type: Boolean }
30
+ clearTableFilterOnReset: { type: Boolean },
31
+ separateSearch: { type: Boolean, default: !1 },
32
+ separateSearchConfig: {}
33
33
  }, {
34
34
  isAutoRefresh: { type: Boolean },
35
35
  isAutoRefreshModifiers: {},
@@ -38,42 +38,47 @@ const ke = {
38
38
  customView: { type: Boolean, default: !1 },
39
39
  customViewModifiers: {}
40
40
  }),
41
- emits: /* @__PURE__ */ U(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
42
- setup(o, { expose: Q, emit: z }) {
43
- de((e) => ({
44
- v3390ee15: _.value
41
+ emits: /* @__PURE__ */ Q(["dataChange", "pageInfoChange"], ["update:isAutoRefresh", "update:refreshInterval", "update:customView"]),
42
+ setup(r, { expose: W, emit: G }) {
43
+ we((e) => ({
44
+ v4d27171c: te.value
45
45
  }));
46
- const s = o, b = z, V = me(), I = a(() => !!V.header), R = a(() => !!V.operation), g = p(o, "isAutoRefresh"), M = p(o, "refreshInterval"), k = p(o, "customView"), d = i({}), m = i(
46
+ const s = r, M = G, $ = Se(), A = o(() => !!$.header), F = o(() => !!$.operation), p = y(r, "isAutoRefresh"), k = y(r, "refreshInterval"), P = y(r, "customView"), w = l({}), S = l(
47
47
  {}
48
- ), $ = i(!1), n = q(), u = q(), { viewportHeightFinal: G } = Me(s, {
48
+ ), j = l(!1), n = N(), u = N(), { viewportHeightFinal: X } = Fe(s, {
49
49
  fallback: 500
50
- }), F = i(0), P = i(0), j = i(0), W = a(() => ({
51
- ...m.value,
50
+ }), D = l(0), x = l(0), B = l(0), Y = o(() => ({
51
+ ...S.value,
52
52
  ...s.staticQuery
53
- })), A = i(!1), X = a(() => A.value ? F.value + 10 : 0), Y = a(() => R.value ? P.value + 10 : 0), Z = a(() => I.value ? j.value + 10 : 0), D = a(() => G.value - s.refineReduceHeight), _ = a(() => s.refine ? `${D.value}px` : "auto"), ee = a(() => s.refine ? D.value - X.value - Y.value - Z.value : void 0), B = (e, t = "search") => {
54
- var l, f, T;
55
- let r = e;
56
- if (s.beforeSearch && (r = s.beforeSearch(
57
- Re(e),
53
+ })), K = l(!1), Z = o(() => K.value ? D.value + 10 : 0), _ = o(() => F.value ? x.value + 10 : 0), ee = o(() => A.value ? B.value + 10 : 0), m = o(() => X.value - s.refineReduceHeight), te = o(() => s.refine ? `${m.value}px` : "auto"), ae = o(() => {
54
+ if (s.refine)
55
+ return s.separateSearch ? m.value : m.value - Z.value - _.value - ee.value;
56
+ }), re = o(
57
+ () => s.refine ? `${m.value}px` : "100vh"
58
+ ), L = (e, t = "search") => {
59
+ var g, d, a;
60
+ let c = e;
61
+ if (s.beforeSearch && (c = s.beforeSearch(
62
+ Ae(e),
58
63
  t
59
- )), t === "reset" && s.clearTableFilterOnReset && ((f = (l = u.value) == null ? void 0 : l.getTableInstance()) == null || f.clearFilter()), JSON.stringify(r) === JSON.stringify(m.value))
60
- return ["reset", "search"].includes(t) ? (T = u.value) == null ? void 0 : T.reload() : void 0;
61
- m.value = {
62
- ...r
64
+ )), t === "reset" && s.clearTableFilterOnReset && ((d = (g = u.value) == null ? void 0 : g.getTableInstance()) == null || d.clearFilter()), JSON.stringify(c) === JSON.stringify(S.value))
65
+ return ["reset", "search"].includes(t) ? (a = u.value) == null ? void 0 : a.reload() : void 0;
66
+ S.value = {
67
+ ...c
63
68
  };
64
- }, te = (e) => {
65
- b("dataChange", e);
66
- }, re = (e) => {
67
- b("pageInfoChange", e);
68
- }, ae = (e) => {
69
- $.value = e;
70
69
  }, oe = (e) => {
71
- F.value = e;
70
+ M("dataChange", e);
72
71
  }, se = (e) => {
73
- P.value = e;
72
+ M("pageInfoChange", e);
74
73
  }, ne = (e) => {
75
74
  j.value = e;
76
- }, le = a(() => s.list), ie = a(() => s.rowKey), K = a(() => d.value), O = {
75
+ }, ie = (e) => {
76
+ D.value = e;
77
+ }, le = (e) => {
78
+ x.value = e;
79
+ }, ue = (e) => {
80
+ B.value = e;
81
+ }, ce = o(() => s.list), he = o(() => s.rowKey), O = o(() => w.value), T = {
77
82
  refresh: async (e = !1) => {
78
83
  var t;
79
84
  return (t = u.value) == null ? void 0 : t.refresh(e);
@@ -111,15 +116,15 @@ const ke = {
111
116
  var t;
112
117
  return (t = n.value) == null ? void 0 : t.toggleCollapse(e);
113
118
  },
114
- isCollapsed: a(() => {
119
+ isCollapsed: o(() => {
115
120
  var e;
116
121
  return ((e = n.value) == null ? void 0 : e.isCollapsed.value) ?? !1;
117
122
  }),
118
123
  update: (e, t) => {
119
- d.value[e] = t;
124
+ w.value[e] = t;
120
125
  }
121
- }, ue = a(() => {
122
- const e = Ie(O, [
126
+ }, fe = o(() => {
127
+ const e = $e(T, [
123
128
  "triggerReset",
124
129
  "triggerSearch",
125
130
  "update"
@@ -128,108 +133,125 @@ const ke = {
128
133
  ...s.injectInfo || {},
129
134
  ...e
130
135
  };
131
- }), ce = (e) => e, he = (e) => e, fe = (e) => e, ve = (e) => {
132
- A.value = e;
136
+ }), ge = (e) => e, de = (e) => e, ve = (e) => e, me = (e) => {
137
+ K.value = e;
133
138
  };
134
- return Q(O), pe(
139
+ return W(T), ye(
135
140
  () => s.list,
136
141
  (e) => {
137
- const t = He(e);
138
- d.value = t, B(be(t, e));
142
+ const t = Ve(e);
143
+ w.value = t, L(Ie(t, e));
139
144
  },
140
145
  {
141
146
  immediate: !0
142
147
  }
143
- ), (e, t) => we((w(), Se("div", ke, [
144
- I.value ? (w(), x(v(J), {
145
- key: 0,
146
- class: "list-page-header",
147
- onHeightChange: ne
148
+ ), (e, t) => {
149
+ var c, g, d;
150
+ return Ce((C(), H(h(Me), {
151
+ "element-loading-background": "rgba(122, 122, 122, 0.5)",
152
+ class: "dc-list-page list-page",
153
+ separate: r.separateSearch,
154
+ type: (c = r.separateSearchConfig) == null ? void 0 : c.type,
155
+ gap: (g = r.separateSearchConfig) == null ? void 0 : g.gap,
156
+ "aside-width": (d = r.separateSearchConfig) == null ? void 0 : d.asideWidth,
157
+ "aside-max-height": re.value
148
158
  }, {
149
- default: c(() => [
150
- h(e.$slots, "header", {}, void 0, !0)
159
+ aside: i(() => [
160
+ A.value ? (C(), H(h(z), {
161
+ key: 0,
162
+ class: "list-page-header",
163
+ onHeightChange: ue
164
+ }, {
165
+ default: i(() => [
166
+ f(e.$slots, "header", {}, void 0, !0)
167
+ ]),
168
+ _: 3
169
+ })) : J("", !0),
170
+ E(h(be), b({
171
+ ref_key: "formSearch",
172
+ ref: n,
173
+ list: ce.value,
174
+ data: O.value
175
+ }, r.formSearchProps, {
176
+ compact: r.separateSearch,
177
+ onSearch: L,
178
+ onHeightChange: ie,
179
+ onVisibleChange: me
180
+ }), U({ _: 2 }, [
181
+ R(r.list, (a) => ({
182
+ name: a.key,
183
+ fn: i((v) => [
184
+ f(e.$slots, `form-${a.key}`, V(I(v)), void 0, !0)
185
+ ])
186
+ }))
187
+ ]), 1040, ["list", "data", "compact"]),
188
+ F.value ? (C(), H(h(z), {
189
+ key: 1,
190
+ class: "list-page-operation",
191
+ onHeightChange: le
192
+ }, {
193
+ default: i(() => [
194
+ f(e.$slots, "operation", {}, void 0, !0)
195
+ ]),
196
+ _: 3
197
+ })) : J("", !0)
151
198
  ]),
152
- _: 3
153
- })) : L("", !0),
154
- E(v(Ce), S({
155
- ref_key: "formSearch",
156
- ref: n,
157
- list: le.value,
158
- data: K.value
159
- }, o.formSearchProps, {
160
- onSearch: B,
161
- onHeightChange: oe,
162
- onVisibleChange: ve
163
- }), N({ _: 2 }, [
164
- y(o.list, (r) => ({
165
- name: r.key,
166
- fn: c((l) => [
167
- h(e.$slots, `form-${r.key}`, C(H(l)), void 0, !0)
168
- ])
169
- }))
170
- ]), 1040, ["list", "data"]),
171
- R.value ? (w(), x(v(J), {
172
- key: 1,
173
- class: "list-page-operation",
174
- onHeightChange: se
175
- }, {
176
- default: c(() => [
177
- h(e.$slots, "operation", {}, void 0, !0)
199
+ default: i(() => [
200
+ E(h(Re), b({
201
+ ref_key: "tableMain",
202
+ ref: u,
203
+ "is-auto-refresh": p.value,
204
+ "onUpdate:isAutoRefresh": t[0] || (t[0] = (a) => p.value = a),
205
+ "refresh-interval": k.value,
206
+ "onUpdate:refreshInterval": t[1] || (t[1] = (a) => k.value = a),
207
+ "custom-view": P.value,
208
+ "onUpdate:customView": t[2] || (t[2] = (a) => P.value = a),
209
+ api: r.api,
210
+ columns: r.columns,
211
+ query: Y.value,
212
+ maxHeight: ae.value,
213
+ rowKey: he.value,
214
+ toolbar: r.toolbar,
215
+ showSwitchView: r.showSwitchView
216
+ }, r.tableMainProps, {
217
+ refine: !1,
218
+ injectInfo: fe.value,
219
+ onLoadingChange: ne,
220
+ onDataChange: oe,
221
+ onPageInfoChange: se
222
+ }), U({
223
+ "custom-view-item": i((a) => [
224
+ f(e.$slots, "custom-view-item", V(I(ve(a))), void 0, !0)
225
+ ]),
226
+ _: 2
227
+ }, [
228
+ R(r.columns, (a) => ({
229
+ name: a.prop,
230
+ fn: i((v) => [
231
+ f(e.$slots, `table-${a.prop}`, V(I(ge(v))), void 0, !0)
232
+ ])
233
+ })),
234
+ R(r.columns, (a) => ({
235
+ name: `header-${a.prop}`,
236
+ fn: i((v) => {
237
+ var q;
238
+ return [
239
+ f(e.$slots, `table-header-${a.columnKey || a.prop}`, b(de(v), {
240
+ searchFormData: O.value,
241
+ triggerSearch: (q = n.value) == null ? void 0 : q.triggerSearch
242
+ }), void 0, !0)
243
+ ];
244
+ })
245
+ }))
246
+ ]), 1040, ["is-auto-refresh", "refresh-interval", "custom-view", "api", "columns", "query", "maxHeight", "rowKey", "toolbar", "showSwitchView", "injectInfo"])
178
247
  ]),
179
248
  _: 3
180
- })) : L("", !0),
181
- E(v(Ve), S({
182
- ref_key: "tableMain",
183
- ref: u,
184
- "is-auto-refresh": g.value,
185
- "onUpdate:isAutoRefresh": t[0] || (t[0] = (r) => g.value = r),
186
- "refresh-interval": M.value,
187
- "onUpdate:refreshInterval": t[1] || (t[1] = (r) => M.value = r),
188
- "custom-view": k.value,
189
- "onUpdate:customView": t[2] || (t[2] = (r) => k.value = r),
190
- api: o.api,
191
- columns: o.columns,
192
- query: W.value,
193
- maxHeight: ee.value,
194
- rowKey: ie.value,
195
- toolbar: o.toolbar,
196
- showSwitchView: o.showSwitchView
197
- }, o.tableMainProps, {
198
- refine: !1,
199
- injectInfo: ue.value,
200
- onLoadingChange: ae,
201
- onDataChange: te,
202
- onPageInfoChange: re
203
- }), N({
204
- "custom-view-item": c((r) => [
205
- h(e.$slots, "custom-view-item", C(H(fe(r))), void 0, !0)
206
- ]),
207
- _: 2
208
- }, [
209
- y(o.columns, (r) => ({
210
- name: r.prop,
211
- fn: c((l) => [
212
- h(e.$slots, `table-${r.prop}`, C(H(ce(l))), void 0, !0)
213
- ])
214
- })),
215
- y(o.columns, (r) => ({
216
- name: `header-${r.prop}`,
217
- fn: c((l) => {
218
- var f;
219
- return [
220
- h(e.$slots, `table-header-${r.columnKey || r.prop}`, S(he(l), {
221
- searchFormData: K.value,
222
- triggerSearch: (f = n.value) == null ? void 0 : f.triggerSearch
223
- }), void 0, !0)
224
- ];
225
- })
226
- }))
227
- ]), 1040, ["is-auto-refresh", "refresh-interval", "custom-view", "api", "columns", "query", "maxHeight", "rowKey", "toolbar", "showSwitchView", "injectInfo"])
228
- ])), [
229
- [v(ye), !g.value && $.value]
230
- ]);
249
+ }, 8, ["separate", "type", "gap", "aside-width", "aside-max-height"])), [
250
+ [h(He), !p.value && j.value]
251
+ ]);
252
+ };
231
253
  }
232
254
  });
233
255
  export {
234
- Te as default
256
+ qe as default
235
257
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ConfirmModal.vue2.mjs";
2
2
  /* empty css */
3
- import f from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const a = /* @__PURE__ */ f(o, [["__scopeId", "data-v-647fb7fd"]]);
3
+ import r from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-6ce57009"]]);
5
5
  export {
6
- a as default
6
+ f as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as E, ref as N, computed as O, openBlock as l, createBlock as s, unref as f, normalizeClass as S, withCtx as a, createElementVNode as u, renderSlot as m, resolveDynamicComponent as v, createElementBlock as w, Fragment as k, createTextVNode as i, toDisplayString as d, createCommentVNode as V, createVNode as $ } from "vue";
2
- import { ElDialog as D, ElButton as g } from "element-plus";
3
- const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__content" }, L = ["reverse"], b = /* @__PURE__ */ E({
1
+ import { defineComponent as S, computed as s, ref as V, openBlock as l, createBlock as i, resolveDynamicComponent as u, mergeProps as $, withCtx as a, createElementVNode as m, renderSlot as y, createElementBlock as g, Fragment as k, createTextVNode as r, toDisplayString as d, unref as B, createCommentVNode as F, createVNode as H } from "vue";
2
+ import { ElDrawer as L, ElDialog as M, ElButton as T } from "element-plus";
3
+ const P = { class: "confirm-modal__title" }, b = { class: "confirm-modal__content" }, z = ["reverse"], q = /* @__PURE__ */ S({
4
4
  inheritAttrs: !1,
5
5
  __name: "ConfirmModal",
6
6
  props: {
@@ -19,96 +19,97 @@ const F = { class: "confirm-modal__title" }, H = { class: "confirm-modal__conten
19
19
  closeOnPressEscape: { type: Boolean, default: !0 },
20
20
  closeOnClickModal: { type: Boolean, default: !0 },
21
21
  useLoading: { type: Boolean },
22
- type: { default: "primary" }
22
+ type: { default: "primary" },
23
+ layerType: { default: "modal" },
24
+ direction: { default: "rtl" }
23
25
  },
24
26
  emits: ["update:show"],
25
- setup(e, { emit: B }) {
26
- const t = e, T = B, c = N(!1), y = O(() => t.useLoading && c.value), r = (o) => {
27
+ setup(e, { emit: x }) {
28
+ const t = e, E = x, h = s(() => t.layerType === "drawer"), D = s(() => h.value ? L : M), N = s(
29
+ () => h.value ? { size: t.width, direction: t.direction } : { width: t.width, alignCenter: !0 }
30
+ ), c = V(!1), C = s(() => t.useLoading && c.value), f = (o) => {
27
31
  var n;
28
- T("update:show", !1), (n = t.onClose) == null || n.call(t, o);
29
- }, h = async () => {
32
+ E("update:show", !1), (n = t.onClose) == null || n.call(t, o);
33
+ }, v = async () => {
30
34
  var n;
31
- await ((n = t.onCancel) == null ? void 0 : n.call(t)) !== !1 && r(!1);
32
- }, C = async () => {
35
+ await ((n = t.onCancel) == null ? void 0 : n.call(t)) !== !1 && f(!1);
36
+ }, w = async () => {
33
37
  var o;
34
38
  c.value = !0;
35
39
  try {
36
40
  const n = await ((o = t.onConfirm) == null ? void 0 : o.call(t));
37
41
  if (c.value = !1, n === !1) return;
38
- r(!0);
42
+ f(!0);
39
43
  } catch {
40
44
  c.value = !1;
41
45
  }
42
- }, x = () => {
43
- r(!1);
46
+ }, O = () => {
47
+ f(!1);
44
48
  };
45
- return (o, n) => (l(), s(f(D), {
49
+ return (o, n) => (l(), i(u(D.value), $({
46
50
  "model-value": e.show,
47
- class: S(["dc-confirm-modal", "confirm-modal", o.$attrs.class]),
48
- width: e.width,
51
+ class: ["dc-confirm-modal", "confirm-modal", o.$attrs.class],
49
52
  "show-close": e.showClose,
50
53
  "append-to-body": "",
51
- "align-center": "",
52
54
  "close-on-click-modal": e.closeOnClickModal,
53
- "close-on-press-escape": e.closeOnPressEscape,
54
- onClose: x
55
- }, {
55
+ "close-on-press-escape": e.closeOnPressEscape
56
+ }, N.value, { onClose: O }), {
56
57
  header: a(() => [
57
- u("div", F, [
58
- m(o.$slots, "title", {}, () => [
59
- typeof e.title == "function" ? (l(), s(v(e.title), { key: 0 })) : (l(), w(k, { key: 1 }, [
60
- i(d(e.title), 1)
58
+ m("div", P, [
59
+ y(o.$slots, "title", {}, () => [
60
+ typeof e.title == "function" ? (l(), i(u(e.title), { key: 0 })) : (l(), g(k, { key: 1 }, [
61
+ r(d(e.title), 1)
61
62
  ], 64))
62
63
  ], !0)
63
64
  ])
64
65
  ]),
65
66
  footer: a(() => [
66
- u("div", {
67
+ m("div", {
67
68
  class: "confirm-modal__footer",
68
69
  reverse: e.reverse
69
70
  }, [
70
- m(o.$slots, "footer", {
71
- cancelHandler: h,
72
- confirmHandler: C,
73
- loading: y.value
71
+ y(o.$slots, "footer", {
72
+ cancelHandler: v,
73
+ confirmHandler: w,
74
+ loading: C.value
74
75
  }, () => [
75
- e.hiddenCancel ? V("", !0) : (l(), s(f(g), {
76
+ e.hiddenCancel ? F("", !0) : (l(), i(B(T), {
76
77
  key: 0,
77
78
  class: "confirm-modal__cancel",
78
- onClick: h
79
+ onClick: v
79
80
  }, {
80
81
  default: a(() => [
81
- i(d(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
82
+ r(d(typeof e.cancelText == "function" ? e.cancelText() : e.cancelText), 1)
82
83
  ]),
83
84
  _: 1
84
85
  })),
85
- $(f(g), {
86
+ H(B(T), {
86
87
  class: "confirm-modal__confirm",
87
88
  type: e.type,
88
- loading: y.value,
89
- onClick: C
89
+ loading: C.value,
90
+ onClick: w
90
91
  }, {
91
92
  default: a(() => [
92
- i(d(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
93
+ r(d(typeof e.confirmText == "function" ? e.confirmText() : e.confirmText), 1)
93
94
  ]),
94
95
  _: 1
95
96
  }, 8, ["type", "loading"])
96
97
  ], !0)
97
- ], 8, L)
98
+ ], 8, z)
98
99
  ]),
99
100
  default: a(() => [
100
- u("div", H, [
101
- m(o.$slots, "default", {}, () => [
102
- typeof e.content == "function" ? (l(), s(v(e.content), { key: 0 })) : (l(), w(k, { key: 1 }, [
103
- i(d(e.content), 1)
101
+ m("div", b, [
102
+ y(o.$slots, "default", {}, () => [
103
+ typeof e.content == "function" ? (l(), i(u(e.content), { key: 0 })) : (l(), g(k, { key: 1 }, [
104
+ r(d(e.content), 1)
104
105
  ], 64))
105
106
  ], !0)
106
107
  ])
107
108
  ]),
108
109
  _: 3
109
- }, 8, ["model-value", "class", "width", "show-close", "close-on-click-modal", "close-on-press-escape"]));
110
+ }, 16, ["model-value", "class", "show-close", "close-on-click-modal", "close-on-press-escape"]));
110
111
  }
111
112
  });
112
113
  export {
113
- b as default
114
+ q as default
114
115
  };
@@ -0,0 +1,7 @@
1
+ import o from "./SlotLayoutFlowAside.vue2.mjs";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5c6ef74b"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,55 @@
1
+ import { defineComponent as v, useCssVars as m, useModel as y, computed as a, openBlock as _, createElementBlock as g, normalizeClass as o, createVNode as i, withCtx as u, renderSlot as r, mergeModels as h } from "vue";
2
+ import c from "./SlotLayoutTemplate.vue.mjs";
3
+ const C = /* @__PURE__ */ v({
4
+ __name: "SlotLayoutFlowAside",
5
+ props: /* @__PURE__ */ h({
6
+ type: { default: "right" },
7
+ gap: { default: "12px" },
8
+ asideWidth: { default: "240px" },
9
+ asideMaxHeight: { default: "100vh" }
10
+ }, {
11
+ separate: { type: Boolean, default: !1 },
12
+ separateModifiers: {}
13
+ }),
14
+ emits: ["update:separate"],
15
+ setup(l) {
16
+ m((s) => ({
17
+ v88700944: e.asideWidth,
18
+ v23b7c943: e.asideMaxHeight,
19
+ v7e1d11ca: f.value
20
+ }));
21
+ const e = l, t = y(l, "separate"), d = a(() => !t.value), n = a(() => t.value ? [
22
+ "dc-slot-layout-flow-aside_separate",
23
+ `dc-slot-layout-flow-aside_separate_${e.type}`
24
+ ] : []), p = a(
25
+ () => `dc-slot-layout-flow-aside-aside_${e.type}`
26
+ ), f = a(() => t.value ? `calc(100% - ${e.gap})` : void 0);
27
+ return (s, w) => (_(), g("div", {
28
+ class: o(["dc-slot-layout-flow-aside", n.value])
29
+ }, [
30
+ i(c, {
31
+ disabled: d.value,
32
+ tag: "div",
33
+ class: o(["dc-slot-layout-flow-aside-aside", p.value])
34
+ }, {
35
+ default: u(() => [
36
+ r(s.$slots, "aside", {}, void 0, !0)
37
+ ]),
38
+ _: 3
39
+ }, 8, ["disabled", "class"]),
40
+ i(c, {
41
+ disabled: d.value,
42
+ tag: "div",
43
+ class: "dc-slot-layout-flow-aside-main"
44
+ }, {
45
+ default: u(() => [
46
+ r(s.$slots, "default", {}, void 0, !0)
47
+ ]),
48
+ _: 3
49
+ }, 8, ["disabled"])
50
+ ], 2));
51
+ }
52
+ });
53
+ export {
54
+ C as default
55
+ };
@@ -0,0 +1,28 @@
1
+ import { defineComponent as r, useAttrs as s, useSlots as o, h as u } from "vue";
2
+ const l = r({
3
+ name: "SlotLayoutTemplate",
4
+ inheritAttrs: !1,
5
+ props: {
6
+ /**
7
+ * 包裹宿主:原生标签名("div")/ 组件对象 / 函数式组件。
8
+ * 懒加载组件 [MUST] 先经 `defineAsyncComponent` 包裹再传——裸异步工厂
9
+ * `() => import('./X.vue')` 会被当函数式组件调用、不 resolve Promise(同
10
+ * `<component :is>` 原生语义,参 ModalShelf 同款约定)。
11
+ */
12
+ tag: {
13
+ type: [String, Object, Function],
14
+ default: "div"
15
+ },
16
+ disabled: { type: Boolean, default: !1 }
17
+ },
18
+ setup(e) {
19
+ const n = s(), t = o();
20
+ return () => {
21
+ var a;
22
+ return e.disabled ? (a = t.default) == null ? void 0 : a.call(t) : u(e.tag, n, t);
23
+ };
24
+ }
25
+ });
26
+ export {
27
+ l as default
28
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./SlotLayoutTemplate.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,42 @@
1
+ import { shallowRef as c, ref as u, watch as f, onScopeDispose as a, readonly as m } from "vue";
2
+ import { useActivated as d } from "./activated.mjs";
3
+ const v = [
4
+ { key: "xl", min: 1920 },
5
+ { key: "lg", min: 1200 },
6
+ { key: "md", min: 992 },
7
+ { key: "sm", min: 768 }
8
+ ], p = (e) => {
9
+ for (const { key: t, min: i } of v)
10
+ if (e >= i) return t;
11
+ return "xs";
12
+ }, k = (e) => {
13
+ if (!e || typeof HTMLElement > "u") return null;
14
+ if (e instanceof HTMLElement) return e;
15
+ const t = e.$el;
16
+ return t instanceof HTMLElement ? t : null;
17
+ }, E = () => {
18
+ const e = c(), t = u("lg"), { isActivated: i } = d();
19
+ let o;
20
+ const r = (n) => {
21
+ t.value = p(
22
+ n.getBoundingClientRect().width
23
+ );
24
+ }, s = () => {
25
+ o == null || o.disconnect(), o = void 0;
26
+ }, l = () => {
27
+ const n = k(e.value);
28
+ !n || typeof ResizeObserver > "u" || (r(n), o = new ResizeObserver(() => r(n)), o.observe(n));
29
+ };
30
+ return f(
31
+ [i, e],
32
+ ([n]) => {
33
+ s(), n && l();
34
+ },
35
+ { immediate: !0, flush: "post" }
36
+ ), a(s), { elRef: e, activeBreakpoint: m(t) };
37
+ };
38
+ export {
39
+ p as resolveBreakpointByWidth,
40
+ k as resolveRootEl,
41
+ E as useCustomBreakpoint
42
+ };