@dazhicheng/ui 1.5.212 → 1.5.215
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.
|
@@ -41,7 +41,11 @@ export declare const TtRadioGroup: import('../../../../utils/src').SFCWithInstal
|
|
|
41
41
|
change: (val: import('./type').TtRadioGroupValueType | undefined) => any;
|
|
42
42
|
"update:modelValue": (value: import('./type').TtRadioGroupValueType) => any;
|
|
43
43
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
44
|
-
$slots:
|
|
44
|
+
$slots: Readonly<{
|
|
45
|
+
default?: () => import('vue').VNodeChild;
|
|
46
|
+
}> & {
|
|
47
|
+
default?: () => import('vue').VNodeChild;
|
|
48
|
+
};
|
|
45
49
|
})> & Record<string, any>;
|
|
46
50
|
export default TtRadioGroup;
|
|
47
51
|
export type TtRadioGroupInstance = InstanceType<typeof TtRadioGroup>;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { TtRadioGroupProp, TtRadioGroupValueType } from './type';
|
|
2
|
+
import { VNodeChild } from 'vue';
|
|
2
3
|
type __VLS_Props = TtRadioGroupProp;
|
|
3
4
|
type __VLS_PublicProps = {
|
|
4
5
|
modelValue?: TtRadioGroupValueType;
|
|
5
6
|
} & __VLS_Props;
|
|
6
7
|
declare function __VLS_template(): {
|
|
7
8
|
attrs: Partial<{}>;
|
|
8
|
-
slots:
|
|
9
|
+
slots: Readonly<{
|
|
10
|
+
/** 单选项内容 */
|
|
11
|
+
default?: () => VNodeChild;
|
|
12
|
+
}> & {
|
|
13
|
+
/** 单选项内容 */
|
|
14
|
+
default?: () => VNodeChild;
|
|
15
|
+
};
|
|
9
16
|
refs: {};
|
|
10
17
|
rootEl: any;
|
|
11
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, mergeModels as d, useModel as y, useAttrs as B, computed as k, ref as p, watch as x, createBlock as w, openBlock as L, unref as m, mergeProps as M, withCtx as P, renderSlot as A } 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 D } from "../../packages/hooks/src/useDesign.js";
|
|
4
4
|
import "axios";
|
|
5
|
-
import { useFormItem as
|
|
5
|
+
import { useFormItem as F, ElRadioGroup as G } 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 c } from "lodash-es";
|
|
16
|
+
const O = /* @__PURE__ */ V({
|
|
17
17
|
name: "TtRadioGroup",
|
|
18
18
|
inheritAttrs: !1,
|
|
19
19
|
__name: "index",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ d({
|
|
21
21
|
id: {},
|
|
22
22
|
size: {},
|
|
23
23
|
disabled: { type: Boolean },
|
|
@@ -35,46 +35,44 @@ const ee = /* @__PURE__ */ B({
|
|
|
35
35
|
modelValue: { type: [String, Number, Boolean] },
|
|
36
36
|
modelModifiers: {}
|
|
37
37
|
}),
|
|
38
|
-
emits: /* @__PURE__ */
|
|
39
|
-
setup(
|
|
40
|
-
const
|
|
41
|
-
...
|
|
42
|
-
...
|
|
43
|
-
})), r =
|
|
44
|
-
async function
|
|
45
|
-
const o =
|
|
38
|
+
emits: /* @__PURE__ */ d(["change"], ["update:modelValue"]),
|
|
39
|
+
setup(n, { emit: f }) {
|
|
40
|
+
const a = n, l = y(n, "modelValue"), s = f, g = B(), { prefixCls: v } = D("radio-group"), h = k(() => ({
|
|
41
|
+
...c(a, ["clearable", "beforeChange", "modelValue"]),
|
|
42
|
+
...c(g, ["onUpdate:modelValue", "onChange", "class"])
|
|
43
|
+
})), r = p(l.value), { formItem: i } = F(), u = p(!1);
|
|
44
|
+
async function C(e) {
|
|
45
|
+
const o = l.value;
|
|
46
46
|
let t = !0;
|
|
47
|
-
|
|
47
|
+
a.beforeChange && (t = await a.beforeChange(e, o)), t ? (l.value = e, s("change", e)) : r.value = o;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
if (!
|
|
49
|
+
function b(e) {
|
|
50
|
+
if (!a.clearable || a.disabled) return;
|
|
51
51
|
const t = e.target.closest(".el-radio, .el-radio-button");
|
|
52
|
-
t != null && t.classList.contains("is-checked") && (e.stopPropagation(), e.preventDefault(),
|
|
52
|
+
t != null && t.classList.contains("is-checked") && (t.classList.contains("is-disabled") || (e.stopPropagation(), e.preventDefault(), l.value = void 0, r.value = void 0, s("change", void 0)));
|
|
53
53
|
}
|
|
54
54
|
return x(
|
|
55
|
-
|
|
55
|
+
l,
|
|
56
56
|
(e) => {
|
|
57
|
-
r.value = e, u.value && (
|
|
57
|
+
r.value = e, u.value && (i == null || i.validate("change").catch((o) => {
|
|
58
58
|
})), u.value = !0;
|
|
59
59
|
},
|
|
60
60
|
{ immediate: !0 }
|
|
61
|
-
), (e, o) => (
|
|
61
|
+
), (e, o) => (L(), w(m(G), M(h.value, {
|
|
62
62
|
modelValue: r.value,
|
|
63
63
|
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
64
|
-
class: [
|
|
64
|
+
class: [m(v), e.$attrs.class],
|
|
65
65
|
"validate-event": !1,
|
|
66
|
-
onClickCapture:
|
|
67
|
-
onChange:
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}))
|
|
75
|
-
]), 1040, ["modelValue", "class"]));
|
|
66
|
+
onClickCapture: b,
|
|
67
|
+
onChange: C
|
|
68
|
+
}), {
|
|
69
|
+
default: P(() => [
|
|
70
|
+
A(e.$slots, "default")
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
}, 16, ["modelValue", "class"]));
|
|
76
74
|
}
|
|
77
75
|
});
|
|
78
76
|
export {
|
|
79
|
-
|
|
77
|
+
O as default
|
|
80
78
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { queryDataPermissionDetailDataTypeContext as
|
|
2
|
-
import { ref as
|
|
3
|
-
import { useRoute as
|
|
4
|
-
const c = /* @__PURE__ */ new Map(),
|
|
5
|
-
let
|
|
6
|
-
const
|
|
1
|
+
import { queryDataPermissionDetailDataTypeContext as L, pageUser as R } from "../api/dataTypeContext.js";
|
|
2
|
+
import { ref as U, watchEffect as b, unref as O, watch as M, computed as V } from "vue";
|
|
3
|
+
import { useRoute as _ } from "vue-router";
|
|
4
|
+
const c = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
|
|
5
|
+
let D, h;
|
|
6
|
+
const j = "all", E = { label: "全部", value: j }, z = {
|
|
7
7
|
platformId: ["platformName", "platformId"],
|
|
8
8
|
shopId: ["shopName", "shopId"],
|
|
9
9
|
purchasePlaceId: ["purchasePlaceName", "purchasePlaceCode"],
|
|
@@ -11,114 +11,117 @@ const V = "all", _ = { label: "全部", value: V }, j = {
|
|
|
11
11
|
lockUserId: ["userName", "userId"],
|
|
12
12
|
userId: ["fullName", "id"]
|
|
13
13
|
};
|
|
14
|
-
async function
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
|
|
18
|
-
const l =
|
|
19
|
-
return
|
|
14
|
+
async function k() {
|
|
15
|
+
if (D) return D;
|
|
16
|
+
if (h) return h;
|
|
17
|
+
h = R({ pageNo: 1, pageSize: 9999 }).then((n) => {
|
|
18
|
+
const l = n.records || [];
|
|
19
|
+
return D = l, l;
|
|
20
20
|
});
|
|
21
21
|
try {
|
|
22
|
-
return await
|
|
22
|
+
return await h;
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
h = void 0;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const l =
|
|
29
|
-
function
|
|
30
|
-
|
|
27
|
+
function J(n) {
|
|
28
|
+
const l = _(), v = U({});
|
|
29
|
+
function m(t = {}) {
|
|
30
|
+
v.value = n.codes.reduce(
|
|
31
31
|
(e, r) => {
|
|
32
|
-
const [s, d] =
|
|
33
|
-
const
|
|
32
|
+
const [s, d] = z[r], g = (t[r] || []).map((f) => {
|
|
33
|
+
const o = r === "purchasePlaceId" ? f.purchaseInfo || {} : f;
|
|
34
34
|
return {
|
|
35
35
|
...f,
|
|
36
|
-
label:
|
|
37
|
-
value:
|
|
36
|
+
label: o == null ? void 0 : o[s],
|
|
37
|
+
value: o == null ? void 0 : o[d]
|
|
38
38
|
};
|
|
39
39
|
});
|
|
40
|
-
return e[r] =
|
|
40
|
+
return e[r] = g, e;
|
|
41
41
|
},
|
|
42
42
|
{}
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function A(t) {
|
|
46
46
|
var e;
|
|
47
|
-
return typeof
|
|
47
|
+
return typeof n.showAll == "boolean" ? n.showAll : ((e = n.showAll) == null ? void 0 : e[t]) ?? !1;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
49
|
+
function x() {
|
|
50
|
+
C.clear(), c.clear(), p.clear(), D = void 0, h = void 0;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function T(t) {
|
|
53
53
|
c.delete(t);
|
|
54
54
|
}
|
|
55
|
-
async function
|
|
56
|
-
const e = l.path, r =
|
|
55
|
+
async function S(t = !1) {
|
|
56
|
+
const e = l.path, r = O(n.dataSource);
|
|
57
57
|
if (r) {
|
|
58
58
|
const i = { ...c.get(e) || {}, ...r };
|
|
59
|
-
c.set(e, i),
|
|
59
|
+
c.set(e, i), m(i);
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const s = c.get(e) || {};
|
|
63
|
-
let d = t ? [...
|
|
63
|
+
let d = t ? [...n.codes] : n.codes.filter((a) => !Object.prototype.hasOwnProperty.call(s, a));
|
|
64
64
|
if (!d.length) {
|
|
65
|
-
|
|
65
|
+
m(s);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
if (c.set(e,
|
|
72
|
-
|
|
68
|
+
const g = t ? void 0 : C.get(e);
|
|
69
|
+
if (g) {
|
|
70
|
+
const a = await g, u = { ...c.get(e) || {}, ...a };
|
|
71
|
+
if (c.set(e, u), d = n.codes.filter((y) => !Object.prototype.hasOwnProperty.call(u, y)), !d.length) {
|
|
72
|
+
m(u);
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
const f = d.filter((
|
|
77
|
-
f.length ?
|
|
78
|
-
(
|
|
76
|
+
const f = d.filter((a) => a !== "userId"), o = d.includes("userId"), q = Promise.allSettled([
|
|
77
|
+
f.length ? L({ dataTypeName: f }).then(
|
|
78
|
+
(a) => a
|
|
79
79
|
) : Promise.resolve([]),
|
|
80
|
-
|
|
81
|
-
]).then(([
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
o ? k() : Promise.resolve(void 0)
|
|
81
|
+
]).then(([a, i]) => {
|
|
82
|
+
const u = a.status === "fulfilled" ? a.value : [], y = i.status === "fulfilled" ? i.value : void 0;
|
|
83
|
+
return {
|
|
84
|
+
...y ? { userId: y } : {},
|
|
85
|
+
...u.reduce((P, I) => {
|
|
86
|
+
const N = I == null ? void 0 : I.dataTypeCode;
|
|
87
|
+
return N && (P[N] = I.originalItems || []), P;
|
|
88
|
+
}, {})
|
|
89
|
+
};
|
|
90
|
+
}), w = (p.get(e) || 0) + 1;
|
|
91
|
+
p.set(e, w), C.set(e, q);
|
|
89
92
|
try {
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
c.set(e,
|
|
93
|
+
const a = await q;
|
|
94
|
+
if (p.get(e) !== w) return;
|
|
95
|
+
const u = { ...c.get(e) || {}, ...a };
|
|
96
|
+
c.set(e, u), m(u);
|
|
94
97
|
} finally {
|
|
95
|
-
|
|
98
|
+
p.get(e) === w && C.delete(e);
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
async function
|
|
101
|
+
async function K() {
|
|
99
102
|
const t = l.path;
|
|
100
|
-
|
|
103
|
+
x(), T(t), await S(!0);
|
|
101
104
|
}
|
|
102
|
-
return
|
|
103
|
-
const t =
|
|
105
|
+
return b(() => {
|
|
106
|
+
const t = O(n.dataSource);
|
|
104
107
|
if (!t) return;
|
|
105
108
|
const e = l.path, s = { ...c.get(e) || {}, ...t };
|
|
106
|
-
c.set(e, s),
|
|
107
|
-
}),
|
|
109
|
+
c.set(e, s), m(s);
|
|
110
|
+
}), M(
|
|
108
111
|
() => l.path,
|
|
109
112
|
() => {
|
|
110
|
-
|
|
113
|
+
S();
|
|
111
114
|
},
|
|
112
115
|
{ immediate: !0 }
|
|
113
116
|
), {
|
|
114
117
|
/**
|
|
115
118
|
* 数据源
|
|
116
119
|
*/
|
|
117
|
-
dataSource:
|
|
118
|
-
const t =
|
|
120
|
+
dataSource: V(() => {
|
|
121
|
+
const t = n.codes.reduce(
|
|
119
122
|
(e, r) => {
|
|
120
|
-
const s =
|
|
121
|
-
return e[r] =
|
|
123
|
+
const s = v.value[r] || [];
|
|
124
|
+
return e[r] = A(r) ? [E, ...s] : s, e;
|
|
122
125
|
},
|
|
123
126
|
{}
|
|
124
127
|
);
|
|
@@ -134,9 +137,9 @@ function G(a) {
|
|
|
134
137
|
/**
|
|
135
138
|
* @description 清空所有缓存,重新请求
|
|
136
139
|
*/
|
|
137
|
-
reload:
|
|
140
|
+
reload: K
|
|
138
141
|
};
|
|
139
142
|
}
|
|
140
143
|
export {
|
|
141
|
-
|
|
144
|
+
J as useDataPermissionOptions
|
|
142
145
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.215",
|
|
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"
|