jky-component-lib 0.0.140 → 0.0.142
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/AClusterMarker/AClusterMarker.vue.d.ts +55 -0
- package/dist/es/amap/AClusterMarker/AClusterMarker.vue.js +202 -0
- package/dist/es/amap/AClusterMarker/AClusterMarker.vue2.js +4 -0
- package/dist/es/amap/AClusterMarker/index.d.ts +4 -0
- package/dist/es/amap/AClusterMarker/index.js +7 -0
- package/dist/es/amap/AMap.vue.d.ts +2 -2
- package/dist/es/amap/AMap.vue.js +3 -1
- package/dist/es/amap/AMapPicker/AMapPicker.vue.js +1 -1
- package/dist/es/amap/AMarker.vue.d.ts +1 -1
- package/dist/es/amap/index.d.ts +5 -1
- package/dist/es/amap/index.js +4 -0
- package/dist/es/amap/style.css +6 -2
- package/dist/es/amap/style3.css +2 -6
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.d.ts +0 -1
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.js +5 -7
- package/dist/es/code-mirror-editor/style.css +0 -38
- package/dist/es/components.d.ts +1 -0
- package/dist/es/components.js +6 -2
- package/dist/es/draggable/Draggable.vue.d.ts +78 -0
- package/dist/es/draggable/Draggable.vue.js +130 -0
- package/dist/es/draggable/Draggable.vue3.js +5 -0
- package/dist/es/draggable/index.d.ts +4 -0
- package/dist/es/draggable/index.js +8 -0
- package/dist/es/draggable/style.css +16 -0
- package/dist/es/form/items/SelectTableItem.vue.d.ts +6 -0
- package/dist/es/index.js +6 -1
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-table/ActionColumn.vue.js +4 -3
- package/dist/es/page-table/PageTable.vue.js +6 -1
- package/dist/es/style.css +195 -0
- package/dist/es/styles.css +1 -1
- package/dist/lib/amap/AClusterMarker/AClusterMarker.vue.d.ts +55 -0
- package/dist/lib/amap/AClusterMarker/AClusterMarker.vue.js +202 -0
- package/dist/lib/amap/AClusterMarker/AClusterMarker.vue2.js +4 -0
- package/dist/lib/amap/AClusterMarker/index.d.ts +4 -0
- package/dist/lib/amap/AClusterMarker/index.js +7 -0
- package/dist/lib/amap/AMap.vue.d.ts +2 -2
- package/dist/lib/amap/AMap.vue.js +3 -1
- package/dist/lib/amap/AMapPicker/AMapPicker.vue.js +1 -1
- package/dist/lib/amap/AMarker.vue.d.ts +1 -1
- package/dist/lib/amap/index.d.ts +5 -1
- package/dist/lib/amap/index.js +4 -0
- package/dist/lib/amap/style.css +6 -2
- package/dist/lib/amap/style3.css +2 -6
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.d.ts +0 -1
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.js +4 -6
- package/dist/lib/code-mirror-editor/style.css +0 -38
- package/dist/lib/components.d.ts +1 -0
- package/dist/lib/components.js +59 -55
- package/dist/lib/draggable/Draggable.vue.d.ts +78 -0
- package/dist/lib/draggable/Draggable.vue.js +130 -0
- package/dist/lib/draggable/Draggable.vue3.js +5 -0
- package/dist/lib/draggable/index.d.ts +4 -0
- package/dist/lib/draggable/index.js +8 -0
- package/dist/lib/draggable/style.css +16 -0
- package/dist/lib/form/items/SelectTableItem.vue.d.ts +6 -0
- package/dist/lib/index.js +42 -37
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-table/ActionColumn.vue.js +4 -3
- package/dist/lib/page-table/PageTable.vue.js +6 -1
- package/dist/lib/style.css +195 -0
- package/dist/lib/styles.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,202 @@
|
|
|
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 _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
24
|
+
name: "JkyAClusterMarker",
|
|
25
|
+
inheritAttrs: false
|
|
26
|
+
}), {
|
|
27
|
+
__name: "AClusterMarker",
|
|
28
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
29
|
+
map: {},
|
|
30
|
+
points: {},
|
|
31
|
+
gridSize: { default: 60 },
|
|
32
|
+
styles: {},
|
|
33
|
+
visible: { type: Boolean, default: true },
|
|
34
|
+
zoomOnClick: { type: Boolean, default: true },
|
|
35
|
+
minClusterSize: { default: 2 },
|
|
36
|
+
maxZoom: {},
|
|
37
|
+
averageCenter: { type: Boolean, default: false },
|
|
38
|
+
renderClusterMarker: {},
|
|
39
|
+
renderMarker: {},
|
|
40
|
+
enable: { type: Boolean, default: true }
|
|
41
|
+
}, {
|
|
42
|
+
"modelValue": { default: () => [] },
|
|
43
|
+
"modelModifiers": {}
|
|
44
|
+
}),
|
|
45
|
+
emits: /* @__PURE__ */ vue.mergeModels(["click", "mouseover", "mouseout", "ready"], ["update:modelValue"]),
|
|
46
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
47
|
+
const props = __props;
|
|
48
|
+
const emit = __emit;
|
|
49
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
50
|
+
let clusterInstance = null;
|
|
51
|
+
let mapInstance = null;
|
|
52
|
+
function initCluster(map) {
|
|
53
|
+
if (!map || !window.AMap)
|
|
54
|
+
return;
|
|
55
|
+
mapInstance = map;
|
|
56
|
+
if (!window.AMap.MarkerCluster) {
|
|
57
|
+
console.warn("AMap.MarkerCluster 插件未加载,请先加载插件");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (clusterInstance) {
|
|
61
|
+
clusterInstance.setMap(null);
|
|
62
|
+
clusterInstance = null;
|
|
63
|
+
}
|
|
64
|
+
const points = preparePoints();
|
|
65
|
+
const clusterOptions = {
|
|
66
|
+
gridSize: props.gridSize,
|
|
67
|
+
zoomOnClick: props.zoomOnClick,
|
|
68
|
+
minClusterSize: props.minClusterSize,
|
|
69
|
+
averageCenter: props.averageCenter
|
|
70
|
+
};
|
|
71
|
+
if (props.styles && props.styles.length > 0) {
|
|
72
|
+
clusterOptions.styles = props.styles.map((style) => ({
|
|
73
|
+
url: style.url,
|
|
74
|
+
size: style.size ? new window.AMap.Size(style.size[0], style.size[1]) : void 0,
|
|
75
|
+
offset: style.offset ? new window.AMap.Pixel(style.offset[0], style.offset[1]) : void 0,
|
|
76
|
+
textColor: style.textColor,
|
|
77
|
+
textSize: style.textSize
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
if (props.renderClusterMarker) {
|
|
81
|
+
clusterOptions.renderClusterMarker = props.renderClusterMarker;
|
|
82
|
+
}
|
|
83
|
+
if (props.renderMarker) {
|
|
84
|
+
clusterOptions.renderMarker = props.renderMarker;
|
|
85
|
+
}
|
|
86
|
+
clusterInstance = new window.AMap.MarkerCluster(map, points, clusterOptions);
|
|
87
|
+
clusterInstance.on("click", (cluster) => {
|
|
88
|
+
emit("click", cluster);
|
|
89
|
+
});
|
|
90
|
+
clusterInstance.on("mouseover", (cluster) => {
|
|
91
|
+
emit("mouseover", cluster);
|
|
92
|
+
});
|
|
93
|
+
clusterInstance.on("mouseout", (cluster) => {
|
|
94
|
+
emit("mouseout", cluster);
|
|
95
|
+
});
|
|
96
|
+
emit("ready", clusterInstance);
|
|
97
|
+
}
|
|
98
|
+
function preparePoints() {
|
|
99
|
+
const points = props.points || modelValue.value || [];
|
|
100
|
+
return points.map((point) => __spreadValues({
|
|
101
|
+
lnglat: point.lnglat,
|
|
102
|
+
title: point.title,
|
|
103
|
+
content: point.content
|
|
104
|
+
}, point.data));
|
|
105
|
+
}
|
|
106
|
+
function updatePoints(newPoints) {
|
|
107
|
+
if (!clusterInstance)
|
|
108
|
+
return;
|
|
109
|
+
clusterInstance.setMap(null);
|
|
110
|
+
const points = newPoints.map((point) => __spreadValues({
|
|
111
|
+
lnglat: point.lnglat,
|
|
112
|
+
title: point.title,
|
|
113
|
+
content: point.content
|
|
114
|
+
}, point.data));
|
|
115
|
+
clusterInstance.addMarkers(points);
|
|
116
|
+
}
|
|
117
|
+
function clearClusters() {
|
|
118
|
+
if (clusterInstance) {
|
|
119
|
+
clusterInstance.setMap(null);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function destroy() {
|
|
123
|
+
if (clusterInstance) {
|
|
124
|
+
clusterInstance.setMap(null);
|
|
125
|
+
clusterInstance = null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
__expose({
|
|
129
|
+
updatePoints,
|
|
130
|
+
clearClusters,
|
|
131
|
+
destroy,
|
|
132
|
+
getClusterInstance: () => clusterInstance
|
|
133
|
+
});
|
|
134
|
+
vue.watch(
|
|
135
|
+
() => props.map,
|
|
136
|
+
(newMap) => {
|
|
137
|
+
if (newMap && props.enable) {
|
|
138
|
+
initCluster(newMap);
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{ immediate: true }
|
|
142
|
+
);
|
|
143
|
+
vue.watch(
|
|
144
|
+
() => props.points,
|
|
145
|
+
(newPoints) => {
|
|
146
|
+
if (clusterInstance && newPoints) {
|
|
147
|
+
updatePoints(newPoints);
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{ deep: true }
|
|
151
|
+
);
|
|
152
|
+
vue.watch(
|
|
153
|
+
() => modelValue.value,
|
|
154
|
+
(newValue) => {
|
|
155
|
+
if (clusterInstance && newValue) {
|
|
156
|
+
updatePoints(newValue);
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{ deep: true }
|
|
160
|
+
);
|
|
161
|
+
vue.watch(
|
|
162
|
+
() => props.gridSize,
|
|
163
|
+
() => {
|
|
164
|
+
if (mapInstance && props.enable) {
|
|
165
|
+
initCluster(mapInstance);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
vue.watch(
|
|
170
|
+
() => props.styles,
|
|
171
|
+
() => {
|
|
172
|
+
if (mapInstance && props.enable) {
|
|
173
|
+
initCluster(mapInstance);
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{ deep: true }
|
|
177
|
+
);
|
|
178
|
+
vue.watch(
|
|
179
|
+
() => props.renderClusterMarker,
|
|
180
|
+
() => {
|
|
181
|
+
if (mapInstance && props.enable) {
|
|
182
|
+
initCluster(mapInstance);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
vue.watch(
|
|
187
|
+
() => props.renderMarker,
|
|
188
|
+
() => {
|
|
189
|
+
if (mapInstance && props.enable) {
|
|
190
|
+
initCluster(mapInstance);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
);
|
|
194
|
+
vue.onUnmounted(() => {
|
|
195
|
+
destroy();
|
|
196
|
+
});
|
|
197
|
+
return (_ctx, _cache) => {
|
|
198
|
+
return vue.renderSlot(_ctx.$slots, "default");
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}));
|
|
202
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AClusterMarker_vue_vue_type_script_setup_true_lang = require("./AClusterMarker.vue.js");
|
|
4
|
+
exports.default = AClusterMarker_vue_vue_type_script_setup_true_lang.default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const AClusterMarker_vue_vue_type_script_setup_true_lang = require("./AClusterMarker.vue.js");
|
|
4
|
+
const withInstall = require("../../utils/with-install.js");
|
|
5
|
+
const JkyAClusterMarker = withInstall.installWithSFC(AClusterMarker_vue_vue_type_script_setup_true_lang.default);
|
|
6
|
+
exports.JkyAClusterMarker = JkyAClusterMarker;
|
|
7
|
+
exports.default = JkyAClusterMarker;
|
|
@@ -16,20 +16,20 @@ declare const __VLS_component: import('vue').DefineComponent<AMapProps, {
|
|
|
16
16
|
removeMarker: (marker: any) => void;
|
|
17
17
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
18
18
|
click: (data: any) => any;
|
|
19
|
+
ready: (map: any) => any;
|
|
19
20
|
moveend: (center: {
|
|
20
21
|
lng: number;
|
|
21
22
|
lat: number;
|
|
22
23
|
}) => any;
|
|
23
24
|
zoomend: (zoom: number) => any;
|
|
24
|
-
ready: (map: any) => any;
|
|
25
25
|
}, string, import('vue').PublicProps, Readonly<AMapProps> & Readonly<{
|
|
26
26
|
onClick?: ((data: any) => any) | undefined;
|
|
27
|
+
onReady?: ((map: any) => any) | undefined;
|
|
27
28
|
onMoveend?: ((center: {
|
|
28
29
|
lng: number;
|
|
29
30
|
lat: number;
|
|
30
31
|
}) => any) | undefined;
|
|
31
32
|
onZoomend?: ((zoom: number) => any) | undefined;
|
|
32
|
-
onReady?: ((map: any) => any) | undefined;
|
|
33
33
|
}>, {
|
|
34
34
|
width: string;
|
|
35
35
|
height: string;
|
|
@@ -80,7 +80,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
80
80
|
const isMapLoaded = vue.ref(false);
|
|
81
81
|
const controls = vue.ref({});
|
|
82
82
|
const getMapUrl = vue.computed(() => {
|
|
83
|
-
const plugins = [
|
|
83
|
+
const plugins = [
|
|
84
|
+
"AMap.MarkerCluster"
|
|
85
|
+
];
|
|
84
86
|
if (props.showScale)
|
|
85
87
|
plugins.push("AMap.Scale");
|
|
86
88
|
if (props.showHawkEye)
|
|
@@ -110,7 +110,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
110
110
|
token: __props.token,
|
|
111
111
|
zoom: __props.zoom,
|
|
112
112
|
center: __props.center,
|
|
113
|
-
|
|
113
|
+
class: "w-full h-80",
|
|
114
114
|
onClick: handleMapClick
|
|
115
115
|
}, {
|
|
116
116
|
default: vue.withCtx(() => {
|
|
@@ -25,8 +25,8 @@ declare const __VLS_component: import('vue').DefineComponent<AMapMarkerProps, {
|
|
|
25
25
|
onMouseout?: ((marker: any, data: MarkerData) => any) | undefined;
|
|
26
26
|
onMouseover?: ((marker: any, data: MarkerData) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
|
-
draggable: boolean;
|
|
29
28
|
visible: boolean;
|
|
29
|
+
draggable: boolean;
|
|
30
30
|
updateMode: "incremental" | "full";
|
|
31
31
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
package/dist/lib/amap/index.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { InstallWithSFC } from '../utils';
|
|
2
|
+
import { default as AClusterMarker } from './AClusterMarker';
|
|
2
3
|
import { default as AMap } from './AMap.vue';
|
|
3
4
|
import { default as AMapPicker } from './AMapPicker/AMapPicker.vue';
|
|
4
5
|
import { default as AMarker } from './AMarker.vue';
|
|
5
6
|
import { default as ATrackPlayback } from './ATrackPlayback.vue';
|
|
7
|
+
export type * from './AClusterMarker/types';
|
|
8
|
+
export type * from './types';
|
|
6
9
|
export declare const JkyAMap: InstallWithSFC<typeof AMap>;
|
|
7
10
|
export declare const JkyAMapPicker: InstallWithSFC<typeof AMapPicker>;
|
|
11
|
+
export declare const JkyAClusterMarker: InstallWithSFC<typeof AClusterMarker>;
|
|
8
12
|
export declare const JkyAMarker: InstallWithSFC<typeof AMarker>;
|
|
9
13
|
export declare const JkyATrackPlayback: InstallWithSFC<typeof ATrackPlayback>;
|
|
10
14
|
export default JkyAMap;
|
|
11
|
-
export { AMapPicker, AMarker, ATrackPlayback };
|
|
15
|
+
export { AClusterMarker, AMapPicker, AMarker, ATrackPlayback };
|
package/dist/lib/amap/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const index = require("./AClusterMarker/index.js");
|
|
3
4
|
const AMap_vue_vue_type_script_setup_true_lang = require("./AMap.vue.js");
|
|
4
5
|
;/* empty css */
|
|
5
6
|
const AMapPicker_vue_vue_type_script_setup_true_lang = require("./AMapPicker/AMapPicker.vue.js");
|
|
@@ -10,11 +11,14 @@ const ATrackPlayback_vue_vue_type_script_setup_true_lang = require("./ATrackPlay
|
|
|
10
11
|
const withInstall = require("../utils/with-install.js");
|
|
11
12
|
const JkyAMap = withInstall.installWithSFC(AMap_vue_vue_type_script_setup_true_lang.default);
|
|
12
13
|
const JkyAMapPicker = withInstall.installWithSFC(AMapPicker_vue_vue_type_script_setup_true_lang.default);
|
|
14
|
+
const JkyAClusterMarker = withInstall.installWithSFC(index.JkyAClusterMarker);
|
|
13
15
|
const JkyAMarker = withInstall.installWithSFC(AMarker_vue_vue_type_script_setup_true_lang.default);
|
|
14
16
|
const JkyATrackPlayback = withInstall.installWithSFC(ATrackPlayback_vue_vue_type_script_setup_true_lang.default);
|
|
17
|
+
exports.AClusterMarker = index.JkyAClusterMarker;
|
|
15
18
|
exports.AMapPicker = AMapPicker_vue_vue_type_script_setup_true_lang.default;
|
|
16
19
|
exports.AMarker = AMarker_vue_vue_type_script_setup_true_lang.default;
|
|
17
20
|
exports.ATrackPlayback = ATrackPlayback_vue_vue_type_script_setup_true_lang.default;
|
|
21
|
+
exports.JkyAClusterMarker = JkyAClusterMarker;
|
|
18
22
|
exports.JkyAMap = JkyAMap;
|
|
19
23
|
exports.JkyAMapPicker = JkyAMapPicker;
|
|
20
24
|
exports.JkyAMarker = JkyAMarker;
|
package/dist/lib/amap/style.css
CHANGED
package/dist/lib/amap/style3.css
CHANGED
|
@@ -11,7 +11,6 @@ declare const _default: import('vue').DefineComponent<CodeMirrorEditorProps, {
|
|
|
11
11
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
12
12
|
onChange?: ((value: string) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
-
height: string;
|
|
15
14
|
modelValue: string;
|
|
16
15
|
disabled: boolean;
|
|
17
16
|
readonly: boolean;
|
|
@@ -30,13 +30,14 @@ const state = require("@codemirror/state");
|
|
|
30
30
|
const themeOneDark = require("@codemirror/theme-one-dark");
|
|
31
31
|
const view = require("@codemirror/view");
|
|
32
32
|
const codemirror = require("codemirror");
|
|
33
|
+
const _hoisted_1 = { class: "j-code-mirror-editor min-h-0 min-w-full" };
|
|
33
34
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
34
35
|
name: "JkyCodeMirrorEditor"
|
|
35
36
|
}), {
|
|
36
37
|
__name: "CodeMirrorEditor",
|
|
37
38
|
props: {
|
|
38
39
|
modelValue: { default: "" },
|
|
39
|
-
height: {
|
|
40
|
+
height: {},
|
|
40
41
|
disabled: { type: Boolean, default: false },
|
|
41
42
|
readonly: { type: Boolean, default: false },
|
|
42
43
|
language: { default: "javascript" },
|
|
@@ -171,16 +172,13 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
|
|
|
171
172
|
}
|
|
172
173
|
});
|
|
173
174
|
return (_ctx, _cache) => {
|
|
174
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
|
175
|
-
class: "j-code-mirror-editor",
|
|
176
|
-
style: vue.normalizeStyle({ height: __props.height })
|
|
177
|
-
}, [
|
|
175
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
178
176
|
vue.createElementVNode("div", {
|
|
179
177
|
ref_key: "editorRef",
|
|
180
178
|
ref: editorRef,
|
|
181
179
|
class: "code-mirror-container"
|
|
182
180
|
}, null, 512)
|
|
183
|
-
]
|
|
181
|
+
]);
|
|
184
182
|
};
|
|
185
183
|
}
|
|
186
184
|
}));
|
|
@@ -4,41 +4,3 @@
|
|
|
4
4
|
--j-code-mirror-border-radius: 4px;
|
|
5
5
|
--j-code-mirror-height: 400px;
|
|
6
6
|
}
|
|
7
|
-
.j-code-mirror-editor {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: var(--j-code-mirror-height);
|
|
10
|
-
/* border: 1px solid var(--j-code-mirror-border-color); */
|
|
11
|
-
border-radius: var(--j-code-mirror-border-radius);
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
}
|
|
14
|
-
.code-mirror-container {
|
|
15
|
-
height: 100%;
|
|
16
|
-
width: 100%;
|
|
17
|
-
overflow: auto;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/* CodeMirror 基础样式覆盖 */
|
|
21
|
-
.code-mirror-container .cm-editor {
|
|
22
|
-
height: 100%;
|
|
23
|
-
}
|
|
24
|
-
.code-mirror-container .cm-scroller {
|
|
25
|
-
overflow: auto;
|
|
26
|
-
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
|
27
|
-
font-size: 14px;
|
|
28
|
-
line-height: 1.5;
|
|
29
|
-
}
|
|
30
|
-
.code-mirror-container .cm-gutters {
|
|
31
|
-
background-color: #2c2d2d;
|
|
32
|
-
border-color: #4c4d4f;
|
|
33
|
-
color: #909399;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* 暗黑模式支持 */
|
|
37
|
-
html.dark .j-code-mirror-editor {
|
|
38
|
-
/* border-color: #4c4d4f; */
|
|
39
|
-
}
|
|
40
|
-
html.dark .code-mirror-container .cm-gutters {
|
|
41
|
-
/* background-color: #2c2d2d;
|
|
42
|
-
border-color: #4c4d4f;
|
|
43
|
-
color: #909399; */
|
|
44
|
-
}
|
package/dist/lib/components.d.ts
CHANGED
package/dist/lib/components.js
CHANGED
|
@@ -1,60 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index$
|
|
4
|
-
const index = require("./amap/index.js");
|
|
5
|
-
const index$
|
|
6
|
-
const index$
|
|
7
|
-
const index$
|
|
8
|
-
const index$
|
|
9
|
-
const index$
|
|
10
|
-
const index$
|
|
11
|
-
const index$
|
|
12
|
-
const index$
|
|
13
|
-
const index$
|
|
14
|
-
const index$
|
|
15
|
-
const index$
|
|
16
|
-
const index$
|
|
17
|
-
const index$
|
|
3
|
+
const index$4 = require("./add-input/index.js");
|
|
4
|
+
const index$1 = require("./amap/index.js");
|
|
5
|
+
const index$5 = require("./button/index.js");
|
|
6
|
+
const index$6 = require("./button-nav/index.js");
|
|
7
|
+
const index$7 = require("./code-mirror-editor/index.js");
|
|
8
|
+
const index$8 = require("./draggable/index.js");
|
|
9
|
+
const index$2 = require("./form/index.js");
|
|
10
|
+
const index$9 = require("./menu/index.js");
|
|
11
|
+
const index$a = require("./modal/index.js");
|
|
12
|
+
const index$b = require("./page-header/index.js");
|
|
13
|
+
const index$c = require("./page-layout/index.js");
|
|
14
|
+
const index$3 = require("./page-table/index.js");
|
|
15
|
+
const index$d = require("./page-table-v2/index.js");
|
|
16
|
+
const index$e = require("./rich-editor/index.js");
|
|
17
|
+
const index$f = require("./say-hello/index.js");
|
|
18
|
+
const index$g = require("./tabs/index.js");
|
|
18
19
|
const components = [
|
|
19
|
-
index$
|
|
20
|
-
index$
|
|
21
|
-
index$
|
|
22
|
-
index$
|
|
23
|
-
index$
|
|
24
|
-
index$
|
|
25
|
-
index$
|
|
26
|
-
index$
|
|
27
|
-
index$
|
|
28
|
-
index$
|
|
29
|
-
index$
|
|
30
|
-
index$
|
|
31
|
-
index$
|
|
32
|
-
index$
|
|
33
|
-
index$
|
|
34
|
-
index$
|
|
35
|
-
index.JkyAMap,
|
|
36
|
-
index.JkyAMapPicker
|
|
20
|
+
index$f.JkySayHello,
|
|
21
|
+
index$5.JkyButton,
|
|
22
|
+
index$6.JkyButtonNav,
|
|
23
|
+
index$b.JkyPageHeader,
|
|
24
|
+
index$9.JkyMenu,
|
|
25
|
+
index$2.JkyForm,
|
|
26
|
+
index$2.JkyFormItem,
|
|
27
|
+
index$2.JkyAMapPickerItem,
|
|
28
|
+
index$7.JkyCodeMirrorEditor,
|
|
29
|
+
index$4.JkyAddInput,
|
|
30
|
+
index$e.JkyRichEditor,
|
|
31
|
+
index$3.JkyPageTable,
|
|
32
|
+
index$d.JkyPageTableV2,
|
|
33
|
+
index$c.JkyPageLayout,
|
|
34
|
+
index$g.JkyTabs,
|
|
35
|
+
index$a.JkyModal,
|
|
36
|
+
index$1.JkyAMap,
|
|
37
|
+
index$1.JkyAMapPicker,
|
|
38
|
+
index$8.JkyDraggable
|
|
37
39
|
];
|
|
38
|
-
exports.JkyAddInput = index$
|
|
39
|
-
exports.
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
46
|
-
exports.
|
|
47
|
-
exports.
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
40
|
+
exports.JkyAddInput = index$4.JkyAddInput;
|
|
41
|
+
exports.JkyAClusterMarker = index$1.JkyAClusterMarker;
|
|
42
|
+
exports.JkyAMap = index$1.JkyAMap;
|
|
43
|
+
exports.JkyAMapPicker = index$1.JkyAMapPicker;
|
|
44
|
+
exports.JkyAMarker = index$1.JkyAMarker;
|
|
45
|
+
exports.JkyATrackPlayback = index$1.JkyATrackPlayback;
|
|
46
|
+
exports.JkyButton = index$5.JkyButton;
|
|
47
|
+
exports.JkyButtonNav = index$6.JkyButtonNav;
|
|
48
|
+
exports.JkyCodeMirrorEditor = index$7.JkyCodeMirrorEditor;
|
|
49
|
+
exports.JkyDraggable = index$8.JkyDraggable;
|
|
50
|
+
exports.JkyAMapPickerItem = index$2.JkyAMapPickerItem;
|
|
51
|
+
exports.JkyForm = index$2.JkyForm;
|
|
52
|
+
exports.JkyFormItem = index$2.JkyFormItem;
|
|
53
|
+
exports.JkyMenu = index$9.JkyMenu;
|
|
54
|
+
exports.JkyModal = index$a.JkyModal;
|
|
55
|
+
exports.JkyPageHeader = index$b.JkyPageHeader;
|
|
56
|
+
exports.JkyPageLayout = index$c.JkyPageLayout;
|
|
57
|
+
exports.JkyActionColumn = index$3.JkyActionColumn;
|
|
58
|
+
exports.JkyPageTable = index$3.JkyPageTable;
|
|
59
|
+
exports.JkyPageTableColumn = index$3.JkyPageTableColumn;
|
|
60
|
+
exports.JkyPageTableV2 = index$d.JkyPageTableV2;
|
|
61
|
+
exports.JkyRichEditor = index$e.JkyRichEditor;
|
|
62
|
+
exports.JkySayHello = index$f.JkySayHello;
|
|
63
|
+
exports.JkyTabs = index$g.JkyTabs;
|
|
60
64
|
exports.components = components;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { DraggableProps, DraggableSlots } from './types';
|
|
2
|
+
declare function __VLS_template(): {
|
|
3
|
+
attrs: Partial<{}>;
|
|
4
|
+
slots: Readonly<DraggableSlots> & DraggableSlots;
|
|
5
|
+
refs: {
|
|
6
|
+
dragRef: HTMLDivElement;
|
|
7
|
+
};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<DraggableProps, {
|
|
12
|
+
/** 手动保存位置 */
|
|
13
|
+
savePosition: () => void;
|
|
14
|
+
/** 重置位置到初始值 */
|
|
15
|
+
resetPosition: () => void;
|
|
16
|
+
/** 获取当前位置 */
|
|
17
|
+
getPosition: () => {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
/** 是否正在拖拽 */
|
|
22
|
+
isDragging: () => boolean;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
24
|
+
change: (position: {
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}) => any;
|
|
28
|
+
click: (event: MouseEvent) => any;
|
|
29
|
+
start: (position: {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
}) => any;
|
|
33
|
+
end: (position: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
}) => any;
|
|
37
|
+
move: (position: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
}) => any;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<DraggableProps> & Readonly<{
|
|
42
|
+
onChange?: ((position: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
}) => any) | undefined;
|
|
46
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
47
|
+
onStart?: ((position: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
}) => any) | undefined;
|
|
51
|
+
onEnd?: ((position: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
}) => any) | undefined;
|
|
55
|
+
onMove?: ((position: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
disabled: boolean;
|
|
61
|
+
initialValue: {
|
|
62
|
+
x: number;
|
|
63
|
+
y: number;
|
|
64
|
+
};
|
|
65
|
+
storageKey: string;
|
|
66
|
+
persistPosition: boolean;
|
|
67
|
+
boundToViewport: boolean;
|
|
68
|
+
viewportMargin: number;
|
|
69
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
70
|
+
dragRef: HTMLDivElement;
|
|
71
|
+
}, HTMLDivElement>;
|
|
72
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|