@opentiny/vue-renderless 3.9.3 → 3.10.0
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/action-sheet/vue.js +25 -2
- package/anchor/index.js +3 -3
- package/anchor/vue.js +7 -1
- package/area/index.js +4 -4
- package/button/vue.js +4 -2
- package/button-group/index.js +8 -1
- package/button-group/vue.js +5 -10
- package/calendar/index.js +14 -14
- package/calendar-bar/index.js +3 -3
- package/carousel-item/index.js +1 -1
- package/cascader/vue.js +1 -1
- package/cascader-mobile/index.js +299 -0
- package/cascader-mobile/vue.js +102 -0
- package/cascader-panel/store.js +3 -1
- package/chart-boxplot/index.js +0 -1
- package/chart-core/deps/constants.js +20 -2
- package/chart-core/index.js +9 -1
- package/chart-core/modules/extend.js +14 -1
- package/chart-gauge/index.js +3 -1
- package/chart-graph/index.js +3 -1
- package/chart-map/index.js +11 -1
- package/chart-scatter/index.js +10 -2
- package/chart-waterfall/index.js +4 -1
- package/checkbox/index.js +8 -16
- package/checkbox/vue.js +7 -9
- package/column-list-item/vue.js +10 -1
- package/common/bigInt.js +4 -11
- package/common/date.js +2 -2
- package/common/deps/ResizeObserver.js +3 -1
- package/common/deps/date-util.js +9 -1
- package/common/deps/date.js +18 -5
- package/common/deps/fastdom/async.js +41 -0
- package/common/deps/fastdom/index.js +9 -0
- package/common/deps/fastdom/sandbox.js +53 -0
- package/common/deps/fastdom/singleton.js +80 -0
- package/common/deps/fullscreen/screenfull.js +16 -2
- package/common/deps/memorize.js +3 -3
- package/common/deps/popup-manager.js +0 -1
- package/common/deps/requestAnimationFrame.js +1 -1
- package/common/deps/throttle.js +2 -2
- package/common/deps/tree-model/node.js +23 -11
- package/common/deps/tree-model/tree-store.js +28 -7
- package/common/deps/vue-popper.js +14 -2
- package/common/deps/vue-popup.js +16 -23
- package/common/index.js +7 -35
- package/common/runtime.js +1 -1
- package/common/validate/rules/type.js +3 -1
- package/credit-card-form/vue.js +2 -2
- package/date-panel/index.js +35 -31
- package/date-panel/vue.js +12 -12
- package/date-picker/index.js +9 -5
- package/date-picker/vue.js +20 -8
- package/date-picker-mobile/index.js +3 -3
- package/date-range/index.js +91 -19
- package/date-range/vue.js +19 -11
- package/date-table/index.js +39 -6
- package/date-table/vue.js +2 -2
- package/dept/index.js +1 -1
- package/detail-page/vue.js +9 -1
- package/dialog-box/index.js +11 -2
- package/dialog-box/vue.js +30 -6
- package/dialog-select/index.js +27 -5
- package/dialog-select/vue.js +11 -4
- package/drop-roles/index.js +3 -1
- package/dropdown/index.js +28 -7
- package/dropdown/vue.js +12 -7
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +3 -3
- package/dropdown-item/vue.js +12 -10
- package/dropdown-menu/index.js +13 -14
- package/dropdown-menu/vue.js +8 -7
- package/espace/vue.js +9 -1
- package/fall-menu/vue.js +12 -1
- package/file-upload/index.js +137 -89
- package/file-upload/vue.js +24 -14
- package/filter/index.js +1 -1
- package/filter/vue.js +1 -3
- package/floating-button/index.js +73 -0
- package/floating-button/vue.js +35 -0
- package/form/index.js +13 -4
- package/form/vue.js +7 -2
- package/form-item/index.js +4 -1
- package/form-item/vue.js +6 -3
- package/fullscreen/vue.js +24 -3
- package/grid/plugins/exportExcel.js +54 -8
- package/grid/static/base/helperGetHGSKeys.js +1 -4
- package/grid/utils/common.js +15 -11
- package/grid/utils/dom.js +5 -1
- package/guide/index.js +2 -3
- package/hrapprover/index.js +3 -1
- package/index-bar/vue.js +8 -1
- package/input/index.js +1 -11
- package/input/vue.js +6 -12
- package/ip-address/index.js +4 -11
- package/ip-address/vue.js +8 -1
- package/link-menu/vue.js +22 -2
- package/locales/index.js +4 -2
- package/logon-user/index.js +3 -1
- package/logout/index.js +6 -2
- package/milestone/vue.js +1 -1
- package/mini-picker/index.js +12 -10
- package/mini-picker/vue.js +10 -10
- package/modal/index.js +5 -3
- package/modal/vue.js +4 -2
- package/month-range/index.js +18 -18
- package/month-range/vue.js +16 -4
- package/month-table/index.js +7 -3
- package/multi-select/vue.js +1 -9
- package/nav-menu/index.js +33 -4
- package/nav-menu/vue.js +9 -1
- package/notify/vue.js +12 -1
- package/numeric/vue.js +6 -2
- package/option/index.js +10 -2
- package/option/vue.js +20 -9
- package/option-group/index.js +3 -1
- package/package.json +2 -1
- package/picker/index.js +88 -17
- package/picker/vue.js +42 -17
- package/picker-column/index.js +6 -6
- package/picker-column/vue.js +5 -5
- package/popconfirm/vue.js +3 -1
- package/popeditor/index.js +55 -13
- package/popeditor/vue.js +23 -7
- package/popover/vue.js +1 -2
- package/popup/vue.js +15 -2
- package/progress/index.js +9 -7
- package/progress/vue.js +12 -4
- package/pull-refresh/vue.js +10 -1
- package/query-builder/index.js +9 -0
- package/query-builder/vue.js +18 -0
- package/radio/vue.js +3 -1
- package/radio-button/vue.js +1 -1
- package/rate/index.js +8 -2
- package/rate/vue.js +27 -4
- package/recycle-scroller/index.js +0 -1
- package/scrollbar/vue-bar.js +18 -2
- package/search/index.js +12 -5
- package/search/vue.js +7 -5
- package/select/index.js +567 -283
- package/select/vue.js +141 -85
- package/select-dropdown/vue.js +8 -6
- package/select-mobile/index.js +26 -13
- package/select-mobile/vue.js +14 -5
- package/select-view/index.js +5 -21
- package/select-view/vue.js +0 -3
- package/selected-box/index.js +3 -1
- package/slider/index.js +5 -5
- package/slider/vue.js +16 -0
- package/slider-button/index.js +41 -0
- package/slider-button/vue.js +36 -0
- package/slider-button-group/slide-button.js +142 -0
- package/slider-button-group/vue.js +52 -0
- package/steps/slide-bar.js +0 -1
- package/switch/index.js +1 -1
- package/switch/vue.js +1 -1
- package/tab-bar/index.js +8 -6
- package/tab-nav/index.js +19 -13
- package/tab-nav/vue.js +10 -9
- package/tabs/index.js +21 -17
- package/tabs/vue.js +1 -4
- package/tag/vue.js +2 -1
- package/tag-group/index.js +23 -10
- package/tag-group/vue.js +5 -4
- package/time/index.js +8 -8
- package/time/vue.js +9 -9
- package/time-line/index.js +24 -2
- package/time-line/vue.js +30 -4
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +2 -2
- package/time-range/index.js +24 -21
- package/time-range/vue.js +26 -16
- package/time-spinner/index.js +32 -21
- package/time-spinner/vue.js +37 -12
- package/timeline-item/index.js +77 -0
- package/timeline-item/vue.js +44 -0
- package/toggle-menu/vue.js +0 -1
- package/tooltip/index.js +11 -12
- package/tooltip/vue.js +11 -1
- package/top-box/vue.js +13 -1
- package/tree/index.js +228 -15
- package/tree/vue.js +119 -15
- package/tree-menu/index.js +35 -0
- package/tree-menu/vue.js +27 -5
- package/tree-node/index.js +75 -10
- package/tree-node/vue.js +45 -23
- package/upload/index.js +90 -49
- package/upload/vue.js +22 -10
- package/upload-dragger/index.js +4 -3
- package/upload-list/index.js +67 -16
- package/upload-list/vue.js +26 -9
- package/user/index.js +7 -4
- package/user-link/index.js +2 -1
- package/wizard/index.js +4 -1
- package/wizard/vue.js +19 -2
- package/year-range/index.js +1 -1
- package/year-range/vue.js +3 -3
- package/year-table/index.js +2 -2
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import "../../../chunk-PKUHTIDK.js";
|
|
2
|
+
const RAF = window.requestAnimationFrame;
|
|
3
|
+
const scheduleFlush = (fastdom) => {
|
|
4
|
+
if (!fastdom.scheduled) {
|
|
5
|
+
fastdom.scheduled = true;
|
|
6
|
+
fastdom.raf(flush.bind(null, fastdom));
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
const flush = (fastdom) => {
|
|
10
|
+
const { reads, writes } = fastdom;
|
|
11
|
+
let error;
|
|
12
|
+
try {
|
|
13
|
+
fastdom.runTasks(reads);
|
|
14
|
+
fastdom.runTasks(writes);
|
|
15
|
+
} catch (e) {
|
|
16
|
+
error = e;
|
|
17
|
+
}
|
|
18
|
+
fastdom.scheduled = false;
|
|
19
|
+
if (reads.length || writes.length)
|
|
20
|
+
scheduleFlush(fastdom);
|
|
21
|
+
if (error) {
|
|
22
|
+
if (fastdom.catch) {
|
|
23
|
+
fastdom.catch(error);
|
|
24
|
+
} else {
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const remove = (array, item) => {
|
|
30
|
+
const index = array.indexOf(item);
|
|
31
|
+
return !!~index && !!array.splice(index, 1);
|
|
32
|
+
};
|
|
33
|
+
const mixin = (target, source) => {
|
|
34
|
+
for (let key in source) {
|
|
35
|
+
if (Object.hasOwnProperty.call(source, key))
|
|
36
|
+
target[key] = source[key];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
class FastDom {
|
|
40
|
+
constructor() {
|
|
41
|
+
this.reads = [];
|
|
42
|
+
this.writes = [];
|
|
43
|
+
this.raf = RAF.bind(window);
|
|
44
|
+
}
|
|
45
|
+
runTasks(tasks) {
|
|
46
|
+
let task;
|
|
47
|
+
while (task = tasks.shift())
|
|
48
|
+
task();
|
|
49
|
+
}
|
|
50
|
+
measure(fn, ctx) {
|
|
51
|
+
const task = !ctx ? fn : fn.bind(ctx);
|
|
52
|
+
this.reads.push(task);
|
|
53
|
+
scheduleFlush(this);
|
|
54
|
+
return task;
|
|
55
|
+
}
|
|
56
|
+
mutate(fn, ctx) {
|
|
57
|
+
const task = !ctx ? fn : fn.bind(ctx);
|
|
58
|
+
this.writes.push(task);
|
|
59
|
+
scheduleFlush(this);
|
|
60
|
+
return task;
|
|
61
|
+
}
|
|
62
|
+
clear(task) {
|
|
63
|
+
return remove(this.reads, task) || remove(this.writes, task);
|
|
64
|
+
}
|
|
65
|
+
extend(props) {
|
|
66
|
+
if (!props || typeof props !== "object")
|
|
67
|
+
throw new Error("[AUI][FastDom] expected object");
|
|
68
|
+
const child = Object.create(this);
|
|
69
|
+
mixin(child, props);
|
|
70
|
+
child.fastdom = this;
|
|
71
|
+
if (child.initialize)
|
|
72
|
+
child.initialize();
|
|
73
|
+
return child;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const fastdomSingleton = new FastDom();
|
|
77
|
+
var singleton_default = fastdomSingleton;
|
|
78
|
+
export {
|
|
79
|
+
singleton_default as default
|
|
80
|
+
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import "../../../chunk-PKUHTIDK.js";
|
|
2
2
|
import { on, off } from "../dom";
|
|
3
|
-
const fullscreenApi = [
|
|
3
|
+
const fullscreenApi = [
|
|
4
|
+
"fullscreenElement",
|
|
5
|
+
"fullscreenEnabled",
|
|
6
|
+
"requestFullscreen",
|
|
7
|
+
"exitFullscreen",
|
|
8
|
+
"fullscreenchange",
|
|
9
|
+
"fullscreenerror"
|
|
10
|
+
];
|
|
4
11
|
const fullscreenApiMoz = [
|
|
5
12
|
"mozFullScreenElement",
|
|
6
13
|
"mozFullScreenEnabled",
|
|
@@ -17,7 +24,14 @@ const fullscreenApiWebkit = [
|
|
|
17
24
|
"webkitfullscreenchange",
|
|
18
25
|
"webkitfullscreenerror"
|
|
19
26
|
];
|
|
20
|
-
const fullscreenApiMs = [
|
|
27
|
+
const fullscreenApiMs = [
|
|
28
|
+
"msFullscreenElement",
|
|
29
|
+
"msFullscreenEnabled",
|
|
30
|
+
"msRequestFullscreen",
|
|
31
|
+
"msExitFullscreen",
|
|
32
|
+
"MSFullscreenChange",
|
|
33
|
+
"MSFullscreenError"
|
|
34
|
+
];
|
|
21
35
|
const fullscreenApiMap = [fullscreenApi, fullscreenApiWebkit, fullscreenApiMoz, fullscreenApiMs];
|
|
22
36
|
const document = typeof window !== "undefined" && typeof window.document !== "undefined" ? window.document : {};
|
|
23
37
|
let fullscreenEvents = null;
|
package/common/deps/memorize.js
CHANGED
|
@@ -24,7 +24,7 @@ class Memorize {
|
|
|
24
24
|
this.assemble(value);
|
|
25
25
|
}
|
|
26
26
|
setKey(storeKey) {
|
|
27
|
-
this._storeKey = this._prefix + (storeKey || Number(
|
|
27
|
+
this._storeKey = this._prefix + (storeKey || Number(new Date()));
|
|
28
28
|
}
|
|
29
29
|
getValue(isSort = true) {
|
|
30
30
|
const storeVlue = window.localStorage[this._storeKey] || "";
|
|
@@ -54,7 +54,7 @@ class Memorize {
|
|
|
54
54
|
key: dataKey
|
|
55
55
|
};
|
|
56
56
|
newData[this._customField1] = 1;
|
|
57
|
-
newData[this._customField2] = Number(
|
|
57
|
+
newData[this._customField2] = Number(new Date());
|
|
58
58
|
if (list.length < this._cacheNum) {
|
|
59
59
|
list.push(newData);
|
|
60
60
|
this.setValue(list);
|
|
@@ -66,7 +66,7 @@ class Memorize {
|
|
|
66
66
|
list.some((item) => {
|
|
67
67
|
if (item.key === dataKey) {
|
|
68
68
|
item[this._customField1] = (item[this._customField1] || 0) + 1;
|
|
69
|
-
item[this._customField2] = Number(
|
|
69
|
+
item[this._customField2] = Number(new Date());
|
|
70
70
|
isChanged = true;
|
|
71
71
|
return true;
|
|
72
72
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
if (!window.requestAnimationFrame) {
|
|
9
9
|
window.requestAnimationFrame = function(callback) {
|
|
10
|
-
const now =
|
|
10
|
+
const now = new Date().getTime();
|
|
11
11
|
const timeToCall = Math.max(0, 16 - (now - lastTime));
|
|
12
12
|
const timeCallback = now + timeToCall;
|
|
13
13
|
const id = window.setTimeout(() => {
|
package/common/deps/throttle.js
CHANGED
|
@@ -9,10 +9,10 @@ function throttle_default(delay, noTrailing, callback, debounceMode) {
|
|
|
9
9
|
}
|
|
10
10
|
function wrapper() {
|
|
11
11
|
const me = this;
|
|
12
|
-
const elapsed =
|
|
12
|
+
const elapsed = new Date().valueOf() - lastExec;
|
|
13
13
|
const args = arguments;
|
|
14
14
|
function exec() {
|
|
15
|
-
lastExec =
|
|
15
|
+
lastExec = new Date().valueOf();
|
|
16
16
|
callback.apply(me, args);
|
|
17
17
|
}
|
|
18
18
|
function clear() {
|
|
@@ -3,7 +3,6 @@ import { merge } from "../../object";
|
|
|
3
3
|
import { markNodeData, NODE_KEY } from "./util";
|
|
4
4
|
import { indexOf } from "../../array";
|
|
5
5
|
import { hasOwn, typeOf } from "../../type";
|
|
6
|
-
import debounce from "../debounce";
|
|
7
6
|
const defaultChildrenKey = "children";
|
|
8
7
|
const getPropertyFromData = (node, prop) => {
|
|
9
8
|
const props = node.store.props;
|
|
@@ -57,7 +56,6 @@ const reInitChecked = (node) => {
|
|
|
57
56
|
!node.store.checkStrictly && reInitChecked(parent);
|
|
58
57
|
};
|
|
59
58
|
let nodeIdSeed = 0;
|
|
60
|
-
const lazyInitChecked = debounce(0, (node) => reInitChecked(node));
|
|
61
59
|
class Node {
|
|
62
60
|
constructor(options) {
|
|
63
61
|
this.init(options);
|
|
@@ -342,23 +340,24 @@ class Node {
|
|
|
342
340
|
}
|
|
343
341
|
return data[childrenKey];
|
|
344
342
|
}
|
|
345
|
-
setChecked(value, isDeepChecked, recursion, passValue) {
|
|
343
|
+
setChecked(value, isDeepChecked, recursion, passValue, checkEasily) {
|
|
346
344
|
this.checked = value === true;
|
|
347
345
|
this.indeterminate = value === "half";
|
|
348
346
|
const { checkStrictly, checkDescendants } = this.store;
|
|
349
|
-
if (checkStrictly) {
|
|
347
|
+
if (checkStrictly && !checkEasily) {
|
|
350
348
|
return;
|
|
351
349
|
}
|
|
352
350
|
let ret = this.setCheckedInner({
|
|
353
351
|
checkDescendants,
|
|
354
352
|
value,
|
|
355
353
|
isDeepChecked,
|
|
356
|
-
passValue
|
|
354
|
+
passValue,
|
|
355
|
+
checkEasily
|
|
357
356
|
});
|
|
358
357
|
let returnFlag = ret.returnFlag;
|
|
359
358
|
passValue = ret.passValue;
|
|
360
359
|
value = ret.value;
|
|
361
|
-
if (returnFlag) {
|
|
360
|
+
if (returnFlag || checkStrictly && checkEasily) {
|
|
362
361
|
return;
|
|
363
362
|
}
|
|
364
363
|
const parentNode = this.parent;
|
|
@@ -366,16 +365,16 @@ class Node {
|
|
|
366
365
|
return;
|
|
367
366
|
}
|
|
368
367
|
if (!recursion) {
|
|
369
|
-
|
|
368
|
+
reInitChecked(parentNode);
|
|
370
369
|
}
|
|
371
370
|
}
|
|
372
|
-
setCheckedInner({ checkDescendants, value, isDeepChecked, passValue }) {
|
|
371
|
+
setCheckedInner({ checkDescendants, value, isDeepChecked, passValue, checkEasily }) {
|
|
373
372
|
let returnFlag = false;
|
|
374
373
|
if (this.shouldLoadData() && !checkDescendants) {
|
|
375
374
|
return { value, passValue, returnFlag };
|
|
376
375
|
}
|
|
377
376
|
const { all, allWithoutDisable } = getChildState(this.childNodes);
|
|
378
|
-
if (!this.isLeaf && !all && allWithoutDisable) {
|
|
377
|
+
if (!this.isLeaf && !all && allWithoutDisable && !checkEasily) {
|
|
379
378
|
this.checked = false;
|
|
380
379
|
value = false;
|
|
381
380
|
}
|
|
@@ -386,10 +385,10 @@ class Node {
|
|
|
386
385
|
const childNode = childNodes[i];
|
|
387
386
|
passValue = passValue || value !== false;
|
|
388
387
|
const isCheck = childNode.disabled ? childNode.checked : passValue;
|
|
389
|
-
childNode.setChecked(isCheck, isDeepChecked, true, passValue);
|
|
388
|
+
childNode.setChecked(isCheck, isDeepChecked, true, passValue, checkEasily);
|
|
390
389
|
}
|
|
391
390
|
const { half, all: all2 } = getChildState(childNodes);
|
|
392
|
-
if (!all2) {
|
|
391
|
+
if (!all2 && !checkEasily) {
|
|
393
392
|
this.checked = all2;
|
|
394
393
|
this.indeterminate = half;
|
|
395
394
|
}
|
|
@@ -444,11 +443,24 @@ class Node {
|
|
|
444
443
|
this.doCreateChildren(children, defaultProps);
|
|
445
444
|
this.updateLeafState();
|
|
446
445
|
callback && callback.call(this, children);
|
|
446
|
+
typeof this.store.afterLoad === "function" && this.store.afterLoad({ data: children });
|
|
447
447
|
});
|
|
448
448
|
} else {
|
|
449
449
|
callback && callback.call(this);
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
+
getPathData(key) {
|
|
453
|
+
const nodes = [key ? this.data[key] : this.data];
|
|
454
|
+
let parentNode = this.parent;
|
|
455
|
+
while (parentNode && parentNode.parent) {
|
|
456
|
+
nodes.unshift(key ? parentNode.data[key] : parentNode.data);
|
|
457
|
+
parentNode = parentNode.parent;
|
|
458
|
+
}
|
|
459
|
+
return nodes;
|
|
460
|
+
}
|
|
461
|
+
getPathText(key, separator = ",") {
|
|
462
|
+
return (this.getPathData(key) || []).join(separator);
|
|
463
|
+
}
|
|
452
464
|
}
|
|
453
465
|
export {
|
|
454
466
|
Node as default,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../../../chunk-PKUHTIDK.js";
|
|
2
5
|
import { hasOwn, isNull } from "../../type";
|
|
3
6
|
import { getNodeKey } from "./util";
|
|
4
7
|
import Node from "./node";
|
|
@@ -17,6 +20,7 @@ class TreeStore {
|
|
|
17
20
|
this.load(this.root, (data) => {
|
|
18
21
|
this.root.doCreateChildren(data);
|
|
19
22
|
this._initDefaultCheckedNodes();
|
|
23
|
+
typeof this.afterLoad === "function" && this.afterLoad({ data, init: true });
|
|
20
24
|
});
|
|
21
25
|
} else {
|
|
22
26
|
this._initDefaultCheckedNodes();
|
|
@@ -81,18 +85,23 @@ class TreeStore {
|
|
|
81
85
|
const refNode = this.getNode(insertData);
|
|
82
86
|
refNode.parent.insertAfter({ data }, refNode);
|
|
83
87
|
}
|
|
84
|
-
remove(data) {
|
|
85
|
-
const treeNode = this.getNode(data);
|
|
88
|
+
remove(data, isSaveChildNode, isNode) {
|
|
89
|
+
const treeNode = isNode ? data : this.getNode(data);
|
|
86
90
|
if (treeNode && treeNode.parent) {
|
|
87
91
|
if (treeNode === this.currentNode) {
|
|
88
92
|
this.currentNode = null;
|
|
89
93
|
}
|
|
94
|
+
if (isSaveChildNode && treeNode.childNodes) {
|
|
95
|
+
treeNode.childNodes.forEach((child) => {
|
|
96
|
+
treeNode.parent.insertChild({ data: child.data });
|
|
97
|
+
});
|
|
98
|
+
}
|
|
90
99
|
treeNode.parent.removeChild(treeNode);
|
|
91
100
|
}
|
|
92
101
|
}
|
|
93
|
-
append(data, parentData) {
|
|
102
|
+
append(data, parentData, index) {
|
|
94
103
|
const parentNode = parentData ? this.getNode(parentData) : this.root;
|
|
95
|
-
parentNode && parentNode.insertChild({ data });
|
|
104
|
+
parentNode && parentNode.insertChild({ data }, index);
|
|
96
105
|
}
|
|
97
106
|
setDefaultCheckedKey(newValue) {
|
|
98
107
|
if (newValue !== this.defaultCheckedKeys) {
|
|
@@ -138,14 +147,14 @@ class TreeStore {
|
|
|
138
147
|
this.nodesMap[nodeKey] = node;
|
|
139
148
|
}
|
|
140
149
|
}
|
|
141
|
-
getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
|
|
150
|
+
getCheckedNodes(leafOnly = false, includeHalfChecked = false, isNode = false) {
|
|
142
151
|
const checkedNodes = [];
|
|
143
152
|
const walkTree = (node) => {
|
|
144
153
|
const childNodes = node.root ? node.root.childNodes : node.childNodes;
|
|
145
154
|
childNodes.forEach((child) => {
|
|
146
155
|
const { checked, indeterminate, isLeaf, data } = child;
|
|
147
156
|
if ((checked || includeHalfChecked && indeterminate) && (!leafOnly || leafOnly && isLeaf)) {
|
|
148
|
-
checkedNodes.push(data);
|
|
157
|
+
checkedNodes.push(isNode ? child : data);
|
|
149
158
|
}
|
|
150
159
|
walkTree(child);
|
|
151
160
|
});
|
|
@@ -282,6 +291,18 @@ class TreeStore {
|
|
|
282
291
|
const currNode = this.nodesMap[key];
|
|
283
292
|
this.setCurrentNode(currNode);
|
|
284
293
|
}
|
|
294
|
+
getData(data) {
|
|
295
|
+
return (this.getNode(data) || {}).data;
|
|
296
|
+
}
|
|
297
|
+
getAllData() {
|
|
298
|
+
const children = this.props.children;
|
|
299
|
+
const walkTree = (nodes) => {
|
|
300
|
+
return nodes.map((node) => {
|
|
301
|
+
return __spreadProps(__spreadValues({}, node.data), { [children]: walkTree(node.childNodes) });
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
return walkTree(this.root.childNodes);
|
|
305
|
+
}
|
|
285
306
|
}
|
|
286
307
|
export {
|
|
287
308
|
TreeStore as default
|
|
@@ -98,7 +98,8 @@ const createPopperFn = ({
|
|
|
98
98
|
nextTick,
|
|
99
99
|
updatePopper,
|
|
100
100
|
nextZIndex,
|
|
101
|
-
parent
|
|
101
|
+
parent,
|
|
102
|
+
followHide
|
|
102
103
|
}) => (dom) => {
|
|
103
104
|
if (isServer) {
|
|
104
105
|
return;
|
|
@@ -134,6 +135,7 @@ const createPopperFn = ({
|
|
|
134
135
|
state.popperJS.onUpdate(options.onUpdate);
|
|
135
136
|
}
|
|
136
137
|
state.popperJS._popper.style.zIndex = nextZIndex(state.popperJS._reference);
|
|
138
|
+
followHide(state.popperJS);
|
|
137
139
|
on(state.popperElm, "click", stop);
|
|
138
140
|
};
|
|
139
141
|
const appendArrowFn = (state) => (el) => {
|
|
@@ -194,6 +196,14 @@ var vue_popper_default = ({
|
|
|
194
196
|
const nextZIndex = (reference) => props.zIndex === "relative" ? getReferMaxZIndex(reference) : PopupManager.nextZIndex();
|
|
195
197
|
const appendArrow = appendArrowFn(state);
|
|
196
198
|
const resetTransformOrigin = resetTransformOriginFn(state, props);
|
|
199
|
+
const followHide = (popperInstance) => {
|
|
200
|
+
const { popperOptions = {} } = props;
|
|
201
|
+
const { followReferenceHide = true } = popperOptions;
|
|
202
|
+
const { _popper: popper, _reference: reference } = popperInstance;
|
|
203
|
+
if (followReferenceHide && getComputedStyle(reference).position !== "fixed" && reference.offsetParent === null) {
|
|
204
|
+
popper.style.display = "none";
|
|
205
|
+
}
|
|
206
|
+
};
|
|
197
207
|
let createPopper;
|
|
198
208
|
const updatePopper = (dom) => {
|
|
199
209
|
const popperJS = state.popperJS;
|
|
@@ -201,6 +211,7 @@ var vue_popper_default = ({
|
|
|
201
211
|
popperJS.update();
|
|
202
212
|
if (popperJS._popper && dom !== true) {
|
|
203
213
|
popperJS._popper.style.zIndex = nextZIndex(popperJS._reference);
|
|
214
|
+
followHide(popperJS);
|
|
204
215
|
}
|
|
205
216
|
} else {
|
|
206
217
|
createPopper(dom);
|
|
@@ -217,7 +228,8 @@ var vue_popper_default = ({
|
|
|
217
228
|
nextTick,
|
|
218
229
|
updatePopper,
|
|
219
230
|
nextZIndex,
|
|
220
|
-
parent
|
|
231
|
+
parent,
|
|
232
|
+
followHide
|
|
221
233
|
});
|
|
222
234
|
const doDestroy = (forceDestroy) => {
|
|
223
235
|
if (!state.popperJS || state.showPopper && !forceDestroy) {
|
package/common/deps/vue-popup.js
CHANGED
|
@@ -3,12 +3,10 @@ import {
|
|
|
3
3
|
} from "../../chunk-PKUHTIDK.js";
|
|
4
4
|
import { merge } from "../object";
|
|
5
5
|
import PopupManager from "./popup-manager";
|
|
6
|
-
import
|
|
7
|
-
import { getStyle, addClass, removeClass, hasClass } from "./dom";
|
|
6
|
+
import { addClass, removeClass } from "./dom";
|
|
8
7
|
let idSeed = 1;
|
|
9
|
-
let scrollBarWidth;
|
|
10
8
|
const isServer = typeof window === "undefined";
|
|
11
|
-
const popLockClass = "
|
|
9
|
+
const popLockClass = "popup-parent--hidden";
|
|
12
10
|
const setWatchFn = ({ onMounted, onBeforeUnmount, watch, vm, api, props, state, nextTick }) => {
|
|
13
11
|
onMounted(() => {
|
|
14
12
|
vm._popupId = `popup-${idSeed++}`;
|
|
@@ -40,11 +38,6 @@ const setWatchFn = ({ onMounted, onBeforeUnmount, watch, vm, api, props, state,
|
|
|
40
38
|
}
|
|
41
39
|
);
|
|
42
40
|
};
|
|
43
|
-
const modifyBodyStyle = ({ bodyHasOverflow, bodyOverflowY, state }) => {
|
|
44
|
-
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === "scroll") && state.withoutHiddenClass) {
|
|
45
|
-
document.body.style.paddingRight = `${state.computedBodyPaddingRight + scrollBarWidth}px`;
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
41
|
const openFn = (state, vm, api) => (options) => {
|
|
49
42
|
if (!state.rendered) {
|
|
50
43
|
state.rendered = true;
|
|
@@ -65,13 +58,6 @@ const openFn = (state, vm, api) => (options) => {
|
|
|
65
58
|
api.doOpen(props);
|
|
66
59
|
}
|
|
67
60
|
};
|
|
68
|
-
const modifyStateOnLockScroll = (state) => {
|
|
69
|
-
state.withoutHiddenClass = !hasClass(document.body, popLockClass);
|
|
70
|
-
if (state.withoutHiddenClass) {
|
|
71
|
-
state.bodyPaddingRight = document.body.style.paddingRight;
|
|
72
|
-
state.computedBodyPaddingRight = parseInt(getStyle(document.body, "paddingRight"), 10);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
61
|
const doOpenFn = (vm, state, props, api) => (properties) => {
|
|
76
62
|
if (isServer || vm.willOpen && !vm.willOpen() || state.opened) {
|
|
77
63
|
return;
|
|
@@ -88,13 +74,14 @@ const doOpenFn = (vm, state, props, api) => (properties) => {
|
|
|
88
74
|
PopupManager.closeModal(vm._popupId);
|
|
89
75
|
vm._closing = false;
|
|
90
76
|
}
|
|
91
|
-
PopupManager.openModal(
|
|
77
|
+
PopupManager.openModal(
|
|
78
|
+
vm._popupId,
|
|
79
|
+
PopupManager.nextZIndex(),
|
|
80
|
+
props.modalAppendToBody ? void 0 : dom,
|
|
81
|
+
properties.modalClass,
|
|
82
|
+
properties.modalFade
|
|
83
|
+
);
|
|
92
84
|
if (properties.lockScroll) {
|
|
93
|
-
modifyStateOnLockScroll(state);
|
|
94
|
-
scrollBarWidth = getScrollBarWidth();
|
|
95
|
-
const bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
96
|
-
const bodyOverflowY = getStyle(document.body, "overflowY");
|
|
97
|
-
modifyBodyStyle({ bodyHasOverflow, bodyOverflowY, state });
|
|
98
85
|
addClass(document.body, popLockClass);
|
|
99
86
|
}
|
|
100
87
|
}
|
|
@@ -126,7 +113,13 @@ const closeFn = (api, vm) => () => {
|
|
|
126
113
|
}
|
|
127
114
|
};
|
|
128
115
|
var vue_popup_default = ({ api, nextTick, onBeforeUnmount, onMounted, props, reactive, toRefs, vm, watch }) => {
|
|
129
|
-
const state = reactive({
|
|
116
|
+
const state = reactive({
|
|
117
|
+
opened: false,
|
|
118
|
+
rendered: false,
|
|
119
|
+
bodyPaddingRight: null,
|
|
120
|
+
withoutHiddenClass: true,
|
|
121
|
+
computedBodyPaddingRight: 0
|
|
122
|
+
});
|
|
130
123
|
setWatchFn({ onMounted, onBeforeUnmount, watch, vm, api, props, state, nextTick });
|
|
131
124
|
const open = openFn(state, vm, api);
|
|
132
125
|
const doOpen = doOpenFn(vm, state, props, api);
|
package/common/index.js
CHANGED
|
@@ -109,12 +109,15 @@ const DATE = {
|
|
|
109
109
|
Time: "hh:mm",
|
|
110
110
|
YearMonth: "yyyy-MM"
|
|
111
111
|
};
|
|
112
|
-
const TriggerTypes = "date,datetime,time,time-select,week,month,year,daterange,monthrange,timerange,datetimerange,dates";
|
|
112
|
+
const TriggerTypes = "date,datetime,time,time-select,week,month,year,years,yearrange,daterange,monthrange,timerange,datetimerange,dates";
|
|
113
113
|
const DATEPICKER = {
|
|
114
114
|
Day: "day",
|
|
115
115
|
Date: "date",
|
|
116
116
|
Dates: "dates",
|
|
117
117
|
Year: "year",
|
|
118
|
+
Years: "years",
|
|
119
|
+
YearRange: "yearrange",
|
|
120
|
+
PanelYearNum: 12,
|
|
118
121
|
Month: "month",
|
|
119
122
|
Week: "week",
|
|
120
123
|
Normal: "normal",
|
|
@@ -147,6 +150,8 @@ const DATEPICKER = {
|
|
|
147
150
|
TriggerTypes: TriggerTypes.split(","),
|
|
148
151
|
DateFormats: {
|
|
149
152
|
year: "yyyy",
|
|
153
|
+
years: "yyyy",
|
|
154
|
+
yearrange: "yyyy",
|
|
150
155
|
month: "yyyy-MM",
|
|
151
156
|
time: "HH:mm:ss",
|
|
152
157
|
week: "yyyywWW",
|
|
@@ -219,39 +224,7 @@ const CASCADER = {
|
|
|
219
224
|
PropsHover: "hoverThreshold",
|
|
220
225
|
MenuConnector: "cascader-menu-"
|
|
221
226
|
};
|
|
222
|
-
const
|
|
223
|
-
uploadFlag: "uploadDocument",
|
|
224
|
-
edocFlag: "edoc_flag_",
|
|
225
|
-
edocUrl: "edoc_url_",
|
|
226
|
-
action: "/EdocAction.do?methodFlag=getJsonp×tamp=",
|
|
227
|
-
name: "edocupload",
|
|
228
|
-
path: "",
|
|
229
|
-
updateFlag: "updateDocumentContent",
|
|
230
|
-
docVersion: "&docVersion=",
|
|
231
|
-
preview: "edoc/preview",
|
|
232
|
-
docId: "?docId=",
|
|
233
|
-
formName: "previewForm",
|
|
234
|
-
formAction: '<form action="',
|
|
235
|
-
formMethod: `" method="post" target='`,
|
|
236
|
-
formInput: '<input type="hidden" name="methodFlag" value="view">',
|
|
237
|
-
formInutValue: '<input type="hidden" name="hw_document_code" value="',
|
|
238
|
-
closeDom: '"/>',
|
|
239
|
-
formClose: "</form>",
|
|
240
|
-
hwVersion: "&hw_doc_version=",
|
|
241
|
-
heightStr: "&tmb_height=",
|
|
242
|
-
widthStr: "&hw_thumb_width=",
|
|
243
|
-
imgPreview: "edoc/previewImage",
|
|
244
|
-
hwId: "?hw_doc_id=",
|
|
245
|
-
viewThumb: "viewThumb",
|
|
246
|
-
viewImage: "viewImage",
|
|
247
|
-
methodFlag: "?methodFlag=",
|
|
248
|
-
code: "&hw_document_code=",
|
|
249
|
-
imgDom: '<img src="',
|
|
250
|
-
imgClose: '">',
|
|
251
|
-
constants: 320,
|
|
252
|
-
twenty: 20
|
|
253
|
-
};
|
|
254
|
-
const version = "3.8.5";
|
|
227
|
+
const version = "3.10.0";
|
|
255
228
|
const log = (data, type = "log") => {
|
|
256
229
|
uLog.logger[type](data);
|
|
257
230
|
};
|
|
@@ -260,7 +233,6 @@ export {
|
|
|
260
233
|
CASCADER,
|
|
261
234
|
DATE,
|
|
262
235
|
DATEPICKER,
|
|
263
|
-
EDOC,
|
|
264
236
|
IPTHRESHOLD,
|
|
265
237
|
KEY_CODE,
|
|
266
238
|
MOUSEDELTA,
|
package/common/runtime.js
CHANGED
|
@@ -5,7 +5,9 @@ import { format } from "../../date";
|
|
|
5
5
|
import { isNullOrEmpty } from "../../string";
|
|
6
6
|
import { isNumber, isObject, isDate, typeOf } from "../../type";
|
|
7
7
|
const emailReg1 = '^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))';
|
|
8
|
-
const emailReg = new RegExp(
|
|
8
|
+
const emailReg = new RegExp(
|
|
9
|
+
emailReg1 + "@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,6}))$"
|
|
10
|
+
);
|
|
9
11
|
const pattern = {
|
|
10
12
|
acceptImg: /\.(png|jpe?g|gif)$/,
|
|
11
13
|
acceptFile: /\.(doc?x|xls?x|ppt?x|txt)$/,
|
package/credit-card-form/vue.js
CHANGED
|
@@ -39,14 +39,14 @@ const initState = ({ reactive, props, computed }) => {
|
|
|
39
39
|
cardMonth: "v-card-month",
|
|
40
40
|
cardNumber: "v-card-number"
|
|
41
41
|
},
|
|
42
|
-
minCardYear:
|
|
42
|
+
minCardYear: new Date().getFullYear(),
|
|
43
43
|
isCardNumberMasked: true,
|
|
44
44
|
mainCardNumber: props.formData.cardNumber,
|
|
45
45
|
cardNumberMaxLength: 19,
|
|
46
46
|
cardMonth: props.formData.cardMonth,
|
|
47
47
|
cardYear: props.formData.cardYear,
|
|
48
48
|
formData: props.formData,
|
|
49
|
-
minCardMonth: computed(() => props.formData.cardYear === state.minCardYear ?
|
|
49
|
+
minCardMonth: computed(() => props.formData.cardYear === state.minCardYear ? new Date().getMonth() + 1 : 1)
|
|
50
50
|
});
|
|
51
51
|
return state;
|
|
52
52
|
};
|