zartui 2.1.13 → 2.1.15
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/es/hierarchy-select/index.js +65 -0
- package/es/index.js +1 -1
- package/es/media-picker/index.js +32 -3
- package/es/tabs/Title.js +5 -1
- package/lib/hierarchy-select/index.js +65 -0
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +32 -3
- package/lib/tabs/Title.js +5 -1
- package/lib/zart.js +103 -5
- package/lib/zart.min.js +2 -2
- package/package.json +1 -1
|
@@ -113,6 +113,71 @@ export default createComponent({
|
|
|
113
113
|
},
|
|
114
114
|
change: function change(item) {
|
|
115
115
|
this.$emit("change", item);
|
|
116
|
+
},
|
|
117
|
+
findNodeLayers: function findNodeLayers(root, id, path, result) {
|
|
118
|
+
for (var index = 0; index < root.length; index++) {
|
|
119
|
+
var _item$children;
|
|
120
|
+
var item = root[index];
|
|
121
|
+
path.push(item);
|
|
122
|
+
if (item.id === id) {
|
|
123
|
+
result.push.apply(result, path);
|
|
124
|
+
path.pop();
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
if ((_item$children = item.children) != null && _item$children.length) {
|
|
128
|
+
if (this.findNodeLayers(item.children, id, path, result)) {
|
|
129
|
+
return true;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
path.pop();
|
|
133
|
+
}
|
|
134
|
+
return false;
|
|
135
|
+
},
|
|
136
|
+
scrollBreadcrumbToLast: function scrollBreadcrumbToLast() {
|
|
137
|
+
this.$nextTick(function () {
|
|
138
|
+
var _document$querySelect;
|
|
139
|
+
(_document$querySelect = document.querySelector('.zt2-hierarchy-select-breadcrumb__item:last-child')) == null || _document$querySelect.scrollIntoViewIfNeeded();
|
|
140
|
+
});
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* 通过节点id,跳到节点所属层进行展示。只从当前已存在的数据中进行查询
|
|
144
|
+
* @param id 要跳到的层级里面的元素id
|
|
145
|
+
* @param force 是否不管其父节点是否选中,直接跳到这一层
|
|
146
|
+
* @returns
|
|
147
|
+
*/
|
|
148
|
+
toNodeLevel: function toNodeLevel(id, force) {
|
|
149
|
+
var _this2 = this;
|
|
150
|
+
var rootLevelData = this.dataList;
|
|
151
|
+
if (this.historyLayers.length) {
|
|
152
|
+
rootLevelData = this.historyLayers[0];
|
|
153
|
+
}
|
|
154
|
+
var nodeLayers = [];
|
|
155
|
+
this.findNodeLayers(rootLevelData, id, [], nodeLayers);
|
|
156
|
+
if (nodeLayers.length) {
|
|
157
|
+
if (!force && nodeLayers.slice(0, nodeLayers.length - 1).some(function (item) {
|
|
158
|
+
var _this2$$refs;
|
|
159
|
+
return (_this2$$refs = _this2.$refs) == null || (_this2$$refs = _this2$$refs.markList) == null ? void 0 : _this2$$refs.getChecked(item);
|
|
160
|
+
})) {
|
|
161
|
+
console.warn('当前指定节点存在上级节点被选中,无法展开到此层级');
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// 先进行初始化操作
|
|
166
|
+
this.breadcrumbData.splice(0);
|
|
167
|
+
this.historyLayers.splice(0, 1, rootLevelData);
|
|
168
|
+
nodeLayers.slice(0, nodeLayers.length - 1).forEach(function (item) {
|
|
169
|
+
_this2.breadcrumbData.push(item);
|
|
170
|
+
_this2.historyLayers.push(item.children);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// 取出最后一层的数据进行展示
|
|
174
|
+
this.dataList = this.historyLayers.splice(this.historyLayers.length - 1)[0];
|
|
175
|
+
this.scrollBreadcrumbToLast();
|
|
176
|
+
// this.$refs.markList.choosedValue = id;
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
console.warn('未找到当前id指定的节点');
|
|
180
|
+
return false;
|
|
116
181
|
}
|
|
117
182
|
},
|
|
118
183
|
render: function render(h) {
|
package/es/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import TextEllipsis from './text-ellipsis';
|
|
|
76
76
|
import Timeline from './timeline';
|
|
77
77
|
import Toast from './toast';
|
|
78
78
|
import Uploader from './uploader';
|
|
79
|
-
var version = '2.1.
|
|
79
|
+
var version = '2.1.15';
|
|
80
80
|
function install(Vue) {
|
|
81
81
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, SpeechRecognizer, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, TextEllipsis, Timeline, Toast, Uploader];
|
|
82
82
|
components.forEach(function (item) {
|
package/es/media-picker/index.js
CHANGED
|
@@ -139,6 +139,12 @@ export default createComponent({
|
|
|
139
139
|
type: String,
|
|
140
140
|
default: "icon"
|
|
141
141
|
},
|
|
142
|
+
pickerType: {
|
|
143
|
+
type: Array,
|
|
144
|
+
default: function _default() {
|
|
145
|
+
return [MediaAddType.PICK];
|
|
146
|
+
}
|
|
147
|
+
},
|
|
142
148
|
pickerOption: {
|
|
143
149
|
type: Object,
|
|
144
150
|
default: function _default() {
|
|
@@ -183,6 +189,7 @@ export default createComponent({
|
|
|
183
189
|
return {
|
|
184
190
|
videoOptionsVisible: false,
|
|
185
191
|
audioOptionsVisible: false,
|
|
192
|
+
photoOptionsVisible: false,
|
|
186
193
|
actionVisible: false,
|
|
187
194
|
mediaPlayerVisible: false,
|
|
188
195
|
mediaTypeToPlay: '',
|
|
@@ -221,6 +228,18 @@ export default createComponent({
|
|
|
221
228
|
_this.mediaPick(MediaType.AUDIO, MediaAddType.PICK);
|
|
222
229
|
}
|
|
223
230
|
}];
|
|
231
|
+
} else if (this.photoOptionsVisible) {
|
|
232
|
+
return [{
|
|
233
|
+
name: '拍照',
|
|
234
|
+
func: function func() {
|
|
235
|
+
_this.mediaPick(MediaType.PHOTO, MediaAddType.TAKE);
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
name: '从相册选择',
|
|
239
|
+
func: function func() {
|
|
240
|
+
_this.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
241
|
+
}
|
|
242
|
+
}];
|
|
224
243
|
}
|
|
225
244
|
}
|
|
226
245
|
},
|
|
@@ -830,6 +849,18 @@ export default createComponent({
|
|
|
830
849
|
"class": bem('label')
|
|
831
850
|
}, [label])]);
|
|
832
851
|
},
|
|
852
|
+
certificateClick: function certificateClick() {
|
|
853
|
+
if (this.pickerType.length === 1 && (this.pickerType.includes(MediaAddType.TAKE) || this.pickerType.includes(MediaAddType.PICK))) {
|
|
854
|
+
this.mediaPick(MediaType.PHOTO, this.pickerType[0]);
|
|
855
|
+
} else if (this.pickerType.length === 2 && this.pickerType.includes(MediaAddType.TAKE) && this.pickerType.includes(MediaAddType.PICK)) {
|
|
856
|
+
this.photoOptionsVisible = true;
|
|
857
|
+
this.actionVisible = true;
|
|
858
|
+
} else {
|
|
859
|
+
// 参数配置错误
|
|
860
|
+
this.photoOptionsVisible = true;
|
|
861
|
+
this.actionVisible = true;
|
|
862
|
+
}
|
|
863
|
+
},
|
|
833
864
|
renderCertificates: function renderCertificates() {
|
|
834
865
|
var _this9 = this;
|
|
835
866
|
var h = this.$createElement;
|
|
@@ -876,9 +907,7 @@ export default createComponent({
|
|
|
876
907
|
"src": this.pickerOption.buttonImage || CERTIFICATE_BUTTON
|
|
877
908
|
},
|
|
878
909
|
"on": {
|
|
879
|
-
"click":
|
|
880
|
-
_this9.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
881
|
-
}
|
|
910
|
+
"click": this.certificateClick
|
|
882
911
|
}
|
|
883
912
|
}), h("span", {
|
|
884
913
|
"class": bem('certificate-text')
|
package/es/tabs/Title.js
CHANGED
|
@@ -103,7 +103,11 @@ export default createComponent({
|
|
|
103
103
|
});
|
|
104
104
|
},
|
|
105
105
|
beforeDestroy: function beforeDestroy() {
|
|
106
|
-
|
|
106
|
+
if (this.mutationObserver) {
|
|
107
|
+
var _this$mutationObserve;
|
|
108
|
+
(_this$mutationObserve = this.mutationObserver) == null || _this$mutationObserve.disconnect();
|
|
109
|
+
this.mutationObserver = null; // 防止内存泄漏
|
|
110
|
+
}
|
|
107
111
|
},
|
|
108
112
|
render: function render() {
|
|
109
113
|
var h = arguments[0];
|
|
@@ -119,6 +119,71 @@ var _default2 = exports.default = createComponent({
|
|
|
119
119
|
},
|
|
120
120
|
change: function change(item) {
|
|
121
121
|
this.$emit("change", item);
|
|
122
|
+
},
|
|
123
|
+
findNodeLayers: function findNodeLayers(root, id, path, result) {
|
|
124
|
+
for (var index = 0; index < root.length; index++) {
|
|
125
|
+
var _item$children;
|
|
126
|
+
var item = root[index];
|
|
127
|
+
path.push(item);
|
|
128
|
+
if (item.id === id) {
|
|
129
|
+
result.push.apply(result, path);
|
|
130
|
+
path.pop();
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
if ((_item$children = item.children) != null && _item$children.length) {
|
|
134
|
+
if (this.findNodeLayers(item.children, id, path, result)) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
path.pop();
|
|
139
|
+
}
|
|
140
|
+
return false;
|
|
141
|
+
},
|
|
142
|
+
scrollBreadcrumbToLast: function scrollBreadcrumbToLast() {
|
|
143
|
+
this.$nextTick(function () {
|
|
144
|
+
var _document$querySelect;
|
|
145
|
+
(_document$querySelect = document.querySelector('.zt2-hierarchy-select-breadcrumb__item:last-child')) == null || _document$querySelect.scrollIntoViewIfNeeded();
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* 通过节点id,跳到节点所属层进行展示。只从当前已存在的数据中进行查询
|
|
150
|
+
* @param id 要跳到的层级里面的元素id
|
|
151
|
+
* @param force 是否不管其父节点是否选中,直接跳到这一层
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
toNodeLevel: function toNodeLevel(id, force) {
|
|
155
|
+
var _this2 = this;
|
|
156
|
+
var rootLevelData = this.dataList;
|
|
157
|
+
if (this.historyLayers.length) {
|
|
158
|
+
rootLevelData = this.historyLayers[0];
|
|
159
|
+
}
|
|
160
|
+
var nodeLayers = [];
|
|
161
|
+
this.findNodeLayers(rootLevelData, id, [], nodeLayers);
|
|
162
|
+
if (nodeLayers.length) {
|
|
163
|
+
if (!force && nodeLayers.slice(0, nodeLayers.length - 1).some(function (item) {
|
|
164
|
+
var _this2$$refs;
|
|
165
|
+
return (_this2$$refs = _this2.$refs) == null || (_this2$$refs = _this2$$refs.markList) == null ? void 0 : _this2$$refs.getChecked(item);
|
|
166
|
+
})) {
|
|
167
|
+
console.warn('当前指定节点存在上级节点被选中,无法展开到此层级');
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// 先进行初始化操作
|
|
172
|
+
this.breadcrumbData.splice(0);
|
|
173
|
+
this.historyLayers.splice(0, 1, rootLevelData);
|
|
174
|
+
nodeLayers.slice(0, nodeLayers.length - 1).forEach(function (item) {
|
|
175
|
+
_this2.breadcrumbData.push(item);
|
|
176
|
+
_this2.historyLayers.push(item.children);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
// 取出最后一层的数据进行展示
|
|
180
|
+
this.dataList = this.historyLayers.splice(this.historyLayers.length - 1)[0];
|
|
181
|
+
this.scrollBreadcrumbToLast();
|
|
182
|
+
// this.$refs.markList.choosedValue = id;
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
console.warn('未找到当前id指定的节点');
|
|
186
|
+
return false;
|
|
122
187
|
}
|
|
123
188
|
},
|
|
124
189
|
render: function render(h) {
|
package/lib/index.js
CHANGED
|
@@ -161,7 +161,7 @@ var _toast = _interopRequireDefault(require("./toast"));
|
|
|
161
161
|
exports.Toast = _toast.default;
|
|
162
162
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
163
163
|
exports.Uploader = _uploader.default;
|
|
164
|
-
var version = exports.version = '2.1.
|
|
164
|
+
var version = exports.version = '2.1.15';
|
|
165
165
|
function install(Vue) {
|
|
166
166
|
var components = [_actionSheet.default, _area.default, _avatar.default, _backTop.default, _badge.default, _button.default, _calendar.default, _cascader.default, _cell.default, _cellGroup.default, _checkbox.default, _checkboxGroup.default, _col.default, _collapse.default, _collapseItem.default, _countDown.default, _datetimePicker.default, _dialog.default, _divider.default, _dropdownItem.default, _dropdownMenu.default, _empty.default, _field.default, _foldDialog.default, _form.default, _grid.default, _gridItem.default, _hierarchySelect.default, _icon.default, _image.default, _imagePreview.default, _indexAnchor.default, _indexBar.default, _info.default, _lazyload.default, _list.default, _loading.default, _locale.default, _mediaPicker.default, _mediaPlayer.default, _multiplePicker.default, _navBar.default, _noticeBar.default, _numberKeyboard.default, _overlay.default, _passwordInput.default, _picker.default, _popover.default, _popup.default, _pullRefresh.default, _radio.default, _radioGroup.default, _rate.default, _row.default, _search.default, _signature.default, _skeleton.default, _slider.default, _speechRecognizer.default, _step.default, _stepper.default, _steps.default, _sticky.default, _swipe.default, _swipeCell.default, _swipeItem.default, _switch.default, _switchCell.default, _tab.default, _tabbar.default, _tabbarItem.default, _table.default, _tabs.default, _tag.default, _textEllipsis.default, _timeline.default, _toast.default, _uploader.default];
|
|
167
167
|
components.forEach(function (item) {
|
|
@@ -145,6 +145,12 @@ var _default2 = exports.default = createComponent({
|
|
|
145
145
|
type: String,
|
|
146
146
|
default: "icon"
|
|
147
147
|
},
|
|
148
|
+
pickerType: {
|
|
149
|
+
type: Array,
|
|
150
|
+
default: function _default() {
|
|
151
|
+
return [_type.MediaAddType.PICK];
|
|
152
|
+
}
|
|
153
|
+
},
|
|
148
154
|
pickerOption: {
|
|
149
155
|
type: Object,
|
|
150
156
|
default: function _default() {
|
|
@@ -189,6 +195,7 @@ var _default2 = exports.default = createComponent({
|
|
|
189
195
|
return {
|
|
190
196
|
videoOptionsVisible: false,
|
|
191
197
|
audioOptionsVisible: false,
|
|
198
|
+
photoOptionsVisible: false,
|
|
192
199
|
actionVisible: false,
|
|
193
200
|
mediaPlayerVisible: false,
|
|
194
201
|
mediaTypeToPlay: '',
|
|
@@ -227,6 +234,18 @@ var _default2 = exports.default = createComponent({
|
|
|
227
234
|
_this.mediaPick(_type.MediaType.AUDIO, _type.MediaAddType.PICK);
|
|
228
235
|
}
|
|
229
236
|
}];
|
|
237
|
+
} else if (this.photoOptionsVisible) {
|
|
238
|
+
return [{
|
|
239
|
+
name: '拍照',
|
|
240
|
+
func: function func() {
|
|
241
|
+
_this.mediaPick(_type.MediaType.PHOTO, _type.MediaAddType.TAKE);
|
|
242
|
+
}
|
|
243
|
+
}, {
|
|
244
|
+
name: '从相册选择',
|
|
245
|
+
func: function func() {
|
|
246
|
+
_this.mediaPick(_type.MediaType.PHOTO, _type.MediaAddType.PICK);
|
|
247
|
+
}
|
|
248
|
+
}];
|
|
230
249
|
}
|
|
231
250
|
}
|
|
232
251
|
},
|
|
@@ -836,6 +855,18 @@ var _default2 = exports.default = createComponent({
|
|
|
836
855
|
"class": bem('label')
|
|
837
856
|
}, [label])]);
|
|
838
857
|
},
|
|
858
|
+
certificateClick: function certificateClick() {
|
|
859
|
+
if (this.pickerType.length === 1 && (this.pickerType.includes(_type.MediaAddType.TAKE) || this.pickerType.includes(_type.MediaAddType.PICK))) {
|
|
860
|
+
this.mediaPick(_type.MediaType.PHOTO, this.pickerType[0]);
|
|
861
|
+
} else if (this.pickerType.length === 2 && this.pickerType.includes(_type.MediaAddType.TAKE) && this.pickerType.includes(_type.MediaAddType.PICK)) {
|
|
862
|
+
this.photoOptionsVisible = true;
|
|
863
|
+
this.actionVisible = true;
|
|
864
|
+
} else {
|
|
865
|
+
// 参数配置错误
|
|
866
|
+
this.photoOptionsVisible = true;
|
|
867
|
+
this.actionVisible = true;
|
|
868
|
+
}
|
|
869
|
+
},
|
|
839
870
|
renderCertificates: function renderCertificates() {
|
|
840
871
|
var _this9 = this;
|
|
841
872
|
var h = this.$createElement;
|
|
@@ -882,9 +913,7 @@ var _default2 = exports.default = createComponent({
|
|
|
882
913
|
"src": this.pickerOption.buttonImage || _Img.CERTIFICATE_BUTTON
|
|
883
914
|
},
|
|
884
915
|
"on": {
|
|
885
|
-
"click":
|
|
886
|
-
_this9.mediaPick(_type.MediaType.PHOTO, _type.MediaAddType.PICK);
|
|
887
|
-
}
|
|
916
|
+
"click": this.certificateClick
|
|
888
917
|
}
|
|
889
918
|
}), h("span", {
|
|
890
919
|
"class": bem('certificate-text')
|
package/lib/tabs/Title.js
CHANGED
|
@@ -108,7 +108,11 @@ var _default = exports.default = createComponent({
|
|
|
108
108
|
});
|
|
109
109
|
},
|
|
110
110
|
beforeDestroy: function beforeDestroy() {
|
|
111
|
-
|
|
111
|
+
if (this.mutationObserver) {
|
|
112
|
+
var _this$mutationObserve;
|
|
113
|
+
(_this$mutationObserve = this.mutationObserver) == null || _this$mutationObserve.disconnect();
|
|
114
|
+
this.mutationObserver = null; // 防止内存泄漏
|
|
115
|
+
}
|
|
112
116
|
},
|
|
113
117
|
render: function render() {
|
|
114
118
|
var h = arguments[0];
|
package/lib/zart.js
CHANGED
|
@@ -6526,7 +6526,11 @@ var Title_createNamespace = Object(utils["b" /* createNamespace */])('tab'),
|
|
|
6526
6526
|
});
|
|
6527
6527
|
},
|
|
6528
6528
|
beforeDestroy: function beforeDestroy() {
|
|
6529
|
-
|
|
6529
|
+
if (this.mutationObserver) {
|
|
6530
|
+
var _this$mutationObserve;
|
|
6531
|
+
(_this$mutationObserve = this.mutationObserver) == null || _this$mutationObserve.disconnect();
|
|
6532
|
+
this.mutationObserver = null; // 防止内存泄漏
|
|
6533
|
+
}
|
|
6530
6534
|
},
|
|
6531
6535
|
render: function render() {
|
|
6532
6536
|
var h = arguments[0];
|
|
@@ -14585,6 +14589,71 @@ function hierarchy_select_pickSlots(instance, keys) {
|
|
|
14585
14589
|
},
|
|
14586
14590
|
change: function change(item) {
|
|
14587
14591
|
this.$emit("change", item);
|
|
14592
|
+
},
|
|
14593
|
+
findNodeLayers: function findNodeLayers(root, id, path, result) {
|
|
14594
|
+
for (var index = 0; index < root.length; index++) {
|
|
14595
|
+
var _item$children;
|
|
14596
|
+
var item = root[index];
|
|
14597
|
+
path.push(item);
|
|
14598
|
+
if (item.id === id) {
|
|
14599
|
+
result.push.apply(result, path);
|
|
14600
|
+
path.pop();
|
|
14601
|
+
return true;
|
|
14602
|
+
}
|
|
14603
|
+
if ((_item$children = item.children) != null && _item$children.length) {
|
|
14604
|
+
if (this.findNodeLayers(item.children, id, path, result)) {
|
|
14605
|
+
return true;
|
|
14606
|
+
}
|
|
14607
|
+
}
|
|
14608
|
+
path.pop();
|
|
14609
|
+
}
|
|
14610
|
+
return false;
|
|
14611
|
+
},
|
|
14612
|
+
scrollBreadcrumbToLast: function scrollBreadcrumbToLast() {
|
|
14613
|
+
this.$nextTick(function () {
|
|
14614
|
+
var _document$querySelect;
|
|
14615
|
+
(_document$querySelect = document.querySelector('.zt2-hierarchy-select-breadcrumb__item:last-child')) == null || _document$querySelect.scrollIntoViewIfNeeded();
|
|
14616
|
+
});
|
|
14617
|
+
},
|
|
14618
|
+
/**
|
|
14619
|
+
* 通过节点id,跳到节点所属层进行展示。只从当前已存在的数据中进行查询
|
|
14620
|
+
* @param id 要跳到的层级里面的元素id
|
|
14621
|
+
* @param force 是否不管其父节点是否选中,直接跳到这一层
|
|
14622
|
+
* @returns
|
|
14623
|
+
*/
|
|
14624
|
+
toNodeLevel: function toNodeLevel(id, force) {
|
|
14625
|
+
var _this2 = this;
|
|
14626
|
+
var rootLevelData = this.dataList;
|
|
14627
|
+
if (this.historyLayers.length) {
|
|
14628
|
+
rootLevelData = this.historyLayers[0];
|
|
14629
|
+
}
|
|
14630
|
+
var nodeLayers = [];
|
|
14631
|
+
this.findNodeLayers(rootLevelData, id, [], nodeLayers);
|
|
14632
|
+
if (nodeLayers.length) {
|
|
14633
|
+
if (!force && nodeLayers.slice(0, nodeLayers.length - 1).some(function (item) {
|
|
14634
|
+
var _this2$$refs;
|
|
14635
|
+
return (_this2$$refs = _this2.$refs) == null || (_this2$$refs = _this2$$refs.markList) == null ? void 0 : _this2$$refs.getChecked(item);
|
|
14636
|
+
})) {
|
|
14637
|
+
console.warn('当前指定节点存在上级节点被选中,无法展开到此层级');
|
|
14638
|
+
return false;
|
|
14639
|
+
}
|
|
14640
|
+
|
|
14641
|
+
// 先进行初始化操作
|
|
14642
|
+
this.breadcrumbData.splice(0);
|
|
14643
|
+
this.historyLayers.splice(0, 1, rootLevelData);
|
|
14644
|
+
nodeLayers.slice(0, nodeLayers.length - 1).forEach(function (item) {
|
|
14645
|
+
_this2.breadcrumbData.push(item);
|
|
14646
|
+
_this2.historyLayers.push(item.children);
|
|
14647
|
+
});
|
|
14648
|
+
|
|
14649
|
+
// 取出最后一层的数据进行展示
|
|
14650
|
+
this.dataList = this.historyLayers.splice(this.historyLayers.length - 1)[0];
|
|
14651
|
+
this.scrollBreadcrumbToLast();
|
|
14652
|
+
// this.$refs.markList.choosedValue = id;
|
|
14653
|
+
return true;
|
|
14654
|
+
}
|
|
14655
|
+
console.warn('未找到当前id指定的节点');
|
|
14656
|
+
return false;
|
|
14588
14657
|
}
|
|
14589
14658
|
},
|
|
14590
14659
|
render: function render(h) {
|
|
@@ -21208,6 +21277,12 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
21208
21277
|
type: String,
|
|
21209
21278
|
default: "icon"
|
|
21210
21279
|
},
|
|
21280
|
+
pickerType: {
|
|
21281
|
+
type: Array,
|
|
21282
|
+
default: function _default() {
|
|
21283
|
+
return [MediaAddType.PICK];
|
|
21284
|
+
}
|
|
21285
|
+
},
|
|
21211
21286
|
pickerOption: {
|
|
21212
21287
|
type: Object,
|
|
21213
21288
|
default: function _default() {
|
|
@@ -21252,6 +21327,7 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
21252
21327
|
return {
|
|
21253
21328
|
videoOptionsVisible: false,
|
|
21254
21329
|
audioOptionsVisible: false,
|
|
21330
|
+
photoOptionsVisible: false,
|
|
21255
21331
|
actionVisible: false,
|
|
21256
21332
|
mediaPlayerVisible: false,
|
|
21257
21333
|
mediaTypeToPlay: '',
|
|
@@ -21290,6 +21366,18 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
21290
21366
|
_this.mediaPick(MediaType.AUDIO, MediaAddType.PICK);
|
|
21291
21367
|
}
|
|
21292
21368
|
}];
|
|
21369
|
+
} else if (this.photoOptionsVisible) {
|
|
21370
|
+
return [{
|
|
21371
|
+
name: '拍照',
|
|
21372
|
+
func: function func() {
|
|
21373
|
+
_this.mediaPick(MediaType.PHOTO, MediaAddType.TAKE);
|
|
21374
|
+
}
|
|
21375
|
+
}, {
|
|
21376
|
+
name: '从相册选择',
|
|
21377
|
+
func: function func() {
|
|
21378
|
+
_this.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
21379
|
+
}
|
|
21380
|
+
}];
|
|
21293
21381
|
}
|
|
21294
21382
|
}
|
|
21295
21383
|
},
|
|
@@ -21899,6 +21987,18 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
21899
21987
|
"class": media_picker_bem('label')
|
|
21900
21988
|
}, [label])]);
|
|
21901
21989
|
},
|
|
21990
|
+
certificateClick: function certificateClick() {
|
|
21991
|
+
if (this.pickerType.length === 1 && (this.pickerType.includes(MediaAddType.TAKE) || this.pickerType.includes(MediaAddType.PICK))) {
|
|
21992
|
+
this.mediaPick(MediaType.PHOTO, this.pickerType[0]);
|
|
21993
|
+
} else if (this.pickerType.length === 2 && this.pickerType.includes(MediaAddType.TAKE) && this.pickerType.includes(MediaAddType.PICK)) {
|
|
21994
|
+
this.photoOptionsVisible = true;
|
|
21995
|
+
this.actionVisible = true;
|
|
21996
|
+
} else {
|
|
21997
|
+
// 参数配置错误
|
|
21998
|
+
this.photoOptionsVisible = true;
|
|
21999
|
+
this.actionVisible = true;
|
|
22000
|
+
}
|
|
22001
|
+
},
|
|
21902
22002
|
renderCertificates: function renderCertificates() {
|
|
21903
22003
|
var _this9 = this;
|
|
21904
22004
|
var h = this.$createElement;
|
|
@@ -21945,9 +22045,7 @@ var media_picker_createNamespace = Object(utils["b" /* createNamespace */])('med
|
|
|
21945
22045
|
"src": this.pickerOption.buttonImage || CERTIFICATE_BUTTON
|
|
21946
22046
|
},
|
|
21947
22047
|
"on": {
|
|
21948
|
-
"click":
|
|
21949
|
-
_this9.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
21950
|
-
}
|
|
22048
|
+
"click": this.certificateClick
|
|
21951
22049
|
}
|
|
21952
22050
|
}), h("span", {
|
|
21953
22051
|
"class": media_picker_bem('certificate-text')
|
|
@@ -31485,7 +31583,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
|
|
|
31485
31583
|
|
|
31486
31584
|
|
|
31487
31585
|
|
|
31488
|
-
var version = '2.1.
|
|
31586
|
+
var version = '2.1.15';
|
|
31489
31587
|
function install(Vue) {
|
|
31490
31588
|
var components = [action_sheet, es_area, avatar, back_top, badge, es_button, calendar, cascader, cell, cell_group, es_checkbox, checkbox_group, col, collapse, collapse_item, count_down, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, fold_dialog, es_form, grid, grid_item, hierarchy_select, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, lazyload, es_list, es_loading, locale["a" /* default */], media_picker, media_player, multiple_picker, nav_bar, notice_bar, number_keyboard, es_overlay, password_input, es_picker, popover, popup, pull_refresh, es_radio, radio_group, rate, row, search, signature, skeleton, slider, speech_recognizer, es_step, stepper, steps, es_sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, tabs, es_tag, text_ellipsis, timeline, es_toast, uploader];
|
|
31491
31589
|
components.forEach(function (item) {
|