@opentiny/vue-renderless 3.13.1 → 3.14.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/index.js +20 -13
- package/action-sheet/vue.js +8 -7
- package/amount/index.js +100 -25
- package/amount/vue.js +102 -26
- package/anchor/index.js +1 -0
- package/area/index.js +8 -8
- package/area/vue.js +5 -5
- package/async-flowchart/index.js +16 -3
- package/autocomplete/index.js +58 -14
- package/autocomplete/vue.js +40 -12
- package/badge/index.js +12 -0
- package/badge/vue.js +6 -4
- package/breadcrumb/vue.js +3 -1
- package/breadcrumb-item/vue.js +6 -2
- package/button/index.js +5 -1
- package/calendar/index.js +2 -86
- package/calendar-bar/index.js +18 -4
- package/calendar-view/index.js +5 -1
- package/calendar-view/vue.js +16 -3
- package/card-group/vue.js +4 -2
- package/cascader/index.js +86 -34
- package/cascader/vue.js +61 -20
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +36 -23
- package/cascader-mobile/vue.js +6 -0
- package/cascader-node/index.js +13 -1
- package/cascader-node/vue.js +15 -4
- package/cascader-panel/index.js +1 -1
- package/cascader-select/column-index.js +150 -0
- package/cascader-select/column.js +120 -0
- package/cascader-select/index.js +29 -165
- package/cascader-select/usePicker.js +251 -0
- package/cascader-select/useTouch.js +65 -0
- package/cascader-select/vue.js +35 -47
- package/cell/vue.js +2 -1
- package/chart-bar/index.js +2 -3
- package/chart-core/deps/constants.js +43 -43
- package/chart-core/index.js +1 -1
- package/chart-gauge/index.js +2 -2
- package/chart-heatmap/index.js +17 -10
- package/chart-line/index.js +8 -9
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +4 -6
- package/checkbox/index.js +18 -1
- package/checkbox/vue.js +15 -7
- package/checkbox-group/vue.js +1 -0
- package/col/vue.js +1 -1
- package/collapse/index.js +3 -3
- package/color-select-panel/vue.js +0 -7
- package/column-list-item/index.js +17 -1
- package/column-list-item/vue.js +8 -3
- package/common/date.js +7 -5
- package/common/deps/clickoutside.js +6 -2
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +44 -11
- package/common/deps/resize-event.js +1 -0
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +2 -2
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +38 -20
- package/common/index.js +2 -2
- package/common/runtime.js +1 -1
- package/common/string.js +2 -2
- package/common/type.js +2 -1
- package/common/validate/rules/enum.js +1 -1
- package/common/validate/rules/pattern.js +2 -2
- package/common/validate/rules/range.js +8 -5
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +5 -5
- package/common/validate/rules/whitespace.js +1 -1
- package/common/validate/util.js +15 -16
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/currency/index.js +74 -7
- package/currency/vue.js +21 -5
- package/date-panel/index.js +16 -0
- package/date-panel/vue.js +8 -2
- package/date-picker-mobile/index.js +12 -0
- package/date-picker-mobile/vue.js +7 -1
- package/date-range/vue.js +14 -6
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +46 -14
- package/dialog-box/vue.js +30 -7
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +27 -5
- package/drawer/vue.js +14 -7
- package/dropdown/index.js +7 -7
- package/dropdown/vue.js +6 -2
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +6 -10
- package/dropdown-item/vue.js +20 -7
- package/dropdown-menu/index.js +20 -7
- package/dropdown-menu/vue.js +4 -3
- package/exception/index.js +2 -7
- package/exception/vue.js +7 -10
- package/fall-menu/index.js +5 -1
- package/fall-menu/vue.js +13 -2
- package/file-upload/index.js +68 -18
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -0
- package/float-button/index.js +42 -0
- package/float-button/vue.js +101 -0
- package/floating-button/index.js +62 -16
- package/floating-button/vue.js +27 -9
- package/flowchart/index.js +134 -25
- package/flowchart/node.js +13 -4
- package/flowchart/vue.js +16 -4
- package/form/vue.js +8 -0
- package/form-item/index.js +5 -5
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/plugins/export.js +5 -2
- package/grid/utils/column.js +1 -0
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -1
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +81 -20
- package/input/vue.js +44 -18
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/link/vue.js +3 -1
- package/loading/index.js +2 -2
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/menu/index.js +15 -2
- package/menu/vue.js +22 -17
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/modal/index.js +44 -4
- package/modal/vue.js +18 -4
- package/multi-select/index.js +186 -11
- package/multi-select/vue.js +60 -15
- package/multi-select-item/index.js +23 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +46 -12
- package/numeric/vue.js +44 -19
- package/option/index.js +27 -9
- package/option/vue.js +37 -21
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +18 -4
- package/pager/vue.js +16 -5
- package/picker/index.js +258 -49
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/vue.js +3 -0
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +71 -32
- package/popeditor/vue.js +15 -11
- package/popover/index.js +4 -4
- package/popover/vue.js +6 -6
- package/popup/index.js +3 -3
- package/popup/vue.js +5 -5
- package/pull-refresh/index.js +13 -13
- package/pull-refresh/vue.js +5 -4
- package/radio/index.js +0 -17
- package/radio/vue.js +4 -10
- package/rate/index.js +1 -1
- package/rate/vue.js +0 -2
- package/record/index.js +4 -1
- package/rich-text/clipboard.js +54 -0
- package/rich-text/index.js +192 -0
- package/rich-text/module/file-upload.js +107 -0
- package/rich-text/module/image-drop.js +63 -0
- package/rich-text/module/image-upload.js +89 -0
- package/rich-text/options.js +141 -0
- package/rich-text/table-module.js +382 -0
- package/rich-text/vue.js +102 -0
- package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
- package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
- package/scrollbar/index.js +11 -11
- package/scrollbar/vue-bar.js +3 -3
- package/scrollbar/vue.js +5 -5
- package/search/index.js +9 -9
- package/search/vue.js +8 -6
- package/select/index.js +457 -389
- package/select/vue.js +257 -161
- package/select-dropdown/index.js +61 -3
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- package/selected-box/index.js +2 -0
- package/selected-box/vue.js +6 -3
- package/signature/index.js +241 -0
- package/signature/vue.js +88 -0
- package/skeleton/index.js +14 -0
- package/skeleton/vue.js +15 -0
- package/skeleton-item/vue.js +15 -0
- package/slider/index.js +70 -17
- package/slider/vue.js +16 -7
- package/split/index.js +5 -3
- package/split/vue.js +4 -6
- package/standard-list-item/index.js +15 -1
- package/standard-list-item/vue.js +6 -5
- package/steps/index.js +25 -2
- package/steps/slide-bar.js +8 -1
- package/steps/vue.js +15 -3
- package/tab-item-mf/vue.js +14 -8
- package/tab-nav/index.js +30 -5
- package/tab-nav/vue.js +16 -4
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +16 -4
- package/tabs/vue.js +2 -1
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tabs-mf/wheel.js +1 -0
- package/tag/index.js +1 -1
- package/tag-group/index.js +2 -1
- package/time/index.js +5 -2
- package/time/vue.js +1 -1
- package/time-line/index.js +3 -3
- package/time-line/vue.js +2 -2
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +6 -3
- package/tooltip/vue.js +4 -4
- package/transfer/index.js +20 -22
- package/transfer/vue.js +1 -6
- package/transfer-panel/vue.js +3 -5
- package/tree/index.js +21 -4
- package/tree/vue.js +10 -8
- package/tree-menu/index.js +31 -5
- package/tree-menu/vue.js +28 -15
- package/tree-node/index.js +18 -18
- package/tree-node/vue.js +6 -5
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +1 -1
- package/types/amount.type.d.ts +168 -1
- package/types/area.type.d.ts +134 -1
- package/types/async-flowchart.type.d.ts +72 -0
- package/types/autocomplete.type.d.ts +199 -1
- package/types/badge.type.d.ts +3 -1
- package/types/breadcrumb-item.type.d.ts +2 -0
- package/types/breadcrumb.type.d.ts +2 -0
- package/types/button-group.type.d.ts +3 -3
- package/types/button.type.d.ts +4 -0
- package/types/cascader-menu.type.d.ts +3 -4
- package/types/cascader-node.type.d.ts +5 -2
- package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
- package/types/cascader-panel.type.d.ts +3 -241
- package/types/cascader.type.d.ts +329 -1
- package/types/checkbox.type.d.ts +9 -3
- package/types/collapse.type.d.ts +20 -3
- package/types/date-picker.type.d.ts +37 -0
- package/types/dialog-box.type.d.ts +13 -3
- package/types/drawer.type.d.ts +133 -1
- package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +1 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/float-button.type.d.ts +123 -0
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
- package/types/form.type.d.ts +1 -1
- package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
- package/types/input.type.d.ts +1 -5
- package/types/ip-address.type.d.ts +160 -1
- package/types/link.type.d.ts +6 -3
- package/types/loading.type.d.ts +7 -0
- package/types/milestone.type.d.ts +1 -1
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +29 -2
- package/types/numeric.type.d.ts +41 -10
- package/types/pager.type.d.ts +13 -1
- package/types/picker.type.d.ts +18 -0
- package/types/popconfirm.type.d.ts +86 -1
- package/types/popeditor.type.d.ts +5 -1
- package/types/popover.type.d.ts +3 -3
- package/types/progress.type.d.ts +3 -1
- package/types/radio.type.d.ts +0 -4
- package/types/rate.type.d.ts +236 -1
- package/types/search.type.d.ts +88 -1
- package/types/shared.type.d.ts +1 -1
- package/types/skeleton-item.type.d.ts +38 -0
- package/types/skeleton.type.d.ts +45 -0
- package/types/slider.type.d.ts +49 -10
- package/types/steps.type.d.ts +15 -4
- package/types/switch.type.d.ts +3 -3
- package/types/tab-bar.type.d.ts +1 -1
- package/types/tab-nav.type.d.ts +7 -2
- package/types/tabs.type.d.ts +9 -1
- package/types/tag-group.type.d.ts +64 -1
- package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
- package/types/time-line.type.d.ts +1 -1
- package/types/timeline-item.type.d.ts +1 -1
- package/types/tooltip.type.d.ts +2 -2
- package/types/transfer.type.d.ts +185 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +2 -2
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/user-head.type.d.ts +146 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +64 -34
- package/upload/vue.js +9 -5
- package/upload-dragger/index.js +22 -20
- package/upload-list/index.js +24 -18
- package/upload-list/vue.js +9 -4
- package/user/index.js +34 -25
- package/user/vue.js +1 -1
- package/user-head/index.js +3 -3
- package/watermark/index.js +11 -0
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
- package/common/deps/modal-queue.js +0 -6
- package/common/deps/requestAnimationFrame.js +0 -25
package/upload-list/vue.js
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
getNotSuccessFiles
|
|
24
24
|
} from "./index";
|
|
25
25
|
import { getToken, initService } from "../file-upload";
|
|
26
|
+
import { formatFileSize } from "../common/string";
|
|
26
27
|
import { getApi } from "../file-upload/vue";
|
|
27
28
|
const api = [
|
|
28
29
|
"t",
|
|
@@ -43,17 +44,20 @@ const api = [
|
|
|
43
44
|
"reUpload",
|
|
44
45
|
"remove",
|
|
45
46
|
"handleTriggerClick",
|
|
46
|
-
"chooseFile"
|
|
47
|
+
"chooseFile",
|
|
48
|
+
"formatFileSize"
|
|
47
49
|
];
|
|
48
|
-
const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, computed }, { t, parent, mode, emit, service, vm, nextTick, designConfig }, { Modal }) => {
|
|
50
|
+
const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, computed }, { t, parent, mode, emit, service, vm, nextTick, designConfig, useBreakpoint }, { Modal }) => {
|
|
49
51
|
var _a, _b, _c, _d, _e, _f;
|
|
50
52
|
const api2 = { getApi };
|
|
51
53
|
parent = inject("uploader").$children[0];
|
|
52
54
|
const constants = parent.$constants;
|
|
53
55
|
const $service = initService({ props, service });
|
|
56
|
+
const { current } = useBreakpoint();
|
|
54
57
|
const state = reactive({
|
|
55
58
|
focusing: false,
|
|
56
59
|
shows: false,
|
|
60
|
+
currentBreakpoint: current,
|
|
57
61
|
progressType: ((_a = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _a.progressType) || "circle",
|
|
58
62
|
progressWidth: (_b = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _b.progressWidth,
|
|
59
63
|
progressStrokeWidth: ((_c = designConfig == null ? void 0 : designConfig.state) == null ? void 0 : _c.progressStrokeWidth) || 6,
|
|
@@ -84,7 +88,7 @@ const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, co
|
|
|
84
88
|
pause: pause({ vm, props }),
|
|
85
89
|
handleLoadedmetadata: handleLoadedmetadata({ vm }),
|
|
86
90
|
handleTimeupdate: handleTimeupdate(),
|
|
87
|
-
destroyed: destroyed({
|
|
91
|
+
destroyed: destroyed({ props, vm }),
|
|
88
92
|
showOperatePanel: showOperatePanel({ state }),
|
|
89
93
|
getFileType: getFileType(),
|
|
90
94
|
getFileIcon: getFileIcon({ constants }),
|
|
@@ -95,7 +99,8 @@ const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, co
|
|
|
95
99
|
handleTriggerClick: handleTriggerClick({ state, props }),
|
|
96
100
|
chooseFile: chooseFile({ state, constants }),
|
|
97
101
|
calcVisible: calcVisible({ props, constants, emit }),
|
|
98
|
-
getNotSuccessFiles: getNotSuccessFiles({ props, constants })
|
|
102
|
+
getNotSuccessFiles: getNotSuccessFiles({ props, constants }),
|
|
103
|
+
formatFileSize
|
|
99
104
|
});
|
|
100
105
|
props.listType === constants.LIST_TYPE.DRAG_SINGLE && watch(
|
|
101
106
|
() => props.files && props.files[0],
|
package/user/index.js
CHANGED
|
@@ -17,8 +17,9 @@ const request = {
|
|
|
17
17
|
this.group[valueField] = [];
|
|
18
18
|
}
|
|
19
19
|
queryIds.forEach((id) => {
|
|
20
|
-
if (!~this.group[valueField].indexOf(id))
|
|
21
|
-
|
|
20
|
+
if (!~this.group[valueField].indexOf(id)) {
|
|
21
|
+
this.group[valueField].push(id);
|
|
22
|
+
}
|
|
22
23
|
});
|
|
23
24
|
},
|
|
24
25
|
removeRequest(item) {
|
|
@@ -78,22 +79,10 @@ const request = {
|
|
|
78
79
|
const me = this;
|
|
79
80
|
const reqParamsSeq = me.getParams();
|
|
80
81
|
let reqLen = reqParamsSeq.length;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const { param, cb } = reqItem;
|
|
86
|
-
const { queryIds, valueField } = param;
|
|
87
|
-
queryIds.forEach((id) => {
|
|
88
|
-
const user = me.cache[valueField] && me.cache[valueField][id];
|
|
89
|
-
user && !reqItem.result.includes(user) && reqItem.result.push(user);
|
|
90
|
-
});
|
|
91
|
-
if (reqItem.result.length === queryIds.length) {
|
|
92
|
-
me.removeRequest(reqItem);
|
|
93
|
-
cb(reqItem.result);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}).finally(() => {
|
|
82
|
+
let final = true;
|
|
83
|
+
const onFinally = () => {
|
|
84
|
+
if (final) {
|
|
85
|
+
final = false;
|
|
97
86
|
reqLen--;
|
|
98
87
|
const errors = [];
|
|
99
88
|
if (!reqLen) {
|
|
@@ -109,7 +98,24 @@ const request = {
|
|
|
109
98
|
errors.length && log.logger.warn(`user [${errors.join(",")}] not found`);
|
|
110
99
|
this.clearRequest();
|
|
111
100
|
}
|
|
112
|
-
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
reqParamsSeq.forEach((params) => {
|
|
104
|
+
api.fetchW3Accounts(params).then((data) => {
|
|
105
|
+
me.setCache(data);
|
|
106
|
+
me.requests.slice().forEach((reqItem) => {
|
|
107
|
+
const { param, cb } = reqItem;
|
|
108
|
+
const { queryIds, valueField } = param;
|
|
109
|
+
queryIds.forEach((id) => {
|
|
110
|
+
const user = me.cache[valueField] && me.cache[valueField][id];
|
|
111
|
+
user && !reqItem.result.includes(user) && reqItem.result.push(user);
|
|
112
|
+
});
|
|
113
|
+
if (reqItem.result.length === queryIds.length) {
|
|
114
|
+
me.removeRequest(reqItem);
|
|
115
|
+
cb(reqItem.result);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}).then(onFinally).catch(onFinally);
|
|
113
119
|
});
|
|
114
120
|
},
|
|
115
121
|
setBatch(batch) {
|
|
@@ -209,7 +215,7 @@ const autoSelect = ({ props, state, nextTick }) => (usersList) => {
|
|
|
209
215
|
return nextTick();
|
|
210
216
|
};
|
|
211
217
|
const searchMethod = ({ api, props, state, emit }) => debounce(props.delay, (query) => {
|
|
212
|
-
if (query && query.length >= props.suggestLength) {
|
|
218
|
+
if (query && query.trim().length >= props.suggestLength) {
|
|
213
219
|
state.loading = true;
|
|
214
220
|
state.visible = true;
|
|
215
221
|
const { multiple } = props;
|
|
@@ -247,13 +253,16 @@ const setSelected = ({ api, props, state }) => (value) => {
|
|
|
247
253
|
});
|
|
248
254
|
props.cache && api.cacheUser(state.selected);
|
|
249
255
|
};
|
|
250
|
-
const userChange = ({ api, emit, props, state }) => (value) => {
|
|
256
|
+
const userChange = ({ api, emit, props, state, dispatch, constants }) => (value, emitChangeFlag = true) => {
|
|
251
257
|
const { multiple } = props;
|
|
252
258
|
let newVal = multiple && Array.isArray(value) ? value.join(props.valueSplit) : (value || "") + "";
|
|
253
259
|
api.setSelected(newVal);
|
|
254
260
|
if (typeof state.lastValue === "string" && state.lastValue !== null && state.lastValue.toLocaleLowerCase() !== newVal.toLocaleLowerCase()) {
|
|
255
261
|
emit("update:modelValue", newVal);
|
|
256
|
-
|
|
262
|
+
if (emitChangeFlag) {
|
|
263
|
+
emit("change", newVal, state.selected);
|
|
264
|
+
dispatch(constants.COMPONENT_NAME.FormItem, constants.EVENT_NAME.FormChange, newVal);
|
|
265
|
+
}
|
|
257
266
|
}
|
|
258
267
|
state.lastValue = newVal;
|
|
259
268
|
};
|
|
@@ -402,7 +411,7 @@ const visibleChange = ({ state, emit }) => (show) => {
|
|
|
402
411
|
emit("visible-change", show);
|
|
403
412
|
};
|
|
404
413
|
const initUser = ({ api, props, state }) => (value) => {
|
|
405
|
-
if (value === state.lastValue) {
|
|
414
|
+
if (value === state.lastValue && value !== null) {
|
|
406
415
|
return;
|
|
407
416
|
}
|
|
408
417
|
state.user = !props.multiple ? "" : [];
|
|
@@ -412,7 +421,7 @@ const initUser = ({ api, props, state }) => (value) => {
|
|
|
412
421
|
if (!value) {
|
|
413
422
|
state.options = [];
|
|
414
423
|
state.selected = [];
|
|
415
|
-
api.userChange(value);
|
|
424
|
+
api.userChange(value, props.changeCompat);
|
|
416
425
|
return;
|
|
417
426
|
}
|
|
418
427
|
value && api.getUsers(value).then((info) => {
|
|
@@ -425,7 +434,7 @@ const initUser = ({ api, props, state }) => (value) => {
|
|
|
425
434
|
});
|
|
426
435
|
state.options = info;
|
|
427
436
|
state.user = props.multiple ? list : list[0];
|
|
428
|
-
api.userChange(value);
|
|
437
|
+
api.userChange(value, props.changeCompat);
|
|
429
438
|
});
|
|
430
439
|
};
|
|
431
440
|
const handleBlur = ({ constants, dispatch, state, emit }) => (e) => {
|
package/user/vue.js
CHANGED
|
@@ -58,7 +58,7 @@ const renderless = (props, { reactive, watch, computed, provide }, { emit, nextT
|
|
|
58
58
|
getUsers: getUsers({ api: api2, props, state }),
|
|
59
59
|
setSelected: setSelected({ api: api2, props, state }),
|
|
60
60
|
searchMethod: searchMethod({ api: api2, props, state, emit }),
|
|
61
|
-
userChange: userChange({ api: api2, emit, props, state }),
|
|
61
|
+
userChange: userChange({ api: api2, emit, props, state, dispatch, constants }),
|
|
62
62
|
useSortable: useSortable({ api: api2, props, state, vm }),
|
|
63
63
|
computedTextField: computedTextField({ service: $service, props }),
|
|
64
64
|
computedValueField: computedValueField({ service: $service, props }),
|
package/user-head/index.js
CHANGED
|
@@ -9,9 +9,9 @@ const computedStyle = ({ state, props }) => () => {
|
|
|
9
9
|
};
|
|
10
10
|
const computedMessage = ({ props }) => () => {
|
|
11
11
|
let result = "";
|
|
12
|
-
const total = Math.floor(props.messageTotal);
|
|
12
|
+
const total = Math.floor(props.messageTotal || NaN);
|
|
13
13
|
if (props.messageType === "details" && !isNaN(total) && total > 0) {
|
|
14
|
-
result = total;
|
|
14
|
+
result = String(total);
|
|
15
15
|
if (props.messageUpperLimit && total > props.messageUpperLimit) {
|
|
16
16
|
result = `${props.messageUpperLimit}+`;
|
|
17
17
|
}
|
|
@@ -55,7 +55,7 @@ const getInternalValue = ({ props }) => () => {
|
|
|
55
55
|
} else if (props.type === "label") {
|
|
56
56
|
result = "U";
|
|
57
57
|
}
|
|
58
|
-
return result;
|
|
58
|
+
return result || props.value;
|
|
59
59
|
} else {
|
|
60
60
|
return props.modelValue;
|
|
61
61
|
}
|
package/watermark/index.js
CHANGED
|
@@ -142,6 +142,16 @@ const updateWatermark = (watermarkBg, props) => {
|
|
|
142
142
|
watermarkDiv.style.zIndex = `${props.zIndex}`;
|
|
143
143
|
return watermarkDiv;
|
|
144
144
|
};
|
|
145
|
+
async function setSlotDivStyle({ vm, props }) {
|
|
146
|
+
const parentRef = vm.$refs.parentRef;
|
|
147
|
+
if (!parentRef) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
for (let child of parentRef.children) {
|
|
151
|
+
child.style.position = "relative";
|
|
152
|
+
child.style.zIndex = `${props.zIndex + 1}`;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
145
155
|
async function createWatermark({ vm, state, props }) {
|
|
146
156
|
const parentRef = vm.$refs.parentRef;
|
|
147
157
|
if (!parentRef) {
|
|
@@ -158,6 +168,7 @@ const reRenderWatermark = ({ state }) => () => {
|
|
|
158
168
|
state.flag++;
|
|
159
169
|
};
|
|
160
170
|
const mounted = ({ vm, state, props }) => () => {
|
|
171
|
+
setSlotDivStyle({ vm, props });
|
|
161
172
|
createWatermark({ vm, state, props });
|
|
162
173
|
state.observerInstance = new MutationObserver((records) => {
|
|
163
174
|
for (const record of records) {
|
package/wheel/index.js
CHANGED
|
@@ -7,6 +7,9 @@ const created = (api) => () => {
|
|
|
7
7
|
const loadPickerData = ({ props, state }) => () => {
|
|
8
8
|
state.dataSource = cloneDeep(props.dataSource);
|
|
9
9
|
state.defaultSelectedIndexs = cloneDeep(props.defaultSelectedIndexs);
|
|
10
|
+
if (!state.dataSource.length) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
10
13
|
const level_1 = state.dataSource;
|
|
11
14
|
const level_n = getNextLevel([], state.dataSource, state.defaultSelectedIndexs, 0);
|
|
12
15
|
if (level_n.length === 0) {
|
package/wizard/vue.js
CHANGED
|
@@ -18,13 +18,15 @@ const api = [
|
|
|
18
18
|
"nextStepHandle",
|
|
19
19
|
"showNode"
|
|
20
20
|
];
|
|
21
|
-
const renderless = (props, { onMounted, reactive }, { emit, constants }) => {
|
|
21
|
+
const renderless = (props, { onMounted, reactive }, { emit, constants, designConfig }) => {
|
|
22
|
+
var _a;
|
|
22
23
|
const state = reactive({
|
|
23
24
|
datas: props.data,
|
|
24
25
|
submitShow: false,
|
|
25
26
|
doing: constants.DOING_STATUS,
|
|
26
27
|
ready: constants.READY_STATUS,
|
|
27
|
-
wait: constants.WAIT_STATUS
|
|
28
|
+
wait: constants.WAIT_STATUS,
|
|
29
|
+
iconYes: ((_a = designConfig == null ? void 0 : designConfig.icons) == null ? void 0 : _a.IconYes) || "tiny-icon-successful"
|
|
28
30
|
});
|
|
29
31
|
const api2 = {
|
|
30
32
|
state,
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
!function() {
|
|
2
|
-
let lastTime = 0;
|
|
3
|
-
const vendors = ["ms", "moz", "webkit", "o"];
|
|
4
|
-
for (let x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
|
5
|
-
window.requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
|
|
6
|
-
window.cancelAnimationFrame = window[vendors[x] + "CancelAnimationFrame"] || window[vendors[x] + "CancelRequestAnimationFrame"];
|
|
7
|
-
}
|
|
8
|
-
if (!window.requestAnimationFrame) {
|
|
9
|
-
window.requestAnimationFrame = function(callback) {
|
|
10
|
-
const now = (/* @__PURE__ */ new Date()).getTime();
|
|
11
|
-
const timeToCall = Math.max(0, 16 - (now - lastTime));
|
|
12
|
-
const timeCallback = now + timeToCall;
|
|
13
|
-
const id = window.setTimeout(() => {
|
|
14
|
-
callback(timeCallback);
|
|
15
|
-
}, timeToCall);
|
|
16
|
-
lastTime = now + timeToCall;
|
|
17
|
-
return id;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
if (!window.cancelAnimationFrame) {
|
|
21
|
-
window.cancelAnimationFrame = function(id) {
|
|
22
|
-
clearTimeout(id);
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
}();
|