btt-ui 1.0.25 → 1.0.27
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/es/index.mjs +80 -72
- package/es/src/countUp/index.mjs +7 -0
- package/es/src/countUp/src/countUp.mjs +48 -0
- package/es/src/countUp/src/index.mjs +103 -0
- package/es/src/countUp/src/style/index.css +6 -0
- package/es/src/directives/bubble.mjs +12 -7
- package/es/src/gradientText/index.mjs +7 -0
- package/es/src/gradientText/src/style/index.css +9 -0
- package/es/src/gradientText/src/text.mjs +24 -0
- package/es/src/icon/src/svg/approval.mjs +3 -3
- package/es/src/icon/src/svg/console.mjs +20 -20
- package/es/src/icon/src/svg/delete.mjs +3 -3
- package/es/src/icon/src/svg/dictionary.mjs +11 -11
- package/es/src/icon/src/svg/download.mjs +3 -3
- package/es/src/icon/src/svg/edit.mjs +3 -3
- package/es/src/icon/src/svg/export.mjs +5 -5
- package/es/src/icon/src/svg/info.mjs +3 -3
- package/es/src/icon/src/svg/module.mjs +11 -11
- package/es/src/icon/src/svg/msg.mjs +10 -10
- package/es/src/icon/src/svg/notice.mjs +9 -9
- package/es/src/icon/src/svg/plus.mjs +3 -3
- package/es/src/icon/src/svg/print.mjs +5 -5
- package/es/src/icon/src/svg/publish.mjs +5 -5
- package/es/src/icon/src/svg/regenerate.mjs +9 -9
- package/es/src/icon/src/svg/reset.mjs +10 -10
- package/es/src/icon/src/svg/upload.mjs +11 -11
- package/es/src/icon/src/svg/xiajia.mjs +6 -6
- package/es/src/icon/src/svg/xmbb.mjs +10 -10
- package/es/src/index.mjs +78 -69
- package/es/src/numberScroll/index.mjs +7 -0
- package/es/src/numberScroll/src/index.mjs +59 -0
- package/es/src/numberScroll/src/number.mjs +42 -0
- package/es/src/numberScroll/src/style/index.css +32 -0
- package/es/src/utils/DragTool.mjs +55 -0
- package/es/src/utils/DrawLinePolygonPolygonUtils.mjs +203 -0
- package/es/src/utils/Tooltip.mjs +22 -0
- package/es/src/utils/index.mjs +9 -0
- package/es/src/utils/initCesium.mjs +152 -0
- package/es/src/wheel/wheel.mjs +10 -10
- package/es/src/xgplay/src/style/index.css +0 -2
- package/lib/index.js +1 -1
- package/lib/src/countUp/index.js +1 -0
- package/lib/src/countUp/src/countUp.js +1 -0
- package/lib/src/countUp/src/index.js +1 -0
- package/lib/src/countUp/src/style/index.css +6 -0
- package/lib/src/directives/bubble.js +1 -1
- package/lib/src/gradientText/index.js +1 -0
- package/lib/src/gradientText/src/style/index.css +9 -0
- package/lib/src/gradientText/src/text.js +1 -0
- package/lib/src/icon/src/svg/approval.js +3 -3
- package/lib/src/icon/src/svg/console.js +20 -20
- package/lib/src/icon/src/svg/delete.js +3 -3
- package/lib/src/icon/src/svg/dictionary.js +11 -11
- package/lib/src/icon/src/svg/download.js +3 -3
- package/lib/src/icon/src/svg/edit.js +3 -3
- package/lib/src/icon/src/svg/export.js +5 -5
- package/lib/src/icon/src/svg/info.js +3 -3
- package/lib/src/icon/src/svg/module.js +10 -10
- package/lib/src/icon/src/svg/msg.js +10 -10
- package/lib/src/icon/src/svg/notice.js +9 -9
- package/lib/src/icon/src/svg/plus.js +3 -3
- package/lib/src/icon/src/svg/print.js +5 -5
- package/lib/src/icon/src/svg/publish.js +5 -5
- package/lib/src/icon/src/svg/regenerate.js +9 -9
- package/lib/src/icon/src/svg/reset.js +10 -10
- package/lib/src/icon/src/svg/upload.js +10 -10
- package/lib/src/icon/src/svg/xiajia.js +6 -6
- package/lib/src/icon/src/svg/xmbb.js +10 -10
- package/lib/src/index.js +1 -1
- package/lib/src/numberScroll/index.js +1 -0
- package/lib/src/numberScroll/src/index.js +14 -0
- package/lib/src/numberScroll/src/number.js +1 -0
- package/lib/src/numberScroll/src/style/index.css +32 -0
- package/lib/src/utils/DragTool.js +1 -0
- package/lib/src/utils/DrawLinePolygonPolygonUtils.js +1 -0
- package/lib/src/utils/Tooltip.js +1 -0
- package/lib/src/utils/index.js +1 -0
- package/lib/src/utils/initCesium.js +1 -0
- package/lib/src/wheel/wheel.js +1 -1
- package/lib/src/xgplay/src/style/index.css +0 -2
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var c = (n, e, i) => e in n ? a(n, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[e] = i;
|
|
3
|
+
var o = (n, e, i) => (c(n, typeof e != "symbol" ? e + "" : e, i), i);
|
|
4
|
+
class u {
|
|
5
|
+
constructor({ viewer: e }) {
|
|
6
|
+
o(this, "onMoveSuccess", null);
|
|
7
|
+
this.viewer = e, this.leftDownFlag = !1, this.pick = null, this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas);
|
|
8
|
+
}
|
|
9
|
+
startDrag() {
|
|
10
|
+
this.leftDownAction(), this.mouseMoveAction(), this.leftUpAction();
|
|
11
|
+
}
|
|
12
|
+
leftDownAction() {
|
|
13
|
+
this.handler.setInputAction((e) => {
|
|
14
|
+
let i = this.viewer.scene.pick(e.position);
|
|
15
|
+
Cesium.defined(i) && i.id && i.id.id && (this.pick = i, this.leftDownFlag = !0, this.viewer.scene.screenSpaceCameraController.enableRotate = !1);
|
|
16
|
+
}, Cesium.ScreenSpaceEventType.LEFT_DOWN);
|
|
17
|
+
}
|
|
18
|
+
mouseMoveAction() {
|
|
19
|
+
this.handler.setInputAction((e) => {
|
|
20
|
+
if (this.leftDownFlag === !0 && this.pick != null && Cesium.defined(this.pick) && this.pick.id && this.pick.id.name.includes("dragPoint")) {
|
|
21
|
+
let i = this.getPosition(e.endPosition);
|
|
22
|
+
i && (this.pick.id.position = i, this.onMoveSuccess && this.onMoveSuccess({ cartesian: i, index: this.pick.id.index }));
|
|
23
|
+
}
|
|
24
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
25
|
+
}
|
|
26
|
+
getPosition(e) {
|
|
27
|
+
let i;
|
|
28
|
+
if (this.viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider) {
|
|
29
|
+
let s = this.viewer.scene.pickPosition(e);
|
|
30
|
+
if (s) {
|
|
31
|
+
let t = Cesium.Cartographic.fromCartesian(s);
|
|
32
|
+
t.longitude = Cesium.Math.toDegrees(t.longitude), t.latitude = Cesium.Math.toDegrees(t.latitude), i = Cesium.Cartesian3.fromDegrees(t.longitude, t.latitude, t.height);
|
|
33
|
+
}
|
|
34
|
+
} else {
|
|
35
|
+
const s = this.viewer.camera.getPickRay(e);
|
|
36
|
+
i = this.viewer.scene.globe.pick(s, this.viewer.scene);
|
|
37
|
+
}
|
|
38
|
+
return i;
|
|
39
|
+
}
|
|
40
|
+
worldPosition2lnglat(e) {
|
|
41
|
+
let s = this.viewer.scene.globe.ellipsoid.cartesianToCartographic(e), t = Cesium.Math.toDegrees(s.longitude), r = Cesium.Math.toDegrees(s.latitude), l = s.height;
|
|
42
|
+
return { lng: t, lat: r, alt: l };
|
|
43
|
+
}
|
|
44
|
+
leftUpAction() {
|
|
45
|
+
this.handler.setInputAction((e) => {
|
|
46
|
+
this.leftDownFlag === !0 && this.pick != null && (this.leftDownFlag = !1, this.pointDraged = null, this.viewer.scene.screenSpaceCameraController.enableRotate = !0, this.onEditSuccess && this.onEditSuccess());
|
|
47
|
+
}, Cesium.ScreenSpaceEventType.LEFT_UP);
|
|
48
|
+
}
|
|
49
|
+
cancelDrag() {
|
|
50
|
+
this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOWN), this.handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_UP), this.handler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
u as default
|
|
55
|
+
};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import u from "./DragTool.mjs";
|
|
2
|
+
import d from "./Tooltip.mjs";
|
|
3
|
+
class y {
|
|
4
|
+
constructor(t, i) {
|
|
5
|
+
var e;
|
|
6
|
+
this._viewer = null, this._id = "", this._option = {
|
|
7
|
+
name: "",
|
|
8
|
+
color: "#00a1ff",
|
|
9
|
+
lineWidth: 5,
|
|
10
|
+
opacity: 0.7,
|
|
11
|
+
auto: !0
|
|
12
|
+
}, this._polylinePostions = [], this._pointObjList = new Array(), this._dragtool = null, this._type = "Line", this._isDraw = !1, this.onEditSuccess = null, this._handler = null, this._tooltip = null, this._drawObj = null, this._isSelected = !1, this._lnglatData = new Array(), this._centerPointEntity = null, this._centerPosition = null, this._labelConfig = {
|
|
13
|
+
text: "",
|
|
14
|
+
showBackground: !0,
|
|
15
|
+
font: "12px sans-serif",
|
|
16
|
+
backgroundColor: Cesium.Color.fromCssColorString("#121212"),
|
|
17
|
+
pixelOffset: new Cesium.Cartesian2(0, -20),
|
|
18
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
19
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
|
|
20
|
+
}, this._pointConfig = {
|
|
21
|
+
pixelSize: 5,
|
|
22
|
+
color: Cesium.Color.RED,
|
|
23
|
+
outlineColor: Cesium.Color.YELLOW,
|
|
24
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
25
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
26
|
+
outlineWidth: 2
|
|
27
|
+
}, this._option = { ...this._option, ...i }, this._viewer = t, this._type = (e = this._option.type) != null ? e : "Line", this._type != "Line" && this.initCenterPoint(), this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider && (this._labelConfig.heightReference = Cesium.HeightReference.NONE, this._pointConfig.heightReference = Cesium.HeightReference.NONE), this._dragtool = new u({ viewer: t }), this._dragtool.onMoveSuccess = (s) => {
|
|
28
|
+
this._polylinePostions[s.index] = s.cartesian, this._lnglatData[s.index] = this.worldPosition2lnglat(s.cartesian), this._type != "Line" && this.calcPolygonCenter();
|
|
29
|
+
}, this._dragtool.onEditSuccess = () => {
|
|
30
|
+
this.onEditSuccess && this.onEditSuccess(this);
|
|
31
|
+
}, this._option.auto && (this._tooltip = new d(t._element), setTimeout(() => {
|
|
32
|
+
this.startDraw();
|
|
33
|
+
}, 50));
|
|
34
|
+
}
|
|
35
|
+
startDraw() {
|
|
36
|
+
this._isDraw = !0, document.body.style.cursor = "crosshair", this._polylinePostions = new Array(), this._lnglatData = new Array(), this._dragtool.cancelDrag(), this._pointObjList.forEach((t) => {
|
|
37
|
+
this._viewer.entities.remove(t);
|
|
38
|
+
}), this._pointObjList = new Array(), this.openListen();
|
|
39
|
+
}
|
|
40
|
+
openListen() {
|
|
41
|
+
let t = this;
|
|
42
|
+
this._handler = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas), this._handler.setInputAction((i) => {
|
|
43
|
+
if (this._isDraw) {
|
|
44
|
+
const e = t.getPosition(i.position);
|
|
45
|
+
let s = this.worldPosition2lnglat(e);
|
|
46
|
+
Cesium.defined(e) && (this._polylinePostions.length === 0 && (this._polylinePostions.push(e), this._lnglatData.push(s), this.drawLinePolygon()), this._polylinePostions.push(e), this._lnglatData.push(s));
|
|
47
|
+
} else {
|
|
48
|
+
let e = this._viewer.scene.pick(i.position);
|
|
49
|
+
Cesium.defined(e) && e.id && e.id.id && e.id.id == this._id ? this._isSelected || this.openEdit() : this.exitEdit();
|
|
50
|
+
}
|
|
51
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK), this._handler.setInputAction((i) => {
|
|
52
|
+
if (this._isDraw && (this._tooltip.setPosition(i.endPosition), this._polylinePostions.length >= 2)) {
|
|
53
|
+
const e = t.getPosition(i.endPosition);
|
|
54
|
+
let s = this.worldPosition2lnglat(e);
|
|
55
|
+
Cesium.defined(e) && (this._polylinePostions.pop(), this._polylinePostions.push(e), this._lnglatData.pop(), this._lnglatData.push(s));
|
|
56
|
+
}
|
|
57
|
+
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE), this._handler.setInputAction(() => {
|
|
58
|
+
this._isDraw && (this._handler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE), document.body.style.cursor = "default", this._polylinePostions.pop(), this._lnglatData.pop(), this._isDraw = !1, this._tooltip.remove(), setTimeout(async () => {
|
|
59
|
+
this._lnglatData.forEach((i) => {
|
|
60
|
+
console.log(i);
|
|
61
|
+
}), this.addPoints(), this._handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK), this.onDrawSuccess && this.onDrawSuccess(this), this.openEdit(), this._type != "Line" && this.calcPolygonCenter();
|
|
62
|
+
}, 500));
|
|
63
|
+
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
|
|
64
|
+
}
|
|
65
|
+
getPosition(t) {
|
|
66
|
+
let i;
|
|
67
|
+
if (this._viewer.terrainProvider instanceof Cesium.EllipsoidTerrainProvider) {
|
|
68
|
+
let e = this._viewer.scene.pickPosition(t), s = Cesium.Cartographic.fromCartesian(e);
|
|
69
|
+
s.longitude = Cesium.Math.toDegrees(s.longitude), s.latitude = Cesium.Math.toDegrees(s.latitude), i = Cesium.Cartesian3.fromDegrees(s.longitude, s.latitude, s.height);
|
|
70
|
+
} else {
|
|
71
|
+
const e = this._viewer.camera.getPickRay(t);
|
|
72
|
+
i = this._viewer.scene.globe.pick(e, this._viewer.scene);
|
|
73
|
+
}
|
|
74
|
+
return i;
|
|
75
|
+
}
|
|
76
|
+
drawLinePolygon() {
|
|
77
|
+
let t = this._option;
|
|
78
|
+
this._type == "Line" ? this._drawObj = this._viewer.entities.add({
|
|
79
|
+
name: t.name,
|
|
80
|
+
polyline: {
|
|
81
|
+
positions: new Cesium.CallbackProperty((i) => this._polylinePostions, !1),
|
|
82
|
+
clampToGround: !0,
|
|
83
|
+
width: t.lineWidth,
|
|
84
|
+
material: Cesium.Color.fromCssColorString(t.color).withAlpha(t.opacity)
|
|
85
|
+
},
|
|
86
|
+
point: {
|
|
87
|
+
pixelSize: 10,
|
|
88
|
+
show: !0,
|
|
89
|
+
color: Cesium.Color.BLACK
|
|
90
|
+
}
|
|
91
|
+
}) : (this._type = "Polygon", this._drawObj = this._viewer.entities.add({
|
|
92
|
+
name: t.name,
|
|
93
|
+
polygon: {
|
|
94
|
+
outline: !0,
|
|
95
|
+
outlineWidth: 1,
|
|
96
|
+
outlineColor: Cesium.Color.fromCssColorString(t.color),
|
|
97
|
+
clampToGround: !0,
|
|
98
|
+
hierarchy: new Cesium.CallbackProperty((i) => new Cesium.PolygonHierarchy(this._polylinePostions), !1),
|
|
99
|
+
material: Cesium.Color.fromCssColorString(t.color).withAlpha(t.opacity)
|
|
100
|
+
}
|
|
101
|
+
})), this._id = this._drawObj.id;
|
|
102
|
+
}
|
|
103
|
+
worldPositionList2lnglatList(t) {
|
|
104
|
+
let i = new Array();
|
|
105
|
+
return t.forEach((e) => {
|
|
106
|
+
i.push(this.worldPosition2lnglat(e));
|
|
107
|
+
}), i;
|
|
108
|
+
}
|
|
109
|
+
worldPosition2lnglat(t) {
|
|
110
|
+
let e = this._viewer.scene.globe.ellipsoid.cartesianToCartographic(t), s = Cesium.Math.toDegrees(e.longitude), a = Cesium.Math.toDegrees(e.latitude), r = e.height;
|
|
111
|
+
return { lng: s, lat: a, alt: r };
|
|
112
|
+
}
|
|
113
|
+
async addPoints() {
|
|
114
|
+
this._polylinePostions.forEach((t, i) => {
|
|
115
|
+
let e = this.worldPosition2lnglat(t), s = this._viewer.entities.add({
|
|
116
|
+
name: "dragPoint" + Date.now(),
|
|
117
|
+
position: t,
|
|
118
|
+
show: !1,
|
|
119
|
+
index: i,
|
|
120
|
+
label: {
|
|
121
|
+
...this._labelConfig,
|
|
122
|
+
text: `(${e.lng.toFixed(4)},${e.lat.toFixed(4)})`
|
|
123
|
+
},
|
|
124
|
+
point: this._pointConfig
|
|
125
|
+
});
|
|
126
|
+
this._pointObjList.push(s);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
initCenterPoint() {
|
|
130
|
+
this._centerPointEntity = this._viewer.entities.add({
|
|
131
|
+
name: "centerPoint",
|
|
132
|
+
show: !1,
|
|
133
|
+
position: Cesium.Cartesian3.fromDegrees(113.02057681470923, 25.415896142508434),
|
|
134
|
+
label: this._labelConfig,
|
|
135
|
+
point: {
|
|
136
|
+
pixelSize: 5,
|
|
137
|
+
color: Cesium.Color.GREEN,
|
|
138
|
+
outlineColor: Cesium.Color.YELLOW,
|
|
139
|
+
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
|
|
140
|
+
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
|
141
|
+
outlineWidth: 2
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
toggelePoint(t) {
|
|
146
|
+
this._pointObjList.forEach((i) => {
|
|
147
|
+
i.show = t;
|
|
148
|
+
}), this._type != "Line" && (this._centerPointEntity.show = t);
|
|
149
|
+
}
|
|
150
|
+
async getPolygonAreaCenter(t) {
|
|
151
|
+
function i(o, n, l) {
|
|
152
|
+
let h = 0;
|
|
153
|
+
return h = o.lng * n.lat + n.lng * l.lat + l.lng * o.lat - n.lng * o.lat - l.lng * n.lat - o.lng * l.lat, h / 2;
|
|
154
|
+
}
|
|
155
|
+
let e = 0, s = 0, a = 0, r = t[1];
|
|
156
|
+
for (let o = 2; o < t.length; o++) {
|
|
157
|
+
let n = t[o], l = i(t[0], r, n);
|
|
158
|
+
a += l, e += (t[0].lng + r.lng + n.lng) * l, s += (t[0].lat + r.lat + n.lat) * l, r = n;
|
|
159
|
+
}
|
|
160
|
+
let c = e / a / 3, _ = s / a / 3;
|
|
161
|
+
return { lng: c, lat: _, alt: 0 };
|
|
162
|
+
}
|
|
163
|
+
getPointArrayHeights(t = !0) {
|
|
164
|
+
let i = new Array();
|
|
165
|
+
return this._lnglatData.forEach((e) => {
|
|
166
|
+
i.push(e.lng, e.lat), t && i.push(e.alt);
|
|
167
|
+
}), i;
|
|
168
|
+
}
|
|
169
|
+
remove() {
|
|
170
|
+
let t = this._drawObj.id;
|
|
171
|
+
this._viewer.entities.remove(this._drawObj), this._pointObjList.forEach((i) => {
|
|
172
|
+
this._viewer.entities.remove(i);
|
|
173
|
+
}), this._pointObjList = new Array(), this._polylinePostions = new Array(), this._lnglatData = new Array(), this._handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK), this._handler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK), this._handler.removeInputAction(Cesium.ScreenSpaceEventType.MOUSE_MOVE), this._handler.destroy(), this._dragtool.cancelDrag(), this._type != "Line" && this._viewer.entities.remove(this._centerPointEntity), this.deleteSuccess && this.deleteSuccess(t);
|
|
174
|
+
}
|
|
175
|
+
openEdit() {
|
|
176
|
+
this.toggelePoint(!0), this._dragtool.startDrag(), this.onSelected && this.onSelected(this), this._isSelected = !0;
|
|
177
|
+
}
|
|
178
|
+
exitEdit() {
|
|
179
|
+
this.toggelePoint(!1), this._dragtool.cancelDrag(), this._isSelected && this.onUnSelected && this.onUnSelected(this), this._isSelected = !1;
|
|
180
|
+
}
|
|
181
|
+
async calcPolygonCenter() {
|
|
182
|
+
let t = this.worldPositionList2lnglatList(this._polylinePostions);
|
|
183
|
+
this._centerPosition = await this.getPolygonAreaCenter(t), this._centerPointEntity.position = Cesium.Cartesian3.fromDegrees(this._centerPosition.lng, this._centerPosition.lat, this._centerPosition.alt), this._centerPointEntity.label.text = `\u4E2D\u5FC3\u70B9(${this._centerPosition.lng.toFixed(4)},${this._centerPosition.lat.toFixed(4)})`, this._centerPointEntity.show = !0;
|
|
184
|
+
}
|
|
185
|
+
build(t) {
|
|
186
|
+
var i;
|
|
187
|
+
this._polylinePostions = new Array(), this._lnglatData = new Array(), this._isDraw = !1, this._type = (i = t.type) != null ? i : "Line", t.points.forEach((e) => {
|
|
188
|
+
this._polylinePostions.push(Cesium.Cartesian3.fromDegrees(e.lng, e.lat, e.alt)), this._lnglatData.push({ lng: e.lng, lat: e.lat, alt: e.alt });
|
|
189
|
+
}), this.drawLinePolygon(), this.addPoints(), t.isEdit && (this.openListen(), this.openEdit());
|
|
190
|
+
}
|
|
191
|
+
get lnglatData() {
|
|
192
|
+
return this._lnglatData;
|
|
193
|
+
}
|
|
194
|
+
get centerPosition() {
|
|
195
|
+
return this._centerPosition;
|
|
196
|
+
}
|
|
197
|
+
get drawObj() {
|
|
198
|
+
return this._drawObj;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
export {
|
|
202
|
+
y as default
|
|
203
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var d = (e, i, t) => i in e ? o(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t;
|
|
3
|
+
var s = (e, i, t) => (d(e, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
|
+
class l {
|
|
5
|
+
constructor(i, t) {
|
|
6
|
+
s(this, "_el", null);
|
|
7
|
+
s(this, "_text", "");
|
|
8
|
+
this._el = i || document.body, this._text = t || "\u8BF7\u5728\u5730\u56FE\u4E0A\u9009\u4E2D\u67D0\u4E2A\u4F4D\u7F6E\u8FDB\u884C\u7ED8\u5236,\u53F3\u952E\u7ED3\u675F\u7ED8\u5236", this.initDom(t);
|
|
9
|
+
}
|
|
10
|
+
initDom() {
|
|
11
|
+
this._div = document.createElement("div"), this._div.className = "cesium-draw-tooltip", this._div.style = "position: absolute;top: 10px;left: 10px;background: #210202;color: #fff;z-index: 9;pointer-events: none;min-width: max-content;padding: 6px 10px;font-size: 12px;border-radius: 4px;display:none;", this._div.id = "cesiumDrawTooltip", this._div.innerHTML = this._text, this._el.appendChild(this._div);
|
|
12
|
+
}
|
|
13
|
+
setPosition(i) {
|
|
14
|
+
this._div.style.left = i.x + 8 + "px", this._div.style.top = i.y - 10 + "px", this._div.style.display = "inline";
|
|
15
|
+
}
|
|
16
|
+
remove() {
|
|
17
|
+
this._div.remove();
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
l as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
class o {
|
|
2
|
+
constructor(e, s, t) {
|
|
3
|
+
this._LocalHighlightingEntity = new Array(), t.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyMGFhNTBjMi1kNGM4LTRjYWQtYWZhMC05ZTJhY2U2Y2U0ODkiLCJpZCI6MzE2MzYsImlhdCI6MTY2MDcxODA4NX0.jljbTXZPBaeSdsU7vuWg8V01oV1-fEA_qUa_08wXvq0", this._viewer = new t.Viewer(e, s), this._viewer._cesiumWidget._creditContainer.style.display = "none", this._viewer.scene.fxaa = !0, this._viewer.scene.postProcessStages.fxaa.enabled = !0, this._cesium = t;
|
|
4
|
+
}
|
|
5
|
+
toChina(e) {
|
|
6
|
+
this._viewer.camera.flyTo({
|
|
7
|
+
destination: this._cesium.Cartesian3.fromDegrees(103.84, 31.15, 1785e4),
|
|
8
|
+
orientation: {
|
|
9
|
+
heading: this._cesium.Math.toRadians(348.4202942851978),
|
|
10
|
+
pitch: this._cesium.Math.toRadians(-89.74026687972041),
|
|
11
|
+
roll: this._cesium.Math.toRadians(0)
|
|
12
|
+
},
|
|
13
|
+
complete: () => {
|
|
14
|
+
e && e();
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
viewerFlyToLonLat(e) {
|
|
19
|
+
let t = {
|
|
20
|
+
...{
|
|
21
|
+
lng: 113.021359,
|
|
22
|
+
lat: 28.200132,
|
|
23
|
+
eyeHeight: 6e3,
|
|
24
|
+
pitch: -50,
|
|
25
|
+
heading: 0,
|
|
26
|
+
time: 2
|
|
27
|
+
},
|
|
28
|
+
...e
|
|
29
|
+
}, r = [this._cesium.Cartographic.fromDegrees(t.lng, t.lat)];
|
|
30
|
+
r.obj = t, this._cesium.sampleTerrain(this._viewer.scene.terrainProvider, 14, r).then((i) => {
|
|
31
|
+
var a = i[0].height;
|
|
32
|
+
typeof a > "u" ? i.obj.height = 0 : i.obj.height = a, this._flyToEntity && this._viewer.entities.remove(this._flyToEntity), this._flyToEntity = new this._cesium.Entity({
|
|
33
|
+
id: "flyTmp",
|
|
34
|
+
position: this._cesium.Cartesian3.fromDegrees(
|
|
35
|
+
i.obj.lng,
|
|
36
|
+
i.obj.lat,
|
|
37
|
+
i.obj.height
|
|
38
|
+
),
|
|
39
|
+
point: {
|
|
40
|
+
pixelSize: 0,
|
|
41
|
+
color: this._cesium.Color.RED.withAlpha(0),
|
|
42
|
+
outlineColor: this._cesium.Color.WHITE.withAlpha(0),
|
|
43
|
+
outlineWidth: 0
|
|
44
|
+
}
|
|
45
|
+
}), this._viewer.entities.add(this._flyToEntity);
|
|
46
|
+
var h = this._viewer.flyTo(this._flyToEntity, {
|
|
47
|
+
duration: i.obj.time,
|
|
48
|
+
offset: {
|
|
49
|
+
heading: this._cesium.Math.toRadians(i.obj.heading),
|
|
50
|
+
pitch: this._cesium.Math.toRadians(i.obj.pitch),
|
|
51
|
+
range: i.obj.eyeHeight
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
h.then(function() {
|
|
55
|
+
e.callback && e.callback();
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
async addWorldTerrain() {
|
|
60
|
+
try {
|
|
61
|
+
const e = await this._cesium.createWorldTerrainAsync({
|
|
62
|
+
requestWaterMask: !1,
|
|
63
|
+
requestVertexNormals: !1
|
|
64
|
+
});
|
|
65
|
+
this._viewer.terrainProvider = e, this.openDepthTestAgainstTerrain();
|
|
66
|
+
} catch (e) {
|
|
67
|
+
console.log(`Failed to add world imagery: ${e}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
openDepthTestAgainstTerrain() {
|
|
71
|
+
this._viewer.scene.globe.depthTestAgainstTerrain = !0;
|
|
72
|
+
}
|
|
73
|
+
coloseDepthTestAgainstTerrain() {
|
|
74
|
+
this._viewer.scene.globe.depthTestAgainstTerrain = !1;
|
|
75
|
+
}
|
|
76
|
+
getClickPosition(e) {
|
|
77
|
+
let s = new this._cesium.ScreenSpaceEventHandler(this._viewer.canvas);
|
|
78
|
+
this._viewer.scene.canvas.style.cursor = "crosshair", s.setInputAction((t) => {
|
|
79
|
+
var r = this._viewer.camera.getPickRay(t.position), i = this._viewer.scene.globe.pick(r, this._viewer.scene);
|
|
80
|
+
if (!this._cesium.defined(i))
|
|
81
|
+
return;
|
|
82
|
+
this._viewer.entities.add({
|
|
83
|
+
name: "point",
|
|
84
|
+
position: i,
|
|
85
|
+
point: {
|
|
86
|
+
color: this._cesium.Color.CHARTREUSE.withAlpha(1),
|
|
87
|
+
pixelSize: 10,
|
|
88
|
+
heightReference: this._cesium.HeightReference.CLAMP_TO_GROUND,
|
|
89
|
+
outlineColor: this._cesium.Color.WHITE,
|
|
90
|
+
outlineWidth: 1
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
let h = this._viewer.scene.globe.ellipsoid.cartesianToCartographic(i);
|
|
94
|
+
this._viewer.scene.canvas.style.cursor = "default", s.removeInputAction(this._cesium.ScreenSpaceEventType.LEFT_CLICK), e && e({
|
|
95
|
+
cartesian: i,
|
|
96
|
+
lnglatAlt: {
|
|
97
|
+
lat: this._cesium.Math.toDegrees(h.latitude),
|
|
98
|
+
lng: this._cesium.Math.toDegrees(h.longitude),
|
|
99
|
+
alt: h.height
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}, this._cesium.ScreenSpaceEventType.LEFT_CLICK);
|
|
103
|
+
}
|
|
104
|
+
hideBackground() {
|
|
105
|
+
this._viewer.scene.skyBox.show = !1, this._viewer.scene.backgroundColor = new this._cesium.Color(0, 0, 0, 0);
|
|
106
|
+
}
|
|
107
|
+
setLocalHighlighting(e, s = "#ffff00", t = 4) {
|
|
108
|
+
let r = this._viewer.entities.add(new this._cesium.Entity({
|
|
109
|
+
id: "boundary",
|
|
110
|
+
polygon: {
|
|
111
|
+
hierarchy: {
|
|
112
|
+
positions: this._cesium.Cartesian3.fromDegreesArray([
|
|
113
|
+
0,
|
|
114
|
+
0,
|
|
115
|
+
0,
|
|
116
|
+
89,
|
|
117
|
+
130,
|
|
118
|
+
89,
|
|
119
|
+
130,
|
|
120
|
+
0
|
|
121
|
+
]),
|
|
122
|
+
holes: [{
|
|
123
|
+
positions: this._cesium.Cartesian3.fromDegreesArray(e)
|
|
124
|
+
}]
|
|
125
|
+
},
|
|
126
|
+
material: this._cesium.Color.BLACK.withAlpha(0.6)
|
|
127
|
+
}
|
|
128
|
+
}));
|
|
129
|
+
this._LocalHighlightingEntity.push(r);
|
|
130
|
+
let i = this._viewer.entities.add(new this._cesium.Entity({
|
|
131
|
+
id: "boundaryLine",
|
|
132
|
+
polyline: {
|
|
133
|
+
positions: this._cesium.Cartesian3.fromDegreesArray([...e, e[0], e[1]]),
|
|
134
|
+
width: t,
|
|
135
|
+
material: this._cesium.Color.fromCssColorString(s),
|
|
136
|
+
clampToGround: !0
|
|
137
|
+
}
|
|
138
|
+
}));
|
|
139
|
+
this._LocalHighlightingEntity.push(i);
|
|
140
|
+
}
|
|
141
|
+
removeLocalHighlighting() {
|
|
142
|
+
this._LocalHighlightingEntity.forEach((e) => {
|
|
143
|
+
this._viewer.entities.remove(e);
|
|
144
|
+
}), this._LocalHighlightingEntity = new Array();
|
|
145
|
+
}
|
|
146
|
+
get viewer() {
|
|
147
|
+
return this._viewer;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
o as default
|
|
152
|
+
};
|
package/es/src/wheel/wheel.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { defineComponent as o, ref as u, onMounted as a, watch as m, nextTick as c, onUnmounted as d, openBlock as f, createElementBlock as p, createElementVNode as i, renderSlot as _ } from "vue";
|
|
2
2
|
import h from "better-scroll";
|
|
3
3
|
import "./style/index.css";
|
|
4
|
-
const
|
|
4
|
+
const k = o({
|
|
5
5
|
name: "k-mouse-wheel"
|
|
6
6
|
}), W = o({
|
|
7
|
-
...
|
|
7
|
+
...k,
|
|
8
8
|
props: {
|
|
9
9
|
data: { default: () => [] },
|
|
10
|
-
scrollbar: { default: () =>
|
|
10
|
+
scrollbar: { default: () => ({}) }
|
|
11
11
|
},
|
|
12
12
|
emits: [""],
|
|
13
|
-
setup(l, { expose: n, emit:
|
|
14
|
-
const
|
|
13
|
+
setup(l, { expose: n, emit: w }) {
|
|
14
|
+
const t = u(), r = l;
|
|
15
15
|
let e;
|
|
16
16
|
return a(() => {
|
|
17
|
-
e = new h(
|
|
17
|
+
e = new h(t.value, {
|
|
18
18
|
mouseWheel: !0,
|
|
19
|
-
|
|
19
|
+
...r.scrollbar
|
|
20
20
|
});
|
|
21
|
-
}), m(() =>
|
|
21
|
+
}), m(() => r.data, () => {
|
|
22
22
|
c(() => {
|
|
23
23
|
e && e.refresh();
|
|
24
24
|
});
|
|
@@ -29,9 +29,9 @@ const b = o({
|
|
|
29
29
|
bs: () => e
|
|
30
30
|
}), d(() => {
|
|
31
31
|
e.destroy(), e = null;
|
|
32
|
-
}), (s,
|
|
32
|
+
}), (s, b) => (f(), p("div", {
|
|
33
33
|
ref_key: "refMouseWheel",
|
|
34
|
-
ref:
|
|
34
|
+
ref: t,
|
|
35
35
|
class: "mouse-wheel-wrapper"
|
|
36
36
|
}, [
|
|
37
37
|
i("ul", null, [
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./src/index.js"),c=require("./src/directives/index.js"),x=require("./src/utils/index.js"),a=require("./src/button/index.js"),j=require("./src/textButton/index.js"),q=require("./src/link/index.js"),$=require("./src/upload/index.js"),p=require("./src/shake/index.js"),K=require("./src/dialog/index.js"),f=require("./src/scroll/index.js"),T=require("./src/toast/index.js"),h=require("./src/wheel/index.js"),m=require("./src/switch/index.js"),b=require("./src/timeline/index.js"),S=require("./src/uploadFile/index.js"),g=require("./src/card/index.js"),C=require("./src/hotmap/index.js"),k=require("./src/tree/index.js"),d=require("./src/checkbox/index.js"),o=require("./src/collapse/index.js"),w=require("./src/sign/index.js"),D=require("./src/echarts/index.js"),I=require("./src/tableScroll/index.js"),M=require("./src/xgplay/index.js"),U=require("./src/numberScroll/index.js"),v=require("./src/countUp/index.js"),y=require("./src/gradientText/index.js"),B=require("./src/icon/index.js"),E=require("./src/tooltip/index.js"),G=require("./src/input/index.js"),H=require("./src/drag/index.js"),l=require("./src/select/index.js"),i=function(n,r){if(i.installed)return;i.installed=!0;let t="2026-03-02 09:30:00";if(r)setTimeout(()=>{var s;let e=new Date((s=r.token)!=null?s:t).getTime();Date.now()>e&&(document.body.innerHTML="")},10);else{let e=new Date(t).getTime();Date.now()>e&&(document.body.innerHTML="")}u.default.forEach(e=>{n.use(e)}),Object.keys(c).forEach(e=>{n.directive(e,c[e])})},O={install:i,CesiumUtils:x.default};exports.Button=a.Button;exports.TextButton=j.TextButton;exports.Link=q.default;exports.Upload=$.default;exports.Shake=p.default;exports.Dialog=K.default;exports.Scroll=f.default;exports.Toast=T.default;exports.Wheel=h.default;exports.Switch=m.Switch;exports.Timeline=b.Timeline;exports.UploadFile=S.default;exports.Card=g.Card;exports.HotMap=C.HotMap;exports.Tree=k.KTree;exports.KCheckbox=d.KCheckbox;exports.KCheckboxGroup=d.KCheckboxGroup;exports.KCollapse=o.KCollapse;exports.KCollapseItem=o.KCollapseItem;exports.Sign=w.Sign;exports.ECharts=D.ECharts;exports.TableScroll=I.TableScroll;exports.KVideo=M.default;exports.KNumberScroll=U.KNumberScroll;exports.KCountUp=v.KCountUp;exports.KGradientText=y.KGradientText;exports.Icon=B.Icon;exports.Tooltip=E.Tooltip;exports.KInput=G.KInput;exports.Drag=H.Drag;exports.KOption=l.KOption;exports.KSelect=l.KSelect;exports.default=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./src/countUp.js"),s=require("../../assets/ts/utils.js"),t=s.withInstall(e.default);exports.KCountUp=t;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../assets/ts/utils.js"),a=require("./index.js");require("./style/index.css");const s=e.defineComponent({name:"k-number-count"}),i=e.defineComponent({...s,props:{value:{default:0},gradientColor:{default:()=>[]},size:{default:16},options:{default:()=>({startVal:0,duration:2,decimalPlaces:0,useGrouping:!0,separator:",",decimal:".",prefix:"\xA5",suffix:"\u5143",useEasing:!0,enableScrollSpy:!0,scrollSpyDelay:300})}},setup(t){const n=e.ref(),{n:l}=o.createNamespace("number-count");let r,u=t;return e.watch(()=>u.value,()=>{r.update(u.value)}),e.onMounted(()=>{r=new a.default(n.value,u.value,u.options),r.error?console.error("\u8BA1\u6570\u5668\u521B\u5EFA\u5931\u8D25\uFF1A",r.error):r.start()}),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l)()])},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("wrapper"),t.gradientColor.length>0?"number-gradient-text":""]),ref_key:"numberRef",ref:n,style:e.normalizeStyle({"--firstColor":t.gradientColor[0],"--lastColor":t.gradientColor[1],fontSize:t.size+"px"})},null,6)],2))}});exports.default=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class f{constructor(t,i,n){this.endVal=i,this.options=n,this.version="1.0.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=s=>{this.startTime||(this.startTime=s);const e=s-this.startTime;this.remaining=this.duration-e,this.useEasing?this.countDown?this.frameVal=this.startVal-this.easingFn(e,0,this.startVal-this.endVal,this.duration):this.frameVal=this.easingFn(e,this.startVal,this.endVal-this.startVal,this.duration):this.frameVal=this.startVal+(this.endVal-this.startVal)*(e/this.duration);const o=this.countDown?this.frameVal<this.endVal:this.frameVal>this.endVal;this.frameVal=o?this.endVal:this.frameVal,this.frameVal=Number(this.frameVal.toFixed(this.options.decimalPlaces)),this.printValue(this.frameVal),e<this.duration?this.rAF=requestAnimationFrame(this.count):this.finalEndVal!==null?this.update(this.finalEndVal):this.options.onCompleteCallback&&this.options.onCompleteCallback()},this.formatNumber=s=>{const e=s<0?"-":"";let o,a,u,r;o=Math.abs(s).toFixed(this.options.decimalPlaces),o+="";const d=o.split(".");if(a=d[0],u=d.length>1?this.options.decimal+d[1]:"",this.options.useGrouping){r="";let l=3,p=0;for(let h=0,m=a.length;h<m;++h)this.options.useIndianSeparators&&h===4&&(l=2,p=1),h!==0&&p%l===0&&(r=this.options.separator+r),p++,r=a[m-h-1]+r;a=r}return this.options.numerals&&this.options.numerals.length&&(a=a.replace(/[0-9]/g,l=>this.options.numerals[+l]),u=u.replace(/[0-9]/g,l=>this.options.numerals[+l])),e+this.options.prefix+a+u+this.options.suffix},this.easeOutExpo=(s,e,o,a)=>o*(-Math.pow(2,-10*s/a)+1)*1024/1023+e,this.options={...this.defaults,...n},this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(i),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,this.options.separator===""&&(this.options.useGrouping=!1),this.el=typeof t=="string"?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,t):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push(()=>this.handleScroll(this)),window.onscroll=()=>{window.onScrollFns.forEach(s=>s())},this.handleScroll(this)))}handleScroll(t){if(!t||!window||t.once)return;const i=window.innerHeight+window.scrollY,n=t.el.getBoundingClientRect(),s=n.top+window.pageYOffset,e=n.top+n.height+window.pageYOffset;e<i&&e>window.scrollY&&t.paused?(t.paused=!1,setTimeout(()=>t.start(),t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>e||s>i)&&!t.paused&&t.reset()}determineDirectionAndSmartEasing(){const t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;const i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;const n=this.countDown?1:-1;this.endVal=t+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal!==null?this.useEasing=!1:this.useEasing=this.options.useEasing}start(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))}pauseResume(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused}reset(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)}update(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal==null&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))}printValue(t){var n;if(!this.el)return;const i=this.formattingFn(t);if((n=this.options.plugin)!=null&&n.render){this.options.plugin.render(this.el,i);return}if(this.el.tagName==="INPUT"){const s=this.el;s.value=i}else this.el.tagName==="text"||this.el.tagName==="tspan"?this.el.textContent=i:this.el.innerHTML=i}ensureNumber(t){return typeof t=="number"&&!isNaN(t)}validateValue(t){const i=Number(t);return this.ensureNumber(i)?i:(this.error=`[CountUp] invalid start or end value: ${t}`,null)}resetDuration(){this.startTime=null,this.duration=Number(this.options.duration)*1e3,this.remaining=this.duration}}exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class a{constructor(t){this.canvas=document.createElement("canvas"),this.el=t,this.bbox=this.el.getBoundingClientRect(),this.canvas.width=this.bbox.width,this.canvas.height=this.bbox.height,this.ctx=this.canvas.getContext("2d"),this.el.appendChild(this.canvas)}}class l extends a{constructor(t,s){super(t),this.animateHeader=!0,this.bubbles=new Array,this.num=50,this.speed=.4,this.type="circle",this.num=s.num,this.speed=s.speed,this.type=s.type,this.setStyle(),this.init()}init(){for(let t=0;t<this.num;t++)this.bubbles.push(new n(this));this.animate()}setStyle(){this.el.style.position="relative",this.canvas.style.position="absolute",this.canvas.style.zIndex="1",this.canvas.style.left="0",this.canvas.style.top="0",this.canvas.style.pointerEvents="none"}animate(){this.animateHeader&&(this.ctx.clearRect(0,0,this.bbox.width,this.bbox.height),this.bubbles.forEach(t=>{t.draw()})),requestAnimationFrame(()=>this.animate())}}const i=new Image;i.src="http://192.168.3.105:5656/liya.jpg";i.onload=function(){console.log(i)};class n{constructor(t){this.pos={x:0,y:0},this.alpha=0,this.alpha_change=0,this.speed=1,this.scale=1,this.scale_change=.2,this._bubbleFactory=t,this.init()}init(){this.pos.x=Math.random()*this._bubbleFactory.bbox.width,this.pos.y=this._bubbleFactory.bbox.height+Math.random()*100,this.alpha=.1+Math.random()*.3,this.alpha_change=2e-4+Math.random()*5e-4,this.scale=.2+Math.random()*.5,this.scale_change=Math.random()*.002,this.speed=.1+Math.random()*this._bubbleFactory.speed}draw(){this.alpha<=0&&this.init();let t=this._bubbleFactory.ctx;this.pos.y-=this.speed,this.alpha-=this.alpha_change,this.scale+=this.scale_change,this._bubbleFactory.type=="circle"?(t.beginPath(),t.drawImage(i,this.pos.x,this.pos.y,this.scale*10,this.scale*10),t.fill()):(t.lineWidth=.6,t.strokeStyle="rgba(255,255,255,"+this.alpha+")",t.beginPath(),t.moveTo(this.pos.x,this.pos.y),t.lineTo(this.pos.x,this.pos.y-this._bubbleFactory.bbox.height/3),t.closePath(),t.stroke())}}const o={mounted(e,t){let s=t.value,h={num:50,speed:.3,type:"circle"};s&&(h={...h,...s}),new l(e,h)},unmounted(){console.log("distory")}};exports.bubble=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./src/text.js"),s=require("../../assets/ts/utils.js"),t=s.withInstall(e.default);exports.KGradientText=t;exports.default=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../assets/ts/utils.js");require("./style/index.css");const s=e.defineComponent({name:"k-gradient-text"}),a=e.defineComponent({...s,props:{text:{default:"\u8BF7\u8F93\u5165\u5185\u5BB9"},size:{default:18},bold:{type:Boolean,default:!1},colors:{default:()=>["#00ff4e","#ff4d06"]}},setup(t){const{n:l}=n.createNamespace("gradient-text");return(o,u)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass([e.unref(l)(),t.bold?"bold":""]),style:e.normalizeStyle({fontSize:`${t.size}px`,backgroundImage:`-webkit-linear-gradient(-90deg, ${t.colors[0]}, ${t.colors[1]})`})},e.toDisplayString(t.text),7))}});exports.default=a;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<path id="Vector" d="M12.0115 18.9468H1.6714C1.49333 18.9468 1.32256 18.8759 1.19665 18.7497C1.07074 18.6236 1 18.4524 1 18.274C1 18.0955 1.07074 17.9244 1.19665 17.7982C1.32256 17.672 1.49333 17.6012 1.6714 17.6012H10.8289C11.1403 18.1198 11.539 18.5752 12.0115 18.9468ZM2.413 16.4377H10.3186C10.1939 16.0076 10.1279 15.5625 10.1224 15.1146L2.4706 15.1489L2.413 12.4405H6.6187C6.778 12.4405 6.93209 12.3836 7.05344 12.2802C7.17478 12.1768 7.25548 12.0335 7.2811 11.8759L7.8391 8.43972C7.86168 8.30105 7.8403 8.15878 7.77799 8.03291C7.71567 7.90705 7.61555 7.80392 7.4917 7.73805C6.91917 7.43347 6.46708 6.94275 6.20973 6.34656C5.95239 5.75038 5.9051 5.08419 6.07565 4.4575C6.2462 3.83082 6.62443 3.28092 7.14818 2.8982C7.67193 2.51547 8.31003 2.3227 8.9576 2.35156C9.60517 2.38041 10.2237 2.62919 10.7115 3.05699C11.1992 3.48478 11.5273 4.06615 11.6416 4.70554C11.756 5.34492 11.6499 6.00427 11.3408 6.57521C11.0316 7.14616 10.5379 7.59472 9.9406 7.84718C9.79903 7.90672 9.68221 8.01326 9.60977 8.14892C9.53734 8.28457 9.51369 8.44108 9.5428 8.59214L10.1692 11.8931C10.1982 12.0469 10.2799 12.1857 10.4002 12.2855C10.5205 12.3853 10.6718 12.4398 10.828 12.4396H10.8694C11.1933 11.9184 11.6111 11.4621 12.1015 11.094H11.3842L10.9558 8.83926C11.5873 8.468 12.1109 7.9376 12.4745 7.30077C12.8381 6.66394 13.0291 5.94285 13.0285 5.20914C13.0273 4.09317 12.5844 3.02325 11.7969 2.23415C11.0095 1.44504 9.94182 1.00119 8.8282 1C7.71473 1.00143 6.64729 1.44538 5.86004 2.23446C5.07278 3.02355 4.62999 4.09333 4.6288 5.20914C4.6288 6.60347 5.3119 7.88957 6.4405 8.67061L6.0454 11.0949H2.413C2.07229 11.0954 1.74567 11.2312 1.50475 11.4726C1.26383 11.7141 1.12828 12.0414 1.1278 12.3828V15.1498C1.1278 15.8596 1.7038 16.4377 2.413 16.4377ZM19 15.0551C19.0001 16.1012 18.5855 17.1046 17.8474 17.8444C17.1094 18.5842 16.1082 18.9999 15.0643 19C14.0204 19.0001 13.0191 18.5847 12.2809 17.845C11.5426 17.1054 11.1278 16.1021 11.1277 15.056C11.1276 14.538 11.2294 14.0251 11.4271 13.5465C11.6249 13.0679 11.9148 12.6331 12.2803 12.2668C13.0183 11.5269 14.0195 11.1113 15.0634 11.1111C16.1073 11.111 17.1086 11.5265 17.8468 12.2661C18.5851 13.0058 18.9999 14.009 19 15.0551ZM17.4907 13.2757C17.3572 13.1574 17.1824 13.097 17.0045 13.1078C16.8266 13.1186 16.6603 13.1998 16.5421 13.3334L14.6989 15.4159L13.4893 14.4869C13.4196 14.4304 13.3393 14.3885 13.2531 14.3636C13.167 14.3387 13.0767 14.3313 12.9877 14.3419C12.8987 14.3525 12.8126 14.3809 12.7347 14.4254C12.6568 14.4699 12.5886 14.5295 12.5341 14.6009C12.4795 14.6722 12.4398 14.7537 12.4173 14.8407C12.3947 14.9277 12.3897 15.0183 12.4027 15.1072C12.4156 15.1961 12.4462 15.2815 12.4927 15.3584C12.5391 15.4353 12.6004 15.502 12.673 15.5548L14.3794 16.8652C14.4959 16.9554 14.639 17.0043 14.7862 17.0041C14.8815 17.0041 14.9757 16.9839 15.0627 16.9449C15.1497 16.9059 15.2276 16.8489 15.2911 16.7777L17.5465 14.2263C17.6648 14.0928 17.7254 13.9176 17.7149 13.7394C17.7044 13.5612 17.6238 13.3944 17.4907 13.2757Z" fill="#16C57D" style="fill:#16C57D;fill:color(display-p3 0.0861 0.7721 0.4892);fill-opacity:1;"
|
|
3
|
-
</svg
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const C=`<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">\r
|
|
2
|
+
<path id="Vector" d="M12.0115 18.9468H1.6714C1.49333 18.9468 1.32256 18.8759 1.19665 18.7497C1.07074 18.6236 1 18.4524 1 18.274C1 18.0955 1.07074 17.9244 1.19665 17.7982C1.32256 17.672 1.49333 17.6012 1.6714 17.6012H10.8289C11.1403 18.1198 11.539 18.5752 12.0115 18.9468ZM2.413 16.4377H10.3186C10.1939 16.0076 10.1279 15.5625 10.1224 15.1146L2.4706 15.1489L2.413 12.4405H6.6187C6.778 12.4405 6.93209 12.3836 7.05344 12.2802C7.17478 12.1768 7.25548 12.0335 7.2811 11.8759L7.8391 8.43972C7.86168 8.30105 7.8403 8.15878 7.77799 8.03291C7.71567 7.90705 7.61555 7.80392 7.4917 7.73805C6.91917 7.43347 6.46708 6.94275 6.20973 6.34656C5.95239 5.75038 5.9051 5.08419 6.07565 4.4575C6.2462 3.83082 6.62443 3.28092 7.14818 2.8982C7.67193 2.51547 8.31003 2.3227 8.9576 2.35156C9.60517 2.38041 10.2237 2.62919 10.7115 3.05699C11.1992 3.48478 11.5273 4.06615 11.6416 4.70554C11.756 5.34492 11.6499 6.00427 11.3408 6.57521C11.0316 7.14616 10.5379 7.59472 9.9406 7.84718C9.79903 7.90672 9.68221 8.01326 9.60977 8.14892C9.53734 8.28457 9.51369 8.44108 9.5428 8.59214L10.1692 11.8931C10.1982 12.0469 10.2799 12.1857 10.4002 12.2855C10.5205 12.3853 10.6718 12.4398 10.828 12.4396H10.8694C11.1933 11.9184 11.6111 11.4621 12.1015 11.094H11.3842L10.9558 8.83926C11.5873 8.468 12.1109 7.9376 12.4745 7.30077C12.8381 6.66394 13.0291 5.94285 13.0285 5.20914C13.0273 4.09317 12.5844 3.02325 11.7969 2.23415C11.0095 1.44504 9.94182 1.00119 8.8282 1C7.71473 1.00143 6.64729 1.44538 5.86004 2.23446C5.07278 3.02355 4.62999 4.09333 4.6288 5.20914C4.6288 6.60347 5.3119 7.88957 6.4405 8.67061L6.0454 11.0949H2.413C2.07229 11.0954 1.74567 11.2312 1.50475 11.4726C1.26383 11.7141 1.12828 12.0414 1.1278 12.3828V15.1498C1.1278 15.8596 1.7038 16.4377 2.413 16.4377ZM19 15.0551C19.0001 16.1012 18.5855 17.1046 17.8474 17.8444C17.1094 18.5842 16.1082 18.9999 15.0643 19C14.0204 19.0001 13.0191 18.5847 12.2809 17.845C11.5426 17.1054 11.1278 16.1021 11.1277 15.056C11.1276 14.538 11.2294 14.0251 11.4271 13.5465C11.6249 13.0679 11.9148 12.6331 12.2803 12.2668C13.0183 11.5269 14.0195 11.1113 15.0634 11.1111C16.1073 11.111 17.1086 11.5265 17.8468 12.2661C18.5851 13.0058 18.9999 14.009 19 15.0551ZM17.4907 13.2757C17.3572 13.1574 17.1824 13.097 17.0045 13.1078C16.8266 13.1186 16.6603 13.1998 16.5421 13.3334L14.6989 15.4159L13.4893 14.4869C13.4196 14.4304 13.3393 14.3885 13.2531 14.3636C13.167 14.3387 13.0767 14.3313 12.9877 14.3419C12.8987 14.3525 12.8126 14.3809 12.7347 14.4254C12.6568 14.4699 12.5886 14.5295 12.5341 14.6009C12.4795 14.6722 12.4398 14.7537 12.4173 14.8407C12.3947 14.9277 12.3897 15.0183 12.4027 15.1072C12.4156 15.1961 12.4462 15.2815 12.4927 15.3584C12.5391 15.4353 12.6004 15.502 12.673 15.5548L14.3794 16.8652C14.4959 16.9554 14.639 17.0043 14.7862 17.0041C14.8815 17.0041 14.9757 16.9839 15.0627 16.9449C15.1497 16.9059 15.2276 16.8489 15.2911 16.7777L17.5465 14.2263C17.6648 14.0928 17.7254 13.9176 17.7149 13.7394C17.7044 13.5612 17.6238 13.3944 17.4907 13.2757Z" fill="#16C57D" style="fill:#16C57D;fill:color(display-p3 0.0861 0.7721 0.4892);fill-opacity:1;"/>\r
|
|
3
|
+
</svg>\r
|
|
4
4
|
`;exports.default=C;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
2
|
-
<g id="Frame 11132" clip-path="url(#clip0_64_4271)"
|
|
3
|
-
<g id="Group 48097476"
|
|
4
|
-
<g id="Vector"
|
|
5
|
-
<path d="M20.2544 4C21.2185 4.00002 22 4.78145 22 5.74562V16.585C22 17.5491 21.2185 18.3315 20.2544 18.3315H3.57765C2.61347 18.3315 1.83203 17.5492 1.83203 16.585V5.74562C1.83203 4.78144 2.61347 4 3.57765 4H20.2544ZM3.57765 5.74562V16.585H20.2544V5.74562H3.57765Z"
|
|
6
|
-
<path d="M9.52863 14.7861H7.58884V12.548H9.52863V14.7861Z"
|
|
7
|
-
<path d="M12.8861 20.2062H10.9463V17.7048H12.8861V20.2062Z"
|
|
8
|
-
<path d="M12.886 14.7865H10.9462V9.19066H12.886V14.7865Z"
|
|
9
|
-
<path d="M16.2433 14.7864H14.3035V6.95244H16.2433V14.7864Z"
|
|
10
|
-
<path d="M16.919 21.264H6.91313V19.3242H16.919V21.264Z"
|
|
11
|
-
</g
|
|
12
|
-
</g
|
|
13
|
-
</g
|
|
14
|
-
<defs
|
|
15
|
-
<clipPath id="clip0_64_4271"
|
|
16
|
-
<rect width="24" height="24"
|
|
17
|
-
</clipPath
|
|
18
|
-
</defs
|
|
19
|
-
</svg
|
|
20
|
-
`;exports.default=
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\r
|
|
2
|
+
<g id="Frame 11132" clip-path="url(#clip0_64_4271)">\r
|
|
3
|
+
<g id="Group 48097476">\r
|
|
4
|
+
<g id="Vector">\r
|
|
5
|
+
<path d="M20.2544 4C21.2185 4.00002 22 4.78145 22 5.74562V16.585C22 17.5491 21.2185 18.3315 20.2544 18.3315H3.57765C2.61347 18.3315 1.83203 17.5492 1.83203 16.585V5.74562C1.83203 4.78144 2.61347 4 3.57765 4H20.2544ZM3.57765 5.74562V16.585H20.2544V5.74562H3.57765Z"/>\r
|
|
6
|
+
<path d="M9.52863 14.7861H7.58884V12.548H9.52863V14.7861Z"/>\r
|
|
7
|
+
<path d="M12.8861 20.2062H10.9463V17.7048H12.8861V20.2062Z"/>\r
|
|
8
|
+
<path d="M12.886 14.7865H10.9462V9.19066H12.886V14.7865Z"/>\r
|
|
9
|
+
<path d="M16.2433 14.7864H14.3035V6.95244H16.2433V14.7864Z"/>\r
|
|
10
|
+
<path d="M16.919 21.264H6.91313V19.3242H16.919V21.264Z"/>\r
|
|
11
|
+
</g>\r
|
|
12
|
+
</g>\r
|
|
13
|
+
</g>\r
|
|
14
|
+
<defs>\r
|
|
15
|
+
<clipPath id="clip0_64_4271">\r
|
|
16
|
+
<rect width="24" height="24"/>\r
|
|
17
|
+
</clipPath>\r
|
|
18
|
+
</defs>\r
|
|
19
|
+
</svg>\r
|
|
20
|
+
`;exports.default=r;
|