@dazhicheng/ui 1.5.210 → 1.5.211
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.
|
@@ -71,7 +71,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
71
71
|
isFirstLoaded: te,
|
|
72
72
|
buildOptionGroups: ae
|
|
73
73
|
} = tl(t), a = We(F, "modelValue"), B = u(() => t.disabled);
|
|
74
|
-
function
|
|
74
|
+
function g(e) {
|
|
75
75
|
if (e === t.showAllField) return { label: "全部", value: t.showAllField };
|
|
76
76
|
const l = f.value.find((o) => o.value === e);
|
|
77
77
|
return l ? { label: l.label, value: l.value } : { label: String(e), value: e };
|
|
@@ -83,12 +83,12 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
83
83
|
const P = u({
|
|
84
84
|
get() {
|
|
85
85
|
if (t.multiple)
|
|
86
|
-
return (Array.isArray(a.value) ? a.value : a.value === void 0 ? [] : [a.value]).map((l) =>
|
|
86
|
+
return (Array.isArray(a.value) ? a.value : a.value === void 0 ? [] : [a.value]).map((l) => g(l));
|
|
87
87
|
if (Array.isArray(a.value)) {
|
|
88
88
|
const e = a.value.at(-1);
|
|
89
|
-
return e === void 0 ? void 0 :
|
|
89
|
+
return e === void 0 ? void 0 : g(e);
|
|
90
90
|
}
|
|
91
|
-
return a.value === void 0 ? void 0 :
|
|
91
|
+
return a.value === void 0 ? void 0 : g(a.value);
|
|
92
92
|
},
|
|
93
93
|
set(e) {
|
|
94
94
|
if (t.multiple) {
|
|
@@ -99,7 +99,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
99
99
|
const l = E(e);
|
|
100
100
|
a.value = l;
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
102
|
+
}), k = u({
|
|
103
103
|
get() {
|
|
104
104
|
return Array.isArray(a.value) ? t.multiple ? a.value : a.value.slice(-1) : a.value === void 0 ? [] : [a.value];
|
|
105
105
|
},
|
|
@@ -187,20 +187,20 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
187
187
|
handleOptionCheck: ye,
|
|
188
188
|
handleOptionsCheck: we,
|
|
189
189
|
handleCheckAll: T,
|
|
190
|
-
removeSelected:
|
|
190
|
+
removeSelected: ge
|
|
191
191
|
} = al({
|
|
192
192
|
multiple: u(() => t.multiple),
|
|
193
193
|
modelValue: a,
|
|
194
|
-
selectedValues:
|
|
194
|
+
selectedValues: k,
|
|
195
195
|
leafNodes: f,
|
|
196
196
|
allValue: u(() => t.showAllField)
|
|
197
|
-
}),
|
|
197
|
+
}), ke = u(() => y.value.reduce(
|
|
198
198
|
(e, l) => (e[String(l.value)] = me(l), e),
|
|
199
199
|
{}
|
|
200
200
|
)), Ce = u(() => y.value.reduce(
|
|
201
201
|
(e, l) => (e[String(l.value)] = fe(l), e),
|
|
202
202
|
{}
|
|
203
|
-
)), Ae = u(() =>
|
|
203
|
+
)), Ae = u(() => k.value.includes(t.showAllField)), W = u(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...f.value.map((l) => ({ ...l }))]);
|
|
204
204
|
function xe(e) {
|
|
205
205
|
const l = n(W);
|
|
206
206
|
if (Array.isArray(e))
|
|
@@ -278,7 +278,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
278
278
|
}
|
|
279
279
|
function Le(e) {
|
|
280
280
|
d(() => {
|
|
281
|
-
|
|
281
|
+
ge(e);
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
284
|
function _e() {
|
|
@@ -323,7 +323,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
323
323
|
filterable: !1,
|
|
324
324
|
placeholder: e.placeholder,
|
|
325
325
|
disabled: e.disabled,
|
|
326
|
-
"popper-class": `${n(c)}__popper`,
|
|
326
|
+
"popper-class": `${n(c)}__popper vxe-table--ignore-clear`,
|
|
327
327
|
onVisibleChange: Fe
|
|
328
328
|
}), {
|
|
329
329
|
empty: Ke(() => [
|
|
@@ -357,12 +357,12 @@ const p = 4, Fl = /* @__PURE__ */ Te({
|
|
|
357
357
|
"show-all": t.showAll,
|
|
358
358
|
"option-per-row": p,
|
|
359
359
|
"row-height": 40,
|
|
360
|
-
"selected-values":
|
|
360
|
+
"selected-values": k.value,
|
|
361
361
|
"is-all-checked": n(ce),
|
|
362
362
|
"is-indeterminate": n(pe),
|
|
363
363
|
"all-checked": Ae.value,
|
|
364
364
|
"scroll-to-group-value": b.value,
|
|
365
|
-
"group-checked-map":
|
|
365
|
+
"group-checked-map": ke.value,
|
|
366
366
|
"group-indeterminate-map": Ce.value,
|
|
367
367
|
"paste-search": e.pasteSearch,
|
|
368
368
|
separator: e.separator,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, mergeModels as m, useModel as k, useAttrs as P, computed as w, ref as d, watch as x, createBlock as L, openBlock as M, unref as c, mergeProps as R, createSlots as S, renderList as $, withCtx as z, renderSlot as A, normalizeProps as D, guardReactiveProps as F } from "vue";
|
|
2
2
|
import "../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
|
|
3
|
-
import { useDesign as
|
|
3
|
+
import { useDesign as G } from "../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
|
-
import { useFormItem as
|
|
5
|
+
import { useFormItem as U, ElRadioGroup as E } from "element-plus";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
import "xe-utils";
|
|
8
8
|
import "dayjs/plugin/utc";
|
|
@@ -12,12 +12,12 @@ import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
|
12
12
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
13
13
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
14
14
|
import "../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
15
|
-
import { omit as
|
|
16
|
-
const
|
|
15
|
+
import { omit as f } from "lodash-es";
|
|
16
|
+
const ee = /* @__PURE__ */ B({
|
|
17
17
|
name: "TtRadioGroup",
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "index",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ m({
|
|
21
21
|
id: {},
|
|
22
22
|
size: {},
|
|
23
23
|
disabled: { type: Boolean },
|
|
@@ -35,46 +35,46 @@ const _ = /* @__PURE__ */ y({
|
|
|
35
35
|
modelValue: { type: [String, Number, Boolean] },
|
|
36
36
|
modelModifiers: {}
|
|
37
37
|
}),
|
|
38
|
-
emits: /* @__PURE__ */
|
|
39
|
-
setup(i, { emit:
|
|
40
|
-
const l = i, a = k(i, "modelValue"), s =
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
})), r =
|
|
44
|
-
async function
|
|
38
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
39
|
+
setup(i, { emit: g }) {
|
|
40
|
+
const l = i, a = k(i, "modelValue"), s = g, v = P(), { prefixCls: h } = G("radio-group"), C = w(() => ({
|
|
41
|
+
...f(l, ["clearable", "beforeChange", "modelValue"]),
|
|
42
|
+
...f(v, ["onUpdate:modelValue", "onChange", "class"])
|
|
43
|
+
})), r = d(a.value), { formItem: n } = U(), u = d(!1);
|
|
44
|
+
async function b(e) {
|
|
45
45
|
const o = a.value;
|
|
46
46
|
let t = !0;
|
|
47
47
|
l.beforeChange && (t = await l.beforeChange(e, o)), t ? (a.value = e, s("change", e)) : r.value = o;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function V(e) {
|
|
50
50
|
if (!l.clearable) return;
|
|
51
51
|
const t = e.target.closest(".el-radio, .el-radio-button");
|
|
52
52
|
t != null && t.classList.contains("is-checked") && (e.stopPropagation(), e.preventDefault(), a.value = void 0, r.value = void 0, s("change", void 0));
|
|
53
53
|
}
|
|
54
|
-
return
|
|
54
|
+
return x(
|
|
55
55
|
a,
|
|
56
56
|
(e) => {
|
|
57
57
|
r.value = e, u.value && (n == null || n.validate("change").catch((o) => {
|
|
58
58
|
})), u.value = !0;
|
|
59
59
|
},
|
|
60
60
|
{ immediate: !0 }
|
|
61
|
-
), (e, o) => (
|
|
61
|
+
), (e, o) => (M(), L(c(E), R(C.value, {
|
|
62
62
|
modelValue: r.value,
|
|
63
63
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
64
|
-
class: [c(
|
|
64
|
+
class: [c(h), e.$attrs.class],
|
|
65
65
|
"validate-event": !1,
|
|
66
|
-
onClickCapture:
|
|
67
|
-
onChange:
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
name:
|
|
71
|
-
fn:
|
|
72
|
-
|
|
66
|
+
onClickCapture: V,
|
|
67
|
+
onChange: b
|
|
68
|
+
}), S({ _: 2 }, [
|
|
69
|
+
$(e.$slots, (t, p) => ({
|
|
70
|
+
name: p,
|
|
71
|
+
fn: z((y) => [
|
|
72
|
+
A(e.$slots, p, D(F(y)))
|
|
73
73
|
])
|
|
74
74
|
}))
|
|
75
75
|
]), 1040, ["modelValue", "class"]));
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
ee as default
|
|
80
80
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.211",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"vue-router": "^5.0.2",
|
|
68
68
|
"vxe-pc-ui": "^4.12.36",
|
|
69
69
|
"vxe-table": "^4.17.48",
|
|
70
|
-
"@dazhicheng/
|
|
71
|
-
"@dazhicheng/
|
|
70
|
+
"@dazhicheng/hooks": "1.4.44",
|
|
71
|
+
"@dazhicheng/utils": "1.3.41"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"dist"
|