@94ai/nf-virtual-select 6.1.20 → 6.1.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.
|
@@ -11,9 +11,9 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
11
11
|
type: ObjectConstructor;
|
|
12
12
|
default: () => {};
|
|
13
13
|
};
|
|
14
|
-
}, {}, {
|
|
15
|
-
|
|
16
|
-
}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
14
|
+
}, {}, {
|
|
15
|
+
sortable: undefined;
|
|
16
|
+
}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
17
17
|
tag: {
|
|
18
18
|
type: StringConstructor;
|
|
19
19
|
default: string;
|
|
@@ -63,7 +63,7 @@ var _sfc_staticRenderFns$2 = [];
|
|
|
63
63
|
var __component__$2 = /* @__PURE__ */ vue2RuntimeHelpers.normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
|
|
64
64
|
const ElOptionNode = __component__$2.exports;
|
|
65
65
|
/**!
|
|
66
|
-
* Sortable 1.15.
|
|
66
|
+
* Sortable 1.15.3
|
|
67
67
|
* @author RubaXa <trash@rubaxa.org>
|
|
68
68
|
* @author owenm <owen23355@gmail.com>
|
|
69
69
|
* @license MIT
|
|
@@ -170,7 +170,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
170
170
|
}
|
|
171
171
|
return target;
|
|
172
172
|
}
|
|
173
|
-
var version = "1.15.
|
|
173
|
+
var version = "1.15.3";
|
|
174
174
|
function userAgent(pattern) {
|
|
175
175
|
if (typeof window !== "undefined" && window.navigator) {
|
|
176
176
|
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
@@ -1231,7 +1231,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
1233
|
target = parent;
|
|
1234
|
-
} while (parent = parent
|
|
1234
|
+
} while (parent = getParentOrHost(parent));
|
|
1235
1235
|
}
|
|
1236
1236
|
_unhideGhostForTarget();
|
|
1237
1237
|
}
|
|
@@ -1998,7 +1998,8 @@ Sortable.utils = {
|
|
|
1998
1998
|
nextTick: _nextTick,
|
|
1999
1999
|
cancelNextTick: _cancelNextTick,
|
|
2000
2000
|
detectDirection: _detectDirection,
|
|
2001
|
-
getChild
|
|
2001
|
+
getChild,
|
|
2002
|
+
expando
|
|
2002
2003
|
};
|
|
2003
2004
|
Sortable.get = function(element) {
|
|
2004
2005
|
return element[expando];
|
|
@@ -2300,23 +2301,21 @@ const _sfc_main$1 = vueDemi.defineComponent({
|
|
|
2300
2301
|
"slot": "header"
|
|
2301
2302
|
}, [(_j = (_i = this.$scopedSlots).header) == null ? void 0 : _j.call(_i, {})])]);
|
|
2302
2303
|
},
|
|
2304
|
+
data() {
|
|
2305
|
+
return {
|
|
2306
|
+
sortable: void 0
|
|
2307
|
+
};
|
|
2308
|
+
},
|
|
2303
2309
|
mounted() {
|
|
2310
|
+
var _a, _b;
|
|
2304
2311
|
if (this.config.multiple && !this.config["collapse-tags"]) {
|
|
2305
|
-
this.setSort();
|
|
2306
|
-
}
|
|
2307
|
-
},
|
|
2308
|
-
methods: {
|
|
2309
|
-
setSort() {
|
|
2310
|
-
var _a;
|
|
2311
2312
|
const elSelectRef = this.$refs.nfVirtualSelect;
|
|
2312
|
-
const el = (_a = elSelectRef == null ? void 0 : elSelectRef.$el) == null ? void 0 : _a.querySelectorAll(".el-select__tags > span")[0];
|
|
2313
|
+
const el = (_b = (_a = elSelectRef == null ? void 0 : elSelectRef.$el) == null ? void 0 : _a.querySelectorAll(".el-select__tags > span")) == null ? void 0 : _b[0];
|
|
2313
2314
|
if (el) {
|
|
2314
|
-
Sortable.create(el, {
|
|
2315
|
-
ghostClass: "sortable-ghost",
|
|
2315
|
+
this.sortable = Sortable.create(el, {
|
|
2316
|
+
ghostClass: "nf-sortable-ghost",
|
|
2316
2317
|
// Class name for the drop placeholder,
|
|
2317
|
-
setData:
|
|
2318
|
-
dataTransfer.setData("Text", "");
|
|
2319
|
-
},
|
|
2318
|
+
setData: (dataTransfer) => dataTransfer.setData("Text", ""),
|
|
2320
2319
|
onEnd: (evt) => {
|
|
2321
2320
|
const valueChange = this.value;
|
|
2322
2321
|
const targetRow = valueChange.splice(evt.oldIndex, 1)[0];
|
|
@@ -2325,6 +2324,13 @@ const _sfc_main$1 = vueDemi.defineComponent({
|
|
|
2325
2324
|
});
|
|
2326
2325
|
}
|
|
2327
2326
|
}
|
|
2327
|
+
},
|
|
2328
|
+
beforeDestroy() {
|
|
2329
|
+
var _a;
|
|
2330
|
+
try {
|
|
2331
|
+
(_a = this.sortable) == null ? void 0 : _a.destroy();
|
|
2332
|
+
} catch (error) {
|
|
2333
|
+
}
|
|
2328
2334
|
}
|
|
2329
2335
|
});
|
|
2330
2336
|
const _sfc_render$1 = null;
|
|
@@ -61,7 +61,7 @@ var _sfc_staticRenderFns$2 = [];
|
|
|
61
61
|
var __component__$2 = /* @__PURE__ */ normalizeComponent(_sfc_main$2, _sfc_render$2, _sfc_staticRenderFns$2, false, null, null, null, null);
|
|
62
62
|
const ElOptionNode = __component__$2.exports;
|
|
63
63
|
/**!
|
|
64
|
-
* Sortable 1.15.
|
|
64
|
+
* Sortable 1.15.3
|
|
65
65
|
* @author RubaXa <trash@rubaxa.org>
|
|
66
66
|
* @author owenm <owen23355@gmail.com>
|
|
67
67
|
* @license MIT
|
|
@@ -168,7 +168,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
168
168
|
}
|
|
169
169
|
return target;
|
|
170
170
|
}
|
|
171
|
-
var version = "1.15.
|
|
171
|
+
var version = "1.15.3";
|
|
172
172
|
function userAgent(pattern) {
|
|
173
173
|
if (typeof window !== "undefined" && window.navigator) {
|
|
174
174
|
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
@@ -1229,7 +1229,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
target = parent;
|
|
1232
|
-
} while (parent = parent
|
|
1232
|
+
} while (parent = getParentOrHost(parent));
|
|
1233
1233
|
}
|
|
1234
1234
|
_unhideGhostForTarget();
|
|
1235
1235
|
}
|
|
@@ -1996,7 +1996,8 @@ Sortable.utils = {
|
|
|
1996
1996
|
nextTick: _nextTick,
|
|
1997
1997
|
cancelNextTick: _cancelNextTick,
|
|
1998
1998
|
detectDirection: _detectDirection,
|
|
1999
|
-
getChild
|
|
1999
|
+
getChild,
|
|
2000
|
+
expando
|
|
2000
2001
|
};
|
|
2001
2002
|
Sortable.get = function(element) {
|
|
2002
2003
|
return element[expando];
|
|
@@ -2298,23 +2299,21 @@ const _sfc_main$1 = defineComponent({
|
|
|
2298
2299
|
"slot": "header"
|
|
2299
2300
|
}, [(_j = (_i = this.$scopedSlots).header) == null ? void 0 : _j.call(_i, {})])]);
|
|
2300
2301
|
},
|
|
2302
|
+
data() {
|
|
2303
|
+
return {
|
|
2304
|
+
sortable: void 0
|
|
2305
|
+
};
|
|
2306
|
+
},
|
|
2301
2307
|
mounted() {
|
|
2308
|
+
var _a, _b;
|
|
2302
2309
|
if (this.config.multiple && !this.config["collapse-tags"]) {
|
|
2303
|
-
this.setSort();
|
|
2304
|
-
}
|
|
2305
|
-
},
|
|
2306
|
-
methods: {
|
|
2307
|
-
setSort() {
|
|
2308
|
-
var _a;
|
|
2309
2310
|
const elSelectRef = this.$refs.nfVirtualSelect;
|
|
2310
|
-
const el = (_a = elSelectRef == null ? void 0 : elSelectRef.$el) == null ? void 0 : _a.querySelectorAll(".el-select__tags > span")[0];
|
|
2311
|
+
const el = (_b = (_a = elSelectRef == null ? void 0 : elSelectRef.$el) == null ? void 0 : _a.querySelectorAll(".el-select__tags > span")) == null ? void 0 : _b[0];
|
|
2311
2312
|
if (el) {
|
|
2312
|
-
Sortable.create(el, {
|
|
2313
|
-
ghostClass: "sortable-ghost",
|
|
2313
|
+
this.sortable = Sortable.create(el, {
|
|
2314
|
+
ghostClass: "nf-sortable-ghost",
|
|
2314
2315
|
// Class name for the drop placeholder,
|
|
2315
|
-
setData:
|
|
2316
|
-
dataTransfer.setData("Text", "");
|
|
2317
|
-
},
|
|
2316
|
+
setData: (dataTransfer) => dataTransfer.setData("Text", ""),
|
|
2318
2317
|
onEnd: (evt) => {
|
|
2319
2318
|
const valueChange = this.value;
|
|
2320
2319
|
const targetRow = valueChange.splice(evt.oldIndex, 1)[0];
|
|
@@ -2323,6 +2322,13 @@ const _sfc_main$1 = defineComponent({
|
|
|
2323
2322
|
});
|
|
2324
2323
|
}
|
|
2325
2324
|
}
|
|
2325
|
+
},
|
|
2326
|
+
beforeDestroy() {
|
|
2327
|
+
var _a;
|
|
2328
|
+
try {
|
|
2329
|
+
(_a = this.sortable) == null ? void 0 : _a.destroy();
|
|
2330
|
+
} catch (error) {
|
|
2331
|
+
}
|
|
2326
2332
|
}
|
|
2327
2333
|
});
|
|
2328
2334
|
const _sfc_render$1 = null;
|
|
@@ -64,23 +64,19 @@ export default defineComponent({
|
|
|
64
64
|
</Tag>
|
|
65
65
|
);
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
sortable: undefined
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
mounted() {
|
|
73
|
+
if (this.config.multiple && !this.config['collapse-tags']) {
|
|
74
74
|
const elSelectRef = this.$refs.nfVirtualSelect as any
|
|
75
|
-
const el = elSelectRef?.$el?.querySelectorAll('.el-select__tags > span')[0]
|
|
75
|
+
const el = elSelectRef?.$el?.querySelectorAll('.el-select__tags > span')?.[0]
|
|
76
76
|
if (el) {
|
|
77
|
-
Sortable.create(el, {
|
|
78
|
-
ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
|
|
79
|
-
setData:
|
|
80
|
-
dataTransfer.setData('Text', '')
|
|
81
|
-
// to avoid Firefox bug
|
|
82
|
-
// Detail see : https://github.com/RubaXa/Sortable/issues/1012
|
|
83
|
-
},
|
|
77
|
+
this.sortable = Sortable.create(el, {
|
|
78
|
+
ghostClass: 'nf-sortable-ghost', // Class name for the drop placeholder,
|
|
79
|
+
setData: (dataTransfer) => dataTransfer.setData('Text', ''),
|
|
84
80
|
onEnd: evt => {
|
|
85
81
|
const valueChange = this.value as any[]
|
|
86
82
|
const targetRow = valueChange.splice(evt.oldIndex, 1)[0]
|
|
@@ -89,7 +85,14 @@ export default defineComponent({
|
|
|
89
85
|
})
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
|
-
}
|
|
88
|
+
},
|
|
89
|
+
beforeDestroy() {
|
|
90
|
+
try {
|
|
91
|
+
(this.sortable as any)?.destroy()
|
|
92
|
+
} catch (error) {
|
|
93
|
+
// console.log(error)
|
|
94
|
+
}
|
|
95
|
+
},
|
|
93
96
|
});
|
|
94
97
|
</script>
|
|
95
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-virtual-select",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.27",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>,DESKTOP-1EDDQ79\\dev026 <liuxiangxiang@94ai.com>",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/common-utils": "^6.1.
|
|
18
|
-
"@94ai/nf-theme-chalk": "^6.1.
|
|
17
|
+
"@94ai/common-utils": "^6.1.27",
|
|
18
|
+
"@94ai/nf-theme-chalk": "^6.1.27",
|
|
19
19
|
"lodash-es": "^4.17.21",
|
|
20
|
-
"sortablejs": "^1.15.
|
|
20
|
+
"sortablejs": "^1.15.3",
|
|
21
21
|
"vue-demi": "^0.14.5",
|
|
22
22
|
"vue-virtual-scroll-list": "^2.3.5"
|
|
23
23
|
},
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"types": "lib/index.d.ts",
|
|
35
35
|
"main": "lib/nf-virtual-select.cjs.js",
|
|
36
36
|
"module": "lib/nf-virtual-select.esm-bundler.js",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "1b2a7d05fe6309416d20cc876412c7e87be86e4e"
|
|
38
38
|
}
|