jky-component-lib 0.0.126 → 0.0.129
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/es/amap/AMapPicker/AMapPicker.vue.d.ts +43 -0
- package/dist/es/amap/AMapPicker/AMapPicker.vue.js +142 -0
- package/dist/es/amap/AMapPicker/AMapPicker.vue2.js +4 -0
- package/dist/es/amap/index.d.ts +3 -1
- package/dist/es/amap/index.js +10 -6
- package/dist/es/amap/style.css +5 -12
- package/dist/es/amap/style2.css +2 -6
- package/dist/es/amap/style3.css +13 -2
- package/dist/es/components.js +7 -3
- package/dist/es/form/AMapPickerItem.vue.d.ts +19 -0
- package/dist/es/form/AMapPickerItem.vue.js +104 -0
- package/dist/es/form/AMapPickerItem.vue3.js +5 -0
- package/dist/es/form/Form.vue.d.ts +2 -2
- package/dist/es/form/FormItem.vue.js +31 -14
- package/dist/es/form/LinkedSelect.vue.d.ts +2 -0
- package/dist/es/form/LinkedSelect.vue.js +68 -53
- package/dist/es/form/{LinkedSelect.vue3.js → LinkedSelect.vue2.js} +0 -1
- package/dist/es/form/index.d.ts +3 -1
- package/dist/es/form/index.js +4 -1
- package/dist/es/index.js +10 -6
- package/dist/es/modal/Modal.vue.d.ts +3 -3
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-table/PageTable.vue.d.ts +10 -10
- package/dist/es/page-table/PageTableColumn.vue.d.ts +1 -1
- package/dist/es/page-table-v2/PageTableV2.vue.d.ts +5 -5
- package/dist/es/style.css +14 -0
- package/dist/lib/amap/AMapPicker/AMapPicker.vue.d.ts +43 -0
- package/dist/lib/amap/AMapPicker/AMapPicker.vue.js +142 -0
- package/dist/lib/amap/AMapPicker/AMapPicker.vue2.js +4 -0
- package/dist/lib/amap/index.d.ts +3 -1
- package/dist/lib/amap/index.js +4 -0
- package/dist/lib/amap/style.css +5 -12
- package/dist/lib/amap/style2.css +2 -6
- package/dist/lib/amap/style3.css +13 -2
- package/dist/lib/components.js +27 -23
- package/dist/lib/form/AMapPickerItem.vue.d.ts +19 -0
- package/dist/lib/form/AMapPickerItem.vue.js +104 -0
- package/dist/lib/form/AMapPickerItem.vue3.js +5 -0
- package/dist/lib/form/Form.vue.d.ts +2 -2
- package/dist/lib/form/FormItem.vue.js +26 -9
- package/dist/lib/form/LinkedSelect.vue.d.ts +2 -0
- package/dist/lib/form/LinkedSelect.vue.js +66 -51
- package/dist/lib/form/{LinkedSelect.vue3.js → LinkedSelect.vue2.js} +0 -1
- package/dist/lib/form/index.d.ts +3 -1
- package/dist/lib/form/index.js +4 -1
- package/dist/lib/index.js +19 -15
- package/dist/lib/modal/Modal.vue.d.ts +3 -3
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-table/PageTable.vue.d.ts +10 -10
- package/dist/lib/page-table/PageTableColumn.vue.d.ts +1 -1
- package/dist/lib/page-table-v2/PageTableV2.vue.d.ts +5 -5
- package/dist/lib/style.css +14 -0
- package/package.json +1 -1
package/dist/lib/amap/index.js
CHANGED
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const AMap_vue_vue_type_script_setup_true_lang = require("./AMap.vue.js");
|
|
4
4
|
;/* empty css */
|
|
5
|
+
const AMapPicker_vue_vue_type_script_setup_true_lang = require("./AMapPicker/AMapPicker.vue.js");
|
|
5
6
|
const AMarker_vue_vue_type_script_setup_true_lang = require("./AMarker.vue.js");
|
|
6
7
|
;/* empty css */
|
|
7
8
|
const ATrackPlayback_vue_vue_type_script_setup_true_lang = require("./ATrackPlayback.vue.js");
|
|
8
9
|
;/* empty css */
|
|
9
10
|
const withInstall = require("../utils/with-install.js");
|
|
10
11
|
const JkyAMap = withInstall.installWithSFC(AMap_vue_vue_type_script_setup_true_lang.default);
|
|
12
|
+
const JkyAMapPicker = withInstall.installWithSFC(AMapPicker_vue_vue_type_script_setup_true_lang.default);
|
|
11
13
|
const JkyAMarker = withInstall.installWithSFC(AMarker_vue_vue_type_script_setup_true_lang.default);
|
|
12
14
|
const JkyATrackPlayback = withInstall.installWithSFC(ATrackPlayback_vue_vue_type_script_setup_true_lang.default);
|
|
15
|
+
exports.AMapPicker = AMapPicker_vue_vue_type_script_setup_true_lang.default;
|
|
13
16
|
exports.AMarker = AMarker_vue_vue_type_script_setup_true_lang.default;
|
|
14
17
|
exports.ATrackPlayback = ATrackPlayback_vue_vue_type_script_setup_true_lang.default;
|
|
15
18
|
exports.JkyAMap = JkyAMap;
|
|
19
|
+
exports.JkyAMapPicker = JkyAMapPicker;
|
|
16
20
|
exports.JkyAMarker = JkyAMarker;
|
|
17
21
|
exports.JkyATrackPlayback = JkyATrackPlayback;
|
|
18
22
|
exports.default = JkyAMap;
|
package/dist/lib/amap/style.css
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
/* AMap 高德地图组件样式 */
|
|
2
|
-
.jky-amap-container {
|
|
3
|
-
/* 地图容器样式 */
|
|
4
|
-
position: relative;
|
|
5
|
-
overflow: hidden;
|
|
6
1
|
|
|
7
|
-
|
|
8
|
-
.amap-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
2
|
+
/* JkyAMarker 组件样式 - 参考高德官方示例 */
|
|
3
|
+
.amap-icon img,
|
|
4
|
+
.amap-marker-content img {
|
|
5
|
+
width: 25px;
|
|
6
|
+
height: 34px;
|
|
14
7
|
}
|
package/dist/lib/amap/style2.css
CHANGED
package/dist/lib/amap/style3.css
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/* AMap 高德地图组件样式 */
|
|
2
|
+
.jky-amap-container {
|
|
3
|
+
/* 地图容器样式 */
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
1
6
|
|
|
2
|
-
/*
|
|
3
|
-
|
|
7
|
+
/* 隐藏高德地图的 logo 和版权信息(注意:商业使用请遵守高德地图条款) */
|
|
8
|
+
.amap-logo {
|
|
9
|
+
display: none !important;
|
|
10
|
+
}
|
|
11
|
+
.amap-copyright {
|
|
12
|
+
display: none !important;
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/lib/components.js
CHANGED
|
@@ -1,54 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index$
|
|
3
|
+
const index$3 = require("./add-input/index.js");
|
|
4
4
|
const index = require("./amap/index.js");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
5
|
+
const index$4 = require("./button/index.js");
|
|
6
|
+
const index$5 = require("./button-nav/index.js");
|
|
7
|
+
const index$6 = require("./code-mirror-editor/index.js");
|
|
8
|
+
const index$1 = require("./form/index.js");
|
|
9
9
|
const index$7 = require("./menu/index.js");
|
|
10
10
|
const index$8 = require("./modal/index.js");
|
|
11
11
|
const index$9 = require("./page-header/index.js");
|
|
12
12
|
const index$a = require("./page-layout/index.js");
|
|
13
|
-
const index$
|
|
13
|
+
const index$2 = require("./page-table/index.js");
|
|
14
14
|
const index$b = require("./page-table-v2/index.js");
|
|
15
15
|
const index$c = require("./rich-editor/index.js");
|
|
16
16
|
const index$d = require("./say-hello/index.js");
|
|
17
17
|
const index$e = require("./tabs/index.js");
|
|
18
18
|
const components = [
|
|
19
19
|
index$d.JkySayHello,
|
|
20
|
-
index$
|
|
21
|
-
index$
|
|
20
|
+
index$4.JkyButton,
|
|
21
|
+
index$5.JkyButtonNav,
|
|
22
22
|
index$9.JkyPageHeader,
|
|
23
23
|
index$7.JkyMenu,
|
|
24
|
-
index$
|
|
25
|
-
index$
|
|
26
|
-
index$
|
|
27
|
-
index$
|
|
24
|
+
index$1.JkyForm,
|
|
25
|
+
index$1.JkyLinkedSelect,
|
|
26
|
+
index$1.JkyAMapPickerItem,
|
|
27
|
+
index$6.JkyCodeMirrorEditor,
|
|
28
|
+
index$3.JkyAddInput,
|
|
28
29
|
index$c.JkyRichEditor,
|
|
29
|
-
index$
|
|
30
|
+
index$2.JkyPageTable,
|
|
30
31
|
index$b.JkyPageTableV2,
|
|
31
32
|
index$a.JkyPageLayout,
|
|
32
33
|
index$e.JkyTabs,
|
|
33
34
|
index$8.JkyModal,
|
|
34
|
-
index.JkyAMap
|
|
35
|
+
index.JkyAMap,
|
|
36
|
+
index.JkyAMapPicker
|
|
35
37
|
];
|
|
36
|
-
exports.JkyAddInput = index$
|
|
38
|
+
exports.JkyAddInput = index$3.JkyAddInput;
|
|
37
39
|
exports.JkyAMap = index.JkyAMap;
|
|
40
|
+
exports.JkyAMapPicker = index.JkyAMapPicker;
|
|
38
41
|
exports.JkyAMarker = index.JkyAMarker;
|
|
39
42
|
exports.JkyATrackPlayback = index.JkyATrackPlayback;
|
|
40
|
-
exports.JkyButton = index$
|
|
41
|
-
exports.JkyButtonNav = index$
|
|
42
|
-
exports.JkyCodeMirrorEditor = index$
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
43
|
+
exports.JkyButton = index$4.JkyButton;
|
|
44
|
+
exports.JkyButtonNav = index$5.JkyButtonNav;
|
|
45
|
+
exports.JkyCodeMirrorEditor = index$6.JkyCodeMirrorEditor;
|
|
46
|
+
exports.JkyAMapPickerItem = index$1.JkyAMapPickerItem;
|
|
47
|
+
exports.JkyForm = index$1.JkyForm;
|
|
48
|
+
exports.JkyLinkedSelect = index$1.JkyLinkedSelect;
|
|
45
49
|
exports.JkyMenu = index$7.JkyMenu;
|
|
46
50
|
exports.JkyModal = index$8.JkyModal;
|
|
47
51
|
exports.JkyPageHeader = index$9.JkyPageHeader;
|
|
48
52
|
exports.JkyPageLayout = index$a.JkyPageLayout;
|
|
49
|
-
exports.JkyActionColumn = index$
|
|
50
|
-
exports.JkyPageTable = index$
|
|
51
|
-
exports.JkyPageTableColumn = index$
|
|
53
|
+
exports.JkyActionColumn = index$2.JkyActionColumn;
|
|
54
|
+
exports.JkyPageTable = index$2.JkyPageTable;
|
|
55
|
+
exports.JkyPageTableColumn = index$2.JkyPageTableColumn;
|
|
52
56
|
exports.JkyPageTableV2 = index$b.JkyPageTableV2;
|
|
53
57
|
exports.JkyRichEditor = index$c.JkyRichEditor;
|
|
54
58
|
exports.JkySayHello = index$d.JkySayHello;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AMapPickerItemProps } from './types';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<AMapPickerItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
3
|
+
"update:modelValue": (value: [number, number] | null) => any;
|
|
4
|
+
change: (value: [number, number] | null) => any;
|
|
5
|
+
}, string, import('vue').PublicProps, Readonly<AMapPickerItemProps> & Readonly<{
|
|
6
|
+
"onUpdate:modelValue"?: ((value: [number, number] | null) => any) | undefined;
|
|
7
|
+
onChange?: ((value: [number, number] | null) => any) | undefined;
|
|
8
|
+
}>, {
|
|
9
|
+
size: string | number;
|
|
10
|
+
title: string;
|
|
11
|
+
center: [number, number];
|
|
12
|
+
token: string;
|
|
13
|
+
zoom: number;
|
|
14
|
+
mode: "dialog" | "drawer";
|
|
15
|
+
buttonText: string;
|
|
16
|
+
longitudePlaceholder: string;
|
|
17
|
+
latitudePlaceholder: string;
|
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
22
|
+
const vue = require("vue");
|
|
23
|
+
const ElementPlus = require("element-plus");
|
|
24
|
+
const AMapPicker_vue_vue_type_script_setup_true_lang = require("../amap/AMapPicker/AMapPicker.vue.js");
|
|
25
|
+
const _hoisted_1 = { class: "jky-amap-picker-item flex items-center gap-2" };
|
|
26
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
27
|
+
name: "JkyAMapPickerItem"
|
|
28
|
+
}), {
|
|
29
|
+
__name: "AMapPickerItem",
|
|
30
|
+
props: {
|
|
31
|
+
modelValue: {},
|
|
32
|
+
token: { default: "75f62fbef756459563f042e5a2a1fd7c" },
|
|
33
|
+
buttonText: { default: "拾取坐标" },
|
|
34
|
+
longitudePlaceholder: { default: "请输入经度" },
|
|
35
|
+
latitudePlaceholder: { default: "请输入纬度" },
|
|
36
|
+
title: { default: "选择坐标" },
|
|
37
|
+
mode: { default: "dialog" },
|
|
38
|
+
size: { default: "600px" },
|
|
39
|
+
zoom: { default: 15 },
|
|
40
|
+
center: { default: () => [116.397428, 39.90923] },
|
|
41
|
+
disabled: { type: Boolean }
|
|
42
|
+
},
|
|
43
|
+
emits: ["update:modelValue", "change"],
|
|
44
|
+
setup(__props, { emit: __emit }) {
|
|
45
|
+
const props = __props;
|
|
46
|
+
const emit = __emit;
|
|
47
|
+
const coordinateValue = vue.computed({
|
|
48
|
+
get: () => {
|
|
49
|
+
if (!props.modelValue || props.modelValue.length !== 2)
|
|
50
|
+
return null;
|
|
51
|
+
return { lng: props.modelValue[0], lat: props.modelValue[1] };
|
|
52
|
+
},
|
|
53
|
+
set: (val) => {
|
|
54
|
+
if (val) {
|
|
55
|
+
const newValue = [val.lng, val.lat];
|
|
56
|
+
emit("update:modelValue", newValue);
|
|
57
|
+
emit("change", newValue);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return (_ctx, _cache) => {
|
|
62
|
+
var _a, _b, _c, _d;
|
|
63
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
64
|
+
vue.createVNode(vue.unref(ElementPlus.ElInputNumber), {
|
|
65
|
+
"model-value": (_b = (_a = props.modelValue) == null ? void 0 : _a[0]) != null ? _b : null,
|
|
66
|
+
placeholder: __props.longitudePlaceholder,
|
|
67
|
+
disabled: __props.disabled,
|
|
68
|
+
controls: false,
|
|
69
|
+
class: "flex-1",
|
|
70
|
+
precision: 6,
|
|
71
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => {
|
|
72
|
+
var _a2, _b2;
|
|
73
|
+
return emit("update:modelValue", val !== void 0 ? [val, (_b2 = (_a2 = props.modelValue) == null ? void 0 : _a2[1]) != null ? _b2 : 0] : null);
|
|
74
|
+
})
|
|
75
|
+
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
76
|
+
vue.createVNode(vue.unref(ElementPlus.ElInputNumber), {
|
|
77
|
+
"model-value": (_d = (_c = props.modelValue) == null ? void 0 : _c[1]) != null ? _d : null,
|
|
78
|
+
placeholder: __props.latitudePlaceholder,
|
|
79
|
+
disabled: __props.disabled,
|
|
80
|
+
controls: false,
|
|
81
|
+
class: "flex-1",
|
|
82
|
+
precision: 6,
|
|
83
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = (val) => {
|
|
84
|
+
var _a2, _b2;
|
|
85
|
+
return emit("update:modelValue", val !== void 0 ? [(_b2 = (_a2 = props.modelValue) == null ? void 0 : _a2[0]) != null ? _b2 : 0, val] : null);
|
|
86
|
+
})
|
|
87
|
+
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
88
|
+
vue.createVNode(AMapPicker_vue_vue_type_script_setup_true_lang.default, {
|
|
89
|
+
modelValue: coordinateValue.value,
|
|
90
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => coordinateValue.value = $event),
|
|
91
|
+
token: __props.token,
|
|
92
|
+
"button-text": __props.buttonText,
|
|
93
|
+
title: __props.title,
|
|
94
|
+
mode: __props.mode,
|
|
95
|
+
size: __props.size,
|
|
96
|
+
zoom: __props.zoom,
|
|
97
|
+
center: __props.center,
|
|
98
|
+
disabled: __props.disabled
|
|
99
|
+
}, null, 8, ["modelValue", "token", "button-text", "title", "mode", "size", "zoom", "center", "disabled"])
|
|
100
|
+
]);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}));
|
|
104
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AMapPickerItem_vue_vue_type_script_setup_true_lang = require("./AMapPickerItem.vue.js");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
exports.default = AMapPickerItem_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -343,11 +343,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps,
|
|
|
343
343
|
fields?: any;
|
|
344
344
|
}) => any) | undefined;
|
|
345
345
|
}>, {
|
|
346
|
+
cancelText: string;
|
|
347
|
+
footerClass: string;
|
|
346
348
|
watchDeep: boolean;
|
|
347
349
|
showFooter: boolean;
|
|
348
|
-
footerClass: string;
|
|
349
350
|
submitText: string;
|
|
350
|
-
cancelText: string;
|
|
351
351
|
submitDisabled: boolean;
|
|
352
352
|
cancelDisabled: boolean;
|
|
353
353
|
showCount: number;
|
|
@@ -57,8 +57,9 @@ const ElementPlus = require("element-plus");
|
|
|
57
57
|
const index = require("../add-input/index.js");
|
|
58
58
|
const index$2 = require("../code-mirror-editor/index.js");
|
|
59
59
|
const index$1 = require("../rich-editor/index.js");
|
|
60
|
+
const AMapPickerItem_vue_vue_type_script_setup_true_lang = require("./AMapPickerItem.vue.js");
|
|
61
|
+
;/* empty css */
|
|
60
62
|
const LinkedSelect_vue_vue_type_script_setup_true_lang = require("./LinkedSelect.vue.js");
|
|
61
|
-
;/* empty css */
|
|
62
63
|
const SelectTable_vue_vue_type_script_setup_true_lang = require("./SelectTable.vue.js");
|
|
63
64
|
;/* empty css */
|
|
64
65
|
const _hoisted_1 = {
|
|
@@ -163,22 +164,28 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
163
164
|
rules.value = configRules;
|
|
164
165
|
});
|
|
165
166
|
}
|
|
167
|
+
function setupWatchFields() {
|
|
168
|
+
const watchFields = props.config.watchFields;
|
|
169
|
+
if (!watchFields || watchFields.length === 0) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
vue.watch(
|
|
173
|
+
() => watchFields.map((field) => props.model[field]),
|
|
174
|
+
() => {
|
|
175
|
+
loadComponentProps();
|
|
176
|
+
loadRules();
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
166
180
|
loadComponentProps();
|
|
167
181
|
loadRules();
|
|
182
|
+
setupWatchFields();
|
|
168
183
|
const modelValue = vue.computed({
|
|
169
184
|
get: () => props.model[props.field],
|
|
170
185
|
set: (val) => {
|
|
171
186
|
props.model[props.field] = val;
|
|
172
187
|
}
|
|
173
188
|
});
|
|
174
|
-
vue.watch(
|
|
175
|
-
() => props.model,
|
|
176
|
-
() => {
|
|
177
|
-
loadComponentProps();
|
|
178
|
-
loadRules();
|
|
179
|
-
},
|
|
180
|
-
{ deep: true }
|
|
181
|
-
);
|
|
182
189
|
const isHidden = vue.computed(() => {
|
|
183
190
|
if (typeof props.config.hidden === "function") {
|
|
184
191
|
return props.config.hidden({
|
|
@@ -505,6 +512,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
505
512
|
props.model[props.field] = val;
|
|
506
513
|
}
|
|
507
514
|
}, _componentSlotsObj);
|
|
515
|
+
// 高德地图坐标拾取器
|
|
516
|
+
case "amap-picker":
|
|
517
|
+
return vue.h(AMapPickerItem_vue_vue_type_script_setup_true_lang.default, __spreadProps(__spreadValues({
|
|
518
|
+
"modelValue": modelValue.value,
|
|
519
|
+
"disabled": props.disabled
|
|
520
|
+
}, props.config.componentProps), {
|
|
521
|
+
"onUpdate:modelValue": (val) => {
|
|
522
|
+
props.model[props.field] = val;
|
|
523
|
+
}
|
|
524
|
+
}), _componentSlotsObj);
|
|
508
525
|
case "custom":
|
|
509
526
|
return (_b = (_a = props.config).render) == null ? void 0 : _b.call(_a, commonProps);
|
|
510
527
|
default:
|
|
@@ -17,8 +17,10 @@ declare function __VLS_template(): {
|
|
|
17
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
18
|
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
19
|
"update:modelValue": (value: any[]) => any;
|
|
20
|
+
change: (value: any[]) => any;
|
|
20
21
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
22
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
23
|
+
onChange?: ((value: any[]) => any) | undefined;
|
|
22
24
|
}>, {
|
|
23
25
|
modelValue: any[];
|
|
24
26
|
disabled: boolean;
|
|
@@ -52,82 +52,97 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
52
52
|
disabled: { type: Boolean, default: false },
|
|
53
53
|
componentProps: { default: void 0 }
|
|
54
54
|
},
|
|
55
|
-
emits: ["update:modelValue"],
|
|
55
|
+
emits: ["update:modelValue", "change"],
|
|
56
56
|
setup(__props, { emit: __emit }) {
|
|
57
|
+
var _a;
|
|
57
58
|
const props = __props;
|
|
58
59
|
const emit = __emit;
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
const level = ((_a = props.config) == null ? void 0 : _a.level) || 1;
|
|
61
|
+
const optionsList = vue.ref(Array.from({ length: level }, () => []));
|
|
62
|
+
const loadingList = vue.ref(Array.from({ length: level }, () => false));
|
|
63
|
+
const values = vue.ref(
|
|
64
|
+
props.modelValue && props.modelValue.length > 0 ? props.modelValue.slice(0, level) : Array.from({ length: level }, () => void 0)
|
|
65
|
+
);
|
|
66
|
+
function loadOptions(levelIndex, value) {
|
|
62
67
|
return __async(this, null, function* () {
|
|
63
|
-
|
|
68
|
+
var _a2;
|
|
69
|
+
if (!((_a2 = props.config) == null ? void 0 : _a2.getOptions) || levelIndex >= level) {
|
|
64
70
|
return;
|
|
65
71
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
return;
|
|
72
|
+
loadingList.value[levelIndex] = true;
|
|
73
|
+
try {
|
|
74
|
+
const levelOptions = yield props.config.getOptions(levelIndex + 1, value);
|
|
75
|
+
optionsList.value[levelIndex] = levelOptions || [];
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.error("Failed to load linked select options:", error);
|
|
78
|
+
optionsList.value[levelIndex] = [];
|
|
79
|
+
} finally {
|
|
80
|
+
loadingList.value[levelIndex] = false;
|
|
77
81
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
linkedSelectLoading.value[i] = false;
|
|
86
|
-
}
|
|
87
|
-
linkedSelectOptions.value = options;
|
|
88
|
-
} catch (error) {
|
|
89
|
-
console.error("Failed to load linked select options:", error);
|
|
90
|
-
linkedSelectOptions.value = Array.from({ length: level }, () => []);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function loadDisplayData() {
|
|
85
|
+
return __async(this, null, function* () {
|
|
86
|
+
for (let i = 0; i < level - 1; i++) {
|
|
87
|
+
if (values.value[i] !== void 0 && values.value[i] !== null) {
|
|
88
|
+
yield loadOptions(i + 1, values.value[i]);
|
|
91
89
|
}
|
|
92
90
|
}
|
|
93
91
|
});
|
|
94
92
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
93
|
+
function watchModelValue() {
|
|
94
|
+
vue.watch(
|
|
95
|
+
() => props.modelValue,
|
|
96
|
+
(newVal) => __async(null, null, function* () {
|
|
97
|
+
if (newVal && newVal.length > 0) {
|
|
98
|
+
values.value = [...newVal];
|
|
99
|
+
yield loadDisplayData();
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
{ deep: true }
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
function handleSelectChange(index, value) {
|
|
106
|
+
for (let i = index + 1; i < level; i++) {
|
|
107
|
+
values.value[i] = void 0;
|
|
108
|
+
optionsList.value[i] = [];
|
|
109
|
+
}
|
|
110
|
+
const newValue = [...values.value];
|
|
108
111
|
emit("update:modelValue", newValue);
|
|
112
|
+
emit("change", newValue);
|
|
113
|
+
if (value !== void 0 && value !== null && index + 1 < level) {
|
|
114
|
+
loadOptions(index + 1, value);
|
|
115
|
+
}
|
|
109
116
|
}
|
|
117
|
+
vue.onMounted(() => {
|
|
118
|
+
var _a2;
|
|
119
|
+
watchModelValue();
|
|
120
|
+
loadDisplayData();
|
|
121
|
+
if ((_a2 = props.config) == null ? void 0 : _a2.getOptions) {
|
|
122
|
+
loadOptions(0, void 0);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
110
125
|
return (_ctx, _cache) => {
|
|
111
|
-
var _a;
|
|
112
126
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
113
127
|
vue.renderSlot(_ctx.$slots, "prefix"),
|
|
114
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array.from({ length: (
|
|
128
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(Array.from({ length: vue.unref(level) }), (_, index) => {
|
|
115
129
|
var _a2, _b, _c, _d, _e, _f;
|
|
116
130
|
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElSelect), vue.mergeProps({
|
|
117
131
|
key: index,
|
|
118
|
-
|
|
132
|
+
modelValue: values.value[index],
|
|
133
|
+
"onUpdate:modelValue": ($event) => values.value[index] = $event,
|
|
119
134
|
placeholder: ((_b = (_a2 = __props.config) == null ? void 0 : _a2.placeholders) == null ? void 0 : _b[index]) || "请选择",
|
|
120
|
-
disabled: __props.disabled,
|
|
135
|
+
disabled: __props.disabled || index > 0 && values.value[index - 1] === void 0 && values.value[index - 1] !== null,
|
|
121
136
|
filterable: (_d = (_c = __props.config) == null ? void 0 : _c.filterable) != null ? _d : false,
|
|
122
137
|
clearable: (_f = (_e = __props.config) == null ? void 0 : _e.clearable) != null ? _f : true,
|
|
123
|
-
loading:
|
|
138
|
+
loading: loadingList.value[index],
|
|
124
139
|
class: "flex-1 min-w-30"
|
|
125
140
|
}, { ref_for: true }, __props.componentProps, {
|
|
126
|
-
|
|
141
|
+
onChange: ($event) => handleSelectChange(index, $event)
|
|
127
142
|
}), {
|
|
128
143
|
default: vue.withCtx(() => [
|
|
129
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
130
|
-
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.
|
|
144
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(optionsList.value[index] || [], (option) => {
|
|
145
|
+
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOption), {
|
|
131
146
|
key: option.value,
|
|
132
147
|
value: option.value,
|
|
133
148
|
label: option.label,
|
|
@@ -136,7 +151,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
136
151
|
}), 128))
|
|
137
152
|
]),
|
|
138
153
|
_: 2
|
|
139
|
-
}, 1040, ["
|
|
154
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled", "filterable", "clearable", "loading", "onChange"]);
|
|
140
155
|
}), 128)),
|
|
141
156
|
vue.renderSlot(_ctx.$slots, "suffix")
|
|
142
157
|
]);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const LinkedSelect_vue_vue_type_script_setup_true_lang = require("./LinkedSelect.vue.js");
|
|
4
|
-
;/* empty css */
|
|
5
4
|
exports.default = LinkedSelect_vue_vue_type_script_setup_true_lang.default;
|
package/dist/lib/form/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { InstallWithSFC } from '../utils';
|
|
2
|
+
import { default as AMapPickerItem } from './AMapPickerItem.vue';
|
|
2
3
|
import { default as Form } from './Form.vue';
|
|
3
4
|
import { default as LinkedSelect } from './LinkedSelect.vue';
|
|
4
|
-
export type { ComponentPropsMap, ComponentPropsType, DynamicComponentProps, FormComponentType, FormItemChildConfig, FormItemConfig, FormItemOption, FormItemProps, FormItemPropsContext, FormProps, FormValidateResult, GridConfig, HelpConfig, HelpType, LinkedSelectConfig, ResponsiveBreakpoint, ResponsiveConfig, SelectTableComponentProps, SelectTableProps, StaticComponentProps, } from './types';
|
|
5
|
+
export type { AMapPickerItemProps, ComponentPropsMap, ComponentPropsType, DynamicComponentProps, FormComponentType, FormItemChildConfig, FormItemConfig, FormItemOption, FormItemProps, FormItemPropsContext, FormProps, FormValidateResult, GridConfig, HelpConfig, HelpType, LinkedSelectConfig, ResponsiveBreakpoint, ResponsiveConfig, SelectTableComponentProps, SelectTableProps, StaticComponentProps, } from './types';
|
|
5
6
|
export declare const JkyForm: InstallWithSFC<typeof Form>;
|
|
6
7
|
export declare const JkyLinkedSelect: InstallWithSFC<typeof LinkedSelect>;
|
|
8
|
+
export declare const JkyAMapPickerItem: InstallWithSFC<typeof AMapPickerItem>;
|
|
7
9
|
export default JkyForm;
|
package/dist/lib/form/index.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AMapPickerItem_vue_vue_type_script_setup_true_lang = require("./AMapPickerItem.vue.js");
|
|
4
|
+
;/* empty css */
|
|
3
5
|
const Form_vue_vue_type_script_setup_true_lang = require("./Form.vue.js");
|
|
4
6
|
;/* empty css */
|
|
5
7
|
const LinkedSelect_vue_vue_type_script_setup_true_lang = require("./LinkedSelect.vue.js");
|
|
6
|
-
;/* empty css */
|
|
7
8
|
const withInstall = require("../utils/with-install.js");
|
|
8
9
|
const JkyForm = withInstall.installWithSFC(Form_vue_vue_type_script_setup_true_lang.default);
|
|
9
10
|
const JkyLinkedSelect = withInstall.installWithSFC(LinkedSelect_vue_vue_type_script_setup_true_lang.default);
|
|
11
|
+
const JkyAMapPickerItem = withInstall.installWithSFC(AMapPickerItem_vue_vue_type_script_setup_true_lang.default);
|
|
12
|
+
exports.JkyAMapPickerItem = JkyAMapPickerItem;
|
|
10
13
|
exports.JkyForm = JkyForm;
|
|
11
14
|
exports.JkyLinkedSelect = JkyLinkedSelect;
|
|
12
15
|
exports.default = JkyForm;
|
package/dist/lib/index.js
CHANGED
|
@@ -4,17 +4,18 @@ const components = require("./components.js");
|
|
|
4
4
|
const installer$1 = require("./utils/installer.js");
|
|
5
5
|
;/* empty css */
|
|
6
6
|
const resolver = require("./resolver.js");
|
|
7
|
+
const AMapPicker_vue_vue_type_script_setup_true_lang = require("./amap/AMapPicker/AMapPicker.vue.js");
|
|
7
8
|
const AMarker_vue_vue_type_script_setup_true_lang = require("./amap/AMarker.vue.js");
|
|
8
9
|
;/* empty css */
|
|
9
10
|
const ATrackPlayback_vue_vue_type_script_setup_true_lang = require("./amap/ATrackPlayback.vue.js");
|
|
10
11
|
;/* empty css */
|
|
11
12
|
const index = require("./amap/index.js");
|
|
12
|
-
const index$1 = require("./
|
|
13
|
-
const index$2 = require("./
|
|
14
|
-
const index$3 = require("./
|
|
15
|
-
const index$4 = require("./button
|
|
16
|
-
const index$5 = require("./
|
|
17
|
-
const index$6 = require("./
|
|
13
|
+
const index$1 = require("./form/index.js");
|
|
14
|
+
const index$2 = require("./page-table/index.js");
|
|
15
|
+
const index$3 = require("./add-input/index.js");
|
|
16
|
+
const index$4 = require("./button/index.js");
|
|
17
|
+
const index$5 = require("./button-nav/index.js");
|
|
18
|
+
const index$6 = require("./code-mirror-editor/index.js");
|
|
18
19
|
const index$7 = require("./menu/index.js");
|
|
19
20
|
const index$8 = require("./modal/index.js");
|
|
20
21
|
const index$9 = require("./page-header/index.js");
|
|
@@ -30,20 +31,23 @@ const install = installer.install;
|
|
|
30
31
|
const version = installer.version;
|
|
31
32
|
exports.components = components.components;
|
|
32
33
|
exports.JkyComponentLibResolver = resolver.JkyComponentLibResolver;
|
|
34
|
+
exports.AMapPicker = AMapPicker_vue_vue_type_script_setup_true_lang.default;
|
|
33
35
|
exports.AMarker = AMarker_vue_vue_type_script_setup_true_lang.default;
|
|
34
36
|
exports.ATrackPlayback = ATrackPlayback_vue_vue_type_script_setup_true_lang.default;
|
|
35
37
|
exports.JkyAMap = index.JkyAMap;
|
|
38
|
+
exports.JkyAMapPicker = index.JkyAMapPicker;
|
|
36
39
|
exports.JkyAMarker = index.JkyAMarker;
|
|
37
40
|
exports.JkyATrackPlayback = index.JkyATrackPlayback;
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
41
|
+
exports.JkyAMapPickerItem = index$1.JkyAMapPickerItem;
|
|
42
|
+
exports.JkyForm = index$1.JkyForm;
|
|
43
|
+
exports.JkyLinkedSelect = index$1.JkyLinkedSelect;
|
|
44
|
+
exports.JkyActionColumn = index$2.JkyActionColumn;
|
|
45
|
+
exports.JkyPageTable = index$2.JkyPageTable;
|
|
46
|
+
exports.JkyPageTableColumn = index$2.JkyPageTableColumn;
|
|
47
|
+
exports.JkyAddInput = index$3.JkyAddInput;
|
|
48
|
+
exports.JkyButton = index$4.JkyButton;
|
|
49
|
+
exports.JkyButtonNav = index$5.JkyButtonNav;
|
|
50
|
+
exports.JkyCodeMirrorEditor = index$6.JkyCodeMirrorEditor;
|
|
47
51
|
exports.JkyMenu = index$7.JkyMenu;
|
|
48
52
|
exports.JkyModal = index$8.JkyModal;
|
|
49
53
|
exports.JkyPageHeader = index$9.JkyPageHeader;
|