next-element-vue 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +31 -11
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +31 -11
- package/dist/index.umd.min.js +3 -3
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 作 者:huangteng
|
|
4
4
|
* 邮 箱:htengweb@163.com
|
|
5
|
-
* 当前版本:0.3.
|
|
6
|
-
* 发布日期:2024-
|
|
5
|
+
* 当前版本:0.3.5 v
|
|
6
|
+
* 发布日期:2024-09-03
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -3579,7 +3579,7 @@ var NextSpinLoading$1 = defineComponent({
|
|
|
3579
3579
|
}
|
|
3580
3580
|
if ("select" === col.type) {
|
|
3581
3581
|
const placeholder = t("next.form.select") + (col.searchPlaceholder || col.searchLabel || col.label);
|
|
3582
|
-
return createVNode(ElSelect, {
|
|
3582
|
+
return !formParams[col.prop] && col.multiple && (formParams[col.prop] = []), createVNode(ElSelect, {
|
|
3583
3583
|
modelValue: formParams[col.prop],
|
|
3584
3584
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
3585
3585
|
clearable: !0,
|
|
@@ -7113,8 +7113,17 @@ class CreatePolygonVertexes {
|
|
|
7113
7113
|
this.destroyedObservers = callback;
|
|
7114
7114
|
}
|
|
7115
7115
|
canvasMouseClick(e) {
|
|
7116
|
-
e.stopPropagation(), this.isDrawing = !0, this.mouseOffset.x = e.offsetX, this.mouseOffset.y = e.offsetY
|
|
7117
|
-
|
|
7116
|
+
e.stopPropagation(), this.isDrawing = !0, this.mouseOffset.x = e.offsetX, this.mouseOffset.y = e.offsetY;
|
|
7117
|
+
const [x, y] = [ e.offsetX, e.offsetY ];
|
|
7118
|
+
let is_add = !0;
|
|
7119
|
+
for (let i = 0; i < this.vertexes.length; i++) {
|
|
7120
|
+
const p = this.vertexes[i];
|
|
7121
|
+
if (Math.sqrt((x - p[0]) ** 2 + (y - p[1]) ** 2) < 8) {
|
|
7122
|
+
is_add = !1;
|
|
7123
|
+
break;
|
|
7124
|
+
}
|
|
7125
|
+
}
|
|
7126
|
+
is_add && this.vertexes.push([ x, y ]), this.vertexes = vertexesUnique(this.vertexes);
|
|
7118
7127
|
}
|
|
7119
7128
|
canvasMousemove(e) {
|
|
7120
7129
|
e.stopPropagation(), this.isDrawing && (this.mouseOffset.x = e.offsetX, this.mouseOffset.y = e.offsetY,
|
|
@@ -7143,11 +7152,12 @@ class EditPolygonPath {
|
|
|
7143
7152
|
pointCentreIndex;
|
|
7144
7153
|
vertexRadius;
|
|
7145
7154
|
edgeCentreRadius;
|
|
7155
|
+
pointRecover;
|
|
7146
7156
|
observers=[];
|
|
7147
7157
|
constructor(canvas, ctx) {
|
|
7148
7158
|
this.canvas = canvas, this.ctx = ctx, this.vertexes = [], this.isEditing = !1, this.canClickEvent = !0,
|
|
7149
7159
|
this.isMoveEditing = !1, this.pointVertexIndex = -1, this.pointCentreIndex = -1,
|
|
7150
|
-
this.vertexRadius = 8, this.edgeCentreRadius = 5;
|
|
7160
|
+
this.vertexRadius = 8, this.edgeCentreRadius = 5, this.pointRecover = [];
|
|
7151
7161
|
}
|
|
7152
7162
|
drawPolygonPath(vertexes, mouseX, mouseY) {
|
|
7153
7163
|
const ctx = this.ctx;
|
|
@@ -7228,7 +7238,9 @@ class EditPolygonPath {
|
|
|
7228
7238
|
}
|
|
7229
7239
|
canvasMousedown(e) {
|
|
7230
7240
|
e.stopPropagation(), e.preventDefault(), this.canClickEvent = !0;
|
|
7231
|
-
const {offsetX: x, offsetY: y} = e
|
|
7241
|
+
const {offsetX: x, offsetY: y} = e;
|
|
7242
|
+
this.pointRecover = [ x, y ];
|
|
7243
|
+
const vertex_i = this.pointInVertexes(x, y);
|
|
7232
7244
|
isValueExist(vertex_i) && (this.isMoveEditing = !0, this.pointVertexIndex = vertex_i,
|
|
7233
7245
|
this.vertexes.splice(this.pointVertexIndex, 1, [ x, y ]));
|
|
7234
7246
|
const i = this.pointInEdgeCentre(x, y);
|
|
@@ -7239,11 +7251,19 @@ class EditPolygonPath {
|
|
|
7239
7251
|
}
|
|
7240
7252
|
canvasMouseup(e) {
|
|
7241
7253
|
e.stopPropagation(), e.preventDefault();
|
|
7242
|
-
|
|
7254
|
+
let {offsetX: x, offsetY: y} = e;
|
|
7255
|
+
this.vertexes = vertexesUnique(this.vertexes);
|
|
7256
|
+
for (let i = 0; i < this.vertexes.length; i++) {
|
|
7257
|
+
const p = this.vertexes[i], radius = Math.sqrt((x - p[0]) ** 2 + (y - p[1]) ** 2);
|
|
7258
|
+
if (radius < 8 && radius > 0 && this.pointRecover.length) {
|
|
7259
|
+
x = this.pointRecover[0], y = this.pointRecover[1], this.pointRecover = [];
|
|
7260
|
+
break;
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7243
7263
|
this.pointVertexIndex > -1 && this.vertexes.splice(this.pointVertexIndex, 1, [ x, y ]),
|
|
7244
7264
|
this.pointCentreIndex > -1 && this.vertexes.splice(this.pointCentreIndex, 1, [ x, y ]),
|
|
7245
7265
|
this.isMoveEditing = !1, this.pointVertexIndex = -1, this.pointCentreIndex = -1,
|
|
7246
|
-
this.notifyObservers();
|
|
7266
|
+
this.drawPolygon(this.vertexes), this.notifyObservers();
|
|
7247
7267
|
}
|
|
7248
7268
|
canvasMouseClick(e) {
|
|
7249
7269
|
e.stopPropagation();
|
|
@@ -7808,7 +7828,7 @@ const zoomDialog = app => {
|
|
|
7808
7828
|
}));
|
|
7809
7829
|
}
|
|
7810
7830
|
});
|
|
7811
|
-
}, version = "0.3.
|
|
7831
|
+
}, version = "0.3.5", install = function(app) {
|
|
7812
7832
|
Object.keys(components).forEach((key => {
|
|
7813
7833
|
const component = components[key];
|
|
7814
7834
|
app.component(component.name, component);
|
|
@@ -7818,7 +7838,7 @@ const zoomDialog = app => {
|
|
|
7818
7838
|
};
|
|
7819
7839
|
|
|
7820
7840
|
var index = {
|
|
7821
|
-
version: "0.3.
|
|
7841
|
+
version: "0.3.5",
|
|
7822
7842
|
install: install
|
|
7823
7843
|
};
|
|
7824
7844
|
|