@opentiny/vue-renderless 3.6.7 → 3.8.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 +28 -1
- package/action-sheet/vue.js +10 -4
- package/alert/index.js +24 -2
- package/alert/vue.js +15 -11
- package/amount/index.js +4 -4
- package/anchor/index.js +1 -1
- package/autocomplete/vue.js +3 -3
- package/autonavi-map/index.js +1 -1
- package/badge/vue.js +6 -6
- package/baidu-map/index.js +1 -1
- package/bulletin-board/index.js +1 -1
- package/calendar/index.js +2 -2
- package/calendar-bar/index.js +268 -0
- package/calendar-bar/vue.js +87 -0
- package/card/index.js +84 -0
- package/card/vue.js +70 -0
- package/card-group/index.js +16 -0
- package/card-group/vue.js +21 -0
- package/card-template/index.js +1 -1
- package/carousel/index.js +89 -2
- package/carousel/vue.js +14 -5
- package/carousel-item/index.js +8 -0
- package/carousel-item/vue.js +7 -3
- package/cascader/index.js +6 -6
- package/cascader/vue.js +3 -3
- package/cascader-menu/vue.js +2 -2
- package/cascader-panel/index.js +4 -4
- package/cascader-panel/node.js +4 -4
- package/cascader-panel/vue.js +2 -2
- package/cascader-select/index.js +179 -0
- package/cascader-select/vue.js +74 -0
- package/cell/vue.js +16 -0
- package/chart-bar/index.js +3 -3
- package/chart-boxplot/index.js +2 -2
- package/chart-candle/index.js +3 -3
- package/chart-core/deps/utils.js +7 -7
- package/chart-core/index.js +2 -2
- package/chart-funnel/index.js +3 -3
- package/chart-gauge/index.js +3 -3
- package/chart-graph/index.js +1 -1
- package/chart-heatmap/index.js +2 -2
- package/chart-line/index.js +3 -3
- package/chart-liquidfill/index.js +2 -2
- package/chart-map/index.js +3 -3
- package/chart-pie/index.js +3 -3
- package/chart-radar/index.js +3 -3
- package/chart-sankey/index.js +3 -3
- package/chart-scatter/index.js +4 -4
- package/chart-sunburst/index.js +1 -1
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +3 -3
- package/chart-wordcloud/index.js +2 -2
- package/checkbox/index.js +21 -0
- package/checkbox/vue.js +16 -3
- package/checkbox-button/vue.js +1 -1
- package/collapse-item/vue.js +1 -1
- package/column-list-group/index.js +0 -0
- package/column-list-group/vue.js +14 -0
- package/column-list-item/index.js +50 -0
- package/column-list-item/vue.js +39 -0
- package/common/array.js +3 -3
- package/common/bigInt.js +5 -2
- package/common/dataset/index.js +3 -3
- package/common/date.js +2 -2
- package/common/deps/ResizeObserver.js +1 -1
- package/common/deps/clickoutside.js +1 -1
- package/common/deps/date-util.js +4 -4
- package/common/deps/date.js +2 -2
- package/common/deps/debounce.js +1 -1
- package/common/deps/dom.js +1 -1
- package/common/deps/fullscreen/apis.js +3 -3
- package/common/deps/fullscreen/screenfull.js +1 -1
- package/common/deps/infinite-scroll.js +176 -0
- package/common/deps/letter-only.js +1 -1
- package/common/deps/number-only.js +1 -1
- package/common/deps/observe-visibility.js +106 -0
- package/common/deps/popper.js +20 -22
- package/common/deps/popup-manager.js +2 -2
- package/common/deps/repeat-click.js +1 -1
- package/common/deps/resize-event.js +1 -1
- package/common/deps/tree-model/node.js +5 -5
- package/common/deps/tree-model/tree-store.js +3 -3
- package/common/deps/upload-ajax.js +2 -2
- package/common/deps/vue-popper.js +4 -4
- package/common/deps/vue-popup.js +4 -4
- package/common/index.js +2 -2
- package/common/object.js +1 -1
- package/common/runtime.js +24 -24
- package/common/string.js +23 -4
- package/common/validate/rules/range.js +2 -2
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +3 -3
- package/common/validate/schema.js +1 -1
- package/common/validate/util.js +1 -1
- package/common/validate/validations/array.js +1 -1
- package/common/validate/validations/date.js +1 -1
- package/common/validate/validations/enum.js +1 -1
- package/common/validate/validations/float.js +1 -1
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/common/validate/validations/number.js +1 -1
- package/common/validate/validations/pattern.js +1 -1
- package/common/validate/validations/string.js +1 -1
- package/common/validate/validations/type.js +1 -1
- package/container/index.js +1 -1
- package/crop/index.js +2 -2
- package/currency/index.js +2 -2
- package/date-panel/index.js +7 -7
- package/date-panel/vue.js +3 -2
- package/date-picker-mobile/index.js +250 -0
- package/date-picker-mobile/vue.js +86 -0
- package/date-range/index.js +1 -1
- package/date-range/vue.js +1 -1
- package/date-table/index.js +3 -3
- package/date-table/vue.js +1 -1
- package/dialog-box/index.js +10 -6
- package/dialog-box/vue.js +1 -1
- package/dialog-select/index.js +345 -0
- package/dialog-select/vue.js +110 -0
- package/drawer/index.js +83 -0
- package/drawer/vue.js +51 -0
- package/drop-times/index.js +1 -1
- package/dropdown/index.js +2 -2
- package/dropdown/vue.js +1 -1
- package/dropdown-item/index.js +1 -1
- package/dropdown-item/mf.js +79 -0
- package/dropdown-menu/index.js +30 -1
- package/dropdown-menu/vue.js +17 -7
- package/dynamic-scroller/index.js +117 -0
- package/dynamic-scroller/vue.js +88 -0
- package/dynamic-scroller-item/index.js +147 -0
- package/dynamic-scroller-item/vue.js +92 -0
- package/espace/index.js +1 -1
- package/espace/vue.js +1 -1
- package/exception/vue.js +3 -1
- package/fall-menu/index.js +4 -4
- package/file-upload/index.js +872 -408
- package/file-upload/vue.js +87 -36
- package/filter/index.js +131 -0
- package/filter/tag-group.js +43 -0
- package/filter/vue.js +73 -0
- package/filter-bar/index.js +9 -0
- package/filter-bar/vue.js +16 -0
- package/filter-box/index.js +17 -0
- package/filter-box/vue.js +19 -0
- package/filter-panel/index.js +42 -0
- package/filter-panel/vue.js +33 -0
- package/floatbar/index.js +1 -1
- package/flowchart/index.js +721 -0
- package/flowchart/vue.js +81 -0
- package/form/index.js +15 -1
- package/form/vue.js +10 -4
- package/form-item/index.js +46 -6
- package/form-item/vue.js +27 -3
- package/fullscreen/index.js +1 -1
- package/fullscreen/vue.js +1 -1
- package/grid/plugins/export.js +2 -2
- package/grid/plugins/exportExcel.js +2 -2
- package/grid/plugins/resize.js +1 -1
- package/grid/static/base/helperEqualCompare.js +1 -1
- package/grid/static/base/isPlainObject.js +1 -1
- package/grid/utils/common.js +3 -3
- package/grid/utils/dom.js +3 -3
- package/grid/utils/event.js +2 -2
- package/guide/index.js +168 -0
- package/guide/vue.js +36 -0
- package/hrapprover/index.js +1 -1
- package/image/index.js +8 -4
- package/image/vue.js +12 -6
- package/image-viewer/index.js +3 -3
- package/image-viewer/vue.js +16 -6
- package/input/index.js +34 -1
- package/input/vue.js +22 -6
- package/ip-address/index.js +1 -1
- package/ip-address/vue.js +1 -1
- package/link-menu/index.js +2 -2
- package/link-menu/vue.js +2 -2
- package/loading/index.js +2 -2
- package/loading/vue.js +2 -1
- package/locales/index.js +1 -1
- package/logout/index.js +1 -1
- package/milestone/index.js +5 -1
- package/modal/index.js +68 -39
- package/modal/vue.js +15 -12
- package/month-range/index.js +1 -1
- package/month-range/vue.js +1 -1
- package/month-table/index.js +5 -5
- package/month-table/vue.js +1 -1
- package/multi-select/index.js +5 -2
- package/multi-select/vue.js +4 -5
- package/nav-menu/index.js +6 -6
- package/notify/index.js +3 -3
- package/numeric/index.js +15 -5
- package/numeric/vue.js +15 -6
- package/option/index.js +1 -1
- package/package.json +2 -1
- package/pager-item/index.js +1 -1
- package/panel/index.js +1 -1
- package/picker/index.js +7 -7
- package/picker/vue.js +1 -1
- package/picker-column/index.js +1 -1
- package/popconfirm/index.js +25 -0
- package/popconfirm/vue.js +22 -0
- package/popeditor/index.js +7 -7
- package/popeditor/vue.js +2 -2
- package/popover/index.js +11 -3
- package/popover/vue.js +33 -10
- package/popup/index.js +4 -4
- package/pull-refresh/index.js +8 -11
- package/pull-refresh/vue.js +7 -7
- package/radio/index.js +17 -0
- package/radio/vue.js +18 -3
- package/radio-button/index.js +8 -0
- package/radio-button/vue.js +19 -4
- package/radio-group/index.js +1 -1
- package/radio-group/vue.js +5 -2
- package/rate/index.js +4 -2
- package/rate/vue.js +1 -1
- package/record/index.js +190 -0
- package/record/vue.js +44 -0
- package/recycle-scroller/index.js +470 -0
- package/recycle-scroller/vue.js +135 -0
- package/river/index.js +371 -0
- package/river/river.js +352 -0
- package/river/vue.js +77 -0
- package/roles/index.js +1 -1
- package/scrollbar/vue-bar.js +1 -1
- package/scrollbar/vue.js +1 -1
- package/search/index.js +3 -3
- package/select/index.js +17 -14
- package/select/vue.js +14 -8
- package/select-dropdown/vue.js +1 -1
- package/select-mobile/index.js +111 -0
- package/select-mobile/vue.js +58 -0
- package/select-view/index.js +170 -0
- package/select-view/vue.js +82 -0
- package/selected-box/index.js +216 -0
- package/selected-box/vue.js +98 -0
- package/slide-bar/index.js +1 -1
- package/slider/index.js +49 -4
- package/slider/vue.js +15 -4
- package/split/vue.js +1 -1
- package/standard-list-item/index.js +18 -0
- package/standard-list-item/vue.js +22 -0
- package/steps/index.js +30 -0
- package/steps/slide-bar.js +122 -0
- package/steps/vue.js +15 -3
- package/switch/index.js +1 -1
- package/switch/vue.js +2 -1
- package/tab-bar/index.js +2 -2
- package/tab-item/index.js +2 -2
- package/tab-item/vue.js +1 -1
- package/tab-item-mf/index.js +0 -0
- package/tab-item-mf/vue.js +16 -0
- package/tab-nav/index.js +78 -4
- package/tab-nav/vue.js +11 -3
- package/tabbar-item/index.js +1 -1
- package/tabbar-item/vue.js +1 -1
- package/tabs/index.js +8 -9
- package/tabs/vue.js +1 -1
- package/tabs-mf/index.js +109 -0
- package/tabs-mf/vue-bar.js +49 -0
- package/tabs-mf/vue-nav-item.js +22 -0
- package/tabs-mf/vue-nav.js +13 -0
- package/tabs-mf/vue.js +45 -0
- package/tabs-mf/wheel.js +71 -0
- package/tag/index.js +8 -2
- package/tag/vue.js +13 -5
- package/tag-group/index.js +24 -0
- package/tag-group/vue.js +29 -0
- package/tall-storage/index.js +1 -1
- package/tall-storage/vue.js +1 -1
- package/time/index.js +1 -1
- package/time/vue.js +2 -2
- package/time-line/index.js +28 -7
- package/time-line/vue.js +9 -4
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +1 -1
- package/time-picker-mobile/index.js +30 -0
- package/time-picker-mobile/vue.js +30 -0
- package/time-range/index.js +1 -1
- package/time-range/vue.js +1 -1
- package/time-spinner/index.js +2 -2
- package/time-spinner/vue.js +1 -1
- package/toggle-menu/index.js +2 -2
- package/toggle-menu/vue.js +1 -1
- package/tooltip/index.js +30 -3
- package/tooltip/vue.js +33 -12
- package/top-box/index.js +3 -3
- package/transfer/index.js +1 -1
- package/transfer-panel/index.js +2 -2
- package/tree/index.js +6 -6
- package/tree/vue.js +1 -1
- package/tree-node/index.js +1 -1
- package/upload/index.js +1 -2
- package/upload/vue.js +2 -2
- package/upload-dragger/index.js +5 -1
- package/upload-dragger/vue.js +9 -3
- package/upload-list/index.js +158 -8
- package/upload-list/vue.js +77 -25
- package/user/index.js +86 -70
- package/user/vue.js +15 -5
- package/user-account/vue.js +1 -1
- package/user-contact/index.js +49 -3
- package/user-contact/vue.js +17 -8
- package/user-head-group/vue.js +17 -0
- package/user-link/index.js +10 -2
- package/user-link/vue.js +11 -6
- package/wheel/index.js +1 -1
- package/wizard/index.js +3 -3
- package/year-range/index.js +125 -0
- package/year-range/vue.js +88 -0
- package/year-table/index.js +175 -11
- package/year-table/vue.js +17 -5
package/file-upload/vue.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { downloadFile as ordinaryDownload } from "
|
|
2
|
+
import { downloadFile as ordinaryDownload } from "../upload-list";
|
|
3
3
|
import {
|
|
4
4
|
initService,
|
|
5
5
|
getNewTabPreviewUrl,
|
|
6
6
|
previewFile,
|
|
7
7
|
getToken,
|
|
8
8
|
downloadFile,
|
|
9
|
+
downloadFileSingleInner,
|
|
9
10
|
batchSegmentUpload,
|
|
10
11
|
segmentUpload,
|
|
11
12
|
sliceChunk,
|
|
@@ -46,9 +47,25 @@ import {
|
|
|
46
47
|
batchSegmentDownload,
|
|
47
48
|
downloadFileInner,
|
|
48
49
|
setWriterFile,
|
|
49
|
-
afterDownload
|
|
50
|
+
afterDownload,
|
|
51
|
+
getFileHash,
|
|
52
|
+
modifyServiceUrlSingle,
|
|
53
|
+
getKiaScanTip,
|
|
54
|
+
downloadFileSingle,
|
|
55
|
+
downloadFileBatch,
|
|
56
|
+
downloadFileSingleHwh5,
|
|
57
|
+
validateDownloadStatus,
|
|
58
|
+
mounted,
|
|
59
|
+
handleChange,
|
|
60
|
+
previewFileSingle,
|
|
61
|
+
previewFileBatch,
|
|
62
|
+
previewImageSingle,
|
|
63
|
+
previewImageBatch,
|
|
64
|
+
abortDownload,
|
|
65
|
+
createDownloadCancelToken,
|
|
66
|
+
handleClickFileList
|
|
50
67
|
} from "./index";
|
|
51
|
-
import { isEmptyObject } from "
|
|
68
|
+
import { isEmptyObject } from "../common/type";
|
|
52
69
|
const api = [
|
|
53
70
|
"state",
|
|
54
71
|
"getNewTabPreviewUrl",
|
|
@@ -67,9 +84,12 @@ const api = [
|
|
|
67
84
|
"getFileUploadUrl",
|
|
68
85
|
"updateUrl",
|
|
69
86
|
"previewImage",
|
|
70
|
-
"updateFile"
|
|
87
|
+
"updateFile",
|
|
88
|
+
"handleChange",
|
|
89
|
+
"abortDownload",
|
|
90
|
+
"handleClickFileList"
|
|
71
91
|
];
|
|
72
|
-
const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, httpRequest }) => {
|
|
92
|
+
const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, httpRequest, service }) => {
|
|
73
93
|
const state = reactive({
|
|
74
94
|
url: "",
|
|
75
95
|
tempIndex: 1,
|
|
@@ -82,7 +102,7 @@ const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, http
|
|
|
82
102
|
docSize: 0,
|
|
83
103
|
// unit(B)
|
|
84
104
|
chunkSize: 0,
|
|
85
|
-
chunkBatchLimit:
|
|
105
|
+
chunkBatchLimit: 5,
|
|
86
106
|
downloadChunkLimit: 5,
|
|
87
107
|
batchQueue: {},
|
|
88
108
|
batchQueueListen: {},
|
|
@@ -110,65 +130,92 @@ const initState = ({ api: api2, reactive, computed, inject, ref, vm, props, http
|
|
|
110
130
|
isEntireCheckCode: computed(() => !("isEntireCheckCode" in props.edm && props.edm.isEntireCheckCode !== true)),
|
|
111
131
|
downloadBatchQueue: {},
|
|
112
132
|
downloadBatchQueueListen: {},
|
|
113
|
-
|
|
114
|
-
downloadReplayAtoms: {}
|
|
133
|
+
downloadChunkFile: {},
|
|
134
|
+
downloadReplayAtoms: {},
|
|
135
|
+
errorStatusCodes: [0, 401, 429],
|
|
136
|
+
// 0:上传异常 401:没权限(token过期)429:超限
|
|
137
|
+
hasFileInfoInterface: computed(() => service.setting.services.EDM && service.setting.services.EDM.DocumentInfoUrl),
|
|
138
|
+
currentDownloadFile: "",
|
|
139
|
+
isDragover: false,
|
|
140
|
+
downloadCancelToken: {},
|
|
141
|
+
// 取消下载token
|
|
142
|
+
downloadCancelData: {},
|
|
143
|
+
// 取消下载时需要清空的缓存数据
|
|
144
|
+
isHwh5: computed(() => !isEmptyObject(props.hwh5)),
|
|
145
|
+
selected: null
|
|
115
146
|
});
|
|
116
147
|
return state;
|
|
117
148
|
};
|
|
118
|
-
const initApi = ({ api: api2, state, props, constants,
|
|
119
|
-
const { SIZE_2G, SIZE_20M, SIZE_8M } = constants.EDM;
|
|
149
|
+
const initApi = ({ api: api2, state, props, constants, vm, $service, t, Modal }) => {
|
|
120
150
|
Object.assign(api2, {
|
|
121
151
|
state,
|
|
122
152
|
sliceChunk: sliceChunk({ state, props }),
|
|
123
153
|
getFormData: getFormData({ constants, props, state }),
|
|
124
|
-
abort: abort({ constants,
|
|
125
|
-
handleClick: handleClick({ constants,
|
|
154
|
+
abort: abort({ constants, vm, state }),
|
|
155
|
+
handleClick: handleClick({ constants, vm }),
|
|
126
156
|
getFile: getFile(state),
|
|
127
157
|
clearFiles: clearFiles(state),
|
|
128
|
-
watchFileList: watchFileList({ constants, state }),
|
|
158
|
+
watchFileList: watchFileList({ constants, state, props }),
|
|
129
159
|
watchListType: watchListType({ constants, state }),
|
|
130
160
|
onBeforeDestroy: onBeforeDestroy(state),
|
|
131
161
|
computedUploadDisabled: computedUploadDisabled({ props, state }),
|
|
132
|
-
computedUploadingSize: computedUploadingSize(state),
|
|
162
|
+
computedUploadingSize: computedUploadingSize({ state, constants }),
|
|
133
163
|
getFileUploadUrl: getFileUploadUrl($service),
|
|
134
164
|
getToken: getToken({ constants, props, state, t, Modal }),
|
|
135
165
|
getDialogConfigObj: getDialogConfigObj({ props, state }),
|
|
136
|
-
computeDocChunkSize: computeDocChunkSize({ props, state,
|
|
137
|
-
updateFile: updateFile({ constants,
|
|
166
|
+
computeDocChunkSize: computeDocChunkSize({ props, state, constants }),
|
|
167
|
+
updateFile: updateFile({ constants, vm }),
|
|
138
168
|
getPreviewUrlSync: getPreviewUrlSync({ constants, props, state }),
|
|
139
169
|
ordinaryDownload: ordinaryDownload($service),
|
|
140
170
|
clearUploadingFiles: clearUploadingFiles({ constants, state }),
|
|
141
|
-
calcUploadingFilesInfo: calcUploadingFilesInfo({ state }),
|
|
142
|
-
properFileSize: properFileSize({ props, state, constants, Modal, t })
|
|
171
|
+
calcUploadingFilesInfo: calcUploadingFilesInfo({ state, constants }),
|
|
172
|
+
properFileSize: properFileSize({ props, state, constants, Modal, t }),
|
|
173
|
+
mounted: mounted({ vm, state }),
|
|
174
|
+
previewFileSingle: previewFileSingle({ api: api2, state, props, constants, service: $service }),
|
|
175
|
+
previewFileBatch: previewFileBatch({ service: $service, props, state, api: api2 }),
|
|
176
|
+
previewImageSingle: previewImageSingle({ state, props, service: $service }),
|
|
177
|
+
previewImageBatch: previewImageBatch({ service: $service, api: api2 }),
|
|
178
|
+
abortDownload: abortDownload({ state }),
|
|
179
|
+
createDownloadCancelToken: createDownloadCancelToken({ state, service: $service })
|
|
143
180
|
});
|
|
144
181
|
};
|
|
145
|
-
const mergeApi = ({ api: api2, props, $service, state, constants, emit, mode, Modal, t,
|
|
182
|
+
const mergeApi = ({ api: api2, props, $service, state, constants, emit, mode, Modal, t, vm, CryptoJS, Streamsaver }) => {
|
|
146
183
|
Object.assign(api2, {
|
|
147
184
|
segmentUploadInit: segmentUploadInit({ api: api2, props, service: $service, state, constants }),
|
|
148
|
-
segmentUpload: segmentUpload({ api: api2, props, service: $service, state, emit, constants }),
|
|
185
|
+
segmentUpload: segmentUpload({ api: api2, props, service: $service, state, emit, constants, CryptoJS }),
|
|
149
186
|
addFileToList: addFileToList({ api: api2, constants, emit, props, state, mode }),
|
|
150
|
-
downloadFile: downloadFile({ api: api2, state
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
187
|
+
downloadFile: downloadFile({ api: api2, state }),
|
|
188
|
+
downloadFileSingleInner: downloadFileSingleInner({ props, state, api: api2, constants }),
|
|
189
|
+
previewImage: previewImage({ api: api2, props, service: $service }),
|
|
190
|
+
previewFile: previewFile({ api: api2, props }),
|
|
191
|
+
getNewTabPreviewUrl: getNewTabPreviewUrl({ api: api2 }),
|
|
192
|
+
submit: submit({ api: api2, constants, Modal, vm, props, state, t }),
|
|
193
|
+
handleStart: handleStart({ api: api2, constants, props, state, vm }),
|
|
194
|
+
batchSegmentUpload: batchSegmentUpload({ api: api2, constants, props, vm, state }),
|
|
157
195
|
largeDocumentUpload: largeDocumentUpload({ api: api2, Modal, state, emit, constants, t }),
|
|
158
196
|
handleProgress: handleProgress({ api: api2, constants, emit, state }),
|
|
159
197
|
handleSuccess: handleSuccess({ api: api2, constants, emit, Modal, props, state }),
|
|
160
198
|
handleError: handleError({ api: api2, constants, emit, state }),
|
|
161
|
-
handleRemove: handleRemove({ api: api2, emit, props, state }),
|
|
199
|
+
handleRemove: handleRemove({ api: api2, emit, props, state, constants }),
|
|
162
200
|
updateUrl: updateUrl({ api: api2, props, service: $service, state }),
|
|
163
|
-
startUpload: startUpload({ api: api2, state, constants,
|
|
201
|
+
startUpload: startUpload({ api: api2, state, constants, vm, Modal, t }),
|
|
164
202
|
beforeUpload: beforeUpload({ api: api2, props, Modal, constants, t, state }),
|
|
165
203
|
getDownloadFileInfo: getDownloadFileInfo({ api: api2, props, state, service: $service }),
|
|
166
204
|
largeDocumentDownload: largeDocumentDownload({ api: api2, state }),
|
|
167
205
|
sliceDownloadChunk: sliceDownloadChunk({ api: api2, state }),
|
|
168
206
|
batchSegmentDownload: batchSegmentDownload({ state, api: api2 }),
|
|
169
|
-
downloadFileInner: downloadFileInner({ api: api2, props,
|
|
170
|
-
setWriterFile: setWriterFile({ state, emit,
|
|
171
|
-
afterDownload: afterDownload({ api: api2, state })
|
|
207
|
+
downloadFileInner: downloadFileInner({ api: api2, props, state }),
|
|
208
|
+
setWriterFile: setWriterFile({ state, emit, Streamsaver }),
|
|
209
|
+
afterDownload: afterDownload({ api: api2, state }),
|
|
210
|
+
getFileHash: getFileHash({ emit, Modal, constants, t, CryptoJS, state }),
|
|
211
|
+
modifyServiceUrlSingle: modifyServiceUrlSingle({ constants }),
|
|
212
|
+
getKiaScanTip: getKiaScanTip({ Modal, constants, t }),
|
|
213
|
+
downloadFileSingle: downloadFileSingle({ service: $service, constants, props, state, api: api2, emit }),
|
|
214
|
+
downloadFileBatch: downloadFileBatch({ api: api2, service: $service, props, state, emit }),
|
|
215
|
+
downloadFileSingleHwh5: downloadFileSingleHwh5({ state, props, emit, constants }),
|
|
216
|
+
validateDownloadStatus: validateDownloadStatus({ state, Modal }),
|
|
217
|
+
handleChange: handleChange({ vm, constants }),
|
|
218
|
+
handleClickFileList: handleClickFileList({ state, emit })
|
|
172
219
|
});
|
|
173
220
|
};
|
|
174
221
|
const initWatch = ({ watch, state, api: api2, props, $service }) => {
|
|
@@ -199,19 +246,23 @@ const initWatch = ({ watch, state, api: api2, props, $service }) => {
|
|
|
199
246
|
);
|
|
200
247
|
watch(() => props.edm, api2.computeDocChunkSize, { deep: true, immediate: true });
|
|
201
248
|
};
|
|
202
|
-
|
|
249
|
+
let getApi = () => ({});
|
|
250
|
+
const renderless = (props, { computed, inject, onBeforeUnmount, provide, reactive, ref, watch, onMounted }, { t, vm, parent, emit, service, mode, constants }, { Modal, CryptoJS, Streamsaver }) => {
|
|
203
251
|
const api2 = {};
|
|
204
252
|
const $service = initService({ props, service });
|
|
205
253
|
const httpRequest = $service.httpRequest;
|
|
206
|
-
const state = initState({ reactive, computed, api: api2, inject, ref, vm, props, httpRequest });
|
|
207
|
-
initApi({ api: api2, state, props, constants,
|
|
208
|
-
mergeApi({ api: api2, props, $service, state, constants, emit, mode, Modal, t,
|
|
254
|
+
const state = initState({ reactive, computed, api: api2, inject, ref, vm, props, httpRequest, service });
|
|
255
|
+
initApi({ api: api2, state, props, constants, vm, $service, t, Modal });
|
|
256
|
+
mergeApi({ api: api2, props, $service, state, constants, emit, mode, Modal, t, vm, CryptoJS, Streamsaver });
|
|
257
|
+
getApi = () => api2;
|
|
209
258
|
provide("uploader", parent);
|
|
259
|
+
onMounted(api2.mounted);
|
|
210
260
|
onBeforeUnmount(api2.onBeforeDestroy);
|
|
211
261
|
initWatch({ watch, state, api: api2, props, $service });
|
|
212
262
|
return api2;
|
|
213
263
|
};
|
|
214
264
|
export {
|
|
215
265
|
api,
|
|
266
|
+
getApi,
|
|
216
267
|
renderless
|
|
217
268
|
};
|
package/filter/index.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { cloneDeep } from "../chart-core/deps/utils";
|
|
3
|
+
const isEmpty = (value) => [void 0, null, ""].indexOf(value) !== -1;
|
|
4
|
+
const resize = ({ state, vm, props }) => () => {
|
|
5
|
+
const refs = vm.$refs;
|
|
6
|
+
if (state.showPanel) {
|
|
7
|
+
const pos = refs.maskPoint.getBoundingClientRect();
|
|
8
|
+
const height = window.innerHeight - pos.top;
|
|
9
|
+
refs.panelMask.style.top = pos.top + "px";
|
|
10
|
+
refs.panelMask.style.height = height + "px";
|
|
11
|
+
if (!props.panelClass) {
|
|
12
|
+
refs.panel.style.maxHeight = (height * 0.7 || 0).toFixed() + "px";
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const panelToggle = ({ state, props, api }) => (index) => {
|
|
17
|
+
const { modelValue } = props;
|
|
18
|
+
if (index === "filter") {
|
|
19
|
+
state.showPanelIndex = -1;
|
|
20
|
+
state.filterPanel.show = !state.filterPanel.show;
|
|
21
|
+
if (state.filterPanel.show) {
|
|
22
|
+
state.filterPanel.selected = props.filterValue.slice();
|
|
23
|
+
api.resize();
|
|
24
|
+
}
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
state.filterPanel.show = false;
|
|
28
|
+
if (state.showPanelIndex === index) {
|
|
29
|
+
state.showPanelIndex = -1;
|
|
30
|
+
} else {
|
|
31
|
+
let value = modelValue[index];
|
|
32
|
+
value = isEmpty(value) ? [] : Array.isArray(value) ? value : [value];
|
|
33
|
+
state.showPanelIndex = index;
|
|
34
|
+
state.selectPanel.selected = value.slice();
|
|
35
|
+
api.resize();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const selectOption = ({ state, api }) => (value) => {
|
|
39
|
+
const {
|
|
40
|
+
selectPanel: { config }
|
|
41
|
+
} = state;
|
|
42
|
+
if (config.type === "tag" && config.multiple) {
|
|
43
|
+
state.selectPanel.selected = value;
|
|
44
|
+
} else if (!config.multiple) {
|
|
45
|
+
state.selectPanel.selected = [value];
|
|
46
|
+
api.confirm();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const filterSelectOption = ({ state, props }) => (value, index) => {
|
|
50
|
+
const { filterGroup } = props;
|
|
51
|
+
if (filterGroup[index].type === "tag" && !filterGroup[index].multiple) {
|
|
52
|
+
state.filterPanel.selected[index] = value;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const reset = ({ state, props }) => (isFilterGroup) => {
|
|
56
|
+
const { modelValue, filterValue } = props;
|
|
57
|
+
if (isFilterGroup) {
|
|
58
|
+
state.filterPanel.selected = cloneDeep(filterValue);
|
|
59
|
+
} else {
|
|
60
|
+
let value = modelValue[state.showPanelIndex];
|
|
61
|
+
value = isEmpty(value) ? [] : Array.isArray(value) ? value : [value];
|
|
62
|
+
state.selectPanel.selected = value.slice();
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const filterConfirm = ({ state, emit }) => () => {
|
|
66
|
+
const filterValue = state.filterPanel.selected.slice();
|
|
67
|
+
state.filterPanel.show = false;
|
|
68
|
+
emit("update:filter-value", cloneDeep(filterValue));
|
|
69
|
+
};
|
|
70
|
+
const confirm = ({ state, props, emit, api }) => (isFilterGroup) => {
|
|
71
|
+
if (isFilterGroup) {
|
|
72
|
+
api.filterConfirm();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
const {
|
|
76
|
+
showPanelIndex,
|
|
77
|
+
selectPanel: { config }
|
|
78
|
+
} = state;
|
|
79
|
+
let modelValue = props.modelValue;
|
|
80
|
+
if (config.multiple) {
|
|
81
|
+
modelValue[showPanelIndex] = state.selectPanel.selected;
|
|
82
|
+
} else {
|
|
83
|
+
modelValue[showPanelIndex] = state.selectPanel.selected[0];
|
|
84
|
+
}
|
|
85
|
+
state.showPanelIndex = -1;
|
|
86
|
+
emit("update:modelValue", modelValue.slice());
|
|
87
|
+
};
|
|
88
|
+
const cancel = ({ state, emit }) => () => {
|
|
89
|
+
state.showPanelIndex = -1;
|
|
90
|
+
state.filterPanel.show = false;
|
|
91
|
+
emit("cancel", state);
|
|
92
|
+
};
|
|
93
|
+
const labelListComputed = ({ props }) => () => {
|
|
94
|
+
const { data, modelValue } = props;
|
|
95
|
+
return data.map((item, index) => {
|
|
96
|
+
const data2 = modelValue[index];
|
|
97
|
+
const values = item.options.map((option) => option.value);
|
|
98
|
+
if (item.type === "tag" && item.multiple) {
|
|
99
|
+
if (data2 && data2.length) {
|
|
100
|
+
return data2.map((value) => {
|
|
101
|
+
const i = values.indexOf(value);
|
|
102
|
+
return i !== -1 ? item.options[i].label : item.options[i].value;
|
|
103
|
+
}).join("; ");
|
|
104
|
+
} else {
|
|
105
|
+
return item.placeholder;
|
|
106
|
+
}
|
|
107
|
+
} else if (!item.multiple) {
|
|
108
|
+
if (isEmpty(data2)) {
|
|
109
|
+
return item.placeholder;
|
|
110
|
+
}
|
|
111
|
+
const i = values.indexOf(data2);
|
|
112
|
+
return i !== -1 ? item.options[i].label : data2;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const selectOptionAll = ({ state }) => () => {
|
|
117
|
+
state.selectPanel.selected = [];
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
cancel,
|
|
121
|
+
confirm,
|
|
122
|
+
filterConfirm,
|
|
123
|
+
filterSelectOption,
|
|
124
|
+
isEmpty,
|
|
125
|
+
labelListComputed,
|
|
126
|
+
panelToggle,
|
|
127
|
+
reset,
|
|
128
|
+
resize,
|
|
129
|
+
selectOption,
|
|
130
|
+
selectOptionAll
|
|
131
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { isEmpty } from "./index";
|
|
3
|
+
const selectOptionAll = ({ state, emit }) => () => {
|
|
4
|
+
state.selected = [];
|
|
5
|
+
emit("click", state.selected);
|
|
6
|
+
emit("update:modelValue", state.selected);
|
|
7
|
+
};
|
|
8
|
+
const selectOption = ({ state, props, emit }) => (value) => {
|
|
9
|
+
if (props.type === "tag" && props.multiple) {
|
|
10
|
+
const index = state.selected.indexOf(value);
|
|
11
|
+
index === -1 ? state.selected.push(value) : state.selected.splice(index, 1);
|
|
12
|
+
const values = state.selected;
|
|
13
|
+
emit("click", values);
|
|
14
|
+
emit("update:modelValue", values.slice());
|
|
15
|
+
} else if (props.type === "tag" && !props.multiple) {
|
|
16
|
+
state.selected = [value];
|
|
17
|
+
emit("click", value);
|
|
18
|
+
emit("update:modelValue", value);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const setSelectedOption = ({ state }) => (value) => {
|
|
22
|
+
state.selected = isEmpty(value) ? [] : Array.isArray(value) ? value.slice() : [value];
|
|
23
|
+
};
|
|
24
|
+
const api = ["state", "selectOptionAll", "selectOption"];
|
|
25
|
+
const renderless = (props, { reactive, watch, computed }, { emit }) => {
|
|
26
|
+
const api2 = {};
|
|
27
|
+
const state = reactive({
|
|
28
|
+
tagWidth: computed(() => (100 / props.columnNum).toFixed(1) + "%"),
|
|
29
|
+
selected: []
|
|
30
|
+
});
|
|
31
|
+
Object.assign(api2, {
|
|
32
|
+
state,
|
|
33
|
+
selectOptionAll: selectOptionAll({ state, emit }),
|
|
34
|
+
selectOption: selectOption({ state, props, emit }),
|
|
35
|
+
setSelectedOption: setSelectedOption({ state, props })
|
|
36
|
+
});
|
|
37
|
+
watch(() => props.modelValue, api2.setSelectedOption);
|
|
38
|
+
return api2;
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
api,
|
|
42
|
+
renderless
|
|
43
|
+
};
|
package/filter/vue.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { on, off } from "../common/deps/dom";
|
|
3
|
+
import {
|
|
4
|
+
panelToggle,
|
|
5
|
+
filterSelectOption,
|
|
6
|
+
filterConfirm,
|
|
7
|
+
labelListComputed,
|
|
8
|
+
selectOption,
|
|
9
|
+
confirm,
|
|
10
|
+
cancel,
|
|
11
|
+
resize,
|
|
12
|
+
reset,
|
|
13
|
+
selectOptionAll
|
|
14
|
+
} from "./index";
|
|
15
|
+
const api = [
|
|
16
|
+
"state",
|
|
17
|
+
"panelToggle",
|
|
18
|
+
"filterSelectOption",
|
|
19
|
+
"filterConfirm",
|
|
20
|
+
"selectOption",
|
|
21
|
+
"confirm",
|
|
22
|
+
"cancel",
|
|
23
|
+
"reset",
|
|
24
|
+
"selectOptionAll"
|
|
25
|
+
];
|
|
26
|
+
const renderless = (props, { reactive, computed, onMounted, onBeforeUnmount }, { emit, vm }) => {
|
|
27
|
+
const api2 = {};
|
|
28
|
+
const state = reactive({
|
|
29
|
+
showPanelIndex: -1,
|
|
30
|
+
filterPanel: {
|
|
31
|
+
show: false,
|
|
32
|
+
selected: []
|
|
33
|
+
},
|
|
34
|
+
selectPanel: {
|
|
35
|
+
selected: [],
|
|
36
|
+
config: computed(() => state.showPanelIndex !== -1 ? props.data[state.showPanelIndex] : { options: [] })
|
|
37
|
+
},
|
|
38
|
+
tagWidth: computed(() => (100 / props.columnNum).toFixed(1) + "%"),
|
|
39
|
+
labelList: computed(() => api2.labelListComputed()),
|
|
40
|
+
showPanel: computed(() => state.showPanelIndex !== -1 || state.filterPanel.show),
|
|
41
|
+
hasFilterValue: computed(
|
|
42
|
+
() => props.filterValue.find(
|
|
43
|
+
(item) => Array.isArray(item) ? item.length > 0 : [void 0, null, ""].indexOf(item) === -1
|
|
44
|
+
)
|
|
45
|
+
)
|
|
46
|
+
});
|
|
47
|
+
Object.assign(api2, {
|
|
48
|
+
state,
|
|
49
|
+
panelToggle: panelToggle({ state, props, api: api2 }),
|
|
50
|
+
filterSelectOption: filterSelectOption({ state, props, emit, api: api2 }),
|
|
51
|
+
filterConfirm: filterConfirm({ state, props, emit }),
|
|
52
|
+
selectOption: selectOption({ state, props, emit, api: api2 }),
|
|
53
|
+
confirm: confirm({ state, props, emit, api: api2 }),
|
|
54
|
+
cancel: cancel({ state, emit }),
|
|
55
|
+
resize: resize({ state, vm, props }),
|
|
56
|
+
reset: reset({ state, props }),
|
|
57
|
+
selectOptionAll: selectOptionAll({ state }),
|
|
58
|
+
labelListComputed: labelListComputed({ state, props })
|
|
59
|
+
});
|
|
60
|
+
onMounted(() => {
|
|
61
|
+
on(window, "scroll", api2.resize);
|
|
62
|
+
on(window, "resize", api2.resize);
|
|
63
|
+
});
|
|
64
|
+
onBeforeUnmount(() => {
|
|
65
|
+
off(window, "scroll", api2.resize);
|
|
66
|
+
off(window, "resize", api2.resize);
|
|
67
|
+
});
|
|
68
|
+
return api2;
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
api,
|
|
72
|
+
renderless
|
|
73
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { click } from "./index";
|
|
3
|
+
const api = ["state", "click"];
|
|
4
|
+
const renderless = (props, { reactive }, { emit }) => {
|
|
5
|
+
const api2 = {};
|
|
6
|
+
const state = reactive({});
|
|
7
|
+
Object.assign(api2, {
|
|
8
|
+
state,
|
|
9
|
+
click: click({ props, emit })
|
|
10
|
+
});
|
|
11
|
+
return api2;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
api,
|
|
15
|
+
renderless
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const handleClear = ({ dispatch, emit }) => ($event) => {
|
|
3
|
+
dispatch("Picker", "handle-clear", $event);
|
|
4
|
+
dispatch("Select", "handle-clear", $event);
|
|
5
|
+
dispatch("Cascader", "handle-clear", $event);
|
|
6
|
+
emit("handle-clear");
|
|
7
|
+
};
|
|
8
|
+
const handeClick = ({ props, emit }) => ($event) => {
|
|
9
|
+
if (props.disabled)
|
|
10
|
+
return;
|
|
11
|
+
$event.stopPropagation();
|
|
12
|
+
emit("click", $event);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
handeClick,
|
|
16
|
+
handleClear
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { handleClear, handeClick } from "./index";
|
|
3
|
+
const api = ["state", "handleClear", "focus", "blur", "handeClick"];
|
|
4
|
+
const renderless = (props, { reactive }, { dispatch, emit }) => {
|
|
5
|
+
const state = reactive({});
|
|
6
|
+
const api2 = {};
|
|
7
|
+
Object.assign(api2, {
|
|
8
|
+
state,
|
|
9
|
+
focus: () => state,
|
|
10
|
+
blur: () => state,
|
|
11
|
+
handleClear: handleClear({ dispatch, emit }),
|
|
12
|
+
handeClick: handeClick({ props, emit })
|
|
13
|
+
});
|
|
14
|
+
return api2;
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
api,
|
|
18
|
+
renderless
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const doDestroy = ({ vm }) => () => {
|
|
3
|
+
vm.$refs.popper && vm.$refs.popper.doDestroy();
|
|
4
|
+
};
|
|
5
|
+
const show = ({ state }) => () => {
|
|
6
|
+
state.visible = true;
|
|
7
|
+
};
|
|
8
|
+
const hide = ({ state }) => () => {
|
|
9
|
+
state.visible = false;
|
|
10
|
+
};
|
|
11
|
+
const togglePanel = ({ props, state }) => () => {
|
|
12
|
+
if (props.disabled)
|
|
13
|
+
return;
|
|
14
|
+
state.visible = !state.visible;
|
|
15
|
+
};
|
|
16
|
+
const popoverShow = ({ state, emit }) => () => {
|
|
17
|
+
emit("visible-change", state.visible);
|
|
18
|
+
};
|
|
19
|
+
const popoverHide = ({ state, emit }) => () => {
|
|
20
|
+
emit("visible-change", state.visible);
|
|
21
|
+
};
|
|
22
|
+
const handleClear = ({ emit }) => () => {
|
|
23
|
+
emit("handle-clear");
|
|
24
|
+
};
|
|
25
|
+
const handleDocumentClick = ({ state, vm }) => (event) => {
|
|
26
|
+
const filterBox = vm.$refs.filterBox.$el;
|
|
27
|
+
const popper = document.querySelector(".tiny-filter-panel__popover");
|
|
28
|
+
if (!filterBox || !popper || filterBox.contains(event.target) || popper.contains(event.target)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
state.visible = false;
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
doDestroy,
|
|
35
|
+
handleClear,
|
|
36
|
+
handleDocumentClick,
|
|
37
|
+
hide,
|
|
38
|
+
popoverHide,
|
|
39
|
+
popoverShow,
|
|
40
|
+
show,
|
|
41
|
+
togglePanel
|
|
42
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { doDestroy, show, hide, popoverShow, popoverHide, handleClear, handleDocumentClick, togglePanel } from "./index";
|
|
3
|
+
import { on, off } from "../common/deps/dom";
|
|
4
|
+
const api = ["state", "doDestroy", "show", "hide", "popoverShow", "popoverHide", "handleClear", "togglePanel"];
|
|
5
|
+
const renderless = (props, { reactive, onMounted, onBeforeUnmount }, { vm, emit }) => {
|
|
6
|
+
const state = reactive({
|
|
7
|
+
visible: false
|
|
8
|
+
});
|
|
9
|
+
const api2 = {};
|
|
10
|
+
Object.assign(api2, {
|
|
11
|
+
state,
|
|
12
|
+
show: show({ state }),
|
|
13
|
+
hide: hide({ state }),
|
|
14
|
+
togglePanel: togglePanel({ props, state }),
|
|
15
|
+
popoverShow: popoverShow({ state, emit }),
|
|
16
|
+
popoverHide: popoverHide({ state, emit }),
|
|
17
|
+
handleClear: handleClear({ emit }),
|
|
18
|
+
doDestroy: doDestroy({ vm }),
|
|
19
|
+
handleDocumentClick: handleDocumentClick({ vm, state })
|
|
20
|
+
});
|
|
21
|
+
handleDocumentClick;
|
|
22
|
+
onMounted(() => {
|
|
23
|
+
on(document, "click", api2.handleDocumentClick);
|
|
24
|
+
});
|
|
25
|
+
onBeforeUnmount(() => {
|
|
26
|
+
off(document, "click", api2.handleDocumentClick);
|
|
27
|
+
});
|
|
28
|
+
return api2;
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
api,
|
|
32
|
+
renderless
|
|
33
|
+
};
|
package/floatbar/index.js
CHANGED