@luzhaoqi/test 0.0.52 → 0.0.54
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/.idea/modules.xml +8 -0
- package/.idea/npm-test.iml +12 -0
- package/README.md +23 -24
- package/index.js +23 -0
- package/package.json +14 -51
- package/test.js +13 -0
- package/dist/dict-DsA0NW4N.mjs +0 -66
- package/dist/dict-aiZOAPw6.mjs +0 -172
- package/dist/dictEdit-PxIqjHPx.mjs +0 -187
- package/dist/favicon.ico +0 -0
- package/dist/index-L-oWjfYx.mjs +0 -19
- package/dist/index-LkpiywJu.mjs +0 -55
- package/dist/index-PbMBEwtj.mjs +0 -162
- package/dist/index-VFWpzLjm.mjs +0 -120
- package/dist/index-fTfCWWWT.mjs +0 -246
- package/dist/index-jG3xGL8q.mjs +0 -33586
- package/dist/index-luK1z0Wp.mjs +0 -6853
- package/dist/index-uB3FyLsC.mjs +0 -82
- package/dist/index-uM09M4BC.mjs +0 -104
- package/dist/layout-KbArRK0t.mjs +0 -11
- package/dist/main-pn1pY5YC.mjs +0 -36092
- package/dist/style.css +0 -11
- package/dist/test-kxtmZdsk.mjs +0 -74
- package/dist/type-bEKVlVJS.mjs +0 -157
- package/dist/typeEdit-y6wwdtll.mjs +0 -146
- package/dist/z-ui3.mjs +0 -37
- package/dist/z-ui3.umd.js +0 -233
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
package/README.md
CHANGED
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# npm-test
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
一个简单的数学库,提供 sum 函数计算数字之和。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 安装
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Customize configuration
|
|
10
|
-
|
|
11
|
-
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
12
|
-
|
|
13
|
-
## Project Setup
|
|
14
|
-
|
|
15
|
-
```sh
|
|
16
|
-
npm install
|
|
7
|
+
```bash
|
|
8
|
+
npm install npm-test
|
|
17
9
|
```
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
## 使用
|
|
20
12
|
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
```
|
|
13
|
+
```javascript
|
|
14
|
+
const sum = require('npm-test');
|
|
24
15
|
|
|
25
|
-
|
|
16
|
+
// 基本用法
|
|
17
|
+
console.log(sum(1, 2, 3)); // 6
|
|
18
|
+
console.log(sum(10, -5, 3.5)); // 8.5
|
|
19
|
+
console.log(sum()); // 0
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
// 错误处理
|
|
22
|
+
try {
|
|
23
|
+
sum('a', 2);
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.error(e.message); // "所有参数必须是有效数字"
|
|
26
|
+
}
|
|
29
27
|
```
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
## API
|
|
32
30
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
### `sum(...numbers)`
|
|
32
|
+
- `...numbers`: 要相加的数字(一个或多个)
|
|
33
|
+
- 返回: 所有数字的和
|
|
34
|
+
- 抛出: 如果任何参数不是数字,则抛出 TypeError
|
package/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 计算数字之和
|
|
3
|
+
* @param {...number} numbers - 要相加的数字
|
|
4
|
+
* @returns {number} 所有数字的和
|
|
5
|
+
* @throws {TypeError} 如果参数不是数字
|
|
6
|
+
* @example
|
|
7
|
+
* sum(1, 2, 3) // 返回 6
|
|
8
|
+
* sum(10, -5, 3.5) // 返回 8.5
|
|
9
|
+
*/
|
|
10
|
+
function sum(...numbers) {
|
|
11
|
+
if (numbers.length === 0) {
|
|
12
|
+
return 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 验证所有参数都是数字
|
|
16
|
+
if (!numbers.every(num => typeof num === 'number' && !isNaN(num))) {
|
|
17
|
+
throw new TypeError('所有参数必须是有效数字');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return numbers.reduce((total, num) => total + num, 0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = sum;
|
package/package.json
CHANGED
|
@@ -1,51 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@luzhaoqi/test",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"pub": "npm publish --access public",
|
|
16
|
-
"lib": "npm run build & npm run pub"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"@element-plus/icons-vue": "^2.3.1",
|
|
20
|
-
"axios": "^1.6.3",
|
|
21
|
-
"clipboard": "^2.0.11",
|
|
22
|
-
"element-plus": "^2.4.4",
|
|
23
|
-
"file-saver": "^2.0.5",
|
|
24
|
-
"fuse.js": "6.4.3",
|
|
25
|
-
"js-cookie": "^3.0.1",
|
|
26
|
-
"jsencrypt": "^3.0.0-rc.1",
|
|
27
|
-
"mockjs": "^1.1.0",
|
|
28
|
-
"nprogress": "^0.2.0",
|
|
29
|
-
"pinia": "^2.1.7",
|
|
30
|
-
"pinia-plugin-persist": "^1.0.0",
|
|
31
|
-
"screenfull": "5.0.2",
|
|
32
|
-
"quill": "1.3.7",
|
|
33
|
-
"vue": "^3.3.11",
|
|
34
|
-
"vue-meta": "^2.4.0",
|
|
35
|
-
"vue-router": "^4.2.5"
|
|
36
|
-
},
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"@rushstack/eslint-patch": "^1.3.3",
|
|
39
|
-
"@vitejs/plugin-vue": "^4.5.2",
|
|
40
|
-
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
41
|
-
"@vue/eslint-config-prettier": "^8.0.0",
|
|
42
|
-
"eslint": "^8.49.0",
|
|
43
|
-
"eslint-plugin-vue": "^9.17.0",
|
|
44
|
-
"prettier": "^3.0.3",
|
|
45
|
-
"sass": "1.69.5",
|
|
46
|
-
"unplugin-auto-import": "^0.17.3",
|
|
47
|
-
"unplugin-vue-components": "^0.26.0",
|
|
48
|
-
"vite": "^5.0.10",
|
|
49
|
-
"vite-plugin-vue-setup-extend": "^0.4.0"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@luzhaoqi/test",
|
|
3
|
+
"version": "0.0.54",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "A simple math library with sum function",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node test.js",
|
|
9
|
+
"pub": "npm publish --access public"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["math", "sum", "addition", "calculator"],
|
|
12
|
+
"author": "lzq",
|
|
13
|
+
"license": "MIT"
|
|
14
|
+
}
|
package/test.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const sum = require('./index');
|
|
2
|
+
|
|
3
|
+
// 基本测试
|
|
4
|
+
console.log('sum(1, 2, 3) =', sum(1, 2, 3)); // 应该输出 6
|
|
5
|
+
console.log('sum(10, -5, 3.5) =', sum(10, -5, 3.5)); // 应该输出 8.5
|
|
6
|
+
console.log('sum() =', sum()); // 应该输出 0
|
|
7
|
+
|
|
8
|
+
// 错误处理测试
|
|
9
|
+
try {
|
|
10
|
+
console.log('sum("a", 2) =', sum('a', 2));
|
|
11
|
+
} catch (e) {
|
|
12
|
+
console.error('错误:', e.message); // 应该输出 "所有参数必须是有效数字"
|
|
13
|
+
}
|
package/dist/dict-DsA0NW4N.mjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { a as r } from "./main-pn1pY5YC.mjs";
|
|
2
|
-
const u = r.config.globalProperties.$z, e = u.$http;
|
|
3
|
-
function n(t) {
|
|
4
|
-
return e.request({
|
|
5
|
-
url: "/ucenter/dict/type/queryPage",
|
|
6
|
-
method: "post",
|
|
7
|
-
data: t
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
function c(t) {
|
|
11
|
-
return e.request({
|
|
12
|
-
url: "/ucenter/dict/type/save",
|
|
13
|
-
method: "post",
|
|
14
|
-
data: t
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
function d(t) {
|
|
18
|
-
return e.request({
|
|
19
|
-
url: "/ucenter/dict/type/update",
|
|
20
|
-
method: "post",
|
|
21
|
-
data: t
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function o(t) {
|
|
25
|
-
return e.request({
|
|
26
|
-
url: `ucenter/dict/type/del/${t}`,
|
|
27
|
-
method: "post"
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function s(t) {
|
|
31
|
-
return e.request({
|
|
32
|
-
url: "/ucenter/dict/queryPage",
|
|
33
|
-
method: "post",
|
|
34
|
-
data: t
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function p(t) {
|
|
38
|
-
return e.request({
|
|
39
|
-
url: "/ucenter/dict/save",
|
|
40
|
-
method: "post",
|
|
41
|
-
data: t
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
function a(t) {
|
|
45
|
-
return e.request({
|
|
46
|
-
url: "/ucenter/dict/update",
|
|
47
|
-
method: "post",
|
|
48
|
-
data: t
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
function l(t) {
|
|
52
|
-
return e.request({
|
|
53
|
-
url: `ucenter/dict/del/${t}`,
|
|
54
|
-
method: "post"
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
export {
|
|
58
|
-
l as a,
|
|
59
|
-
a as b,
|
|
60
|
-
p as c,
|
|
61
|
-
s as d,
|
|
62
|
-
o as e,
|
|
63
|
-
d as f,
|
|
64
|
-
c as g,
|
|
65
|
-
n as l
|
|
66
|
-
};
|
package/dist/dict-aiZOAPw6.mjs
DELETED
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as O, computed as S, onMounted as N, ref as d, resolveComponent as a, openBlock as r, createBlock as k, unref as s, withCtx as t, createVNode as o, createElementBlock as C, Fragment as w, renderList as $, withKeys as E, createTextVNode as m } from "vue";
|
|
2
|
-
import K from "./dictEdit-PxIqjHPx.mjs";
|
|
3
|
-
import { d as L, l as M, a as Q } from "./dict-DsA0NW4N.mjs";
|
|
4
|
-
import { u as F } from "./index-jG3xGL8q.mjs";
|
|
5
|
-
import "./main-pn1pY5YC.mjs";
|
|
6
|
-
const X = {
|
|
7
|
-
__name: "dict",
|
|
8
|
-
setup(I) {
|
|
9
|
-
const i = O().proxy.$z, x = F(), h = S(() => i.$store.dict.getDictByCode("sys_status"));
|
|
10
|
-
N(() => {
|
|
11
|
-
i.$store.dict.setDictByCode("sys_status"), z();
|
|
12
|
-
});
|
|
13
|
-
const T = d({
|
|
14
|
-
api: L,
|
|
15
|
-
hiddenQuery: {
|
|
16
|
-
dictType: x.params.id
|
|
17
|
-
},
|
|
18
|
-
columns: [
|
|
19
|
-
{ label: "字典编号", type: "index", width: 90 },
|
|
20
|
-
{ label: "字典标签", prop: "lable" },
|
|
21
|
-
{ label: "字典键值", prop: "value" },
|
|
22
|
-
{ label: "字典排序", prop: "dictSort" },
|
|
23
|
-
{ label: "状态", prop: "status", slot: !0 },
|
|
24
|
-
{ label: "备注", prop: "remark" },
|
|
25
|
-
{ label: "操作", prop: "menu", width: "200", slot: !0 }
|
|
26
|
-
]
|
|
27
|
-
}), _ = d([]), z = () => {
|
|
28
|
-
M({ pageSize: 9999 }).then((n) => {
|
|
29
|
-
_.value = n.records || [];
|
|
30
|
-
});
|
|
31
|
-
}, f = d(), b = d(), c = () => {
|
|
32
|
-
f.value.handleQuery();
|
|
33
|
-
}, v = (n, u) => {
|
|
34
|
-
n === "add" ? b.value.show(n, f.value.queryParams) : b.value.show(n, u);
|
|
35
|
-
}, B = (n) => {
|
|
36
|
-
i.$modal.confirm("是否确认删除名称为" + n.lable + "的数据项?", "警告", {
|
|
37
|
-
confirmButtonText: "确定",
|
|
38
|
-
cancelButtonText: "取消",
|
|
39
|
-
type: "warning"
|
|
40
|
-
}).then(() => {
|
|
41
|
-
Q(n.id).then(() => {
|
|
42
|
-
i.$modal.msgSuccess("删除成功"), c();
|
|
43
|
-
}).catch((u) => {
|
|
44
|
-
console.log(u), i.$modal.msgError("删除失败");
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
return (n, u) => {
|
|
49
|
-
const g = a("el-option"), V = a("el-select"), y = a("el-form-item"), D = a("el-input"), p = a("el-button"), A = a("z-dict-tag"), U = a("z-list");
|
|
50
|
-
return r(), k(U, {
|
|
51
|
-
ref_key: "list",
|
|
52
|
-
ref: f,
|
|
53
|
-
tableOption: s(T)
|
|
54
|
-
}, {
|
|
55
|
-
form: t(({ queryParams: l }) => [
|
|
56
|
-
o(y, { label: "字典类型" }, {
|
|
57
|
-
default: t(() => [
|
|
58
|
-
o(V, {
|
|
59
|
-
modelValue: l.dictType,
|
|
60
|
-
"onUpdate:modelValue": (e) => l.dictType = e,
|
|
61
|
-
clearable: "",
|
|
62
|
-
filterable: "",
|
|
63
|
-
onChange: c
|
|
64
|
-
}, {
|
|
65
|
-
default: t(() => [
|
|
66
|
-
(r(!0), C(w, null, $(s(_), (e) => (r(), k(g, {
|
|
67
|
-
key: e.dictType,
|
|
68
|
-
label: e.dictName,
|
|
69
|
-
value: e.dictType
|
|
70
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
71
|
-
]),
|
|
72
|
-
_: 2
|
|
73
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
74
|
-
]),
|
|
75
|
-
_: 2
|
|
76
|
-
}, 1024),
|
|
77
|
-
o(y, { label: "字典标签" }, {
|
|
78
|
-
default: t(() => [
|
|
79
|
-
o(D, {
|
|
80
|
-
modelValue: l.lable,
|
|
81
|
-
"onUpdate:modelValue": (e) => l.lable = e,
|
|
82
|
-
placeholder: "请输入字典标签",
|
|
83
|
-
clearable: "",
|
|
84
|
-
onKeyup: E(c, ["enter", "native"])
|
|
85
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
86
|
-
]),
|
|
87
|
-
_: 2
|
|
88
|
-
}, 1024),
|
|
89
|
-
o(y, { label: "状态" }, {
|
|
90
|
-
default: t(() => [
|
|
91
|
-
o(V, {
|
|
92
|
-
modelValue: l.status,
|
|
93
|
-
"onUpdate:modelValue": (e) => l.status = e,
|
|
94
|
-
clearable: ""
|
|
95
|
-
}, {
|
|
96
|
-
default: t(() => [
|
|
97
|
-
(r(!0), C(w, null, $(s(h), (e) => (r(), k(g, {
|
|
98
|
-
key: e.value,
|
|
99
|
-
label: e.label,
|
|
100
|
-
value: e.value
|
|
101
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
102
|
-
]),
|
|
103
|
-
_: 2
|
|
104
|
-
}, 1032, ["modelValue", "onUpdate:modelValue"])
|
|
105
|
-
]),
|
|
106
|
-
_: 2
|
|
107
|
-
}, 1024)
|
|
108
|
-
]),
|
|
109
|
-
leftMenu: t(() => [
|
|
110
|
-
o(p, {
|
|
111
|
-
onClick: u[0] || (u[0] = (l) => v("add")),
|
|
112
|
-
icon: "el-icon-plus",
|
|
113
|
-
type: "primary",
|
|
114
|
-
plain: ""
|
|
115
|
-
}, {
|
|
116
|
-
default: t(() => [
|
|
117
|
-
m("新增字典")
|
|
118
|
-
]),
|
|
119
|
-
_: 1
|
|
120
|
-
})
|
|
121
|
-
]),
|
|
122
|
-
status: t((l) => [
|
|
123
|
-
o(A, {
|
|
124
|
-
options: s(h),
|
|
125
|
-
value: l.row.status
|
|
126
|
-
}, null, 8, ["options", "value"])
|
|
127
|
-
]),
|
|
128
|
-
menu: t((l) => [
|
|
129
|
-
o(p, {
|
|
130
|
-
link: "",
|
|
131
|
-
onClick: (e) => v("edit", l.row)
|
|
132
|
-
}, {
|
|
133
|
-
default: t(() => [
|
|
134
|
-
m("编辑")
|
|
135
|
-
]),
|
|
136
|
-
_: 2
|
|
137
|
-
}, 1032, ["onClick"]),
|
|
138
|
-
o(p, {
|
|
139
|
-
link: "",
|
|
140
|
-
onClick: (e) => v("view", l.row)
|
|
141
|
-
}, {
|
|
142
|
-
default: t(() => [
|
|
143
|
-
m("详情")
|
|
144
|
-
]),
|
|
145
|
-
_: 2
|
|
146
|
-
}, 1032, ["onClick"]),
|
|
147
|
-
o(p, {
|
|
148
|
-
link: "",
|
|
149
|
-
onClick: (e) => B(l.row)
|
|
150
|
-
}, {
|
|
151
|
-
default: t(() => [
|
|
152
|
-
m("删除")
|
|
153
|
-
]),
|
|
154
|
-
_: 2
|
|
155
|
-
}, 1032, ["onClick"])
|
|
156
|
-
]),
|
|
157
|
-
default: t(() => [
|
|
158
|
-
o(K, {
|
|
159
|
-
ref_key: "dialog",
|
|
160
|
-
ref: b,
|
|
161
|
-
typeArr: s(_),
|
|
162
|
-
onOk: c
|
|
163
|
-
}, null, 8, ["typeArr"])
|
|
164
|
-
]),
|
|
165
|
-
_: 1
|
|
166
|
-
}, 8, ["tableOption"]);
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
};
|
|
170
|
-
export {
|
|
171
|
-
X as default
|
|
172
|
-
};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as I, computed as L, onMounted as M, ref as i, resolveComponent as n, openBlock as m, createBlock as y, unref as o, isRef as G, withCtx as u, createVNode as a, createElementBlock as T, Fragment as x, renderList as A, createTextVNode as H, toDisplayString as J } from "vue";
|
|
2
|
-
import { b as K, c as P } from "./dict-DsA0NW4N.mjs";
|
|
3
|
-
import "./main-pn1pY5YC.mjs";
|
|
4
|
-
import "./index-jG3xGL8q.mjs";
|
|
5
|
-
const j = {
|
|
6
|
-
__name: "dictEdit",
|
|
7
|
-
props: {
|
|
8
|
-
typeArr: {
|
|
9
|
-
type: Array,
|
|
10
|
-
default() {
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
emits: ["ok"],
|
|
16
|
-
setup(C, { expose: D, emit: U }) {
|
|
17
|
-
const c = I().proxy.$z, $ = L(() => c.$store.dict.getDictByCode("sys_status"));
|
|
18
|
-
M(() => {
|
|
19
|
-
c.$store.dict.setDictByCode("sys_status");
|
|
20
|
-
});
|
|
21
|
-
const f = i(!1), _ = i(""), p = i(!1), V = () => ({
|
|
22
|
-
id: void 0,
|
|
23
|
-
dictType: void 0,
|
|
24
|
-
lable: void 0,
|
|
25
|
-
value: void 0,
|
|
26
|
-
dictSort: 0,
|
|
27
|
-
status: "1",
|
|
28
|
-
remark: void 0
|
|
29
|
-
}), l = i(V()), q = i({
|
|
30
|
-
dictType: [{ required: !0, message: "请输入字典类型", trigger: "change" }],
|
|
31
|
-
lable: [{ required: !0, message: "请输入字典标签", trigger: "blur" }],
|
|
32
|
-
value: [{ required: !0, message: "请输入字典值", trigger: "blur" }],
|
|
33
|
-
status: [{ required: !0, message: "请选择状态", trigger: "change" }]
|
|
34
|
-
}), k = (d) => {
|
|
35
|
-
const e = c.$utils._.cloneDeep(l.value);
|
|
36
|
-
for (const r in e)
|
|
37
|
-
d[r] !== void 0 && (e[r] = d[r]);
|
|
38
|
-
l.value = e;
|
|
39
|
-
}, v = i(), w = (d, e) => {
|
|
40
|
-
switch (l.value.dictType = e.dictType, d) {
|
|
41
|
-
case "add":
|
|
42
|
-
p.value = !1, _.value = "新增";
|
|
43
|
-
break;
|
|
44
|
-
case "edit":
|
|
45
|
-
p.value = !1, _.value = "编辑", k(e);
|
|
46
|
-
break;
|
|
47
|
-
case "view":
|
|
48
|
-
p.value = !0, _.value = "详情", k(e);
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
f.value = !0;
|
|
52
|
-
}, B = () => {
|
|
53
|
-
v.value.resetFields(), l.value = V();
|
|
54
|
-
}, S = (d) => {
|
|
55
|
-
v.value.validate((e) => {
|
|
56
|
-
if (e) {
|
|
57
|
-
const r = l.value.id ? K : P, b = l.value.id ? "修改成功!" : "提交成功!";
|
|
58
|
-
r(c.$utils._.cloneDeep(l.value)).then(() => {
|
|
59
|
-
d(b), z("ok");
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}, z = U;
|
|
64
|
-
return D({ show: w, form: l }), (d, e) => {
|
|
65
|
-
const r = n("el-option"), b = n("el-select"), s = n("el-form-item"), g = n("el-input"), N = n("el-radio"), R = n("el-radio-group"), E = n("el-input-number"), F = n("el-form"), O = n("z-dialog");
|
|
66
|
-
return m(), y(O, {
|
|
67
|
-
modelValue: o(f),
|
|
68
|
-
"onUpdate:modelValue": e[6] || (e[6] = (t) => G(f) ? f.value = t : null),
|
|
69
|
-
title: o(_),
|
|
70
|
-
width: "30%",
|
|
71
|
-
disabled: o(p),
|
|
72
|
-
onCancel: B,
|
|
73
|
-
onOk: S
|
|
74
|
-
}, {
|
|
75
|
-
default: u(() => [
|
|
76
|
-
a(F, {
|
|
77
|
-
ref_key: "formRef",
|
|
78
|
-
ref: v,
|
|
79
|
-
model: o(l),
|
|
80
|
-
"label-width": "80px",
|
|
81
|
-
rules: o(q),
|
|
82
|
-
disabled: o(p)
|
|
83
|
-
}, {
|
|
84
|
-
default: u(() => [
|
|
85
|
-
a(s, {
|
|
86
|
-
label: "字典类型",
|
|
87
|
-
prop: "dictType"
|
|
88
|
-
}, {
|
|
89
|
-
default: u(() => [
|
|
90
|
-
a(b, {
|
|
91
|
-
modelValue: o(l).dictType,
|
|
92
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => o(l).dictType = t),
|
|
93
|
-
disabled: ""
|
|
94
|
-
}, {
|
|
95
|
-
default: u(() => [
|
|
96
|
-
(m(!0), T(x, null, A(C.typeArr, (t) => (m(), y(r, {
|
|
97
|
-
key: t.dictType,
|
|
98
|
-
label: t.dictName,
|
|
99
|
-
value: t.dictType
|
|
100
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
101
|
-
]),
|
|
102
|
-
_: 1
|
|
103
|
-
}, 8, ["modelValue"])
|
|
104
|
-
]),
|
|
105
|
-
_: 1
|
|
106
|
-
}),
|
|
107
|
-
a(s, {
|
|
108
|
-
label: "字典标签",
|
|
109
|
-
prop: "lable"
|
|
110
|
-
}, {
|
|
111
|
-
default: u(() => [
|
|
112
|
-
a(g, {
|
|
113
|
-
modelValue: o(l).lable,
|
|
114
|
-
"onUpdate:modelValue": e[1] || (e[1] = (t) => o(l).lable = t)
|
|
115
|
-
}, null, 8, ["modelValue"])
|
|
116
|
-
]),
|
|
117
|
-
_: 1
|
|
118
|
-
}),
|
|
119
|
-
a(s, {
|
|
120
|
-
label: "字典值",
|
|
121
|
-
prop: "value"
|
|
122
|
-
}, {
|
|
123
|
-
default: u(() => [
|
|
124
|
-
a(g, {
|
|
125
|
-
modelValue: o(l).value,
|
|
126
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) => o(l).value = t)
|
|
127
|
-
}, null, 8, ["modelValue"])
|
|
128
|
-
]),
|
|
129
|
-
_: 1
|
|
130
|
-
}),
|
|
131
|
-
a(s, {
|
|
132
|
-
label: "状态",
|
|
133
|
-
prop: "status"
|
|
134
|
-
}, {
|
|
135
|
-
default: u(() => [
|
|
136
|
-
a(R, {
|
|
137
|
-
modelValue: o(l).status,
|
|
138
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) => o(l).status = t)
|
|
139
|
-
}, {
|
|
140
|
-
default: u(() => [
|
|
141
|
-
(m(!0), T(x, null, A(o($), (t) => (m(), y(N, {
|
|
142
|
-
key: t.value,
|
|
143
|
-
value: t.value
|
|
144
|
-
}, {
|
|
145
|
-
default: u(() => [
|
|
146
|
-
H(J(t.label), 1)
|
|
147
|
-
]),
|
|
148
|
-
_: 2
|
|
149
|
-
}, 1032, ["value"]))), 128))
|
|
150
|
-
]),
|
|
151
|
-
_: 1
|
|
152
|
-
}, 8, ["modelValue"])
|
|
153
|
-
]),
|
|
154
|
-
_: 1
|
|
155
|
-
}),
|
|
156
|
-
a(s, { label: "排序" }, {
|
|
157
|
-
default: u(() => [
|
|
158
|
-
a(E, {
|
|
159
|
-
modelValue: o(l).dictSort,
|
|
160
|
-
"onUpdate:modelValue": e[4] || (e[4] = (t) => o(l).dictSort = t),
|
|
161
|
-
"controls-position": "right"
|
|
162
|
-
}, null, 8, ["modelValue"])
|
|
163
|
-
]),
|
|
164
|
-
_: 1
|
|
165
|
-
}),
|
|
166
|
-
a(s, { label: "备注" }, {
|
|
167
|
-
default: u(() => [
|
|
168
|
-
a(g, {
|
|
169
|
-
type: "textarea",
|
|
170
|
-
modelValue: o(l).remark,
|
|
171
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) => o(l).remark = t)
|
|
172
|
-
}, null, 8, ["modelValue"])
|
|
173
|
-
]),
|
|
174
|
-
_: 1
|
|
175
|
-
})
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
}, 8, ["model", "rules", "disabled"])
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
}, 8, ["modelValue", "title", "disabled"]);
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
export {
|
|
186
|
-
j as default
|
|
187
|
-
};
|
package/dist/favicon.ico
DELETED
|
Binary file
|
package/dist/index-L-oWjfYx.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { resolveComponent as o, openBlock as n, createElementBlock as c, createTextVNode as e, createVNode as _, withCtx as r } from "vue";
|
|
2
|
-
import { _ as s } from "./index-jG3xGL8q.mjs";
|
|
3
|
-
const a = {}, d = { class: "home" };
|
|
4
|
-
function l(f, m) {
|
|
5
|
-
const t = o("el-button");
|
|
6
|
-
return n(), c("div", d, [
|
|
7
|
-
e(" 首页 "),
|
|
8
|
-
_(t, null, {
|
|
9
|
-
default: r(() => [
|
|
10
|
-
e("1213")
|
|
11
|
-
]),
|
|
12
|
-
_: 1
|
|
13
|
-
})
|
|
14
|
-
]);
|
|
15
|
-
}
|
|
16
|
-
const u = /* @__PURE__ */ s(a, [["render", l], ["__scopeId", "data-v-5541444f"]]);
|
|
17
|
-
export {
|
|
18
|
-
u as default
|
|
19
|
-
};
|
package/dist/index-LkpiywJu.mjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance as v, computed as y, onMounted as z, ref as g, resolveComponent as o, openBlock as s, createElementBlock as d, createTextVNode as u, createVNode as a, unref as t, withCtx as f, Fragment as h, renderList as x, createBlock as C, createElementVNode as e, toDisplayString as V } from "vue";
|
|
2
|
-
const b = /* @__PURE__ */ e("hr", null, null, -1), B = /* @__PURE__ */ e("hr", null, null, -1), k = /* @__PURE__ */ e("p", null, "正常输出:", -1), D = /* @__PURE__ */ e("br", null, null, -1), q = {
|
|
3
|
-
__name: "index",
|
|
4
|
-
setup($) {
|
|
5
|
-
const r = v().proxy.$z, n = y(() => r.$store.dict.getDictByCode("sys_status"));
|
|
6
|
-
z(() => {
|
|
7
|
-
r.$store.dict.setDictByCode("sys_status");
|
|
8
|
-
});
|
|
9
|
-
const c = g({
|
|
10
|
-
status: "0"
|
|
11
|
-
});
|
|
12
|
-
return (E, _) => {
|
|
13
|
-
const p = o("z-option"), m = o("z-select"), i = o("z-dict-tag");
|
|
14
|
-
return s(), d("div", null, [
|
|
15
|
-
u(" 下拉框使用字典: "),
|
|
16
|
-
a(m, {
|
|
17
|
-
modelValue: t(c).status,
|
|
18
|
-
"onUpdate:modelValue": _[0] || (_[0] = (l) => t(c).status = l),
|
|
19
|
-
clearable: ""
|
|
20
|
-
}, {
|
|
21
|
-
default: f(() => [
|
|
22
|
-
(s(!0), d(h, null, x(t(n), (l) => (s(), C(p, {
|
|
23
|
-
key: l.value,
|
|
24
|
-
label: l.label,
|
|
25
|
-
value: l.value
|
|
26
|
-
}, null, 8, ["label", "value"]))), 128))
|
|
27
|
-
]),
|
|
28
|
-
_: 1
|
|
29
|
-
}, 8, ["modelValue"]),
|
|
30
|
-
b,
|
|
31
|
-
e("div", null, [
|
|
32
|
-
u(" 字典标签只用字典: "),
|
|
33
|
-
a(i, {
|
|
34
|
-
options: t(n),
|
|
35
|
-
value: 0,
|
|
36
|
-
listClass: "danger"
|
|
37
|
-
}, null, 8, ["options"]),
|
|
38
|
-
a(i, {
|
|
39
|
-
options: t(n),
|
|
40
|
-
value: 1
|
|
41
|
-
}, null, 8, ["options"])
|
|
42
|
-
]),
|
|
43
|
-
B,
|
|
44
|
-
e("div", null, [
|
|
45
|
-
k,
|
|
46
|
-
D,
|
|
47
|
-
u(V(t(n)), 1)
|
|
48
|
-
])
|
|
49
|
-
]);
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
export {
|
|
54
|
-
q as default
|
|
55
|
-
};
|