@opentiny/vue-renderless 3.12.0 → 3.13.0-alpha.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/alert/index.js +50 -1
- package/alert/vue.js +36 -9
- 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 +20 -6
- package/calendar-view/index.js +10 -12
- package/calendar-view/vue.js +17 -4
- package/cascader/index.js +80 -34
- package/cascader/vue.js +49 -19
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +37 -24
- package/cascader-mobile/vue.js +7 -1
- 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/cascader-view/index.js +1 -1
- 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 +17 -0
- package/checkbox/vue.js +16 -7
- package/checkbox-group/vue.js +2 -0
- package/col/index.js +7 -2
- 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 +2 -0
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +48 -5
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +1 -1
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +22 -10
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- 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/container/index.js +17 -1
- package/container/vue.js +12 -3
- 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 +12 -5
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +17 -6
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +26 -5
- package/drawer/vue.js +13 -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 +21 -8
- 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 +47 -12
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -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 +3 -1
- package/form-item/index.js +4 -4
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/utils/common.js +10 -5
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -0
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +89 -22
- package/input/vue.js +52 -21
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/label/index.js +56 -0
- package/label/vue.js +26 -0
- package/link/vue.js +3 -1
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/mask/index.js +13 -0
- package/mask/vue.js +18 -0
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/multi-select/index.js +150 -10
- package/multi-select/vue.js +46 -11
- package/multi-select-item/index.js +17 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +51 -9
- package/numeric/vue.js +44 -14
- package/option/index.js +12 -5
- package/option/vue.js +15 -7
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +372 -0
- package/pager/vue.js +125 -2
- package/picker/index.js +253 -48
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/index.js +0 -2
- package/pop-upload/vue.js +3 -4
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +55 -24
- 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 +57 -65
- package/pull-refresh/vue.js +23 -7
- 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-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 +1 -1
- package/search/vue.js +3 -1
- package/select/index.js +185 -113
- package/select/vue.js +105 -20
- package/select-dropdown/index.js +62 -4
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- 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 +27 -7
- package/slider/vue.js +26 -7
- package/split/index.js +1 -1
- 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 +9 -4
- package/tab-nav/vue.js +6 -2
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +1 -1
- package/tabs/vue.js +1 -0
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tag/index.js +1 -1
- package/tag/vue.js +5 -1
- package/tag-group/index.js +2 -1
- package/tall-storage/index.js +4 -5
- package/time/index.js +4 -1
- package/time/vue.js +1 -1
- package/time-line/vue.js +1 -1
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/time-spinner/index.js +0 -3
- package/time-spinner/vue.js +2 -3
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +1 -2
- package/tooltip/vue.js +3 -3
- 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 +27 -3
- package/tree-menu/vue.js +27 -14
- package/tree-node/index.js +12 -10
- package/tree-node/vue.js +6 -5
- package/types/action-menu.type.d.ts +5 -0
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +16 -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.type.d.ts +5 -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 +327 -1
- package/types/checkbox.type.d.ts +9 -0
- package/types/collapse.type.d.ts +19 -2
- package/types/date-picker.type.d.ts +33 -0
- package/types/dialog-box.type.d.ts +5 -1
- package/types/drawer.type.d.ts +132 -1
- package/types/{dropdown-item.type-bf83e929.d.ts → dropdown-item.type-8475a549.d.ts} +8 -14
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +2 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-d88482e4.d.ts} +3 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +23 -9
- package/types/ip-address.type.d.ts +160 -1
- package/types/label.type.d.ts +81 -0
- package/types/link.type.d.ts +6 -3
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +4 -2
- package/types/numeric.type.d.ts +36 -9
- package/types/pager.type.d.ts +171 -1
- package/types/picker.type.d.ts +14 -0
- package/types/popconfirm.type.d.ts +85 -1
- package/types/popeditor.type.d.ts +4 -0
- package/types/popover.type.d.ts +3 -3
- 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 +8 -1
- package/types/steps.type.d.ts +14 -3
- package/types/tab-item.type.d.ts +0 -1
- package/types/tab-nav.type.d.ts +6 -1
- package/types/tabs.type.d.ts +5 -0
- package/types/tag-group.type.d.ts +64 -1
- package/types/tag.type.d.ts +12 -0
- package/types/tooltip.type.d.ts +1 -1
- package/types/transfer.type.d.ts +183 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +1 -1
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-1078fba2.d.ts} +27 -6
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +59 -29
- package/upload/vue.js +6 -4
- package/upload-list/index.js +14 -14
- package/upload-list/vue.js +5 -2
- package/user/index.js +5 -4
- package/user-head/index.js +1 -1
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
|
@@ -1,2 +1,211 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { ExtractPropTypes } from 'vue';
|
|
3
|
+
import * as _opentiny_vue_common from '@opentiny/vue-common';
|
|
4
|
+
import { ISharedRenderlessParamUtils } from './shared.type.js';
|
|
1
5
|
|
|
2
|
-
|
|
6
|
+
declare const treeMenuProps: {
|
|
7
|
+
placeholder: {
|
|
8
|
+
default: string;
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
};
|
|
11
|
+
data: ArrayConstructor;
|
|
12
|
+
nodeKey: StringConstructor;
|
|
13
|
+
defaultExpandAll: BooleanConstructor;
|
|
14
|
+
suffixIcon: ObjectConstructor;
|
|
15
|
+
prefixIcon: ObjectConstructor;
|
|
16
|
+
searchIcon: {
|
|
17
|
+
type: ObjectConstructor;
|
|
18
|
+
default: () => vue.Raw<_opentiny_vue_common.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<_opentiny_vue_common.ExtractPropTypes<{}>>, {}, {}>>;
|
|
21
|
+
};
|
|
22
|
+
props: ObjectConstructor;
|
|
23
|
+
draggable: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
emptyText: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
default: string;
|
|
30
|
+
};
|
|
31
|
+
checkStrictly: BooleanConstructor;
|
|
32
|
+
lazy: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
load: FunctionConstructor;
|
|
37
|
+
showCheckbox: BooleanConstructor;
|
|
38
|
+
filterNodeMethod: FunctionConstructor;
|
|
39
|
+
defaultCheckedKeys: ArrayConstructor;
|
|
40
|
+
defaultExpandedKeys: ArrayConstructor;
|
|
41
|
+
defaultExpandedKeysHighlight: (StringConstructor | NumberConstructor)[];
|
|
42
|
+
indent: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
allowDrag: FunctionConstructor;
|
|
47
|
+
allowDrop: FunctionConstructor;
|
|
48
|
+
expandOnClickNode: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: boolean;
|
|
51
|
+
};
|
|
52
|
+
ellipsis: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
wrap: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
getMenuDataSync: FunctionConstructor;
|
|
61
|
+
accordion: BooleanConstructor;
|
|
62
|
+
showTitle: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
66
|
+
showFilter: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
collapsible: {
|
|
71
|
+
type: BooleanConstructor;
|
|
72
|
+
default: boolean;
|
|
73
|
+
};
|
|
74
|
+
showNumber: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
default: boolean;
|
|
77
|
+
};
|
|
78
|
+
nodeHeight: NumberConstructor;
|
|
79
|
+
onlyCheckChildren: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: boolean;
|
|
82
|
+
};
|
|
83
|
+
menuCollapsible: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
87
|
+
tiny_mode: StringConstructor;
|
|
88
|
+
tiny_mode_root: BooleanConstructor;
|
|
89
|
+
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
90
|
+
tiny_renderless: FunctionConstructor;
|
|
91
|
+
tiny_theme: StringConstructor;
|
|
92
|
+
tiny_chart_theme: ObjectConstructor;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Copyright (c) 2022 - present TinyVue Authors.
|
|
97
|
+
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
98
|
+
*
|
|
99
|
+
* Use of this source code is governed by an MIT-style license.
|
|
100
|
+
*
|
|
101
|
+
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
|
|
102
|
+
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
|
|
103
|
+
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
declare const initData: ({ state, props, service, api }: {
|
|
108
|
+
state: ITreeMenuState;
|
|
109
|
+
props: ITreeMenuProps;
|
|
110
|
+
service: any;
|
|
111
|
+
api: ITreeMenuApi;
|
|
112
|
+
}) => () => Promise<void>;
|
|
113
|
+
declare const setMenuKey: (api: ITreeMenuApi) => ({ newData, menuData }: {
|
|
114
|
+
newData: ITreeMenuNewData[];
|
|
115
|
+
menuData: ITreeMenuData[];
|
|
116
|
+
}) => ITreeMenuNewData[];
|
|
117
|
+
declare const filterNode: () => (value: any, data: any) => any;
|
|
118
|
+
declare const watchFilterText: ({ vm }: {
|
|
119
|
+
vm: any;
|
|
120
|
+
}) => (value: any) => void;
|
|
121
|
+
declare const nodeDragStart: (emit: any) => (node: any, event: any) => void;
|
|
122
|
+
declare const nodeDragEnter: (emit: any) => (dragNode: any, dropNode: any, event: any) => void;
|
|
123
|
+
declare const nodeDragOver: (emit: any) => (dragNode: any, dropNode: any, event: any) => void;
|
|
124
|
+
declare const nodeDragEnd: (emit: any) => (dragNode: any, dropNode: any, dropType: any, event: any) => void;
|
|
125
|
+
declare const nodeDrop: (emit: any) => (dragNode: any, dropNode: any, dropType: any, event: any) => void;
|
|
126
|
+
declare const nodeExpand: (emit: any) => (nodeData: any, node: any) => void;
|
|
127
|
+
declare const nodeCollapse: (emit: any) => (nodeData: any, node: any) => void;
|
|
128
|
+
declare const nodeClick: ({ emit, props, state }: {
|
|
129
|
+
emit: any;
|
|
130
|
+
props: any;
|
|
131
|
+
state: any;
|
|
132
|
+
}) => (nodeData: any, node: any) => void;
|
|
133
|
+
declare const checkChange: (emit: any) => (data: any, checked: any, indeterminate: any) => void;
|
|
134
|
+
declare const check: (emit: any) => (data: any, checkedStatus: any) => void;
|
|
135
|
+
declare const currentChange: (emit: any) => (data: any, node: any) => void;
|
|
136
|
+
declare const getTitle: (props: any) => (label: any) => any;
|
|
137
|
+
declare const collapseChange: ({ state, props, emit }: {
|
|
138
|
+
state: any;
|
|
139
|
+
props: any;
|
|
140
|
+
emit: any;
|
|
141
|
+
}) => () => void;
|
|
142
|
+
declare const collapseMenu: ({ state, props, api }: {
|
|
143
|
+
state: any;
|
|
144
|
+
props: any;
|
|
145
|
+
api: any;
|
|
146
|
+
}) => () => void;
|
|
147
|
+
declare const expandMenu: ({ state, props, api }: {
|
|
148
|
+
state: ITreeMenuState;
|
|
149
|
+
props: ITreeMenuProps;
|
|
150
|
+
api: ITreeMenuApi;
|
|
151
|
+
}) => () => void;
|
|
152
|
+
declare const setCurrentKey: ({ vm }: {
|
|
153
|
+
vm: any;
|
|
154
|
+
}) => (key: string) => void;
|
|
155
|
+
declare const getCurrentKey: ({ vm }: {
|
|
156
|
+
vm: any;
|
|
157
|
+
}) => () => any;
|
|
158
|
+
declare const setCurrentNode: ({ vm }: {
|
|
159
|
+
vm: any;
|
|
160
|
+
}) => (key: string) => void;
|
|
161
|
+
declare const getCurrentNode: ({ vm }: {
|
|
162
|
+
vm: any;
|
|
163
|
+
}) => () => any;
|
|
164
|
+
|
|
165
|
+
interface ITreeMenuState {
|
|
166
|
+
data?: unknown[];
|
|
167
|
+
filterText: string;
|
|
168
|
+
isCollapsed: boolean;
|
|
169
|
+
}
|
|
170
|
+
type ITreeMenuProps = ExtractPropTypes<typeof treeMenuProps>;
|
|
171
|
+
interface ITreeMenuApi {
|
|
172
|
+
t: ISharedRenderlessParamUtils['t'];
|
|
173
|
+
state: ITreeMenuState;
|
|
174
|
+
check: ReturnType<typeof check>;
|
|
175
|
+
filterNode: ReturnType<typeof filterNode>;
|
|
176
|
+
nodeDrop: ReturnType<typeof nodeDrop>;
|
|
177
|
+
nodeClick: ReturnType<typeof nodeClick>;
|
|
178
|
+
nodeExpand: ReturnType<typeof nodeExpand>;
|
|
179
|
+
nodeDragEnd: ReturnType<typeof nodeDragEnd>;
|
|
180
|
+
checkChange: ReturnType<typeof checkChange>;
|
|
181
|
+
nodeCollapse: ReturnType<typeof nodeCollapse>;
|
|
182
|
+
nodeDragOver: ReturnType<typeof nodeDragOver>;
|
|
183
|
+
nodeDragStart: ReturnType<typeof nodeDragStart>;
|
|
184
|
+
nodeDragEnter: ReturnType<typeof nodeDragEnter>;
|
|
185
|
+
currentChange: ReturnType<typeof currentChange>;
|
|
186
|
+
watchFilterText: ReturnType<typeof watchFilterText>;
|
|
187
|
+
getTitle: ReturnType<typeof getTitle>;
|
|
188
|
+
setMenuKey: ReturnType<typeof setMenuKey>;
|
|
189
|
+
initData: ReturnType<typeof initData>;
|
|
190
|
+
collapseChange: ReturnType<typeof collapseChange>;
|
|
191
|
+
collapseMenu: ReturnType<typeof collapseMenu>;
|
|
192
|
+
expandMenu: ReturnType<typeof expandMenu>;
|
|
193
|
+
setCurrentKey: ReturnType<typeof setCurrentKey>;
|
|
194
|
+
getCurrentKey: ReturnType<typeof getCurrentKey>;
|
|
195
|
+
setCurrentNode: ReturnType<typeof setCurrentNode>;
|
|
196
|
+
getCurrentNode: ReturnType<typeof getCurrentNode>;
|
|
197
|
+
}
|
|
198
|
+
interface ITreeMenuData {
|
|
199
|
+
name: string;
|
|
200
|
+
siteNodeId: string;
|
|
201
|
+
url: string;
|
|
202
|
+
children: ITreeMenuData[];
|
|
203
|
+
}
|
|
204
|
+
interface ITreeMenuNewData extends ITreeMenuData {
|
|
205
|
+
label: string;
|
|
206
|
+
id: string;
|
|
207
|
+
url: string;
|
|
208
|
+
children: ITreeMenuNewData[];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { ITreeMenuApi, ITreeMenuData, ITreeMenuNewData, ITreeMenuProps, ITreeMenuState };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ISharedRenderlessParamUtils, ISharedRenderlessFunctionParams } from './shared.type.js';
|
|
3
|
-
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-
|
|
3
|
+
import { I as IFileUploadVm, a as IFileUploadConstants } from './upload-list.type-1078fba2.js';
|
|
4
4
|
|
|
5
5
|
declare const UploadDraggerProps: {
|
|
6
6
|
disabled: BooleanConstructor;
|
|
@@ -7,6 +7,11 @@ declare const $constants: {
|
|
|
7
7
|
UPLOAD_INNER_TEMPLATE: string;
|
|
8
8
|
UPLOAD_LIST_INNER: string;
|
|
9
9
|
UPLOAD_LIST_INNER_TEMPLATE: string;
|
|
10
|
+
ONLY_SUPPORT: string;
|
|
11
|
+
COMMA: string;
|
|
12
|
+
FILE_NOT_LESS_THAN: string;
|
|
13
|
+
FILE_NOT_MORE_THAN: string;
|
|
14
|
+
NUMBER_LIMIT: string;
|
|
10
15
|
FILE_STATUS: {
|
|
11
16
|
READY: string;
|
|
12
17
|
SUCESS: string;
|
|
@@ -21,6 +26,7 @@ declare const $constants: {
|
|
|
21
26
|
THUMB: string;
|
|
22
27
|
PICTURE_SINGLE: string;
|
|
23
28
|
DRAG_SINGLE: string;
|
|
29
|
+
SAAS: string;
|
|
24
30
|
};
|
|
25
31
|
EDM: {
|
|
26
32
|
CHUNKINIT: string;
|
|
@@ -68,6 +74,7 @@ declare const $constants: {
|
|
|
68
74
|
NOT_SUPPORT_NO_SUFFIX: string;
|
|
69
75
|
STATUS_SPECIAL_CHARACTERS: number;
|
|
70
76
|
NOT_SUPPORT_SPECIAL_CHARACTERS: string;
|
|
77
|
+
DOC_PREVIEW: string;
|
|
71
78
|
};
|
|
72
79
|
IMAGE_TYPE: string;
|
|
73
80
|
FILE_TYPE: {
|
|
@@ -100,6 +107,11 @@ declare const fileUploadProps: {
|
|
|
100
107
|
UPLOAD_INNER_TEMPLATE: string;
|
|
101
108
|
UPLOAD_LIST_INNER: string;
|
|
102
109
|
UPLOAD_LIST_INNER_TEMPLATE: string;
|
|
110
|
+
ONLY_SUPPORT: string;
|
|
111
|
+
COMMA: string;
|
|
112
|
+
FILE_NOT_LESS_THAN: string;
|
|
113
|
+
FILE_NOT_MORE_THAN: string;
|
|
114
|
+
NUMBER_LIMIT: string;
|
|
103
115
|
FILE_STATUS: {
|
|
104
116
|
READY: string;
|
|
105
117
|
SUCESS: string;
|
|
@@ -114,6 +126,7 @@ declare const fileUploadProps: {
|
|
|
114
126
|
THUMB: string;
|
|
115
127
|
PICTURE_SINGLE: string;
|
|
116
128
|
DRAG_SINGLE: string;
|
|
129
|
+
SAAS: string;
|
|
117
130
|
};
|
|
118
131
|
EDM: {
|
|
119
132
|
CHUNKINIT: string;
|
|
@@ -161,6 +174,7 @@ declare const fileUploadProps: {
|
|
|
161
174
|
NOT_SUPPORT_NO_SUFFIX: string;
|
|
162
175
|
STATUS_SPECIAL_CHARACTERS: number;
|
|
163
176
|
NOT_SUPPORT_SPECIAL_CHARACTERS: string;
|
|
177
|
+
DOC_PREVIEW: string;
|
|
164
178
|
};
|
|
165
179
|
IMAGE_TYPE: string;
|
|
166
180
|
FILE_TYPE: {
|
|
@@ -337,6 +351,10 @@ declare const fileUploadProps: {
|
|
|
337
351
|
type: BooleanConstructor;
|
|
338
352
|
default: boolean;
|
|
339
353
|
};
|
|
354
|
+
compact: {
|
|
355
|
+
type: BooleanConstructor;
|
|
356
|
+
default: boolean;
|
|
357
|
+
};
|
|
340
358
|
beforeAddFile: FunctionConstructor;
|
|
341
359
|
encryptConfig: {
|
|
342
360
|
type: ObjectConstructor;
|
|
@@ -385,7 +403,7 @@ declare const beforeUpload: ({ props, api, Modal, constants, t, state }: Pick<IF
|
|
|
385
403
|
declare const startUpload: ({ state, constants, vm, Modal, api, t }: Pick<IFileUploadRenderlessParams, 'state' | 'constants' | 'vm' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile, isList: boolean) => void;
|
|
386
404
|
declare const properFileSize: ({ props, state, api, constants, Modal, t }: Pick<IFileUploadRenderlessParams, 'props' | 'state' | 'constants' | 'api' | 't'> & IFileUploadModalVm) => (file: IFileUploadFile) => boolean;
|
|
387
405
|
declare const addFileToList: ({ api, constants, emit, props, state, mode }: Pick<IFileUploadRenderlessParams, 'api' | 'constants' | 'emit' | 'props' | 'state' | 'mode'>) => (rawFile: IFileUploadFile, updateId: string, reUpload: boolean) => void;
|
|
388
|
-
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "state" | "
|
|
406
|
+
declare const getFileHash: ({ emit, Modal, constants, t, CryptoJS, state }: Pick<IFileUploadRenderlessParams, "state" | "emit" | "t" | "constants"> & IFileUploadModalVm & {
|
|
389
407
|
CryptoJS: object;
|
|
390
408
|
}) => ({ file, chunkSize, showTips }: {
|
|
391
409
|
file: IFileUploadFile;
|
|
@@ -470,7 +488,7 @@ declare const setWriterFile: ({ state, emit, Streamsaver }: Pick<IFileUploadRend
|
|
|
470
488
|
declare const getFormData$1: ({ constants, props, state }: Pick<IFileUploadRenderlessParams, 'constants' | 'props' | 'state'>) => ({ formData, file, type }: IFileUploadGetFormData) => IUploadFormData;
|
|
471
489
|
declare const largeDocumentUpload: ({ api, Modal, state, t, emit, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'state' | 't' | 'emit' | 'constants'> & IFileUploadModalVm) => (file: IFileUploadFile) => void;
|
|
472
490
|
declare const segmentUploadInit: ({ api, props, service, state, constants }: Pick<IFileUploadRenderlessParams, 'api' | 'props' | 'service' | 'state' | 'constants'>) => (file: IFileUploadFile) => Promise<unknown>;
|
|
473
|
-
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "state" | "
|
|
491
|
+
declare const segmentUpload: ({ api, props, service, state, emit, constants, CryptoJS }: Pick<IFileUploadRenderlessParams, "state" | "props" | "emit" | "api" | "constants" | "service"> & {
|
|
474
492
|
CryptoJS: object;
|
|
475
493
|
}) => (batchIndex: number, file: IFileUploadFile, progress: {
|
|
476
494
|
file: IFileUploadFile;
|
|
@@ -506,7 +524,7 @@ declare const previewImageBatch: ({ service, api }: Pick<IFileUploadRenderlessPa
|
|
|
506
524
|
url: string;
|
|
507
525
|
file: IFileUploadFile;
|
|
508
526
|
}) => any;
|
|
509
|
-
declare const getDialogConfigObj: ({ props, state }: Pick<IFileUploadRenderlessParams, 'props' | 'state'>) => () => object;
|
|
527
|
+
declare const getDialogConfigObj: ({ props, state, t, constants }: Pick<IFileUploadRenderlessParams, 'props' | 'state' | 't' | 'constants'>) => () => object;
|
|
510
528
|
declare const computeDocChunkSize: ({ props, state, constants }: Pick<IFileUploadRenderlessParams, 'props' | 'state' | 'constants'>) => () => void;
|
|
511
529
|
declare const computedSourcetype: ({ props, constants }: Pick<IFileUploadRenderlessParams, 'props' | 'constants'>) => () => string[];
|
|
512
530
|
declare const getFileSourceType: ({ state, props, constants }: Pick<IFileUploadRenderlessParams, 'state' | 'props' | 'constants'>) => ({ file }: {
|
|
@@ -650,6 +668,11 @@ declare const uploadProps: {
|
|
|
650
668
|
default: () => void;
|
|
651
669
|
};
|
|
652
670
|
mode: StringConstructor;
|
|
671
|
+
showTitle: BooleanConstructor;
|
|
672
|
+
isHwh5: {
|
|
673
|
+
type: BooleanConstructor;
|
|
674
|
+
default: boolean;
|
|
675
|
+
};
|
|
653
676
|
tiny_mode: StringConstructor;
|
|
654
677
|
tiny_mode_root: BooleanConstructor;
|
|
655
678
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -682,7 +705,7 @@ declare const uploadFiles: ({ state, constants, Modal, props, t }: Pick<IUploadR
|
|
|
682
705
|
declare const upload: ({ api, props, refs }: Pick<IUploadRenderlessParams, 'api' | 'props' | 'refs'>) => (rawFile: File) => void;
|
|
683
706
|
declare const abort: ({ state, props, constants }: Pick<IUploadRenderlessParams, 'state' | 'props' | 'constants'>) => (file: IFileUploadFile) => void;
|
|
684
707
|
declare const post: ({ api, constants, props, state, service }: Pick<IUploadRenderlessParams, 'api' | 'constants' | 'props' | 'state' | 'service'>) => (rawFile: IFileUploadFile) => void;
|
|
685
|
-
declare const handleClick: ({ props, refs }: Pick<IUploadRenderlessParams, 'props' | 'refs'>) => ($event: Event, type: string) => void;
|
|
708
|
+
declare const handleClick: ({ props, refs, state }: Pick<IUploadRenderlessParams, 'props' | 'refs' | 'state'>) => ($event: Event, type: string) => void;
|
|
686
709
|
declare const handleKeydown: (api: IUploadRenderlessParams['api']) => (event: KeyboardEvent) => void;
|
|
687
710
|
declare const handleUpdate: ({ props, state }: Pick<IUploadRenderlessParams, 'props' | 'state'>) => (file: IFileUploadFile) => void;
|
|
688
711
|
declare const mounted: ({ state, props, api }: Pick<IUploadRenderlessParams, 'state' | 'props' | 'api'>) => () => void;
|
|
@@ -1079,8 +1102,6 @@ declare const uploadListProps: {
|
|
|
1079
1102
|
type: BooleanConstructor;
|
|
1080
1103
|
default: boolean;
|
|
1081
1104
|
};
|
|
1082
|
-
reUploadable: BooleanConstructor;
|
|
1083
|
-
reUploadTip: FunctionConstructor;
|
|
1084
1105
|
tiny_mode: StringConstructor;
|
|
1085
1106
|
tiny_mode_root: BooleanConstructor;
|
|
1086
1107
|
tiny_template: (FunctionConstructor | ObjectConstructor)[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-
|
|
2
|
+
export { H as IUploadListApi, J as IUploadListProps, K as IUploadListRenderlessParamUtils, L as IUploadListRenderlessParams, G as IUploadListState, M as IUploadListVideoParam } from './upload-list.type-1078fba2.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/upload.type.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'vue';
|
|
2
|
-
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-
|
|
2
|
+
export { d as IUploadApi, i as IUploadFormData, k as IUploadOptionsOfHwh5, j as IUploadOptionsOfPost, e as IUploadProps, h as IUploadRenderlessOtherParams, f as IUploadRenderlessParamUtils, g as IUploadRenderlessParams, c as IUploadState, b as IUploadStateHeader } from './upload-list.type-1078fba2.js';
|
|
3
3
|
import './shared.type.js';
|
package/types/wizard.type.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ interface IWizardState {
|
|
|
62
62
|
doing: string;
|
|
63
63
|
ready: string;
|
|
64
64
|
wait: string;
|
|
65
|
+
iconYes: 'tiny-icon-yes' | 'tiny-icon-successful';
|
|
65
66
|
}
|
|
66
67
|
type IWizardConstants = typeof $constants;
|
|
67
68
|
type IWizardRenderlessParams = ISharedRenderlessFunctionParams<IWizardConstants> & {
|
package/upload/index.js
CHANGED
|
@@ -95,11 +95,8 @@ const uploadFiles = ({
|
|
|
95
95
|
}
|
|
96
96
|
return folderAry.length < 7;
|
|
97
97
|
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (!props.multiple) {
|
|
101
|
-
postFiles = postFiles.slice(0, 1);
|
|
102
|
-
}
|
|
98
|
+
} else if (!props.multiple) {
|
|
99
|
+
postFiles = postFiles.slice(0, 1);
|
|
103
100
|
}
|
|
104
101
|
if (postFiles.length === 0) {
|
|
105
102
|
return;
|
|
@@ -147,7 +144,8 @@ const upload = ({ api, props, refs }) => (rawFile) => {
|
|
|
147
144
|
const abort = ({ state, props, constants }) => (file) => {
|
|
148
145
|
const { reqs } = state;
|
|
149
146
|
const cancel = function(uid) {
|
|
150
|
-
|
|
147
|
+
var _a;
|
|
148
|
+
if ((_a = reqs[uid]) == null ? void 0 : _a.abort) {
|
|
151
149
|
reqs[uid].abort();
|
|
152
150
|
} else if (state.cancelToken[uid]) {
|
|
153
151
|
state.cancelToken[uid]();
|
|
@@ -265,31 +263,32 @@ const getOptionsOfHwh5 = ({
|
|
|
265
263
|
uploaderInner,
|
|
266
264
|
uid
|
|
267
265
|
}) => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
266
|
+
const edm = uploaderInner.edm;
|
|
267
|
+
const params = edm && edm.upload && edm.upload.params || {};
|
|
268
|
+
return Object.assign(
|
|
269
|
+
{
|
|
270
|
+
edmAuth: {
|
|
271
|
+
edmToken: props.edmToken.edmToken,
|
|
272
|
+
appId: uploaderInner.hwh5.appId
|
|
273
|
+
},
|
|
274
|
+
filePath: rawFile.filePath,
|
|
275
|
+
progress: 1
|
|
272
276
|
},
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
if (props.onProgress) {
|
|
277
|
+
params,
|
|
278
|
+
{
|
|
279
|
+
onProgress: (data) => {
|
|
277
280
|
props.onProgress(data, rawFile);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
onSuccess: (res) => {
|
|
281
|
-
if (props.onSuccess) {
|
|
281
|
+
},
|
|
282
|
+
onSuccess: (res) => {
|
|
282
283
|
props.onSuccess(res, rawFile);
|
|
284
|
+
delete state.reqs[uid];
|
|
285
|
+
},
|
|
286
|
+
onError: (error) => {
|
|
287
|
+
props.onError(error, rawFile);
|
|
288
|
+
delete state.reqs[uid];
|
|
283
289
|
}
|
|
284
|
-
delete state.reqs[uid];
|
|
285
|
-
},
|
|
286
|
-
onError: (error) => {
|
|
287
|
-
if (props.onProgress) {
|
|
288
|
-
props.onProgress(error, rawFile);
|
|
289
|
-
}
|
|
290
|
-
delete state.reqs[uid];
|
|
291
290
|
}
|
|
292
|
-
|
|
291
|
+
);
|
|
293
292
|
};
|
|
294
293
|
const post = ({
|
|
295
294
|
api,
|
|
@@ -325,11 +324,42 @@ const post = ({
|
|
|
325
324
|
excuteReq(options);
|
|
326
325
|
}
|
|
327
326
|
};
|
|
328
|
-
const handleClick = ({ props, refs }) => ($event, type) => {
|
|
329
|
-
if (
|
|
330
|
-
|
|
327
|
+
const handleClick = ({ props, refs, state }) => ($event, type) => {
|
|
328
|
+
if (props.disabled || props.displayOnly || state.isStopPropagation) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
const { uploader, uploadInner } = state;
|
|
332
|
+
const { encryptConfig = {} } = uploader;
|
|
333
|
+
const fileUploadVm = uploadInner.$parent;
|
|
334
|
+
const inputHandler = () => {
|
|
335
|
+
typeof props.handleTriggerClick === "function" && props.handleTriggerClick($event, type);
|
|
336
|
+
if (props.isHwh5) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
331
339
|
refs.input.value = null;
|
|
340
|
+
state.isStopPropagation = true;
|
|
332
341
|
refs.input.click();
|
|
342
|
+
state.isStopPropagation = false;
|
|
343
|
+
};
|
|
344
|
+
if (typeof uploader.beforeAddFile === "function") {
|
|
345
|
+
$event.preventDefault();
|
|
346
|
+
let isPromise;
|
|
347
|
+
const promise = uploader.beforeAddFile(() => {
|
|
348
|
+
!isPromise && inputHandler();
|
|
349
|
+
});
|
|
350
|
+
isPromise = promise && typeof promise.then === "function";
|
|
351
|
+
if (isPromise) {
|
|
352
|
+
promise.then(() => inputHandler()).catch(() => null);
|
|
353
|
+
} else if (promise) {
|
|
354
|
+
inputHandler();
|
|
355
|
+
}
|
|
356
|
+
} else if (encryptConfig && encryptConfig.enabled && fileUploadVm) {
|
|
357
|
+
fileUploadVm.state.encryptDialogConfig.show = true;
|
|
358
|
+
fileUploadVm.state.encryptDialogConfig.selectFileMethod = () => {
|
|
359
|
+
inputHandler();
|
|
360
|
+
};
|
|
361
|
+
} else {
|
|
362
|
+
inputHandler();
|
|
333
363
|
}
|
|
334
364
|
};
|
|
335
365
|
const handleKeydown = (api) => (event) => {
|
package/upload/vue.js
CHANGED
|
@@ -36,8 +36,9 @@ const renderless = (props, { computed, inject, reactive, onMounted, onBeforeUnmo
|
|
|
36
36
|
reqs: {},
|
|
37
37
|
uploader,
|
|
38
38
|
accecpt: "",
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
uploadInner: computed(() => state.uploader.$refs[constants.FILE_UPLOAD_INNER_TEMPLATE]),
|
|
40
|
+
isEdm: computed(() => state.uploadInner.state.isEdm),
|
|
41
|
+
openEdmDownload: computed(() => state.uploadInner.edm.download),
|
|
41
42
|
headers: computed(() => {
|
|
42
43
|
if (state.isEdm) {
|
|
43
44
|
return {
|
|
@@ -49,14 +50,15 @@ const renderless = (props, { computed, inject, reactive, onMounted, onBeforeUnmo
|
|
|
49
50
|
formData: {},
|
|
50
51
|
cancelToken: {},
|
|
51
52
|
updateId: "",
|
|
52
|
-
updateInput: null
|
|
53
|
+
updateInput: null,
|
|
54
|
+
isStopPropagation: false
|
|
53
55
|
});
|
|
54
56
|
Object.assign(api2, {
|
|
55
57
|
state,
|
|
56
58
|
isImage,
|
|
57
59
|
abort: abort({ state, props, constants }),
|
|
58
60
|
getFormData: getFormData({ state, constants, props }),
|
|
59
|
-
handleClick: handleClick({ props, refs }),
|
|
61
|
+
handleClick: handleClick({ props, refs, state }),
|
|
60
62
|
onBeforeDestroy: onBeforeDestroy(state),
|
|
61
63
|
handleUpdate: handleUpdate({ state, props }),
|
|
62
64
|
uploadFiles: uploadFiles({ constants, Modal, props, state, t }),
|
package/upload-list/index.js
CHANGED
|
@@ -96,43 +96,43 @@ const getFileIcon = ({ constants }) => ({ type }) => {
|
|
|
96
96
|
let iconTypes = {
|
|
97
97
|
[EXCEL]: {
|
|
98
98
|
name: "icon-excel-type",
|
|
99
|
-
color: "#
|
|
99
|
+
color: "#09AA71"
|
|
100
100
|
},
|
|
101
101
|
[FILE]: {
|
|
102
102
|
name: "icon-file-type",
|
|
103
|
-
color: "#
|
|
103
|
+
color: "#09AA71"
|
|
104
104
|
},
|
|
105
105
|
[PDF]: {
|
|
106
106
|
name: "icon-pdf-type",
|
|
107
|
-
color: "#
|
|
107
|
+
color: "#E02128"
|
|
108
108
|
},
|
|
109
109
|
[PICTURE]: {
|
|
110
110
|
name: "icon-picture-type",
|
|
111
|
-
color: "#
|
|
111
|
+
color: "#5531EB"
|
|
112
112
|
},
|
|
113
113
|
[PPT]: {
|
|
114
114
|
name: "icon-ppt-type",
|
|
115
|
-
color: "#
|
|
115
|
+
color: "#E02128"
|
|
116
116
|
},
|
|
117
117
|
[TEXT]: {
|
|
118
118
|
name: "icon-text-type",
|
|
119
|
-
color: "#
|
|
119
|
+
color: "#2CB8C9"
|
|
120
120
|
},
|
|
121
121
|
[WORD]: {
|
|
122
122
|
name: "icon-word-type",
|
|
123
|
-
color: "#
|
|
123
|
+
color: "#0067D1"
|
|
124
124
|
},
|
|
125
125
|
[ZIP]: {
|
|
126
126
|
name: "icon-zip-type",
|
|
127
|
-
color: "#
|
|
127
|
+
color: "#2CB8C9"
|
|
128
128
|
},
|
|
129
129
|
[VIDEO]: {
|
|
130
130
|
name: "icon-video-type",
|
|
131
|
-
color: "#
|
|
131
|
+
color: "#0067D1"
|
|
132
132
|
},
|
|
133
133
|
[AUDIO]: {
|
|
134
134
|
name: "icon-audio",
|
|
135
|
-
color: "#
|
|
135
|
+
color: "#5531EB"
|
|
136
136
|
},
|
|
137
137
|
default: {
|
|
138
138
|
name: "icon-other-type",
|
|
@@ -153,8 +153,8 @@ const calcUploadListLiWidth = ({ vm, nextTick, props, constants }) => () => {
|
|
|
153
153
|
const { listType } = props;
|
|
154
154
|
const { LIST_TYPE } = constants;
|
|
155
155
|
nextTick(() => {
|
|
156
|
-
const uploadListEle = vm.$refs
|
|
157
|
-
const uploadListLiEle = vm.$refs
|
|
156
|
+
const uploadListEle = vm.$refs.uploadList;
|
|
157
|
+
const uploadListLiEle = vm.$refs.uploadListLi;
|
|
158
158
|
if (!uploadListEle || !(uploadListLiEle && uploadListLiEle[0]))
|
|
159
159
|
return;
|
|
160
160
|
if (listType === LIST_TYPE.TEXT) {
|
|
@@ -213,11 +213,11 @@ const handleTriggerClick = ({ state, props }) => ($event, type) => {
|
|
|
213
213
|
});
|
|
214
214
|
};
|
|
215
215
|
const mounted = ({ api, vm }) => () => {
|
|
216
|
-
const el = vm.$refs
|
|
216
|
+
const el = vm.$refs.uploadList;
|
|
217
217
|
el && addResizeListener(el, api.calcUploadListLiWidth);
|
|
218
218
|
};
|
|
219
219
|
const destroyed = ({ api, props, vm }) => () => {
|
|
220
|
-
removeResizeListener(vm.$refs
|
|
220
|
+
removeResizeListener(vm.$refs.uploadList, api.calcUploadListLiWidth);
|
|
221
221
|
props.files.forEach((file) => {
|
|
222
222
|
removePlayEventListener({ type: "ended", el: file.el }, file.playEvent);
|
|
223
223
|
delete file.playEvent;
|
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,7 +44,8 @@ const api = [
|
|
|
43
44
|
"reUpload",
|
|
44
45
|
"remove",
|
|
45
46
|
"handleTriggerClick",
|
|
46
|
-
"chooseFile"
|
|
47
|
+
"chooseFile",
|
|
48
|
+
"formatFileSize"
|
|
47
49
|
];
|
|
48
50
|
const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, computed }, { t, parent, mode, emit, service, vm, nextTick, designConfig }, { Modal }) => {
|
|
49
51
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -95,7 +97,8 @@ const renderless = (props, { reactive, onMounted, onUnmounted, watch, inject, co
|
|
|
95
97
|
handleTriggerClick: handleTriggerClick({ state, props }),
|
|
96
98
|
chooseFile: chooseFile({ state, constants }),
|
|
97
99
|
calcVisible: calcVisible({ props, constants, emit }),
|
|
98
|
-
getNotSuccessFiles: getNotSuccessFiles({ props, constants })
|
|
100
|
+
getNotSuccessFiles: getNotSuccessFiles({ props, constants }),
|
|
101
|
+
formatFileSize
|
|
99
102
|
});
|
|
100
103
|
props.listType === constants.LIST_TYPE.DRAG_SINGLE && watch(
|
|
101
104
|
() => 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,7 +79,7 @@ const request = {
|
|
|
78
79
|
const me = this;
|
|
79
80
|
const reqParamsSeq = me.getParams();
|
|
80
81
|
let reqLen = reqParamsSeq.length;
|
|
81
|
-
reqParamsSeq.
|
|
82
|
+
reqParamsSeq.forEach((params) => {
|
|
82
83
|
api.fetchW3Accounts(params).then((data) => {
|
|
83
84
|
me.setCache(data);
|
|
84
85
|
me.requests.slice().forEach((reqItem) => {
|
|
@@ -402,7 +403,7 @@ const visibleChange = ({ state, emit }) => (show) => {
|
|
|
402
403
|
emit("visible-change", show);
|
|
403
404
|
};
|
|
404
405
|
const initUser = ({ api, props, state }) => (value) => {
|
|
405
|
-
if (value === state.lastValue) {
|
|
406
|
+
if (value === state.lastValue && value !== null) {
|
|
406
407
|
return;
|
|
407
408
|
}
|
|
408
409
|
state.user = !props.multiple ? "" : [];
|
package/user-head/index.js
CHANGED
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) {
|