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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AMapPickerProps, CoordinateValue } from './types';
|
|
2
|
+
type __VLS_Props = AMapPickerProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue?: CoordinateValue | null;
|
|
5
|
+
} & __VLS_Props;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
button?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: HTMLDivElement;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: CoordinateValue | null) => any;
|
|
17
|
+
} & {
|
|
18
|
+
"update:modelValue": (value: CoordinateValue | null) => any;
|
|
19
|
+
change: (value: CoordinateValue | null) => any;
|
|
20
|
+
cancel: () => any;
|
|
21
|
+
confirm: (value: CoordinateValue | null) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: CoordinateValue | null) => any) | undefined;
|
|
24
|
+
onChange?: ((value: CoordinateValue | null) => any) | undefined;
|
|
25
|
+
onCancel?: (() => any) | undefined;
|
|
26
|
+
onConfirm?: ((value: CoordinateValue | null) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
size: string | number;
|
|
29
|
+
title: string;
|
|
30
|
+
center: [number, number];
|
|
31
|
+
disabled: boolean;
|
|
32
|
+
token: string;
|
|
33
|
+
zoom: number;
|
|
34
|
+
mode: "dialog" | "drawer";
|
|
35
|
+
buttonText: string;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, useModel, ref, openBlock, createElementBlock, renderSlot, createVNode, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, createBlock, createCommentVNode, mergeModels } from "vue";
|
|
21
|
+
import { ElButton } from "element-plus";
|
|
22
|
+
import _sfc_main$1 from "../../modal/Modal.vue.js";
|
|
23
|
+
/* empty css */
|
|
24
|
+
import _sfc_main$2 from "../AMap.vue.js";
|
|
25
|
+
/* empty css */
|
|
26
|
+
import _sfc_main$3 from "../AMarker.vue.js";
|
|
27
|
+
/* empty css */
|
|
28
|
+
const _hoisted_1 = { class: "inline-block jky-amap-picker" };
|
|
29
|
+
const _hoisted_2 = { class: "relative overflow-hidden jky-amap-picker__map-wrapper" };
|
|
30
|
+
const _hoisted_3 = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "absolute left-4 top-2 p-2 bg-white/90 shadow-blueGray flex items-center gap-x-2 jky-amap-picker__coordinate-info"
|
|
33
|
+
};
|
|
34
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
35
|
+
name: "JkyAMapPicker"
|
|
36
|
+
}), {
|
|
37
|
+
__name: "AMapPicker",
|
|
38
|
+
props: /* @__PURE__ */ mergeModels({
|
|
39
|
+
token: { default: "75f62fbef756459563f042e5a2a1fd7c" },
|
|
40
|
+
buttonText: { default: "选择坐标" },
|
|
41
|
+
title: { default: "选择坐标位置" },
|
|
42
|
+
mode: { default: "dialog" },
|
|
43
|
+
size: { default: "800px" },
|
|
44
|
+
zoom: { default: 11 },
|
|
45
|
+
center: { default: () => [116.397428, 39.90923] },
|
|
46
|
+
disabled: { type: Boolean, default: false }
|
|
47
|
+
}, {
|
|
48
|
+
"modelValue": {},
|
|
49
|
+
"modelModifiers": {}
|
|
50
|
+
}),
|
|
51
|
+
emits: /* @__PURE__ */ mergeModels(["update:modelValue", "change", "confirm", "cancel"], ["update:modelValue"]),
|
|
52
|
+
setup(__props, { emit: __emit }) {
|
|
53
|
+
const props = __props;
|
|
54
|
+
const emit = __emit;
|
|
55
|
+
const modelValue = useModel(__props, "modelValue");
|
|
56
|
+
const modalVisible = ref(false);
|
|
57
|
+
const selectedCoordinate = ref(null);
|
|
58
|
+
function openModal() {
|
|
59
|
+
if (props.disabled)
|
|
60
|
+
return;
|
|
61
|
+
selectedCoordinate.value = modelValue.value ? __spreadValues({}, modelValue.value) : null;
|
|
62
|
+
modalVisible.value = true;
|
|
63
|
+
}
|
|
64
|
+
function handleMapClick(data) {
|
|
65
|
+
if (data && data.lnglat) {
|
|
66
|
+
selectedCoordinate.value = {
|
|
67
|
+
lng: data.lnglat.lng,
|
|
68
|
+
lat: data.lnglat.lat
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function handleConfirm() {
|
|
73
|
+
modelValue.value = selectedCoordinate.value;
|
|
74
|
+
emit("change", selectedCoordinate.value);
|
|
75
|
+
emit("confirm", selectedCoordinate.value);
|
|
76
|
+
modalVisible.value = false;
|
|
77
|
+
}
|
|
78
|
+
function handleCancel() {
|
|
79
|
+
emit("cancel");
|
|
80
|
+
modalVisible.value = false;
|
|
81
|
+
}
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
84
|
+
renderSlot(_ctx.$slots, "button", {}, () => [
|
|
85
|
+
createVNode(unref(ElButton), {
|
|
86
|
+
type: "primary",
|
|
87
|
+
disabled: __props.disabled,
|
|
88
|
+
onClick: openModal
|
|
89
|
+
}, {
|
|
90
|
+
default: withCtx(() => [
|
|
91
|
+
createTextVNode(toDisplayString(__props.buttonText), 1)
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["disabled"])
|
|
95
|
+
]),
|
|
96
|
+
createVNode(_sfc_main$1, {
|
|
97
|
+
modelValue: modalVisible.value,
|
|
98
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modalVisible.value = $event),
|
|
99
|
+
title: __props.title,
|
|
100
|
+
mode: __props.mode,
|
|
101
|
+
size: __props.size,
|
|
102
|
+
onConfirm: handleConfirm,
|
|
103
|
+
onCancel: handleCancel
|
|
104
|
+
}, {
|
|
105
|
+
default: withCtx(() => [
|
|
106
|
+
createElementVNode("div", _hoisted_2, [
|
|
107
|
+
createVNode(_sfc_main$2, {
|
|
108
|
+
token: __props.token,
|
|
109
|
+
zoom: __props.zoom,
|
|
110
|
+
center: __props.center,
|
|
111
|
+
height: "320px",
|
|
112
|
+
onClick: handleMapClick
|
|
113
|
+
}, {
|
|
114
|
+
default: withCtx(() => {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
return [
|
|
117
|
+
selectedCoordinate.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
118
|
+
key: 0,
|
|
119
|
+
markers: [{
|
|
120
|
+
position: [(_a = selectedCoordinate.value) == null ? void 0 : _a.lng, (_b = selectedCoordinate.value) == null ? void 0 : _b.lat]
|
|
121
|
+
}],
|
|
122
|
+
draggable: ""
|
|
123
|
+
}, null, 8, ["markers"])) : createCommentVNode("", true)
|
|
124
|
+
];
|
|
125
|
+
}),
|
|
126
|
+
_: 1
|
|
127
|
+
}, 8, ["token", "zoom", "center"]),
|
|
128
|
+
selectedCoordinate.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
129
|
+
createElementVNode("span", null, "经度: " + toDisplayString(selectedCoordinate.value.lng.toFixed(6)), 1),
|
|
130
|
+
createElementVNode("span", null, "纬度: " + toDisplayString(selectedCoordinate.value.lat.toFixed(6)), 1)
|
|
131
|
+
])) : createCommentVNode("", true)
|
|
132
|
+
])
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
}, 8, ["modelValue", "title", "mode", "size"])
|
|
136
|
+
]);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}));
|
|
140
|
+
export {
|
|
141
|
+
_sfc_main as default
|
|
142
|
+
};
|
package/dist/es/amap/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { InstallWithSFC } from '../utils';
|
|
2
2
|
import { default as AMap } from './AMap.vue';
|
|
3
|
+
import { default as AMapPicker } from './AMapPicker/AMapPicker.vue';
|
|
3
4
|
import { default as AMarker } from './AMarker.vue';
|
|
4
5
|
import { default as ATrackPlayback } from './ATrackPlayback.vue';
|
|
5
6
|
export declare const JkyAMap: InstallWithSFC<typeof AMap>;
|
|
7
|
+
export declare const JkyAMapPicker: InstallWithSFC<typeof AMapPicker>;
|
|
6
8
|
export declare const JkyAMarker: InstallWithSFC<typeof AMarker>;
|
|
7
9
|
export declare const JkyATrackPlayback: InstallWithSFC<typeof ATrackPlayback>;
|
|
8
10
|
export default JkyAMap;
|
|
9
|
-
export { AMarker, ATrackPlayback };
|
|
11
|
+
export { AMapPicker, AMarker, ATrackPlayback };
|
package/dist/es/amap/index.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import _sfc_main from "./AMap.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import _sfc_main$1 from "./
|
|
3
|
+
import _sfc_main$1 from "./AMapPicker/AMapPicker.vue.js";
|
|
4
|
+
import _sfc_main$2 from "./AMarker.vue.js";
|
|
4
5
|
/* empty css */
|
|
5
|
-
import _sfc_main$
|
|
6
|
+
import _sfc_main$3 from "./ATrackPlayback.vue.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { installWithSFC } from "../utils/with-install.js";
|
|
8
9
|
const JkyAMap = installWithSFC(_sfc_main);
|
|
9
|
-
const
|
|
10
|
-
const
|
|
10
|
+
const JkyAMapPicker = installWithSFC(_sfc_main$1);
|
|
11
|
+
const JkyAMarker = installWithSFC(_sfc_main$2);
|
|
12
|
+
const JkyATrackPlayback = installWithSFC(_sfc_main$3);
|
|
11
13
|
export {
|
|
12
|
-
_sfc_main$1 as
|
|
13
|
-
_sfc_main$2 as
|
|
14
|
+
_sfc_main$1 as AMapPicker,
|
|
15
|
+
_sfc_main$2 as AMarker,
|
|
16
|
+
_sfc_main$3 as ATrackPlayback,
|
|
14
17
|
JkyAMap,
|
|
18
|
+
JkyAMapPicker,
|
|
15
19
|
JkyAMarker,
|
|
16
20
|
JkyATrackPlayback,
|
|
17
21
|
JkyAMap as default
|
package/dist/es/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/es/amap/style2.css
CHANGED
package/dist/es/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/es/components.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { JkyAddInput } from "./add-input/index.js";
|
|
2
|
-
import { JkyAMap } from "./amap/index.js";
|
|
2
|
+
import { JkyAMap, JkyAMapPicker } from "./amap/index.js";
|
|
3
3
|
import { JkyAMarker, JkyATrackPlayback } from "./amap/index.js";
|
|
4
4
|
import { JkyButton } from "./button/index.js";
|
|
5
5
|
import { JkyButtonNav } from "./button-nav/index.js";
|
|
6
6
|
import { JkyCodeMirrorEditor } from "./code-mirror-editor/index.js";
|
|
7
|
-
import { JkyForm, JkyLinkedSelect } from "./form/index.js";
|
|
7
|
+
import { JkyForm, JkyLinkedSelect, JkyAMapPickerItem } from "./form/index.js";
|
|
8
8
|
import { JkyMenu } from "./menu/index.js";
|
|
9
9
|
import { JkyModal } from "./modal/index.js";
|
|
10
10
|
import { JkyPageHeader } from "./page-header/index.js";
|
|
@@ -23,6 +23,7 @@ const components = [
|
|
|
23
23
|
JkyMenu,
|
|
24
24
|
JkyForm,
|
|
25
25
|
JkyLinkedSelect,
|
|
26
|
+
JkyAMapPickerItem,
|
|
26
27
|
JkyCodeMirrorEditor,
|
|
27
28
|
JkyAddInput,
|
|
28
29
|
JkyRichEditor,
|
|
@@ -31,10 +32,13 @@ const components = [
|
|
|
31
32
|
JkyPageLayout,
|
|
32
33
|
JkyTabs,
|
|
33
34
|
JkyModal,
|
|
34
|
-
JkyAMap
|
|
35
|
+
JkyAMap,
|
|
36
|
+
JkyAMapPicker
|
|
35
37
|
];
|
|
36
38
|
export {
|
|
37
39
|
JkyAMap,
|
|
40
|
+
JkyAMapPicker,
|
|
41
|
+
JkyAMapPickerItem,
|
|
38
42
|
JkyAMarker,
|
|
39
43
|
JkyATrackPlayback,
|
|
40
44
|
JkyActionColumn,
|
|
@@ -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
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref } from "vue";
|
|
21
|
+
import { ElInputNumber } from "element-plus";
|
|
22
|
+
import _sfc_main$1 from "../amap/AMapPicker/AMapPicker.vue.js";
|
|
23
|
+
const _hoisted_1 = { class: "jky-amap-picker-item flex items-center gap-2" };
|
|
24
|
+
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
25
|
+
name: "JkyAMapPickerItem"
|
|
26
|
+
}), {
|
|
27
|
+
__name: "AMapPickerItem",
|
|
28
|
+
props: {
|
|
29
|
+
modelValue: {},
|
|
30
|
+
token: { default: "75f62fbef756459563f042e5a2a1fd7c" },
|
|
31
|
+
buttonText: { default: "拾取坐标" },
|
|
32
|
+
longitudePlaceholder: { default: "请输入经度" },
|
|
33
|
+
latitudePlaceholder: { default: "请输入纬度" },
|
|
34
|
+
title: { default: "选择坐标" },
|
|
35
|
+
mode: { default: "dialog" },
|
|
36
|
+
size: { default: "600px" },
|
|
37
|
+
zoom: { default: 15 },
|
|
38
|
+
center: { default: () => [116.397428, 39.90923] },
|
|
39
|
+
disabled: { type: Boolean }
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:modelValue", "change"],
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const coordinateValue = computed({
|
|
46
|
+
get: () => {
|
|
47
|
+
if (!props.modelValue || props.modelValue.length !== 2)
|
|
48
|
+
return null;
|
|
49
|
+
return { lng: props.modelValue[0], lat: props.modelValue[1] };
|
|
50
|
+
},
|
|
51
|
+
set: (val) => {
|
|
52
|
+
if (val) {
|
|
53
|
+
const newValue = [val.lng, val.lat];
|
|
54
|
+
emit("update:modelValue", newValue);
|
|
55
|
+
emit("change", newValue);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
var _a, _b, _c, _d;
|
|
61
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
62
|
+
createVNode(unref(ElInputNumber), {
|
|
63
|
+
"model-value": (_b = (_a = props.modelValue) == null ? void 0 : _a[0]) != null ? _b : null,
|
|
64
|
+
placeholder: __props.longitudePlaceholder,
|
|
65
|
+
disabled: __props.disabled,
|
|
66
|
+
controls: false,
|
|
67
|
+
class: "flex-1",
|
|
68
|
+
precision: 6,
|
|
69
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => {
|
|
70
|
+
var _a2, _b2;
|
|
71
|
+
return emit("update:modelValue", val !== void 0 ? [val, (_b2 = (_a2 = props.modelValue) == null ? void 0 : _a2[1]) != null ? _b2 : 0] : null);
|
|
72
|
+
})
|
|
73
|
+
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
74
|
+
createVNode(unref(ElInputNumber), {
|
|
75
|
+
"model-value": (_d = (_c = props.modelValue) == null ? void 0 : _c[1]) != null ? _d : null,
|
|
76
|
+
placeholder: __props.latitudePlaceholder,
|
|
77
|
+
disabled: __props.disabled,
|
|
78
|
+
controls: false,
|
|
79
|
+
class: "flex-1",
|
|
80
|
+
precision: 6,
|
|
81
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = (val) => {
|
|
82
|
+
var _a2, _b2;
|
|
83
|
+
return emit("update:modelValue", val !== void 0 ? [(_b2 = (_a2 = props.modelValue) == null ? void 0 : _a2[0]) != null ? _b2 : 0, val] : null);
|
|
84
|
+
})
|
|
85
|
+
}, null, 8, ["model-value", "placeholder", "disabled"]),
|
|
86
|
+
createVNode(_sfc_main$1, {
|
|
87
|
+
modelValue: coordinateValue.value,
|
|
88
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => coordinateValue.value = $event),
|
|
89
|
+
token: __props.token,
|
|
90
|
+
"button-text": __props.buttonText,
|
|
91
|
+
title: __props.title,
|
|
92
|
+
mode: __props.mode,
|
|
93
|
+
size: __props.size,
|
|
94
|
+
zoom: __props.zoom,
|
|
95
|
+
center: __props.center,
|
|
96
|
+
disabled: __props.disabled
|
|
97
|
+
}, null, 8, ["modelValue", "token", "button-text", "title", "mode", "size", "zoom", "center", "disabled"])
|
|
98
|
+
]);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
102
|
+
export {
|
|
103
|
+
_sfc_main as default
|
|
104
|
+
};
|
|
@@ -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;
|
|
@@ -49,15 +49,16 @@ var __async = (__this, __arguments, generator) => {
|
|
|
49
49
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
import { defineComponent, ref, computed,
|
|
52
|
+
import { defineComponent, ref, computed, openBlock, createElementBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, resolveDynamicComponent, Fragment, createTextVNode, toDisplayString, createCommentVNode, createSlots, watch, h } from "vue";
|
|
53
53
|
import { Plus, CircleCloseFilled, CircleCheckFilled, WarningFilled, QuestionFilled } from "@element-plus/icons-vue";
|
|
54
54
|
import { ElFormItem, ElDivider, ElInput, ElUpload, ElButton, ElIcon, ElInputNumber, ElRate, ElTransfer, ElSelectV2, ElMention, ElInputTag, ElColorPickerPanel, ElColorPicker, ElTreeSelect, ElCascader, ElSlider, ElSwitch, ElCheckboxGroup, ElCheckbox, ElRadioGroup, ElRadioButton, ElRadio, ElTimeSelect, ElTimePicker, ElDatePicker, ElAutocomplete, ElSelect, ElTooltip } from "element-plus";
|
|
55
55
|
import { JkyAddInput } from "../add-input/index.js";
|
|
56
56
|
import { JkyCodeMirrorEditor } from "../code-mirror-editor/index.js";
|
|
57
57
|
import { JkyRichEditor } from "../rich-editor/index.js";
|
|
58
|
-
import _sfc_main$1 from "./
|
|
59
|
-
/* empty css
|
|
60
|
-
import _sfc_main$2 from "./
|
|
58
|
+
import _sfc_main$1 from "./AMapPickerItem.vue.js";
|
|
59
|
+
/* empty css */
|
|
60
|
+
import _sfc_main$2 from "./LinkedSelect.vue.js";
|
|
61
|
+
import _sfc_main$3 from "./SelectTable.vue.js";
|
|
61
62
|
/* empty css */
|
|
62
63
|
const _hoisted_1 = {
|
|
63
64
|
key: 0,
|
|
@@ -161,22 +162,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
161
162
|
rules.value = configRules;
|
|
162
163
|
});
|
|
163
164
|
}
|
|
165
|
+
function setupWatchFields() {
|
|
166
|
+
const watchFields = props.config.watchFields;
|
|
167
|
+
if (!watchFields || watchFields.length === 0) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
watch(
|
|
171
|
+
() => watchFields.map((field) => props.model[field]),
|
|
172
|
+
() => {
|
|
173
|
+
loadComponentProps();
|
|
174
|
+
loadRules();
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
}
|
|
164
178
|
loadComponentProps();
|
|
165
179
|
loadRules();
|
|
180
|
+
setupWatchFields();
|
|
166
181
|
const modelValue = computed({
|
|
167
182
|
get: () => props.model[props.field],
|
|
168
183
|
set: (val) => {
|
|
169
184
|
props.model[props.field] = val;
|
|
170
185
|
}
|
|
171
186
|
});
|
|
172
|
-
watch(
|
|
173
|
-
() => props.model,
|
|
174
|
-
() => {
|
|
175
|
-
loadComponentProps();
|
|
176
|
-
loadRules();
|
|
177
|
-
},
|
|
178
|
-
{ deep: true }
|
|
179
|
-
);
|
|
180
187
|
const isHidden = computed(() => {
|
|
181
188
|
if (typeof props.config.hidden === "function") {
|
|
182
189
|
return props.config.hidden({
|
|
@@ -422,7 +429,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
422
429
|
}
|
|
423
430
|
// 表格选择器
|
|
424
431
|
case "select-table":
|
|
425
|
-
return h(_sfc_main$
|
|
432
|
+
return h(_sfc_main$3, __spreadProps(__spreadValues(__spreadValues({}, commonProps), componentProps.value), {
|
|
426
433
|
labelWidth: formItemProps.value.labelWidth
|
|
427
434
|
}), _componentSlotsObj);
|
|
428
435
|
case "rate":
|
|
@@ -494,7 +501,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
494
501
|
}
|
|
495
502
|
// 联动下拉框
|
|
496
503
|
case "linked-select":
|
|
497
|
-
return h(_sfc_main$
|
|
504
|
+
return h(_sfc_main$2, {
|
|
498
505
|
"config": props.config.config,
|
|
499
506
|
"modelValue": modelValue.value,
|
|
500
507
|
"disabled": props.disabled,
|
|
@@ -503,6 +510,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
503
510
|
props.model[props.field] = val;
|
|
504
511
|
}
|
|
505
512
|
}, _componentSlotsObj);
|
|
513
|
+
// 高德地图坐标拾取器
|
|
514
|
+
case "amap-picker":
|
|
515
|
+
return h(_sfc_main$1, __spreadProps(__spreadValues({
|
|
516
|
+
"modelValue": modelValue.value,
|
|
517
|
+
"disabled": props.disabled
|
|
518
|
+
}, props.config.componentProps), {
|
|
519
|
+
"onUpdate:modelValue": (val) => {
|
|
520
|
+
props.model[props.field] = val;
|
|
521
|
+
}
|
|
522
|
+
}), _componentSlotsObj);
|
|
506
523
|
case "custom":
|
|
507
524
|
return (_b = (_a = props.config).render) == null ? void 0 : _b.call(_a, commonProps);
|
|
508
525
|
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;
|