jmash-region 0.0.2 → 0.0.5
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-DTkFVHk1.mjs} +1 -1
- package/dist/{edit.vue_vue_type_script_setup_true_lang-C4FJ1dMZ.mjs → edit.vue_vue_type_script_setup_true_lang-70FNJkv4.mjs} +196 -196
- package/dist/index-CxRWNkUU.mjs +422 -0
- package/dist/{index-BuYbOeq6.mjs → index-DQQestCN.mjs} +14 -15
- package/dist/index-NeklU2VV.mjs +1674 -0
- package/dist/index.mjs +6 -1428
- package/dts/{index.d.ts → src/index.d.ts} +3 -2
- package/dts/{utils → src/utils}/index.d.ts +0 -1
- package/package.json +12 -11
- package/dist/index-C0q1Spk1.mjs +0 -4
- package/dist/index-CYXjL9hA.mjs +0 -4
- package/dist/index-DWUZrsjg.mjs +0 -550
- 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/components/JmashTable/index.vue.d.ts +0 -47
- /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/{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/{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,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
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type PropType } from "vue";
|
|
2
|
-
import type { TableColumn } from "jmash-core";
|
|
3
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<globalThis.ExtractPropTypes<{
|
|
4
|
-
tableLabel: {
|
|
5
|
-
type: PropType<TableColumn[]>;
|
|
6
|
-
default: () => never[];
|
|
7
|
-
};
|
|
8
|
-
isSelection: {
|
|
9
|
-
type: BooleanConstructor;
|
|
10
|
-
default: boolean;
|
|
11
|
-
};
|
|
12
|
-
}>, {
|
|
13
|
-
clearSelection: () => any;
|
|
14
|
-
getSelectionRows: () => any;
|
|
15
|
-
toggleRowSelection: (row: any, selected: boolean) => any;
|
|
16
|
-
toggleAllSelection: () => any;
|
|
17
|
-
toggleRowExpansion: (row: any, expanded?: boolean | undefined) => any;
|
|
18
|
-
setCurrentRow: (row: any) => any;
|
|
19
|
-
clearSort: () => any;
|
|
20
|
-
clearFilter: (columnKeys?: string[] | undefined) => any;
|
|
21
|
-
doLayout: () => any;
|
|
22
|
-
sort: (prop: string, order: string) => any;
|
|
23
|
-
scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => any;
|
|
24
|
-
setScrollTop: (top?: number | undefined) => any;
|
|
25
|
-
setScrollLeft: (left?: number | undefined) => any;
|
|
26
|
-
refs: () => any;
|
|
27
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
28
|
-
tableLabel: {
|
|
29
|
-
type: PropType<TableColumn[]>;
|
|
30
|
-
default: () => never[];
|
|
31
|
-
};
|
|
32
|
-
isSelection: {
|
|
33
|
-
type: BooleanConstructor;
|
|
34
|
-
default: boolean;
|
|
35
|
-
};
|
|
36
|
-
}>> & Readonly<{}>, {
|
|
37
|
-
tableLabel: TableColumn[];
|
|
38
|
-
isSelection: boolean;
|
|
39
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, Partial<Record<string, (_: {
|
|
40
|
-
data: any;
|
|
41
|
-
}) => any>>>;
|
|
42
|
-
export default _default;
|
|
43
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
44
|
-
new (): {
|
|
45
|
-
$slots: S;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
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
|