@dazhicheng/ui 1.5.25 → 1.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10834 -13799
- package/dist/pad-pkcs7-DGpLXRzj.js +2984 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/vxeTable/switchStatus.d.ts +7 -0
- package/dist/plugins.d.ts +2 -0
- package/dist/plugins.js +63 -0
- package/package.json +16 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vxeTable/switchStatus';
|
package/dist/plugins.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ElSwitch as w, ElMessage as V } from "element-plus";
|
|
2
|
+
import { omit as C } from "lodash-es";
|
|
3
|
+
import { h as s, defineComponent as F, ref as S } from "vue";
|
|
4
|
+
import "axios";
|
|
5
|
+
import { b as i } from "./pad-pkcs7-DGpLXRzj.js";
|
|
6
|
+
import "xe-utils";
|
|
7
|
+
const b = [
|
|
8
|
+
"modelValue",
|
|
9
|
+
"onUpdate:modelValue",
|
|
10
|
+
"loading",
|
|
11
|
+
"api",
|
|
12
|
+
"beforeFetch",
|
|
13
|
+
"afterFetch",
|
|
14
|
+
"beforeChange"
|
|
15
|
+
];
|
|
16
|
+
function D() {
|
|
17
|
+
return {
|
|
18
|
+
install(u) {
|
|
19
|
+
u.renderer.add("switchStatus", {
|
|
20
|
+
renderTableDefault(d, m) {
|
|
21
|
+
const { row: t, column: a } = m, e = d.props ?? {};
|
|
22
|
+
return s(
|
|
23
|
+
F({
|
|
24
|
+
name: "TtVxeSwitchCell",
|
|
25
|
+
setup: () => {
|
|
26
|
+
const o = S(!1);
|
|
27
|
+
return () => s(w, {
|
|
28
|
+
...C(e, [...b]),
|
|
29
|
+
modelValue: t[a.field],
|
|
30
|
+
loading: o.value,
|
|
31
|
+
"onUpdate:modelValue": async (r) => {
|
|
32
|
+
t[a.field] = r;
|
|
33
|
+
},
|
|
34
|
+
beforeChange: async () => {
|
|
35
|
+
var l, f, c;
|
|
36
|
+
const r = t[a.field];
|
|
37
|
+
if ((i(e.beforeChange) ? await ((l = e.beforeChange) == null ? void 0 : l.call(e, r)) : !0) === !1 || !i(e.api)) return !1;
|
|
38
|
+
const h = !r;
|
|
39
|
+
let n = { [a.field]: h, id: t.id };
|
|
40
|
+
if (o.value = !0, i(e.beforeFetch)) {
|
|
41
|
+
const g = await ((f = e.beforeFetch) == null ? void 0 : f.call(e, n, t, a));
|
|
42
|
+
n = {
|
|
43
|
+
...n,
|
|
44
|
+
...g
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const p = await e.api(n).finally(() => {
|
|
48
|
+
o.value = !1;
|
|
49
|
+
});
|
|
50
|
+
return (c = e.afterFetch) == null || c.call(e, p), V.success(r ? "禁用成功" : "启用成功"), !0;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
D as createVxePluginSwitchStatus
|
|
63
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./plugins": {
|
|
15
|
+
"types": "./dist/plugins.d.ts",
|
|
16
|
+
"import": "./dist/plugins.js"
|
|
17
|
+
},
|
|
14
18
|
"./style.css": "./dist/style.css",
|
|
15
19
|
"./dist/style.css": "./dist/style.css"
|
|
16
20
|
},
|
|
@@ -25,28 +29,30 @@
|
|
|
25
29
|
]
|
|
26
30
|
},
|
|
27
31
|
"dependencies": {
|
|
28
|
-
"@element-plus/icons-vue": "^2.3.2",
|
|
29
32
|
"@iconify/vue": "^5.0.0",
|
|
30
33
|
"@standard-schema/spec": "1.0.0",
|
|
31
34
|
"@standard-schema/utils": "0.3.0",
|
|
32
35
|
"@tanstack/vue-store": "^0.8.0",
|
|
33
36
|
"@vee-validate/zod": "^4.15.1",
|
|
34
|
-
"@vueuse/core": "^14.2.1",
|
|
35
|
-
"axios": "^1.13.4",
|
|
36
|
-
"element-plus": "^2.13.2",
|
|
37
37
|
"es-toolkit": "^1.45.1",
|
|
38
|
-
"lodash-es": "^4.17.23",
|
|
39
38
|
"numeral": "^2.0.6",
|
|
40
39
|
"sortablejs": "^1.15.7",
|
|
41
40
|
"vee-validate": "^4.15.1",
|
|
42
|
-
"vue": "^3.5.21",
|
|
43
|
-
"vue-router": "^5.0.2",
|
|
44
|
-
"vxe-table": "^4.17.48",
|
|
45
|
-
"xe-utils": "^4.0.0",
|
|
46
41
|
"zod": "^4.3.6",
|
|
47
42
|
"@dazhicheng/hooks": "1.4.18",
|
|
48
43
|
"@dazhicheng/utils": "1.3.18"
|
|
49
44
|
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@element-plus/icons-vue": "^2.3.0",
|
|
47
|
+
"@vueuse/core": "^10.0.0",
|
|
48
|
+
"axios": "^1.0.0",
|
|
49
|
+
"element-plus": "^2.7.0",
|
|
50
|
+
"lodash-es": "^4.0.0",
|
|
51
|
+
"vue": "^3.5.0",
|
|
52
|
+
"vue-router": "^4.0.0",
|
|
53
|
+
"vxe-pc-ui": "^4.0.0",
|
|
54
|
+
"vxe-table": "^4.17.0"
|
|
55
|
+
},
|
|
50
56
|
"files": [
|
|
51
57
|
"dist"
|
|
52
58
|
],
|