jmash-region 0.0.2 → 0.0.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.
- package/dist/{edit-BBgaXo7r.mjs → edit-BofAehfs.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs → edit.vue_vue_type_script_setup_true_lang-DIB1Rij-.mjs} +133 -134
- package/dist/{index-BuYbOeq6.mjs → index-BT93ZnZ1.mjs} +4 -5
- package/dist/index-C1Hml01a.mjs +1602 -0
- package/dist/{index-DWUZrsjg.mjs → index-Cm74yBxt.mjs} +2 -2
- package/dist/index.mjs +6 -1428
- package/dts/{index.d.ts → src/index.d.ts} +3 -2
- package/package.json +58 -58
- package/dist/index-C0q1Spk1.mjs +0 -4
- package/dist/index-CYXjL9hA.mjs +0 -4
- package/dist/index-S5ZXIciD.mjs +0 -12
- package/dist/index.vue_vue_type_script_setup_true_lang-BKzkVa9A.mjs +0 -63
- package/dist/index.vue_vue_type_script_setup_true_lang-DTmt2AA1.mjs +0 -58
- /package/dts/{App.vue.d.ts → src/App.vue.d.ts} +0 -0
- /package/dts/{api → src/api}/region/dict.d.ts +0 -0
- /package/dts/{api → src/api}/region/index.d.ts +0 -0
- /package/dts/{api → src/api}/region/os-dict-region/index.d.ts +0 -0
- /package/dts/{api → src/api}/region/os-dict-region/types.d.ts +0 -0
- /package/dts/{components → src/components}/JmashRegionCascader/index.vue.d.ts +0 -0
- /package/dts/{components → src/components}/JmashRegionTree/index.vue.d.ts +0 -0
- /package/dts/{components → src/components}/JmashTable/index.vue.d.ts +0 -0
- /package/dts/{constant.d.ts → src/constant.d.ts} +0 -0
- /package/dts/{lang → src/lang}/index.d.ts +0 -0
- /package/dts/{lang → src/lang}/region/en.d.ts +0 -0
- /package/dts/{lang → src/lang}/region/zh-cn.d.ts +0 -0
- /package/dts/{main.d.ts → src/main.d.ts} +0 -0
- /package/dts/{permission.d.ts → src/permission.d.ts} +0 -0
- /package/dts/{utils → src/utils}/index.d.ts +0 -0
- /package/dts/{views → src/views}/region/os-dict-region/edit.vue.d.ts +0 -0
- /package/dts/{views → src/views}/region/os-dict-region/index.vue.d.ts +0 -0
- /package/dts/{views → src/views}/region/os-region-component/index.vue.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { App } from "vue";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import JmashRegionTree from "@/components/JmashRegionTree/index.vue";
|
|
3
|
+
import JmashRegionCascader from "@/components/JmashRegionCascader/index.vue";
|
|
4
|
+
export { JmashRegionTree, JmashRegionCascader };
|
|
4
5
|
export { dictRegionApi } from "@/api/region/os-dict-region";
|
|
5
6
|
export type { DictRegionApi, DictRegionReq, DictRegionModel, DictRegionList, DictRegionKey, DictRegionMoveKey, DictRegionEnableKey, DictRegionCreateReq, DictRegionUpdateReq, DictRegionExportReq, DictRegionImportReq, } from "@/api/region/os-dict-region/types";
|
|
6
7
|
declare const dict: {
|
package/package.json
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "jmash-region",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"private": false,
|
|
5
|
-
"module": "dist/index.mjs",
|
|
6
|
-
"types": "dts/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"dts"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "vite build && pnpm build:dts",
|
|
14
|
-
"build:dts": "vue-tsc --declaration --emitDeclarationOnly",
|
|
15
|
-
"preview": "vite preview",
|
|
16
|
-
"build-only": "vite build",
|
|
17
|
-
"type-check": "vue-tsc --build --force",
|
|
18
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
19
|
-
"format": "prettier --write src/"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"axios": "^1.6.7",
|
|
23
|
-
"element-plus": "^2.7.5",
|
|
24
|
-
"jmash-core": "^0.0.95",
|
|
25
|
-
"jmash-dict": "^0.0.41",
|
|
26
|
-
"jmash-rbac": "^0.0.30",
|
|
27
|
-
"pinia": "^2.1.7",
|
|
28
|
-
"vue": "^3.4.21",
|
|
29
|
-
"vue-i18n": "^9.10.1",
|
|
30
|
-
"vue-router": "^4.3.0"
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@
|
|
34
|
-
"@tsconfig/node20": "^20.1.2",
|
|
35
|
-
"@types/node": "^20.11.10",
|
|
36
|
-
"@vitejs/plugin-vue": "^5.0.3",
|
|
37
|
-
"@vue/
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"typescript": "
|
|
46
|
-
"unplugin-auto-import": "^0.17.5",
|
|
47
|
-
"unplugin-vue-components": "^0.26.0",
|
|
48
|
-
"vite": "^5.0.11",
|
|
49
|
-
"vue-tsc": "^1.8.27"
|
|
50
|
-
},
|
|
51
|
-
"dependencies": {
|
|
52
|
-
"@vueuse/core": "^10.9.0",
|
|
53
|
-
"file-saver": "^2.0.5",
|
|
54
|
-
"nprogress": "^0.2.0",
|
|
55
|
-
"pinyin-pro": "^3.25.0",
|
|
56
|
-
"qs": "^6.12.0"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "jmash-region",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"private": false,
|
|
5
|
+
"module": "dist/index.mjs",
|
|
6
|
+
"types": "dts/src/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"dts/src"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "vite build && pnpm build:dts",
|
|
14
|
+
"build:dts": "vue-tsc --declaration --emitDeclarationOnly",
|
|
15
|
+
"preview": "vite preview",
|
|
16
|
+
"build-only": "vite build",
|
|
17
|
+
"type-check": "vue-tsc --build --force",
|
|
18
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
19
|
+
"format": "prettier --write src/"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"axios": "^1.6.7",
|
|
23
|
+
"element-plus": "^2.7.5",
|
|
24
|
+
"jmash-core": "^0.0.95",
|
|
25
|
+
"jmash-dict": "^0.0.41",
|
|
26
|
+
"jmash-rbac": "^0.0.30",
|
|
27
|
+
"pinia": "^2.1.7",
|
|
28
|
+
"vue": "^3.4.21",
|
|
29
|
+
"vue-i18n": "^9.10.1",
|
|
30
|
+
"vue-router": "^4.3.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@eslint/js": "^9.14.0",
|
|
34
|
+
"@tsconfig/node20": "^20.1.2",
|
|
35
|
+
"@types/node": "^20.11.10",
|
|
36
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
|
37
|
+
"@vue/tsconfig": "^0.5.1",
|
|
38
|
+
"eslint": "^9.14.0",
|
|
39
|
+
"eslint-plugin-vue": "^9.30.0",
|
|
40
|
+
"globals": "^15.12.0",
|
|
41
|
+
"npm-run-all2": "^6.1.1",
|
|
42
|
+
"prettier": "^3.0.3",
|
|
43
|
+
"sass": "^1.72.0",
|
|
44
|
+
"typescript": "~5.3.0",
|
|
45
|
+
"typescript-eslint": "^8.13.0",
|
|
46
|
+
"unplugin-auto-import": "^0.17.5",
|
|
47
|
+
"unplugin-vue-components": "^0.26.0",
|
|
48
|
+
"vite": "^5.0.11",
|
|
49
|
+
"vue-tsc": "^1.8.27"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@vueuse/core": "^10.9.0",
|
|
53
|
+
"file-saver": "^2.0.5",
|
|
54
|
+
"nprogress": "^0.2.0",
|
|
55
|
+
"pinyin-pro": "^3.25.0",
|
|
56
|
+
"qs": "^6.12.0"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/index-C0q1Spk1.mjs
DELETED
package/dist/index-CYXjL9hA.mjs
DELETED
package/dist/index-S5ZXIciD.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const i = (s) => {
|
|
2
|
-
const e = {
|
|
3
|
-
regionIds: [],
|
|
4
|
-
regionCodes: []
|
|
5
|
-
}, n = (r) => {
|
|
6
|
-
e.regionIds.push(r.regionId), e.regionCodes.push(r.regionCode), r.children && r.children.length > 0 && r.children.forEach((o) => n(o));
|
|
7
|
-
};
|
|
8
|
-
return n(s), e;
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
i as e
|
|
12
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, useModel as C, ref as i, watchEffect as g, resolveComponent as v, openBlock as _, createBlock as x } from "vue";
|
|
2
|
-
import { dictRegionApi as s } from "./index.mjs";
|
|
3
|
-
import { e as y } from "./index-S5ZXIciD.mjs";
|
|
4
|
-
const L = /* @__PURE__ */ f({
|
|
5
|
-
__name: "index",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {},
|
|
8
|
-
modelModifiers: {}
|
|
9
|
-
},
|
|
10
|
-
emits: ["update:modelValue"],
|
|
11
|
-
setup(u) {
|
|
12
|
-
const l = C(u, "modelValue"), n = i([]), c = () => {
|
|
13
|
-
s.findByCode({ regionCode: l.value }).then(({ data: o }) => {
|
|
14
|
-
const e = y(o);
|
|
15
|
-
n.value = e.regionCodes;
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
g(
|
|
19
|
-
() => l.value && !n.value.length && c()
|
|
20
|
-
);
|
|
21
|
-
const d = i([]), p = (o) => {
|
|
22
|
-
s.findList({
|
|
23
|
-
likeRegionName: o
|
|
24
|
-
}).then(({ data: e }) => {
|
|
25
|
-
d.value = e.results.map((a) => (a.hasChildren = !a.hasChildren, a));
|
|
26
|
-
});
|
|
27
|
-
}, h = () => {
|
|
28
|
-
n.value = [];
|
|
29
|
-
}, m = (o, e) => {
|
|
30
|
-
s.findList({
|
|
31
|
-
parentId: o.data.regionId
|
|
32
|
-
}).then(({ data: a }) => {
|
|
33
|
-
const t = a.results.map((r) => (r.hasChildren = !r.hasChildren, r));
|
|
34
|
-
!o.data.regionId && (d.value = t), e(t);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
return (o, e) => {
|
|
38
|
-
const a = v("el-tree-select");
|
|
39
|
-
return _(), x(a, {
|
|
40
|
-
lazy: "",
|
|
41
|
-
filterable: "",
|
|
42
|
-
"check-strictly": "",
|
|
43
|
-
modelValue: l.value,
|
|
44
|
-
"onUpdate:modelValue": e[0] || (e[0] = (t) => l.value = t),
|
|
45
|
-
"node-key": "regionCode",
|
|
46
|
-
load: m,
|
|
47
|
-
data: d.value,
|
|
48
|
-
"default-expanded-keys": n.value,
|
|
49
|
-
"filter-method": p,
|
|
50
|
-
onClear: h,
|
|
51
|
-
props: {
|
|
52
|
-
value: "regionCode",
|
|
53
|
-
label: "regionName",
|
|
54
|
-
isLeaf: "hasChildren",
|
|
55
|
-
children: "children"
|
|
56
|
-
}
|
|
57
|
-
}, null, 8, ["modelValue", "data", "default-expanded-keys"]);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
export {
|
|
62
|
-
L as _
|
|
63
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, useModel as f, ref as g, resolveComponent as v, openBlock as h, createBlock as C } from "vue";
|
|
2
|
-
import { dictRegionApi as d } from "./index.mjs";
|
|
3
|
-
const V = /* @__PURE__ */ m({
|
|
4
|
-
__name: "index",
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: {},
|
|
7
|
-
modelModifiers: {}
|
|
8
|
-
},
|
|
9
|
-
emits: ["update:modelValue"],
|
|
10
|
-
setup(s) {
|
|
11
|
-
const r = f(s, "modelValue"), i = {
|
|
12
|
-
lazy: !0,
|
|
13
|
-
// 开启懒加载
|
|
14
|
-
checkStrictly: !0,
|
|
15
|
-
// 选择任意一级选项
|
|
16
|
-
lazyLoad(l, o) {
|
|
17
|
-
var e;
|
|
18
|
-
d.findList({
|
|
19
|
-
parentId: (e = l.data) == null ? void 0 : e.regionId
|
|
20
|
-
}).then(({ data: t }) => {
|
|
21
|
-
const c = t.results.map((n) => ({
|
|
22
|
-
label: n.regionName,
|
|
23
|
-
value: n.regionCode,
|
|
24
|
-
regionId: n.regionId,
|
|
25
|
-
leaf: !n.hasChildren
|
|
26
|
-
}));
|
|
27
|
-
o(c);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}, u = () => {
|
|
31
|
-
r.value = [], a.value = [];
|
|
32
|
-
}, a = g([]), p = (l) => (d.findList({
|
|
33
|
-
likeRegionName: l
|
|
34
|
-
}).then(({ data: o }) => {
|
|
35
|
-
a.value = o.results.map((e) => ({
|
|
36
|
-
label: e.regionName,
|
|
37
|
-
value: e.regionCode,
|
|
38
|
-
regionId: e.regionId,
|
|
39
|
-
leaf: !e.hasChildren
|
|
40
|
-
}));
|
|
41
|
-
}), !1);
|
|
42
|
-
return (l, o) => {
|
|
43
|
-
const e = v("el-cascader");
|
|
44
|
-
return h(), C(e, {
|
|
45
|
-
modelValue: r.value,
|
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (t) => r.value = t),
|
|
47
|
-
props: i,
|
|
48
|
-
options: a.value,
|
|
49
|
-
filterable: "",
|
|
50
|
-
onClear: u,
|
|
51
|
-
"before-filter": p
|
|
52
|
-
}, null, 8, ["modelValue", "options"]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
V as _
|
|
58
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|