@opentinyvue/vue-design-aurora 2.26.0 → 2.28.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/index.d.ts +34 -0
- package/index.js +108 -1
- package/package.json +5 -5
- package/src/base-select/index.d.ts +35 -0
- package/src/select-wrapper/index.d.ts +35 -0
package/index.d.ts
CHANGED
|
@@ -237,6 +237,40 @@ declare const _default: {
|
|
|
237
237
|
computedTreeMaxHeight(): void;
|
|
238
238
|
};
|
|
239
239
|
};
|
|
240
|
+
BaseSelect: {
|
|
241
|
+
baseOpts: {
|
|
242
|
+
optionHeight: number;
|
|
243
|
+
limit: number;
|
|
244
|
+
};
|
|
245
|
+
icons: {
|
|
246
|
+
dropdownIcon: any;
|
|
247
|
+
};
|
|
248
|
+
state: {
|
|
249
|
+
sizeMap: {
|
|
250
|
+
default: number;
|
|
251
|
+
mini: number;
|
|
252
|
+
small: number;
|
|
253
|
+
medium: number;
|
|
254
|
+
};
|
|
255
|
+
spacingHeight: number;
|
|
256
|
+
initialInputHeight: number;
|
|
257
|
+
autoHideDownIcon: boolean;
|
|
258
|
+
delayBlur: boolean;
|
|
259
|
+
};
|
|
260
|
+
props: {
|
|
261
|
+
tagType: string;
|
|
262
|
+
stopPropagation: boolean;
|
|
263
|
+
};
|
|
264
|
+
renderless: (props: any, hooks: any, { emit }: {
|
|
265
|
+
emit: any;
|
|
266
|
+
}, api: any) => {
|
|
267
|
+
computedCollapseTagSize: () => string;
|
|
268
|
+
computedShowDropdownIcon: () => boolean;
|
|
269
|
+
toggleCheckAll: (filtered: any) => void;
|
|
270
|
+
computedShowTagText: () => any;
|
|
271
|
+
isTagClosable: (item: any) => boolean;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
240
274
|
};
|
|
241
275
|
};
|
|
242
276
|
export default _default;
|
package/index.js
CHANGED
|
@@ -396,6 +396,112 @@ var Popeditor = {
|
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
};
|
|
399
|
+
var BaseSelect = {
|
|
400
|
+
// 虚拟滚动的默认options不一致
|
|
401
|
+
baseOpts: {
|
|
402
|
+
optionHeight: 34,
|
|
403
|
+
limit: 20
|
|
404
|
+
},
|
|
405
|
+
icons: {
|
|
406
|
+
dropdownIcon: iconChevronDown()
|
|
407
|
+
},
|
|
408
|
+
state: {
|
|
409
|
+
sizeMap: {
|
|
410
|
+
default: 30,
|
|
411
|
+
mini: 24,
|
|
412
|
+
small: 36,
|
|
413
|
+
medium: 42
|
|
414
|
+
},
|
|
415
|
+
spacingHeight: 2,
|
|
416
|
+
initialInputHeight: 30,
|
|
417
|
+
// 显示清除等图标时,不隐藏下拉箭头时
|
|
418
|
+
autoHideDownIcon: false,
|
|
419
|
+
delayBlur: true
|
|
420
|
+
},
|
|
421
|
+
props: {
|
|
422
|
+
tagType: "info",
|
|
423
|
+
stopPropagation: true
|
|
424
|
+
},
|
|
425
|
+
renderless: function renderless9(props, hooks, _ref0, api) {
|
|
426
|
+
_ref0.emit;
|
|
427
|
+
var state = api.state;
|
|
428
|
+
return {
|
|
429
|
+
// 兼容不同主题输入框尺寸对应标签尺寸不一致
|
|
430
|
+
computedCollapseTagSize: function computedCollapseTagSize() {
|
|
431
|
+
var size = "small";
|
|
432
|
+
if (~["small", "mini"].indexOf(state.selectSize)) {
|
|
433
|
+
size = state.selectSize;
|
|
434
|
+
} else if (~["medium", "default"].indexOf(state.selectSize)) {
|
|
435
|
+
size = "small";
|
|
436
|
+
}
|
|
437
|
+
return size;
|
|
438
|
+
},
|
|
439
|
+
// 兼容显示清除图标时,是否同时显示下拉图标
|
|
440
|
+
computedShowDropdownIcon: function computedShowDropdownIcon() {
|
|
441
|
+
return !(props.remote && props.filterable && !props.remoteConfig.showIcon);
|
|
442
|
+
},
|
|
443
|
+
// aui 的勾选未处理disabled的选项,故此放这里。
|
|
444
|
+
toggleCheckAll: function toggleCheckAll(filtered) {
|
|
445
|
+
var getEnabledValues = function getEnabledValues2(options) {
|
|
446
|
+
var values = [];
|
|
447
|
+
for (var i = 0; i < options.length; i++) {
|
|
448
|
+
if (!options[i].state.disabled && !options[i].state.groupDisabled && options[i].state.visible) {
|
|
449
|
+
values.push(options[i].value);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return values;
|
|
453
|
+
};
|
|
454
|
+
var value;
|
|
455
|
+
var enabledValues = getEnabledValues(state.options);
|
|
456
|
+
if (filtered) {
|
|
457
|
+
if (state.filteredSelectCls === "check" || state.filteredSelectCls === "halfselect") {
|
|
458
|
+
value = Array.from(/* @__PURE__ */ new Set([].concat(state.modelValue, enabledValues)));
|
|
459
|
+
} else {
|
|
460
|
+
value = state.modelValue.filter(function(val) {
|
|
461
|
+
return !enabledValues.includes(val);
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
} else {
|
|
465
|
+
if (state.selectCls === "check") {
|
|
466
|
+
value = enabledValues;
|
|
467
|
+
} else if (state.selectCls === "halfselect") {
|
|
468
|
+
var unchecked = state.options.filter(function(item) {
|
|
469
|
+
return !item.state.disabled && item.state.selectCls === "check";
|
|
470
|
+
});
|
|
471
|
+
unchecked.length ? value = enabledValues : value = [];
|
|
472
|
+
} else if (state.selectCls === "checked-sur") {
|
|
473
|
+
value = [];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
var requiredValue = [];
|
|
477
|
+
if (props.multiple) {
|
|
478
|
+
state.options.forEach(function(opt) {
|
|
479
|
+
if (opt.required) requiredValue.push(opt.value);
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
if (Array.isArray(value)) {
|
|
483
|
+
value = requiredValue.concat(value.filter(function(val) {
|
|
484
|
+
return !requiredValue.find(function(requireVal) {
|
|
485
|
+
return requireVal === val;
|
|
486
|
+
});
|
|
487
|
+
}));
|
|
488
|
+
}
|
|
489
|
+
api.setSoftFocus();
|
|
490
|
+
state.isSilentBlur = true;
|
|
491
|
+
api.updateModelValue(value);
|
|
492
|
+
api.directEmitChange(value);
|
|
493
|
+
},
|
|
494
|
+
// aurora 禁用和只展示的时候都是tagText,默认主题是 isDisplayOnly 才显示tagText
|
|
495
|
+
computedShowTagText: function computedShowTagText() {
|
|
496
|
+
return state.isDisabled || state.isDisplayOnly;
|
|
497
|
+
},
|
|
498
|
+
// aurora 禁用已选项无效果,必选不显示关闭图标
|
|
499
|
+
isTagClosable: function isTagClosable(item) {
|
|
500
|
+
return !item.required;
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
};
|
|
399
505
|
var version = "2.undefined";
|
|
400
506
|
var index = {
|
|
401
507
|
name: "aurora",
|
|
@@ -429,7 +535,8 @@ var index = {
|
|
|
429
535
|
Pager,
|
|
430
536
|
Wizard,
|
|
431
537
|
DialogBox,
|
|
432
|
-
Popeditor
|
|
538
|
+
Popeditor,
|
|
539
|
+
BaseSelect
|
|
433
540
|
}
|
|
434
541
|
};
|
|
435
542
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentinyvue/vue-design-aurora",
|
|
3
|
-
"version": "2.26.0",
|
|
4
|
-
"main": "./index.js",
|
|
5
|
-
"sideEffects": false,
|
|
6
3
|
"type": "module",
|
|
4
|
+
"version": "2.28.0",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./index.js",
|
|
7
8
|
"dependencies": {
|
|
8
|
-
"@opentinyvue/vue-icon": "~2.
|
|
9
|
+
"@opentinyvue/vue-icon": "~2.28.0"
|
|
9
10
|
},
|
|
10
|
-
"license": "MIT",
|
|
11
11
|
"module": "./index.js",
|
|
12
12
|
"types": "index.d.ts"
|
|
13
13
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseOpts: {
|
|
3
|
+
optionHeight: number;
|
|
4
|
+
limit: number;
|
|
5
|
+
};
|
|
6
|
+
icons: {
|
|
7
|
+
dropdownIcon: any;
|
|
8
|
+
};
|
|
9
|
+
state: {
|
|
10
|
+
sizeMap: {
|
|
11
|
+
default: number;
|
|
12
|
+
mini: number;
|
|
13
|
+
small: number;
|
|
14
|
+
medium: number;
|
|
15
|
+
};
|
|
16
|
+
spacingHeight: number;
|
|
17
|
+
initialInputHeight: number;
|
|
18
|
+
autoHideDownIcon: boolean;
|
|
19
|
+
delayBlur: boolean;
|
|
20
|
+
};
|
|
21
|
+
props: {
|
|
22
|
+
tagType: string;
|
|
23
|
+
stopPropagation: boolean;
|
|
24
|
+
};
|
|
25
|
+
renderless: (props: any, hooks: any, { emit }: {
|
|
26
|
+
emit: any;
|
|
27
|
+
}, api: any) => {
|
|
28
|
+
computedCollapseTagSize: () => string;
|
|
29
|
+
computedShowDropdownIcon: () => boolean;
|
|
30
|
+
toggleCheckAll: (filtered: any) => void;
|
|
31
|
+
computedShowTagText: () => any;
|
|
32
|
+
isTagClosable: (item: any) => boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
baseOpts: {
|
|
3
|
+
optionHeight: number;
|
|
4
|
+
limit: number;
|
|
5
|
+
};
|
|
6
|
+
icons: {
|
|
7
|
+
dropdownIcon: any;
|
|
8
|
+
};
|
|
9
|
+
state: {
|
|
10
|
+
sizeMap: {
|
|
11
|
+
default: number;
|
|
12
|
+
mini: number;
|
|
13
|
+
small: number;
|
|
14
|
+
medium: number;
|
|
15
|
+
};
|
|
16
|
+
spacingHeight: number;
|
|
17
|
+
initialInputHeight: number;
|
|
18
|
+
autoHideDownIcon: boolean;
|
|
19
|
+
delayBlur: boolean;
|
|
20
|
+
};
|
|
21
|
+
props: {
|
|
22
|
+
tagType: string;
|
|
23
|
+
stopPropagation: boolean;
|
|
24
|
+
};
|
|
25
|
+
renderless: (props: any, hooks: any, { emit }: {
|
|
26
|
+
emit: any;
|
|
27
|
+
}, api: any) => {
|
|
28
|
+
computedCollapseTagSize: () => string;
|
|
29
|
+
computedShowDropdownIcon: () => boolean;
|
|
30
|
+
toggleCheckAll: (filtered: any) => void;
|
|
31
|
+
computedShowTagText: () => any;
|
|
32
|
+
isTagClosable: (item: any) => boolean;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|