br-dionysus 0.3.2 → 0.3.3

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, openBlock as _, createElementBlock as g, renderSlot as K, onMounted as E, ref as B, watch as T, computed as I, nextTick as Q, createCommentVNode as F, createElementVNode as d, normalizeStyle as Y, Fragment as Z, renderList as ee, toDisplayString as ce, withModifiers as de, pushScopeId as te, popScopeId as oe, reactive as ne, resolveComponent as w, createVNode as S, useSlots as ue, unref as h, normalizeClass as me, createBlock as le, withCtx as N, createTextVNode as D } from "vue";
1
+ import { defineComponent as W, openBlock as _, createElementBlock as g, renderSlot as K, onMounted as T, ref as B, watch as E, computed as I, nextTick as Q, createCommentVNode as F, createElementVNode as d, normalizeStyle as Y, Fragment as Z, renderList as ee, toDisplayString as ce, withModifiers as de, pushScopeId as te, popScopeId as oe, reactive as ne, resolveComponent as w, createVNode as S, useSlots as ue, unref as h, normalizeClass as me, createBlock as le, withCtx as N, createTextVNode as D } from "vue";
2
2
  const pe = /* @__PURE__ */ W({
3
3
  __name: "index",
4
4
  emits: ["click"],
@@ -83,13 +83,13 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
83
83
  let i = parseInt(n.substring(0, 2), 16), k = parseInt(n.substring(2, 4), 16), z = parseInt(n.substring(4, 6), 16);
84
84
  return i += Math.round((255 - i) * (m / 100)), k += Math.round((255 - k) * (m / 100)), z += Math.round((255 - z) * (m / 100)), i = i.toString(16).padStart(2, "0"), k = k.toString(16).padStart(2, "0"), z = z.toString(16).padStart(2, "0"), `#${i}${k}${z}`;
85
85
  };
86
- E(() => {
86
+ T(() => {
87
87
  if (document.documentElement.style.setProperty("--br-dionysus-primary-color", o.primaryColor), o.primaryBackgroundColor)
88
88
  return !1;
89
89
  document.documentElement.style.setProperty("--br-dionysus-primary-bg-color", l(o.primaryColor, 90));
90
90
  });
91
91
  const r = B(o.activeKey);
92
- T(
92
+ E(
93
93
  () => o.activeKey,
94
94
  (n) => {
95
95
  r.value = n;
@@ -110,14 +110,14 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
110
110
  k.appendChild(O);
111
111
  });
112
112
  };
113
- T(
113
+ E(
114
114
  () => c.value,
115
115
  () => {
116
116
  Q(() => {
117
117
  f();
118
118
  });
119
119
  }
120
- ), E(() => {
120
+ ), T(() => {
121
121
  f();
122
122
  });
123
123
  const u = B(!1), s = B(0), v = B(0), $ = I(() => {
@@ -136,20 +136,20 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
136
136
  const { horizontal: m } = e(n);
137
137
  u.value = m, m && (s.value = n.scrollWidth - n.clientWidth);
138
138
  };
139
- T(
139
+ E(
140
140
  () => c.value,
141
141
  () => {
142
142
  Q(() => {
143
143
  x();
144
144
  });
145
145
  }
146
- ), E(() => {
146
+ ), T(() => {
147
147
  x();
148
148
  });
149
149
  const V = new ResizeObserver(() => {
150
150
  x();
151
151
  });
152
- E(() => {
152
+ T(() => {
153
153
  const n = document.querySelector(".g-tab-page-box");
154
154
  if (!n)
155
155
  return !1;
@@ -225,7 +225,7 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
225
225
  install(t) {
226
226
  t.component("tab-page", Ne);
227
227
  }
228
- }, Ee = ["data-is-table-mini", "data-no-spacing"], Te = ["data-size", "data-thousandth-place", "data-focus", "value", "data-disabled"], je = /* @__PURE__ */ W({
228
+ }, Te = ["data-is-table-mini", "data-no-spacing"], Ee = ["data-size", "data-thousandth-place", "data-focus", "value", "data-disabled"], je = /* @__PURE__ */ W({
229
229
  __name: "index",
230
230
  props: {
231
231
  modelValue: {
@@ -281,9 +281,9 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
281
281
  vSize: null,
282
282
  isTableMini: !1
283
283
  }), l = a, r = I(() => (o.vValue || "").toLocaleString("en-US", { maximumFractionDigits: 6 })), b = I(() => e.max >= e.min ? e.max : e.min);
284
- T(() => e.modelValue, () => {
284
+ E(() => e.modelValue, () => {
285
285
  c();
286
- }), T(() => e.size, () => {
286
+ }), E(() => e.size, () => {
287
287
  f();
288
288
  });
289
289
  const c = () => {
@@ -351,8 +351,8 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
351
351
  value: r.value,
352
352
  "data-disabled": e.disabled,
353
353
  readonly: ""
354
- }, null, 8, Te)) : F("", !0)
355
- ], 8, Ee);
354
+ }, null, 8, Ee)) : F("", !0)
355
+ ], 8, Te);
356
356
  };
357
357
  }
358
358
  }), Ke = /* @__PURE__ */ j(je, [["__scopeId", "data-v-0539abf7"]]), J = {
@@ -374,7 +374,7 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
374
374
  const e = t, o = (p = 24) => Array.from(Array(Number(p) || 24), () => Math.floor(Math.random() * 36).toString(36)).join(""), l = () => {
375
375
  document.documentElement.style.setProperty("--m-inline-min-width", e.minWidth), document.documentElement.style.setProperty("--m-inline-max-width", e.maxWidth);
376
376
  };
377
- T(
377
+ E(
378
378
  () => [e.minWidth, e.maxWidth],
379
379
  () => {
380
380
  l();
@@ -389,7 +389,7 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
389
389
  }, u = new ResizeObserver(() => {
390
390
  s.value = f();
391
391
  }), s = B(!1);
392
- E(() => {
392
+ T(() => {
393
393
  const p = document.querySelector("[data-box]");
394
394
  if (!p)
395
395
  return !1;
@@ -519,7 +519,7 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
519
519
  ], c = (u) => ({
520
520
  background: u
521
521
  });
522
- return E(() => {
522
+ return T(() => {
523
523
  l.apply();
524
524
  }), a({
525
525
  setSkin: (u) => {
@@ -621,7 +621,9 @@ const _e = /* @__PURE__ */ j(ve, [["render", he], ["__scopeId", "data-v-1f1035fb
621
621
  install(t) {
622
622
  t.component("skin-config", at);
623
623
  }
624
- }, rt = {
624
+ }, rt = () => {
625
+ console.log("aaa");
626
+ }, it = {
625
627
  install(t) {
626
628
  var a, e, o, l, r, b;
627
629
  (a = H.install) == null || a.call(H, t), (e = L.install) == null || e.call(L, t), (o = R.install) == null || o.call(R, t), (l = J.install) == null || l.call(J, t), (r = X.install) == null || r.call(X, t), (b = G.install) == null || b.call(G, t);
@@ -640,5 +642,6 @@ export {
640
642
  G as SkinConfigPlugin,
641
643
  Ne as TabPage,
642
644
  R as TabPagePlugin,
643
- rt as default
645
+ it as default,
646
+ rt as hook
644
647
  };
@@ -1,2 +1,2 @@
1
1
  (function(b,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(b=typeof globalThis<"u"?globalThis:b||self,e(b.BrPlugin={},b.Vue))})(this,function(b,e){"use strict";var K=document.createElement("style");K.textContent=`@charset "UTF-8";.my-button[data-v-2a480934]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:5px 10px;background:#87cefa;border:none;border-radius:4px;color:#fff}.my-button[data-v-2a480934]:active{background:#5cb9f3}.my-button[data-v-2a480934]:not(:last-child){margin-right:15px}[data-v-edfffe70]:root{--br-dionysus-primary-color: #646CFFFF;--br-dionysus-primary-bg-color: #979fff}.u-icon-box[data-v-edfffe70]{display:none}.g-box[data-v-edfffe70]{position:relative;overflow:hidden;padding-left:16px;padding-right:16px;width:100%;background-color:#fff;box-sizing:border-box}.g-box .u-page-btn[data-v-edfffe70]{position:absolute;bottom:0;height:33px;border:0;box-sizing:border-box;background-color:#fff;opacity:.6;cursor:pointer}.g-box .s-previous-btn[data-v-edfffe70]{left:0}.g-box .s-next-btn[data-v-edfffe70]{right:0;transform:rotate(180deg)}.g-dionysus-box[data-v-edfffe70]{overflow:hidden;width:100%}.g-tab-page-box[data-v-edfffe70]{display:flex;color:#4a4a4a;white-space:nowrap;box-sizing:border-box;box-shadow:2px 0 8px #1d23290d;transform:translate(0);transition:.2s}.g-tab-page-box .u-li[data-v-edfffe70]{display:inline-block;position:relative;height:33px;font-size:14px;box-sizing:border-box;cursor:pointer}.g-tab-page-box .u-li .u-gp[data-v-edfffe70]{display:flex;position:relative;z-index:1;padding:6px 8px;height:100%;align-items:center;background-color:#fff;border-radius:6px 6px 0 0;box-sizing:border-box}.g-tab-page-box .u-li .u-gp[data-v-edfffe70]:after{position:absolute;bottom:0;right:0;z-index:1;content:"";width:12px;height:12px;border-radius:6px 6px 0;pointer-events:none}.g-tab-page-box .u-li .u-gp[data-v-edfffe70]:before{position:absolute;bottom:0;left:0;z-index:1;content:"";width:12px;height:12px;border-radius:6px 6px 6px 0;pointer-events:none}.g-tab-page-box .u-li[data-v-edfffe70]:after{position:absolute;bottom:0;right:0;z-index:2;content:"";width:12px;height:12px;border-radius:6px;pointer-events:none}.g-tab-page-box .u-li[data-v-edfffe70]:before{position:absolute;bottom:0;left:0;z-index:2;content:"";width:12px;height:12px;border-radius:6px;pointer-events:none}.g-tab-page-box .u-li[data-hover=true] .u-gp[data-v-edfffe70],.g-tab-page-box .u-li[data-hover=true] .u-gp[data-v-edfffe70]:after,.g-tab-page-box .u-li[data-hover=true] .u-gp[data-v-edfffe70]:before,.g-tab-page-box .u-li[data-hover=true][data-active=false][data-v-edfffe70]:after,.g-tab-page-box .u-li[data-hover=true][data-active=false][data-v-edfffe70]:before{background-color:#dfe1e5}.g-tab-page-box .u-li[data-hover-before=true] .u-gp[data-v-edfffe70]:after{background-color:#dfe1e5}.g-tab-page-box .u-li[data-hover-before=true][data-v-edfffe70]:after{background-color:#fff}.g-tab-page-box .u-li[data-hover-after=true] .u-gp[data-v-edfffe70]:before{background-color:#dfe1e5}.g-tab-page-box .u-li[data-hover-after=true][data-v-edfffe70]:before{background-color:#fff}.g-tab-page-box .u-li[data-active-before=true] .u-gp[data-v-edfffe70]:after{background-color:var(--br-dionysus-primary-bg-color)}.g-tab-page-box .u-li[data-active-before=true][data-v-edfffe70]:after{background-color:#fff}.g-tab-page-box .u-li[data-active-after=true] .u-gp[data-v-edfffe70]:before{background-color:var(--br-dionysus-primary-bg-color)}.g-tab-page-box .u-li[data-active-after=true][data-v-edfffe70]:before{background-color:#fff}.g-tab-page-box .u-li[data-active=true][data-v-edfffe70]{color:var(--br-dionysus-primary-color)}.g-tab-page-box .u-li[data-active=true] .u-gp[data-v-edfffe70],.g-tab-page-box .u-li[data-active=true] .u-gp[data-v-edfffe70]:before,.g-tab-page-box .u-li[data-active=true] .u-gp[data-v-edfffe70]:after,.g-tab-page-box .u-li[data-active=true][data-v-edfffe70]:after,.g-tab-page-box .u-li[data-active=true][data-v-edfffe70]:before{background-color:var(--br-dionysus-primary-bg-color)}.g-tab-page-box .u-li .u-icon[data-v-edfffe70]{margin-right:8px;pointer-events:none}.g-tab-page-box .u-li .u-sn[data-v-edfffe70]{pointer-events:none}.g-tab-page-box .u-li .u-btn[data-v-edfffe70]{position:relative;//margin-left: 14px;margin-left:4px;width:14px;height:14px;font-size:14px;border-radius:50%}.g-tab-page-box .u-li .u-btn[data-v-edfffe70]:after{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;content:"";border-radius:50%}.g-tab-page-box .u-li .u-btn[data-v-edfffe70]:hover{color:#fff;background-color:#9ca3af}.g-tab-page-box .u-li[data-active=true] .u-btn[data-v-edfffe70]:hover{color:#fff;background-color:var(--br-dionysus-primary-color)}.g-tab-page-box .s-icon[data-v-edfffe70]{display:block;position:relative;width:14px;height:14px}.g-tab-page-box .s-icon[data-v-edfffe70]:after{position:absolute;top:50%;left:50%;content:"";width:1px;height:10px;background-color:#303133;transform:translate(-50%,-50%) rotate(45deg)}.g-tab-page-box .s-icon[data-v-edfffe70]:before{position:absolute;top:50%;left:50%;content:"";width:1px;height:10px;background-color:#303133;transform:translate(-50%,-50%) rotate(-45deg)}.g-tab-page-box .u-li[data-active=true] .s-icon[data-v-edfffe70]:after,.g-tab-page-box .u-li[data-active=true] .s-icon[data-v-edfffe70]:before{background-color:var(--br-dionysus-primary-color)}.g-tab-page-box .u-li .u-btn:hover .s-icon[data-v-edfffe70]:after,.g-tab-page-box .u-li .u-btn:hover .s-icon[data-v-edfffe70]:before{background-color:#fff}.g-tab-page-box .u-li[data-active=true] .u-btn:hover .s-icon[data-v-edfffe70]:after,.g-tab-page-box .u-li[data-active=true] .u-btn:hover .s-icon[data-v-edfffe70]:before{background-color:#fff}.g-tab-page-box .u-li[data-active=false][data-hover=false][data-active-before=false][data-hover-before=false] .u-sn[data-v-edfffe70]:after{position:absolute;top:50%;right:0;z-index:2;content:"";width:1px;height:50%;transform:translateY(-50%);background-color:#4a4a4a}.g-tab-page-box .u-li:nth-last-of-type(1)[data-active=false][data-hover=false] .u-sn[data-v-edfffe70]:after{background-color:#0000!important}.g-m-input-number-box[data-v-0539abf7]{position:relative;width:100%}.g-m-input-number-box .m-input-number[data-v-0539abf7]{width:100%}.g-m-input-number-box .u-text[data-thousandth-place=true][data-v-0539abf7]{display:inline-block;position:absolute;top:0;left:0;margin-bottom:0;padding-left:15px;padding-right:15px;width:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-feature-settings:normal;font-stretch:100%;font-weight:400;text-indent:0;color:#606266;text-align:left;letter-spacing:normal;word-spacing:0;background-color:#0000;border-radius:4px;border:1px solid rgba(0,0,0,0);box-sizing:border-box;cursor:text;pointer-events:none}.g-m-input-number-box .u-text[data-thousandth-place=true][data-v-0539abf7]:hover{border-color:#c0c4cc}.g-m-input-number-box .u-text[data-thousandth-place=true][data-size=mini][data-v-0539abf7]{font-size:12px;height:28px;line-height:28px}.g-m-input-number-box .u-text[data-thousandth-place=true][data-disabled=true][data-v-0539abf7]{color:#00000040}.g-m-input-number-box .u-text[data-thousandth-place=true][data-focus=true][data-v-0539abf7]{color:#0000}.g-m-input-number-box[data-is-table-mini=true] .u-text[data-size=mini][data-v-0539abf7]{height:24px;font-size:14px;line-height:24px}.g-m-input-number-box[data-no-spacing] .u-text[data-v-0539abf7]{padding-left:0}.g-m-input-number-box .m-input-number .el-input__inner{text-align:left}.g-m-input-number-box .m-input-number[data-thousandth-place=true] .el-input__inner{color:#0000}.g-m-input-number-box .m-input-number[data-focus=true] .el-input__inner{color:#606266}.g-m-input-number-box .m-input-number[no-border=true] .el-input__inner{border:0}.g-m-input-number-box[data-is-table-mini=true] .m-input-number .el-input__inner{height:24px;font-size:14px;line-height:24px}.g-m-input-number-box[data-no-spacing=true] .m-input-number .el-input__inner{padding-left:0}.g-inline-box[data-v-6b32beca]{margin-bottom:14px;padding-top:10px;border:1px solid var(--el-border-color-lighter);border-radius:4px}.m-inline-btn[data-v-6b32beca]{padding:0 14px 10px}.m-inline[data-v-6b32beca]{display:flex;position:relative;width:100%}.m-inline-btn+.m-inline[data-v-6b32beca]{padding-top:10px}.m-inline-btn+.m-inline[data-v-6b32beca]:before{position:absolute;top:0;left:50%;content:"";width:calc(100% - 28px);height:1px;background-color:var(--el-border-color-lighter);transform:translate(-50%)}.u-btn-gp[data-v-6b32beca]{display:flex;padding-left:14px;padding-right:14px}.u-row[data-v-6b32beca]{display:flex;overflow:hidden;max-height:34px;flex:1}.u-row[data-unfold=true][data-v-6b32beca]{max-height:none}.u-btn-unfold[data-v-6b32beca]{margin-left:8px;width:12px;height:24px;line-height:24px;text-align:center;color:var(--el-text-color-regular);transform:rotate(90deg);cursor:pointer}.u-btn-unfold[data-unfold=true][data-v-6b32beca]{transform:rotate(270deg)}.g-inline-box .m-inline[dataCover] [data-box]{display:grid;grid-template-columns:repeat(auto-fit,minmax(var(--m-inline-min-width),1fr))}.g-inline-box .m-inline[dataCover] [data-box] [data-item]{padding-bottom:10px;min-width:var(--m-inline-min-width);max-width:var(--m-inline-max-width)}.g-inline-box .m-inline[dataCover] .el-form-item{margin-bottom:0;width:100%}.g-inline-box .m-inline[dataCover] .el-form-item .el-input,.g-inline-box .m-inline[dataCover] .el-form-item .el-cascader,.g-inline-box .m-inline[dataCover] .el-form{width:100%}.g-inline-box .m-inline[dataCover] .el-form .u-it-gp{display:flex}.g-inline-box .m-inline[dataCover] .u-row[data-single-line=true] .el-form{display:flex;justify-content:flex-start}html[data-v-b9f65c6d],body[data-v-b9f65c6d]{height:100%;overflow:hidden;background:#f1f1f2;margin:0}body[data-v-b9f65c6d],div[data-v-b9f65c6d],dl[data-v-b9f65c6d],dt[data-v-b9f65c6d],dd[data-v-b9f65c6d],ul[data-v-b9f65c6d],ol[data-v-b9f65c6d],li[data-v-b9f65c6d],h1[data-v-b9f65c6d],h2[data-v-b9f65c6d],h3[data-v-b9f65c6d],h4[data-v-b9f65c6d],h5[data-v-b9f65c6d],h6[data-v-b9f65c6d],input[data-v-b9f65c6d],button[data-v-b9f65c6d],textarea[data-v-b9f65c6d],p[data-v-b9f65c6d],blockquote[data-v-b9f65c6d],th[data-v-b9f65c6d],td[data-v-b9f65c6d]{margin:0;padding:0}img[data-v-b9f65c6d]{border:none;display:inline-block}em[data-v-b9f65c6d],strong[data-v-b9f65c6d]{font-style:normal;font-weight:400}li[data-v-b9f65c6d]{list-style:none}table[data-v-b9f65c6d]{border-collapse:collapse;border-spacing:0}h1[data-v-b9f65c6d]{font-size:18px}h2[data-v-b9f65c6d]{font-size:16px}h3[data-v-b9f65c6d]{font-size:14px}h4[data-v-b9f65c6d],h5[data-v-b9f65c6d],h6[data-v-b9f65c6d]{font-size:100%}q[data-v-b9f65c6d]:before,q[data-v-b9f65c6d]:after{content:""}button[data-v-b9f65c6d],input[data-v-b9f65c6d],select[data-v-b9f65c6d],textarea[data-v-b9f65c6d]{font-size:100%}input[data-v-b9f65c6d],button[data-v-b9f65c6d],textarea[data-v-b9f65c6d],select[data-v-b9f65c6d],optgroup[data-v-b9f65c6d],option[data-v-b9f65c6d]{font-size:inherit;font-style:inherit;font-weight:inherit}address[data-v-b9f65c6d],cite[data-v-b9f65c6d],dfn[data-v-b9f65c6d],em[data-v-b9f65c6d],var[data-v-b9f65c6d],i[data-v-b9f65c6d]{font-style:normal;color:inherit;line-height:inherit}a[data-v-b9f65c6d]{text-decoration:none;color:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0)}a[data-v-b9f65c6d]:hover{text-decoration:none}input[data-v-b9f65c6d],button[data-v-b9f65c6d],textarea[data-v-b9f65c6d],select[data-v-b9f65c6d]{outline:none}input[data-v-b9f65c6d]:-webkit-autofill{-webkit-box-shadow:0 0 0 400px #fff inset}.g-skin-config-box[data-v-b9f65c6d]{display:flex}.g-skin-config-box .u-tt[data-v-b9f65c6d]{padding:0 24px;line-height:50px;box-shadow:0 1px 2px #00152914}.g-skin-config-box .u-box[data-v-b9f65c6d]{display:flex;padding:20px 24px;height:calc(100% - 50px);flex-direction:column}.g-skin-config-box .u-box .u-box-tt[data-v-b9f65c6d]{margin:34px 0}.g-skin-config-box .u-box .u-group[data-v-b9f65c6d]{display:flex;margin-bottom:12px;justify-content:space-between;align-items:center;color:var(--m-fc-body)}.g-skin-config-box .u-box .u-list[data-v-b9f65c6d]{display:flex;margin:0 -10px;flex-wrap:wrap}.g-skin-config-box .u-box .u-list .u-li[data-v-b9f65c6d]{display:flex;margin-bottom:10px;width:12.5%;justify-content:center}.g-skin-config-box .u-box .u-list .u-li .u-color[data-v-b9f65c6d]{display:flex;width:20px;height:20px;color:#fff;align-items:center;justify-content:center;cursor:pointer}.g-skin-config-box .u-pc[data-v-b9f65c6d]{display:flex;margin-top:10px;width:100%;flex:1;justify-content:center}.u-btn[data-v-b9f65c6d]{display:flex;font-size:18px;color:var(--el-color-primary);cursor:pointer}.u-btn svg path[data-v-b9f65c6d]{stroke:var(--el-color-primary);fill:var(--el-color-primary)}.g-skin-config-box .el-drawer__body{padding:0}.g-skin-config-box .el-switch{height:auto}.g-skin-config-box .u-pc{display:flex;justify-content:center}.g-skin-config-box .u-pc .el-color-picker{width:100%}.g-skin-config-box .u-pc .el-color-picker .el-color-picker__trigger{width:100%;height:34px}
2
- `,document.head.appendChild(K);const D=e.defineComponent({__name:"index",emits:["click"],setup(o,{emit:i}){const t=i;return(a,r)=>(e.openBlock(),e.createElementBlock("button",{class:"my-button",onClick:r[0]||(r[0]=d=>t("click",d))},[e.renderSlot(a.$slots,"default",{},void 0,!0)]))}}),S=(o,i)=>{const t=o.__vccOpts||o;for(const[a,r]of i)t[a]=r;return t},U=S(D,[["__scopeId","data-v-2a480934"]]),N={install(o){o.component("my-button",U)}},L={},R={class:"my-foo"};function J(o,i){return e.openBlock(),e.createElementBlock("div",R," 我是测试组件组件 ")}const q=S(L,[["render",J],["__scopeId","data-v-1f1035fb"]]),B={install(o){o.component("my-foo",q)}},E=o=>(e.pushScopeId("data-v-edfffe70"),o=o(),e.popScopeId(),o),Y={class:"g-box"},G=[E(()=>e.createElementVNode("svg",{t:"1704703004061",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4356",width:"16",height:"16"},[e.createElementVNode("path",{d:"M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",fill:"#272636","p-id":"4357"})],-1))],X={class:"g-dionysus-box"},Q=["data-active","data-active-before","data-active-after","onMouseenter","data-hover","data-hover-before","data-hover-after","onClick"],Z={class:"u-gp"},ee=E(()=>e.createElementVNode("i",{class:"u-icon j-icon"},null,-1)),te={class:"u-sn"},oe=["onClick"],ae=[E(()=>e.createElementVNode("i",{class:"s-icon"},null,-1))],ne={class:"u-icon-box"},re=[E(()=>e.createElementVNode("svg",{t:"1704703004061",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4356",width:"16",height:"16"},[e.createElementVNode("path",{d:"M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",fill:"#272636","p-id":"4357"})],-1))],W=S(e.defineComponent({__name:"index",props:{modelValue:{default:()=>[]},activeKey:{default:""},showRightClickMenu:{type:Boolean,default:!1},primaryColor:{default:"#646CFFFF"},primaryBackgroundColor:{default:null}},emits:["close","click"],setup(o,{emit:i}){const t=n=>({horizontal:n.scrollWidth>n.clientWidth,vertical:n.scrollHeight>n.clientHeight}),a=o,r=(n,p=100)=>{n=n.replace("#","").toLowerCase(),n.length===3&&(n=n.split("").map(T=>T+T).join(""));let s=parseInt(n.substring(0,2),16),v=parseInt(n.substring(2,4),16),V=parseInt(n.substring(4,6),16);return s+=Math.round((255-s)*(p/100)),v+=Math.round((255-v)*(p/100)),V+=Math.round((255-V)*(p/100)),s=s.toString(16).padStart(2,"0"),v=v.toString(16).padStart(2,"0"),V=V.toString(16).padStart(2,"0"),`#${s}${v}${V}`};e.onMounted(()=>{if(document.documentElement.style.setProperty("--br-dionysus-primary-color",a.primaryColor),a.primaryBackgroundColor)return!1;document.documentElement.style.setProperty("--br-dionysus-primary-bg-color",r(a.primaryColor,90))});const d=e.ref(a.activeKey);e.watch(()=>a.activeKey,n=>{d.value=n});const x=i,c=e.computed(()=>a.modelValue.map(n=>({key:n.key,title:n.title}))),m=()=>{c.value.forEach((n,p)=>{const s=".j-dionysus-list-box .j-li:nth-of-type("+(p+1)+") .j-icon",v=document.querySelector(s);if(!v||v.children.length)return!1;const V=document.querySelector('[data-key="'+n.key+'"]');if(!V)return!1;const T=V.cloneNode(!0);v.appendChild(T)})};e.watch(()=>c.value,()=>{e.nextTick(()=>{m()})}),e.onMounted(()=>{m()});const f=e.ref(!1),l=e.ref(0),g=e.ref(0),C=e.computed(()=>{const n=g.value>l.value?l.value:g.value;return{transform:"translateX(-"+(f.value?n:0)+"px)"}}),u=()=>{g.value=g.value<300?0:g.value-300},y=()=>{g.value=g.value>l.value-300?l.value:g.value+300},k=()=>{const n=document.querySelector(".g-tab-page-box");if(!n)return!1;const{horizontal:p}=t(n);f.value=p,p&&(l.value=n.scrollWidth-n.clientWidth)};e.watch(()=>c.value,()=>{e.nextTick(()=>{k()})}),e.onMounted(()=>{k()});const _=new ResizeObserver(()=>{k()});e.onMounted(()=>{const n=document.querySelector(".g-tab-page-box");if(!n)return!1;_.observe(n)});const j=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===a.activeKey);return n===-1?-1:(p=c.value[n-1])==null?void 0:p.key}),h=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===a.activeKey);return n===-1?-1:(p=c.value[n+1])==null?void 0:p.key}),z=e.ref(2),Ve=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===z.value);return n===-1?-1:(p=c.value[n-1])==null?void 0:p.key}),Se=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===z.value);return n===-1?-1:(p=c.value[n+1])==null?void 0:p.key}),ze=n=>{x("click",n)},Ne=(n=[])=>{x("close",n)};return(n,p)=>(e.openBlock(),e.createElementBlock("div",Y,[f.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"u-page-btn s-previous-btn",onClick:u},G)):e.createCommentVNode("",!0),e.createElementVNode("div",X,[e.createElementVNode("ul",{class:"g-tab-page-box j-dionysus-list-box",style:e.normalizeStyle(C.value),onMouseleave:p[0]||(p[0]=s=>z.value=-1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.modelValue,s=>(e.openBlock(),e.createElementBlock("li",{class:"u-li j-li",key:s.key,"data-active":a.activeKey===s.key,"data-active-before":j.value===s.key,"data-active-after":h.value===s.key,onMouseenter:v=>z.value=s.key,"data-hover":z.value===s.key,"data-hover-before":Ve.value===s.key,"data-hover-after":Se.value===s.key,onClick:v=>ze(s.key)},[e.createElementVNode("div",Z,[ee,e.createElementVNode("span",te,e.toDisplayString(s.title),1),e.createElementVNode("div",{class:"u-btn",onClick:e.withModifiers(v=>Ne([s.key]),["stop"])},ae,8,oe)])],40,Q))),128))],36)]),e.createElementVNode("div",ne,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),f.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"u-page-btn s-next-btn",onClick:y},re)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-edfffe70"]]),$={install(o){o.component("tab-page",W)}},ie=["data-is-table-mini","data-no-spacing"],le=["data-size","data-thousandth-place","data-focus","value","data-disabled"],A=S(e.defineComponent({__name:"index",props:{modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!0},thousandthPlace:{type:Boolean,default:!1},noBorder:{type:Boolean,default:!1},noSpacing:{type:Boolean,default:!1}},emits:["update:modelValue","change","focus","blur"],setup(o,{emit:i}){const t=o,a=e.reactive({vValue:null,isFocus:!1,vSize:null,isTableMini:!1}),r=i,d=e.computed(()=>(a.vValue||"").toLocaleString("en-US",{maximumFractionDigits:6})),x=e.computed(()=>t.max>=t.min?t.max:t.min);e.watch(()=>t.modelValue,()=>{c()}),e.watch(()=>t.size,()=>{m()});const c=()=>{if(t.modelValue===""||t.modelValue===null||t.modelValue===void 0)return a.vValue=void 0,!1;if(t.modelValue>t.max||t.modelValue<t.min)return r("update:modelValue",a.vValue),!1;a.vValue=t.modelValue},m=()=>{const u={large:"large",small:"small",mini:"mini","table-mini":"mini"};a.vSize=u[t.size],a.isTableMini=t.size==="table-mini"},f=()=>{if(a.vValue===void 0)return r("update:modelValue",null),!1;r("update:modelValue",a.vValue)},l=u=>{if(u===void 0)return r("update:modelValue",null),!1;f(),r("change",u)},g=()=>{a.isFocus=!0,r("focus",a.vValue)},C=()=>{a.isFocus=!1,r("blur",a.vValue)};return c(),m(),(u,y)=>{const k=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",{class:"g-m-input-number-box","data-is-table-mini":a.isTableMini,"data-no-spacing":t.noSpacing},[e.createVNode(k,{class:"m-input-number",modelValue:a.vValue,"onUpdate:modelValue":y[0]||(y[0]=_=>a.vValue=_),size:a.vSize,min:t.min,max:x.value,controls:!1,disabled:t.disabled,placeholder:t.placeholder,step:t.step,stepStrictly:t.stepStrictly,"data-thousandth-place":t.thousandthPlace,"data-focus":a.isFocus,noBorder:t.noBorder,onChange:y[1]||(y[1]=_=>{l(_),f()}),onFocus:g,onBlur:C},null,8,["modelValue","size","min","max","disabled","placeholder","step","stepStrictly","data-thousandth-place","data-focus","noBorder"]),t.thousandthPlace?(e.openBlock(),e.createElementBlock("input",{key:0,class:"u-text",type:"text","data-size":a.vSize,"data-thousandth-place":t.thousandthPlace,"data-focus":a.isFocus,value:d.value,"data-disabled":t.disabled,readonly:""},null,8,le)):e.createCommentVNode("",!0)],8,ie)}}}),[["__scopeId","data-v-0539abf7"]]),M={install(o){o.component("m-input-number",A)}},de={class:"g-inline-box"},se={key:1,class:"m-inline",dataCover:""},ce=["data-unfold","data-single-line"],fe={class:"u-btn-gp"},H=S(e.defineComponent({__name:"index",props:{minWidth:{default:"200px"},maxWidth:{default:"300px"}},emits:["switch"],setup(o,{emit:i}){const t=o,a=(u=24)=>Array.from(Array(Number(u)||24),()=>Math.floor(Math.random()*36).toString(36)).join(""),r=()=>{document.documentElement.style.setProperty("--m-inline-min-width",t.minWidth),document.documentElement.style.setProperty("--m-inline-max-width",t.maxWidth)};e.watch(()=>[t.minWidth,t.maxWidth],()=>{r()}),r();const d=e.useSlots(),x=i,c="j-"+a(8),m=()=>{const u=document.querySelector("."+c+" [data-box]");if(!u)return!1;const y=u.querySelectorAll("."+c+" [data-item]");return u.clientWidth<y.length*200},f=new ResizeObserver(()=>{l.value=m()}),l=e.ref(!1);e.onMounted(()=>{const u=document.querySelector("[data-box]");if(!u)return!1;l.value=m(),f.observe(u)});const g=e.ref(!1),C=()=>{g.value=!g.value,x("switch",g.value)};return(u,y)=>{const k=e.resolveComponent("DArrowRight"),_=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock("div",de,[e.unref(d).inlineBtn?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m-inline-btn",onClick:m},[e.renderSlot(u.$slots,"inlineBtn",{},void 0,!0)])):e.createCommentVNode("",!0),e.unref(d).default?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",{class:e.normalizeClass(["u-row",c]),"data-unfold":g.value,"data-single-line":!l.value},[e.renderSlot(u.$slots,"default",{},void 0,!0)],8,ce),e.createElementVNode("div",fe,[e.renderSlot(u.$slots,"submitBtn",{},void 0,!0),l.value?(e.openBlock(),e.createBlock(_,{key:0,class:"u-btn-unfold",onClick:C,"data-unfold":g.value},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["data-unfold"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-6b32beca"]]),I={install(o){o.component("m-inline",H)}},w=(o,i=100)=>{o=o.replace("#","").toLowerCase(),o.length===3&&(o=o.split("").map(d=>d+d).join(""));let t=parseInt(o.substring(0,2),16),a=parseInt(o.substring(2,4),16),r=parseInt(o.substring(4,6),16);return i>0&&(t+=Math.round((255-t)*(i/100)),a+=Math.round((255-a)*(i/100)),r+=Math.round((255-r)*(i/100))),i<=0&&(t+=Math.round(t*(i/100)),a+=Math.round(a*(i/100)),r+=Math.round(r*(i/100))),t=t.toString(16).padStart(2,"0"),a=a.toString(16).padStart(2,"0"),r=r.toString(16).padStart(2,"0"),`#${t}${a}${r}`},pe=()=>{const o={darkTheme:!1,followSystem:!1,primaryColor:"#646CFF"};localStorage.getItem("skinConfig")===null&&localStorage.setItem("skinConfig",JSON.stringify(o));const i=e.reactive(JSON.parse(localStorage.getItem("skinConfig"))),t=c=>{i.primaryColor=c,r(),x()},a=()=>{i.darkTheme=o.darkTheme,i.followSystem=o.followSystem,i.primaryColor=o.primaryColor,r(),x()},r=()=>{const c=i.darkTheme||i.followSystem&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,m=l=>c?-l:l,f=document.documentElement.style;f.setProperty("--el-color-primary",i.primaryColor),f.setProperty("--el-color-primary-dark-2",w(i.primaryColor,m(50))),f.setProperty("--el-color-primary-light-3",w(i.primaryColor,m(25))),f.setProperty("--el-color-primary-light-5",w(i.primaryColor,m(40))),f.setProperty("--el-color-primary-light-7",w(i.primaryColor,m(60))),f.setProperty("--el-color-primary-light-8",w(i.primaryColor,m(75))),f.setProperty("--el-color-primary-light-9",w(i.primaryColor,m(90))),f.setProperty("--m-scrollbar-thumb-color",w(i.primaryColor,m(70))),f.setProperty("--m-scrollbar-thumb-hover-color",w(i.primaryColor,m(50))),d(c)},d=(c=!1)=>{document.documentElement.setAttribute("data-dark",String(c))},x=()=>{localStorage.setItem("skinConfig",JSON.stringify(i))};return{skinConfig:i,reset:a,setPrimaryColor:t,apply:r,save:x,switchDark:d}},P=o=>(e.pushScopeId("data-v-b9f65c6d"),o=o(),e.popScopeId(),o),ue={class:"g-skin-config-box"},be=[P(()=>e.createElementVNode("svg",{t:"1706517168459",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4378",width:"24",height:"24"},[e.createElementVNode("path",{d:"M533.333333 853.333333c179.2 0 320-145.066667 320-320S708.266667 213.333333 533.333333 213.333333 213.333333 358.4 213.333333 533.333333c0 93.866667 34.133333 132.266667 115.2 157.866667 8.533333 4.266667 12.8 4.266667 21.333334 8.533333 4.266667 0 21.333333 4.266667 21.333333 8.533334 51.2 17.066667 76.8 25.6 98.133333 51.2 17.066667 17.066667 29.866667 38.4 42.666667 59.733333 4.266667 8.533333 8.533333 17.066667 8.533333 21.333333 8.533333 0 8.533333 8.533333 12.8 12.8z m0 42.666667c-59.733333 0-21.333333-42.666667-89.6-110.933333-64-64-273.066667-25.6-273.066666-251.733334C170.666667 332.8 332.8 170.666667 533.333333 170.666667S896 332.8 896 533.333333 733.866667 896 533.333333 896z m72.533334-106.666667c-42.666667 0-76.8-34.133333-76.8-76.8s34.133333-72.533333 76.8-72.533333 76.8 34.133333 76.8 72.533333-34.133333 76.8-76.8 76.8z m0-42.666666c17.066667 0 34.133333-12.8 34.133333-34.133334s-12.8-29.866667-34.133333-29.866666-34.133333 12.8-34.133334 29.866666 17.066667 34.133333 34.133334 34.133334zM640 384c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z m-119.466667-34.133333c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666667zM725.333333 469.333333c-25.6 0-42.666667-17.066667-42.666666-42.666666s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666666zM405.333333 384c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z",fill:"#444444","p-id":"4379"})],-1))],me=P(()=>e.createElementVNode("h2",{class:"u-tt"},"主题配置",-1)),ge={class:"u-box"},he={class:"u-group"},xe=P(()=>e.createElementVNode("label",null,"深色主题",-1)),ve={class:"u-group"},ye=P(()=>e.createElementVNode("label",null,"跟随系统",-1)),ke={class:"u-list"},_e=["onClick"],we={class:"u-pc"},O=S(e.defineComponent({__name:"index",setup(o,{expose:i}){const t=e.ref(!1),a=()=>{t.value=!0},r=pe(),d=r.skinConfig,x=["#1690ff","#419eff","#007aff","#59c8fa","#646CFF","#536dfe","#646cff","#9c28b0","#af52de","#0096c7","#04c1d4","#35c759","#42a047","#7cb342","#c0ca34","#78dec7","#e53834","#d81a60","#f4511e","#fb8c01","#ffb300","#fdd835","#6d4c41","#546e7a"],c=f=>({background:f});return e.onMounted(()=>{r.apply()}),i({setSkin:f=>{d.darkTheme=f.darkTheme,d.followSystem=f.followSystem,d.primaryColor=f.primaryColor,r.apply(),r.save()}}),(f,l)=>{const g=e.resolveComponent("el-divider"),C=e.resolveComponent("el-switch"),u=e.resolveComponent("Check"),y=e.resolveComponent("el-icon"),k=e.resolveComponent("el-color-picker"),_=e.resolveComponent("el-button"),j=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",{class:"u-btn",onClick:a},be),e.createVNode(j,{modelValue:t.value,"onUpdate:modelValue":l[6]||(l[6]=h=>t.value=h),direction:"rtl",withHeader:!1,size:"300"},{default:e.withCtx(()=>[me,e.createElementVNode("div",ge,[e.createVNode(g,{class:"u-box-tt"},{default:e.withCtx(()=>[e.createTextVNode("主题模式")]),_:1}),e.createElementVNode("div",he,[xe,e.createVNode(C,{modelValue:e.unref(d).darkTheme,"onUpdate:modelValue":l[0]||(l[0]=h=>e.unref(d).darkTheme=h),onChange:l[1]||(l[1]=h=>{e.unref(r).apply(),e.unref(r).save()})},null,8,["modelValue"])]),e.createElementVNode("div",ve,[ye,e.createVNode(C,{modelValue:e.unref(d).followSystem,"onUpdate:modelValue":l[2]||(l[2]=h=>e.unref(d).followSystem=h),onChange:l[3]||(l[3]=h=>{e.unref(r).apply(),e.unref(r).save()})},null,8,["modelValue"])]),e.createVNode(g,{class:"u-box-tt"},{default:e.withCtx(()=>[e.createTextVNode("系统主题")]),_:1}),e.createElementVNode("ul",ke,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(x,h=>e.createElementVNode("li",{class:"u-li",key:h},[e.createElementVNode("div",{class:"u-color",style:e.normalizeStyle(c(h)),onClick:z=>e.unref(r).setPrimaryColor(h)},[e.unref(d).primaryColor===h?(e.openBlock(),e.createBlock(y,{key:0},{default:e.withCtx(()=>[e.createVNode(u)]),_:1})):e.createCommentVNode("",!0)],12,_e)])),64))]),e.createElementVNode("div",we,[e.createVNode(k,{modelValue:e.unref(d).primaryColor,"onUpdate:modelValue":l[4]||(l[4]=h=>e.unref(d).primaryColor=h),"color-format":"hex",onChange:l[5]||(l[5]=h=>e.unref(r).setPrimaryColor(e.unref(d).primaryColor))},null,8,["modelValue"])]),e.createVNode(_,{type:"warning",onClick:e.unref(r).reset},{default:e.withCtx(()=>[e.createTextVNode(" 重置当前配置 ")]),_:1},8,["onClick"])])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-b9f65c6d"]]),F={install(o){o.component("skin-config",O)}},Ce={install(o){var i,t,a,r,d,x;(i=N.install)==null||i.call(N,o),(t=B.install)==null||t.call(B,o),(a=$.install)==null||a.call($,o),(r=M.install)==null||r.call(M,o),(d=I.install)==null||d.call(I,o),(x=F.install)==null||x.call(F,o)}};b.Button=U,b.ButtonPlugin=N,b.Foo=q,b.FooPlugin=B,b.MInline=H,b.MInlinePlugin=I,b.MInputNumber=A,b.MInputNumberPlugin=M,b.SkinConfig=O,b.SkinConfigPlugin=F,b.TabPage=W,b.TabPagePlugin=$,b.default=Ce,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
+ `,document.head.appendChild(K);const D=e.defineComponent({__name:"index",emits:["click"],setup(o,{emit:i}){const t=i;return(a,r)=>(e.openBlock(),e.createElementBlock("button",{class:"my-button",onClick:r[0]||(r[0]=d=>t("click",d))},[e.renderSlot(a.$slots,"default",{},void 0,!0)]))}}),S=(o,i)=>{const t=o.__vccOpts||o;for(const[a,r]of i)t[a]=r;return t},U=S(D,[["__scopeId","data-v-2a480934"]]),N={install(o){o.component("my-button",U)}},L={},R={class:"my-foo"};function J(o,i){return e.openBlock(),e.createElementBlock("div",R," 我是测试组件组件 ")}const q=S(L,[["render",J],["__scopeId","data-v-1f1035fb"]]),B={install(o){o.component("my-foo",q)}},E=o=>(e.pushScopeId("data-v-edfffe70"),o=o(),e.popScopeId(),o),Y={class:"g-box"},G=[E(()=>e.createElementVNode("svg",{t:"1704703004061",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4356",width:"16",height:"16"},[e.createElementVNode("path",{d:"M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",fill:"#272636","p-id":"4357"})],-1))],X={class:"g-dionysus-box"},Q=["data-active","data-active-before","data-active-after","onMouseenter","data-hover","data-hover-before","data-hover-after","onClick"],Z={class:"u-gp"},ee=E(()=>e.createElementVNode("i",{class:"u-icon j-icon"},null,-1)),te={class:"u-sn"},oe=["onClick"],ae=[E(()=>e.createElementVNode("i",{class:"s-icon"},null,-1))],ne={class:"u-icon-box"},re=[E(()=>e.createElementVNode("svg",{t:"1704703004061",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4356",width:"16",height:"16"},[e.createElementVNode("path",{d:"M671.807 927.804l-415.632-415.804 415.632-415.803 63.445 63.616-352.017 352.209 352.017 352.102z",fill:"#272636","p-id":"4357"})],-1))],W=S(e.defineComponent({__name:"index",props:{modelValue:{default:()=>[]},activeKey:{default:""},showRightClickMenu:{type:Boolean,default:!1},primaryColor:{default:"#646CFFFF"},primaryBackgroundColor:{default:null}},emits:["close","click"],setup(o,{emit:i}){const t=n=>({horizontal:n.scrollWidth>n.clientWidth,vertical:n.scrollHeight>n.clientHeight}),a=o,r=(n,p=100)=>{n=n.replace("#","").toLowerCase(),n.length===3&&(n=n.split("").map(T=>T+T).join(""));let s=parseInt(n.substring(0,2),16),v=parseInt(n.substring(2,4),16),V=parseInt(n.substring(4,6),16);return s+=Math.round((255-s)*(p/100)),v+=Math.round((255-v)*(p/100)),V+=Math.round((255-V)*(p/100)),s=s.toString(16).padStart(2,"0"),v=v.toString(16).padStart(2,"0"),V=V.toString(16).padStart(2,"0"),`#${s}${v}${V}`};e.onMounted(()=>{if(document.documentElement.style.setProperty("--br-dionysus-primary-color",a.primaryColor),a.primaryBackgroundColor)return!1;document.documentElement.style.setProperty("--br-dionysus-primary-bg-color",r(a.primaryColor,90))});const d=e.ref(a.activeKey);e.watch(()=>a.activeKey,n=>{d.value=n});const x=i,c=e.computed(()=>a.modelValue.map(n=>({key:n.key,title:n.title}))),m=()=>{c.value.forEach((n,p)=>{const s=".j-dionysus-list-box .j-li:nth-of-type("+(p+1)+") .j-icon",v=document.querySelector(s);if(!v||v.children.length)return!1;const V=document.querySelector('[data-key="'+n.key+'"]');if(!V)return!1;const T=V.cloneNode(!0);v.appendChild(T)})};e.watch(()=>c.value,()=>{e.nextTick(()=>{m()})}),e.onMounted(()=>{m()});const f=e.ref(!1),l=e.ref(0),g=e.ref(0),C=e.computed(()=>{const n=g.value>l.value?l.value:g.value;return{transform:"translateX(-"+(f.value?n:0)+"px)"}}),u=()=>{g.value=g.value<300?0:g.value-300},y=()=>{g.value=g.value>l.value-300?l.value:g.value+300},k=()=>{const n=document.querySelector(".g-tab-page-box");if(!n)return!1;const{horizontal:p}=t(n);f.value=p,p&&(l.value=n.scrollWidth-n.clientWidth)};e.watch(()=>c.value,()=>{e.nextTick(()=>{k()})}),e.onMounted(()=>{k()});const _=new ResizeObserver(()=>{k()});e.onMounted(()=>{const n=document.querySelector(".g-tab-page-box");if(!n)return!1;_.observe(n)});const j=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===a.activeKey);return n===-1?-1:(p=c.value[n-1])==null?void 0:p.key}),h=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===a.activeKey);return n===-1?-1:(p=c.value[n+1])==null?void 0:p.key}),z=e.ref(2),Se=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===z.value);return n===-1?-1:(p=c.value[n-1])==null?void 0:p.key}),ze=e.computed(()=>{var p;const n=c.value.findIndex(s=>s.key===z.value);return n===-1?-1:(p=c.value[n+1])==null?void 0:p.key}),Ne=n=>{x("click",n)},Be=(n=[])=>{x("close",n)};return(n,p)=>(e.openBlock(),e.createElementBlock("div",Y,[f.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"u-page-btn s-previous-btn",onClick:u},G)):e.createCommentVNode("",!0),e.createElementVNode("div",X,[e.createElementVNode("ul",{class:"g-tab-page-box j-dionysus-list-box",style:e.normalizeStyle(C.value),onMouseleave:p[0]||(p[0]=s=>z.value=-1)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.modelValue,s=>(e.openBlock(),e.createElementBlock("li",{class:"u-li j-li",key:s.key,"data-active":a.activeKey===s.key,"data-active-before":j.value===s.key,"data-active-after":h.value===s.key,onMouseenter:v=>z.value=s.key,"data-hover":z.value===s.key,"data-hover-before":Se.value===s.key,"data-hover-after":ze.value===s.key,onClick:v=>Ne(s.key)},[e.createElementVNode("div",Z,[ee,e.createElementVNode("span",te,e.toDisplayString(s.title),1),e.createElementVNode("div",{class:"u-btn",onClick:e.withModifiers(v=>Be([s.key]),["stop"])},ae,8,oe)])],40,Q))),128))],36)]),e.createElementVNode("div",ne,[e.renderSlot(n.$slots,"icon",{},void 0,!0)]),f.value?(e.openBlock(),e.createElementBlock("button",{key:1,class:"u-page-btn s-next-btn",onClick:y},re)):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-edfffe70"]]),$={install(o){o.component("tab-page",W)}},ie=["data-is-table-mini","data-no-spacing"],le=["data-size","data-thousandth-place","data-focus","value","data-disabled"],A=S(e.defineComponent({__name:"index",props:{modelValue:{type:[String,Number],default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},size:{type:String,default:""},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},step:{type:Number,default:1},stepStrictly:{type:Boolean,default:!0},thousandthPlace:{type:Boolean,default:!1},noBorder:{type:Boolean,default:!1},noSpacing:{type:Boolean,default:!1}},emits:["update:modelValue","change","focus","blur"],setup(o,{emit:i}){const t=o,a=e.reactive({vValue:null,isFocus:!1,vSize:null,isTableMini:!1}),r=i,d=e.computed(()=>(a.vValue||"").toLocaleString("en-US",{maximumFractionDigits:6})),x=e.computed(()=>t.max>=t.min?t.max:t.min);e.watch(()=>t.modelValue,()=>{c()}),e.watch(()=>t.size,()=>{m()});const c=()=>{if(t.modelValue===""||t.modelValue===null||t.modelValue===void 0)return a.vValue=void 0,!1;if(t.modelValue>t.max||t.modelValue<t.min)return r("update:modelValue",a.vValue),!1;a.vValue=t.modelValue},m=()=>{const u={large:"large",small:"small",mini:"mini","table-mini":"mini"};a.vSize=u[t.size],a.isTableMini=t.size==="table-mini"},f=()=>{if(a.vValue===void 0)return r("update:modelValue",null),!1;r("update:modelValue",a.vValue)},l=u=>{if(u===void 0)return r("update:modelValue",null),!1;f(),r("change",u)},g=()=>{a.isFocus=!0,r("focus",a.vValue)},C=()=>{a.isFocus=!1,r("blur",a.vValue)};return c(),m(),(u,y)=>{const k=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",{class:"g-m-input-number-box","data-is-table-mini":a.isTableMini,"data-no-spacing":t.noSpacing},[e.createVNode(k,{class:"m-input-number",modelValue:a.vValue,"onUpdate:modelValue":y[0]||(y[0]=_=>a.vValue=_),size:a.vSize,min:t.min,max:x.value,controls:!1,disabled:t.disabled,placeholder:t.placeholder,step:t.step,stepStrictly:t.stepStrictly,"data-thousandth-place":t.thousandthPlace,"data-focus":a.isFocus,noBorder:t.noBorder,onChange:y[1]||(y[1]=_=>{l(_),f()}),onFocus:g,onBlur:C},null,8,["modelValue","size","min","max","disabled","placeholder","step","stepStrictly","data-thousandth-place","data-focus","noBorder"]),t.thousandthPlace?(e.openBlock(),e.createElementBlock("input",{key:0,class:"u-text",type:"text","data-size":a.vSize,"data-thousandth-place":t.thousandthPlace,"data-focus":a.isFocus,value:d.value,"data-disabled":t.disabled,readonly:""},null,8,le)):e.createCommentVNode("",!0)],8,ie)}}}),[["__scopeId","data-v-0539abf7"]]),M={install(o){o.component("m-input-number",A)}},de={class:"g-inline-box"},se={key:1,class:"m-inline",dataCover:""},ce=["data-unfold","data-single-line"],fe={class:"u-btn-gp"},H=S(e.defineComponent({__name:"index",props:{minWidth:{default:"200px"},maxWidth:{default:"300px"}},emits:["switch"],setup(o,{emit:i}){const t=o,a=(u=24)=>Array.from(Array(Number(u)||24),()=>Math.floor(Math.random()*36).toString(36)).join(""),r=()=>{document.documentElement.style.setProperty("--m-inline-min-width",t.minWidth),document.documentElement.style.setProperty("--m-inline-max-width",t.maxWidth)};e.watch(()=>[t.minWidth,t.maxWidth],()=>{r()}),r();const d=e.useSlots(),x=i,c="j-"+a(8),m=()=>{const u=document.querySelector("."+c+" [data-box]");if(!u)return!1;const y=u.querySelectorAll("."+c+" [data-item]");return u.clientWidth<y.length*200},f=new ResizeObserver(()=>{l.value=m()}),l=e.ref(!1);e.onMounted(()=>{const u=document.querySelector("[data-box]");if(!u)return!1;l.value=m(),f.observe(u)});const g=e.ref(!1),C=()=>{g.value=!g.value,x("switch",g.value)};return(u,y)=>{const k=e.resolveComponent("DArrowRight"),_=e.resolveComponent("el-icon");return e.openBlock(),e.createElementBlock("div",de,[e.unref(d).inlineBtn?(e.openBlock(),e.createElementBlock("div",{key:0,class:"m-inline-btn",onClick:m},[e.renderSlot(u.$slots,"inlineBtn",{},void 0,!0)])):e.createCommentVNode("",!0),e.unref(d).default?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",{class:e.normalizeClass(["u-row",c]),"data-unfold":g.value,"data-single-line":!l.value},[e.renderSlot(u.$slots,"default",{},void 0,!0)],8,ce),e.createElementVNode("div",fe,[e.renderSlot(u.$slots,"submitBtn",{},void 0,!0),l.value?(e.openBlock(),e.createBlock(_,{key:0,class:"u-btn-unfold",onClick:C,"data-unfold":g.value},{default:e.withCtx(()=>[e.createVNode(k)]),_:1},8,["data-unfold"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-6b32beca"]]),I={install(o){o.component("m-inline",H)}},w=(o,i=100)=>{o=o.replace("#","").toLowerCase(),o.length===3&&(o=o.split("").map(d=>d+d).join(""));let t=parseInt(o.substring(0,2),16),a=parseInt(o.substring(2,4),16),r=parseInt(o.substring(4,6),16);return i>0&&(t+=Math.round((255-t)*(i/100)),a+=Math.round((255-a)*(i/100)),r+=Math.round((255-r)*(i/100))),i<=0&&(t+=Math.round(t*(i/100)),a+=Math.round(a*(i/100)),r+=Math.round(r*(i/100))),t=t.toString(16).padStart(2,"0"),a=a.toString(16).padStart(2,"0"),r=r.toString(16).padStart(2,"0"),`#${t}${a}${r}`},pe=()=>{const o={darkTheme:!1,followSystem:!1,primaryColor:"#646CFF"};localStorage.getItem("skinConfig")===null&&localStorage.setItem("skinConfig",JSON.stringify(o));const i=e.reactive(JSON.parse(localStorage.getItem("skinConfig"))),t=c=>{i.primaryColor=c,r(),x()},a=()=>{i.darkTheme=o.darkTheme,i.followSystem=o.followSystem,i.primaryColor=o.primaryColor,r(),x()},r=()=>{const c=i.darkTheme||i.followSystem&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,m=l=>c?-l:l,f=document.documentElement.style;f.setProperty("--el-color-primary",i.primaryColor),f.setProperty("--el-color-primary-dark-2",w(i.primaryColor,m(50))),f.setProperty("--el-color-primary-light-3",w(i.primaryColor,m(25))),f.setProperty("--el-color-primary-light-5",w(i.primaryColor,m(40))),f.setProperty("--el-color-primary-light-7",w(i.primaryColor,m(60))),f.setProperty("--el-color-primary-light-8",w(i.primaryColor,m(75))),f.setProperty("--el-color-primary-light-9",w(i.primaryColor,m(90))),f.setProperty("--m-scrollbar-thumb-color",w(i.primaryColor,m(70))),f.setProperty("--m-scrollbar-thumb-hover-color",w(i.primaryColor,m(50))),d(c)},d=(c=!1)=>{document.documentElement.setAttribute("data-dark",String(c))},x=()=>{localStorage.setItem("skinConfig",JSON.stringify(i))};return{skinConfig:i,reset:a,setPrimaryColor:t,apply:r,save:x,switchDark:d}},P=o=>(e.pushScopeId("data-v-b9f65c6d"),o=o(),e.popScopeId(),o),ue={class:"g-skin-config-box"},be=[P(()=>e.createElementVNode("svg",{t:"1706517168459",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4378",width:"24",height:"24"},[e.createElementVNode("path",{d:"M533.333333 853.333333c179.2 0 320-145.066667 320-320S708.266667 213.333333 533.333333 213.333333 213.333333 358.4 213.333333 533.333333c0 93.866667 34.133333 132.266667 115.2 157.866667 8.533333 4.266667 12.8 4.266667 21.333334 8.533333 4.266667 0 21.333333 4.266667 21.333333 8.533334 51.2 17.066667 76.8 25.6 98.133333 51.2 17.066667 17.066667 29.866667 38.4 42.666667 59.733333 4.266667 8.533333 8.533333 17.066667 8.533333 21.333333 8.533333 0 8.533333 8.533333 12.8 12.8z m0 42.666667c-59.733333 0-21.333333-42.666667-89.6-110.933333-64-64-273.066667-25.6-273.066666-251.733334C170.666667 332.8 332.8 170.666667 533.333333 170.666667S896 332.8 896 533.333333 733.866667 896 533.333333 896z m72.533334-106.666667c-42.666667 0-76.8-34.133333-76.8-76.8s34.133333-72.533333 76.8-72.533333 76.8 34.133333 76.8 72.533333-34.133333 76.8-76.8 76.8z m0-42.666666c17.066667 0 34.133333-12.8 34.133333-34.133334s-12.8-29.866667-34.133333-29.866666-34.133333 12.8-34.133334 29.866666 17.066667 34.133333 34.133334 34.133334zM640 384c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z m-119.466667-34.133333c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666667zM725.333333 469.333333c-25.6 0-42.666667-17.066667-42.666666-42.666666s17.066667-42.666667 42.666666-42.666667 42.666667 17.066667 42.666667 42.666667-17.066667 42.666667-42.666667 42.666666zM405.333333 384c-25.6 0-42.666667-17.066667-42.666666-42.666667s17.066667-42.666667 42.666666-42.666666 42.666667 17.066667 42.666667 42.666666-17.066667 42.666667-42.666667 42.666667z",fill:"#444444","p-id":"4379"})],-1))],me=P(()=>e.createElementVNode("h2",{class:"u-tt"},"主题配置",-1)),ge={class:"u-box"},he={class:"u-group"},xe=P(()=>e.createElementVNode("label",null,"深色主题",-1)),ve={class:"u-group"},ye=P(()=>e.createElementVNode("label",null,"跟随系统",-1)),ke={class:"u-list"},_e=["onClick"],we={class:"u-pc"},O=S(e.defineComponent({__name:"index",setup(o,{expose:i}){const t=e.ref(!1),a=()=>{t.value=!0},r=pe(),d=r.skinConfig,x=["#1690ff","#419eff","#007aff","#59c8fa","#646CFF","#536dfe","#646cff","#9c28b0","#af52de","#0096c7","#04c1d4","#35c759","#42a047","#7cb342","#c0ca34","#78dec7","#e53834","#d81a60","#f4511e","#fb8c01","#ffb300","#fdd835","#6d4c41","#546e7a"],c=f=>({background:f});return e.onMounted(()=>{r.apply()}),i({setSkin:f=>{d.darkTheme=f.darkTheme,d.followSystem=f.followSystem,d.primaryColor=f.primaryColor,r.apply(),r.save()}}),(f,l)=>{const g=e.resolveComponent("el-divider"),C=e.resolveComponent("el-switch"),u=e.resolveComponent("Check"),y=e.resolveComponent("el-icon"),k=e.resolveComponent("el-color-picker"),_=e.resolveComponent("el-button"),j=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",{class:"u-btn",onClick:a},be),e.createVNode(j,{modelValue:t.value,"onUpdate:modelValue":l[6]||(l[6]=h=>t.value=h),direction:"rtl",withHeader:!1,size:"300"},{default:e.withCtx(()=>[me,e.createElementVNode("div",ge,[e.createVNode(g,{class:"u-box-tt"},{default:e.withCtx(()=>[e.createTextVNode("主题模式")]),_:1}),e.createElementVNode("div",he,[xe,e.createVNode(C,{modelValue:e.unref(d).darkTheme,"onUpdate:modelValue":l[0]||(l[0]=h=>e.unref(d).darkTheme=h),onChange:l[1]||(l[1]=h=>{e.unref(r).apply(),e.unref(r).save()})},null,8,["modelValue"])]),e.createElementVNode("div",ve,[ye,e.createVNode(C,{modelValue:e.unref(d).followSystem,"onUpdate:modelValue":l[2]||(l[2]=h=>e.unref(d).followSystem=h),onChange:l[3]||(l[3]=h=>{e.unref(r).apply(),e.unref(r).save()})},null,8,["modelValue"])]),e.createVNode(g,{class:"u-box-tt"},{default:e.withCtx(()=>[e.createTextVNode("系统主题")]),_:1}),e.createElementVNode("ul",ke,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(x,h=>e.createElementVNode("li",{class:"u-li",key:h},[e.createElementVNode("div",{class:"u-color",style:e.normalizeStyle(c(h)),onClick:z=>e.unref(r).setPrimaryColor(h)},[e.unref(d).primaryColor===h?(e.openBlock(),e.createBlock(y,{key:0},{default:e.withCtx(()=>[e.createVNode(u)]),_:1})):e.createCommentVNode("",!0)],12,_e)])),64))]),e.createElementVNode("div",we,[e.createVNode(k,{modelValue:e.unref(d).primaryColor,"onUpdate:modelValue":l[4]||(l[4]=h=>e.unref(d).primaryColor=h),"color-format":"hex",onChange:l[5]||(l[5]=h=>e.unref(r).setPrimaryColor(e.unref(d).primaryColor))},null,8,["modelValue"])]),e.createVNode(_,{type:"warning",onClick:e.unref(r).reset},{default:e.withCtx(()=>[e.createTextVNode(" 重置当前配置 ")]),_:1},8,["onClick"])])]),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-b9f65c6d"]]),F={install(o){o.component("skin-config",O)}},Ce=()=>{console.log("aaa")},Ve={install(o){var i,t,a,r,d,x;(i=N.install)==null||i.call(N,o),(t=B.install)==null||t.call(B,o),(a=$.install)==null||a.call($,o),(r=M.install)==null||r.call(M,o),(d=I.install)==null||d.call(I,o),(x=F.install)==null||x.call(F,o)}};b.Button=U,b.ButtonPlugin=N,b.Foo=q,b.FooPlugin=B,b.MInline=H,b.MInlinePlugin=I,b.MInputNumber=A,b.MInputNumberPlugin=M,b.SkinConfig=O,b.SkinConfigPlugin=F,b.TabPage=W,b.TabPagePlugin=$,b.default=Ve,b.hook=Ce,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,2 @@
1
+ declare const myTest: () => void;
2
+ export default myTest;
@@ -1,4 +1,5 @@
1
1
  import { Plugin } from 'vue';
2
+ import hook from './Hook';
2
3
  declare const BrPlugin: Plugin;
3
4
  export default BrPlugin;
4
5
  export * from './Button';
@@ -7,3 +8,4 @@ export * from './TabPage';
7
8
  export * from './MInputNumber';
8
9
  export * from './MInline';
9
10
  export * from './SkinConfig';
11
+ export { hook };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "br-dionysus",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "scripts": {
5
5
  "dev": "vite --config ./build/base.config.ts",
6
6
  "build:doc": "vue-tsc --noEmit && vite build --config ./build/doc.config.ts && node script/copyDir.js",
@@ -0,0 +1,5 @@
1
+ const myTest = (): void => {
2
+ console.log('aaa')
3
+ }
4
+
5
+ export default myTest
package/packages/index.ts CHANGED
@@ -8,6 +8,7 @@ import { TabPagePlugin } from './TabPage'
8
8
  import { MInputNumberPlugin } from './MInputNumber'
9
9
  import { MInlinePlugin } from './MInline'
10
10
  import { SkinConfigPlugin } from 'packages/SkinConfig'
11
+ import hook from 'packages/Hook'
11
12
 
12
13
  const BrPlugin: Plugin = {
13
14
  install(app: App) {
@@ -28,3 +29,5 @@ export * from './TabPage'
28
29
  export * from './MInputNumber'
29
30
  export * from './MInline'
30
31
  export * from './SkinConfig'
32
+
33
+ export { hook }