vxe-pc-ui 3.4.1 → 3.4.2
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/color-picker/src/color-picker.js +2 -2
- package/es/date-picker/src/date-picker.js +1 -1
- package/es/form/src/form.js +1 -1
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +1 -1
- package/es/input/src/input.js +4 -4
- package/es/number-input/src/number-input.js +3 -3
- package/es/pulldown/src/pulldown.js +1 -1
- package/es/select/src/select.js +53 -10
- package/es/select/style.css +17 -0
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +1 -1
- package/es/tree-select/src/tree-select.js +1 -1
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-select/style.css +17 -0
- package/es/vxe-select/style.min.css +1 -1
- package/lib/color-picker/src/color-picker.js +2 -2
- package/lib/color-picker/src/color-picker.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +1 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/form/src/form.js +1 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +1 -1
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +66 -27
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +4 -4
- package/lib/input/src/input.min.js +1 -1
- package/lib/number-input/src/number-input.js +3 -3
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +1 -1
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +48 -10
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +17 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +1 -1
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +1 -1
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +2 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-select/style/style.css +17 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/color-picker/src/color-picker.ts +2 -2
- package/packages/date-picker/src/date-picker.ts +1 -1
- package/packages/form/src/form.ts +1 -1
- package/packages/icon-picker/src/icon-picker.ts +1 -1
- package/packages/input/src/input.ts +4 -4
- package/packages/number-input/src/number-input.ts +3 -3
- package/packages/pulldown/src/pulldown.ts +1 -1
- package/packages/select/src/select.ts +53 -10
- package/packages/table-select/src/table-select.ts +1 -1
- package/packages/tree-select/src/tree-select.ts +1 -1
- package/packages/ui/index.ts +1 -0
- package/styles/components/select.scss +19 -0
- package/types/components/select.d.ts +3 -0
- package/types/ui/global-icon.d.ts +1 -0
- /package/es/icon/{iconfont.1741079786101.ttf → iconfont.1741176247715.ttf} +0 -0
- /package/es/icon/{iconfont.1741079786101.woff → iconfont.1741176247715.woff} +0 -0
- /package/es/icon/{iconfont.1741079786101.woff2 → iconfont.1741176247715.woff2} +0 -0
- /package/es/{iconfont.1741079786101.ttf → iconfont.1741176247715.ttf} +0 -0
- /package/es/{iconfont.1741079786101.woff → iconfont.1741176247715.woff} +0 -0
- /package/es/{iconfont.1741079786101.woff2 → iconfont.1741176247715.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1741079786101.ttf → iconfont.1741176247715.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1741079786101.woff → iconfont.1741176247715.woff} +0 -0
- /package/lib/icon/style/{iconfont.1741079786101.woff2 → iconfont.1741176247715.woff2} +0 -0
- /package/lib/{iconfont.1741079786101.ttf → iconfont.1741176247715.ttf} +0 -0
- /package/lib/{iconfont.1741079786101.woff → iconfont.1741176247715.woff} +0 -0
- /package/lib/{iconfont.1741079786101.woff2 → iconfont.1741176247715.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -12854,14 +12854,14 @@ var defineVxeComponent = function defineVxeComponent(options) {
|
|
|
12854
12854
|
};
|
|
12855
12855
|
;// CONCATENATED MODULE: ./packages/ui/src/log.ts
|
|
12856
12856
|
|
|
12857
|
-
var log_version = "ui v".concat("3.4.
|
|
12857
|
+
var log_version = "ui v".concat("3.4.2");
|
|
12858
12858
|
var warnLog = log.create('warn', log_version);
|
|
12859
12859
|
var errLog = log.create('error', log_version);
|
|
12860
12860
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
12861
12861
|
|
|
12862
12862
|
|
|
12863
12863
|
|
|
12864
|
-
var ui_version = "3.4.
|
|
12864
|
+
var ui_version = "3.4.2";
|
|
12865
12865
|
index_esm_VxeUI.uiVersion = ui_version;
|
|
12866
12866
|
index_esm_VxeUI.dynamicApp = dynamicApp;
|
|
12867
12867
|
function config(options) {
|
|
@@ -13219,6 +13219,7 @@ setIcon({
|
|
|
13219
13219
|
SELECT_LOADED: iconPrefix + 'spinner roll',
|
|
13220
13220
|
SELECT_OPEN: iconPrefix + 'caret-down rotate180',
|
|
13221
13221
|
SELECT_CLOSE: iconPrefix + 'caret-down',
|
|
13222
|
+
ADD_OPTION: iconPrefix + 'add',
|
|
13222
13223
|
// icon-picker
|
|
13223
13224
|
ICON_PICKER_OPEN: iconPrefix + 'caret-down rotate180',
|
|
13224
13225
|
ICON_PICKER_CLOSE: iconPrefix + 'caret-down',
|
|
@@ -20683,7 +20684,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
20683
20684
|
var internalData = $xeInput.internalData;
|
|
20684
20685
|
return new Promise(function (resolve) {
|
|
20685
20686
|
reactData.visiblePanel = false;
|
|
20686
|
-
internalData.hpTimeout =
|
|
20687
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
20687
20688
|
reactData.isAniVisible = false;
|
|
20688
20689
|
resolve();
|
|
20689
20690
|
}, 350);
|
|
@@ -21031,7 +21032,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
21031
21032
|
numberDownNextEvent: function numberDownNextEvent(evnt) {
|
|
21032
21033
|
var $xeInput = this;
|
|
21033
21034
|
var internalData = $xeInput.internalData;
|
|
21034
|
-
internalData.dnTimeout =
|
|
21035
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
21035
21036
|
$xeInput.numberNextEvent(evnt);
|
|
21036
21037
|
$xeInput.numberDownNextEvent(evnt);
|
|
21037
21038
|
}, 60);
|
|
@@ -21107,7 +21108,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
21107
21108
|
numberDownPrevEvent: function numberDownPrevEvent(evnt) {
|
|
21108
21109
|
var $xeInput = this;
|
|
21109
21110
|
var internalData = $xeInput.internalData;
|
|
21110
|
-
internalData.dnTimeout =
|
|
21111
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
21111
21112
|
$xeInput.numberPrevEvent(evnt);
|
|
21112
21113
|
$xeInput.numberDownPrevEvent(evnt);
|
|
21113
21114
|
}, 60);
|
|
@@ -21123,7 +21124,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
21123
21124
|
} else {
|
|
21124
21125
|
$xeInput.numberNextEvent(evnt);
|
|
21125
21126
|
}
|
|
21126
|
-
internalData.dnTimeout =
|
|
21127
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
21127
21128
|
if (isPrevNumber) {
|
|
21128
21129
|
$xeInput.numberDownPrevEvent(evnt);
|
|
21129
21130
|
} else {
|
|
@@ -22642,7 +22643,7 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
22642
22643
|
|
|
22643
22644
|
|
|
22644
22645
|
|
|
22645
|
-
var WinEyeDropper = window.EyeDropper;
|
|
22646
|
+
var WinEyeDropper = typeof window !== 'undefined' ? window.EyeDropper : null;
|
|
22646
22647
|
/* harmony default export */ var color_picker = (/* define-vxe-component start */defineVxeComponent({
|
|
22647
22648
|
name: 'VxeColorPicker',
|
|
22648
22649
|
mixins: [globalMixins.sizeMixin],
|
|
@@ -23051,7 +23052,7 @@ var WinEyeDropper = window.EyeDropper;
|
|
|
23051
23052
|
var reactData = $xeColorPicker.reactData;
|
|
23052
23053
|
var internalData = $xeColorPicker.internalData;
|
|
23053
23054
|
reactData.visiblePanel = false;
|
|
23054
|
-
internalData.hpTimeout =
|
|
23055
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
23055
23056
|
reactData.isAniVisible = false;
|
|
23056
23057
|
}, 350);
|
|
23057
23058
|
},
|
|
@@ -24993,7 +24994,7 @@ var Countdown = VxeCountdown;
|
|
|
24993
24994
|
var internalData = $xeDatePicker.internalData;
|
|
24994
24995
|
return new Promise(function (resolve) {
|
|
24995
24996
|
reactData.visiblePanel = false;
|
|
24996
|
-
internalData.hpTimeout =
|
|
24997
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
24997
24998
|
reactData.isAniVisible = false;
|
|
24998
24999
|
resolve();
|
|
24999
25000
|
}, 350);
|
|
@@ -29004,7 +29005,7 @@ var validErrorRuleValue = function validErrorRuleValue(rule, val) {
|
|
|
29004
29005
|
}
|
|
29005
29006
|
}).catch(function () {
|
|
29006
29007
|
return new Promise(function (resolve) {
|
|
29007
|
-
internalData.meTimeout =
|
|
29008
|
+
internalData.meTimeout = setTimeout(function () {
|
|
29008
29009
|
itemList.forEach(function (item) {
|
|
29009
29010
|
if (item.errRule) {
|
|
29010
29011
|
item.showError = true;
|
|
@@ -30618,7 +30619,7 @@ var Icon = VxeIcon;
|
|
|
30618
30619
|
var reactData = $xeIconPicker.reactData;
|
|
30619
30620
|
var internalData = $xeIconPicker.internalData;
|
|
30620
30621
|
reactData.visiblePanel = false;
|
|
30621
|
-
internalData.hpTimeout =
|
|
30622
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
30622
30623
|
reactData.isAniVisible = false;
|
|
30623
30624
|
}, 350);
|
|
30624
30625
|
},
|
|
@@ -36206,7 +36207,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
36206
36207
|
numberDownNextEvent: function numberDownNextEvent(evnt) {
|
|
36207
36208
|
var $xeNumberInput = this;
|
|
36208
36209
|
var internalData = $xeNumberInput.internalData;
|
|
36209
|
-
internalData.dnTimeout =
|
|
36210
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
36210
36211
|
$xeNumberInput.numberNextEvent(evnt);
|
|
36211
36212
|
$xeNumberInput.numberDownNextEvent(evnt);
|
|
36212
36213
|
}, 60);
|
|
@@ -36280,7 +36281,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
36280
36281
|
numberDownPrevEvent: function numberDownPrevEvent(evnt) {
|
|
36281
36282
|
var $xeNumberInput = this;
|
|
36282
36283
|
var internalData = $xeNumberInput.internalData;
|
|
36283
|
-
internalData.dnTimeout =
|
|
36284
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
36284
36285
|
$xeNumberInput.numberPrevEvent(evnt);
|
|
36285
36286
|
$xeNumberInput.numberDownPrevEvent(evnt);
|
|
36286
36287
|
}, 60);
|
|
@@ -36296,7 +36297,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
36296
36297
|
} else {
|
|
36297
36298
|
$xeNumberInput.numberNextEvent(evnt);
|
|
36298
36299
|
}
|
|
36299
|
-
internalData.dnTimeout =
|
|
36300
|
+
internalData.dnTimeout = setTimeout(function () {
|
|
36300
36301
|
if (isPrevNumber) {
|
|
36301
36302
|
$xeNumberInput.numberDownPrevEvent(evnt);
|
|
36302
36303
|
} else {
|
|
@@ -36938,6 +36939,12 @@ function getOptUniqueId() {
|
|
|
36938
36939
|
}
|
|
36939
36940
|
},
|
|
36940
36941
|
prefixIcon: String,
|
|
36942
|
+
allowCreate: {
|
|
36943
|
+
type: Boolean,
|
|
36944
|
+
default: function _default() {
|
|
36945
|
+
return getConfig().select.allowCreate;
|
|
36946
|
+
}
|
|
36947
|
+
},
|
|
36941
36948
|
placement: String,
|
|
36942
36949
|
options: Array,
|
|
36943
36950
|
optionProps: Object,
|
|
@@ -37025,6 +37032,7 @@ function getOptUniqueId() {
|
|
|
37025
37032
|
var internalData = {
|
|
37026
37033
|
synchData: [],
|
|
37027
37034
|
fullData: [],
|
|
37035
|
+
optAddMaps: {},
|
|
37028
37036
|
optGroupKeyMaps: {},
|
|
37029
37037
|
optFullValMaps: {},
|
|
37030
37038
|
remoteValMaps: {},
|
|
@@ -37574,7 +37582,7 @@ function getOptUniqueId() {
|
|
|
37574
37582
|
reactData.searchValue = '';
|
|
37575
37583
|
reactData.searchLoading = false;
|
|
37576
37584
|
reactData.visiblePanel = false;
|
|
37577
|
-
internalData.hpTimeout =
|
|
37585
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
37578
37586
|
reactData.isAniVisible = false;
|
|
37579
37587
|
}, 350);
|
|
37580
37588
|
},
|
|
@@ -37800,7 +37808,7 @@ function getOptUniqueId() {
|
|
|
37800
37808
|
$xeSelect.showOptionPanel();
|
|
37801
37809
|
setTimeout(function () {
|
|
37802
37810
|
reactData.triggerFocusPanel = false;
|
|
37803
|
-
},
|
|
37811
|
+
}, 500);
|
|
37804
37812
|
}
|
|
37805
37813
|
}
|
|
37806
37814
|
$xeSelect.dispatchEvent('focus', {}, evnt);
|
|
@@ -37898,12 +37906,29 @@ function getOptUniqueId() {
|
|
|
37898
37906
|
},
|
|
37899
37907
|
handleData: function handleData() {
|
|
37900
37908
|
var $xeSelect = this;
|
|
37909
|
+
var props = $xeSelect;
|
|
37901
37910
|
var reactData = $xeSelect.reactData;
|
|
37902
37911
|
var internalData = $xeSelect.internalData;
|
|
37912
|
+
var filterable = props.filterable,
|
|
37913
|
+
allowCreate = props.allowCreate;
|
|
37903
37914
|
var scrollYLoad = reactData.scrollYLoad,
|
|
37904
|
-
afterVisibleList = reactData.afterVisibleList
|
|
37905
|
-
|
|
37906
|
-
|
|
37915
|
+
afterVisibleList = reactData.afterVisibleList,
|
|
37916
|
+
searchValue = reactData.searchValue;
|
|
37917
|
+
var optAddMaps = internalData.optAddMaps,
|
|
37918
|
+
scrollYStore = internalData.scrollYStore;
|
|
37919
|
+
var labelField = $xeSelect.computeLabelField;
|
|
37920
|
+
var valueField = $xeSelect.computeValueField;
|
|
37921
|
+
var restList = scrollYLoad ? afterVisibleList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : afterVisibleList.slice(0);
|
|
37922
|
+
if (filterable && allowCreate && searchValue) {
|
|
37923
|
+
if (!restList.some(function (option) {
|
|
37924
|
+
return option[labelField] === searchValue;
|
|
37925
|
+
})) {
|
|
37926
|
+
var addItem = optAddMaps[searchValue] || _defineProperty(_defineProperty(_defineProperty({}, $xeSelect.getOptKey(), searchValue), labelField, searchValue), valueField, searchValue);
|
|
37927
|
+
optAddMaps[searchValue] = addItem;
|
|
37928
|
+
restList.unshift(addItem);
|
|
37929
|
+
}
|
|
37930
|
+
}
|
|
37931
|
+
reactData.optList = restList;
|
|
37907
37932
|
return $xeSelect.$nextTick();
|
|
37908
37933
|
},
|
|
37909
37934
|
updateYData: function updateYData() {
|
|
@@ -38174,9 +38199,12 @@ function getOptUniqueId() {
|
|
|
38174
38199
|
var props = $xeSelect;
|
|
38175
38200
|
var slots = $xeSelect.$scopedSlots;
|
|
38176
38201
|
var reactData = $xeSelect.reactData;
|
|
38177
|
-
var
|
|
38202
|
+
var internalData = $xeSelect.internalData;
|
|
38203
|
+
var allowCreate = props.allowCreate,
|
|
38204
|
+
optionKey = props.optionKey,
|
|
38178
38205
|
value = props.value;
|
|
38179
38206
|
var currentOption = reactData.currentOption;
|
|
38207
|
+
var optAddMaps = internalData.optAddMaps;
|
|
38180
38208
|
var optionOpts = $xeSelect.computeOptionOpts;
|
|
38181
38209
|
var labelField = $xeSelect.computeLabelField;
|
|
38182
38210
|
var valueField = $xeSelect.computeValueField;
|
|
@@ -38189,21 +38217,24 @@ function getOptUniqueId() {
|
|
|
38189
38217
|
var optid = $xeSelect.getOptId(option);
|
|
38190
38218
|
var optionValue = option[valueField];
|
|
38191
38219
|
var isOptGroup = $xeSelect.hasOptGroupById(optid);
|
|
38192
|
-
var
|
|
38193
|
-
var
|
|
38194
|
-
var
|
|
38220
|
+
var isAdd = !!(allowCreate && optAddMaps[optid]);
|
|
38221
|
+
var isSelected = !isAdd && (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(value) ? value.indexOf(optionValue) > -1 : value === optionValue);
|
|
38222
|
+
var isVisible = isAdd || !isOptGroup || isOptionVisible(option);
|
|
38223
|
+
var isDisabled = !isAdd && $xeSelect.checkOptionDisabled(isSelected, option, group);
|
|
38195
38224
|
var defaultSlot = slots ? slots.default : null;
|
|
38196
38225
|
var optParams = {
|
|
38197
38226
|
option: option,
|
|
38198
38227
|
group: null,
|
|
38199
38228
|
$select: $xeSelect
|
|
38200
38229
|
};
|
|
38230
|
+
var optVNs = optionSlot ? $xeSelect.callSlot(optionSlot, optParams, h) : defaultSlot ? $xeSelect.callSlot(defaultSlot, optParams, h) : getFuncText(option[isOptGroup ? groupLabelField : labelField]);
|
|
38201
38231
|
return isVisible ? h('div', {
|
|
38202
38232
|
key: useKey || optionKey ? optid : cIndex,
|
|
38203
38233
|
class: ['vxe-select-option', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className(optParams) : className : '', {
|
|
38204
38234
|
'vxe-select-optgroup': isOptGroup,
|
|
38205
38235
|
'is--disabled': isDisabled,
|
|
38206
38236
|
'is--selected': isSelected,
|
|
38237
|
+
'is--add': isAdd,
|
|
38207
38238
|
'is--hover': currentOption && $xeSelect.getOptId(currentOption) === optid
|
|
38208
38239
|
}],
|
|
38209
38240
|
attrs: {
|
|
@@ -38227,7 +38258,15 @@ function getOptUniqueId() {
|
|
|
38227
38258
|
}
|
|
38228
38259
|
}
|
|
38229
38260
|
}
|
|
38230
|
-
},
|
|
38261
|
+
}, allowCreate ? [h('span', {
|
|
38262
|
+
key: 1,
|
|
38263
|
+
class: 'vxe-select-option--label'
|
|
38264
|
+
}, optVNs), isAdd ? h('span', {
|
|
38265
|
+
key: 2,
|
|
38266
|
+
class: 'vxe-select-option--add-icon'
|
|
38267
|
+
}, [h('i', {
|
|
38268
|
+
class: getIcon().ADD_OPTION
|
|
38269
|
+
})]) : renderEmptyElement($xeSelect)] : optVNs) : renderEmptyElement($xeSelect);
|
|
38231
38270
|
});
|
|
38232
38271
|
},
|
|
38233
38272
|
renderOpts: function renderOpts(h) {
|
|
@@ -40469,7 +40508,7 @@ var Print = VxePrint;
|
|
|
40469
40508
|
$xePulldown.emitModel(false);
|
|
40470
40509
|
return new Promise(function (resolve) {
|
|
40471
40510
|
if (reactData.isAniVisible) {
|
|
40472
|
-
internalData.hpTimeout =
|
|
40511
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
40473
40512
|
reactData.isAniVisible = false;
|
|
40474
40513
|
$xePulldown.$nextTick(function () {
|
|
40475
40514
|
resolve();
|
|
@@ -43004,7 +43043,7 @@ function getRowUniqueId() {
|
|
|
43004
43043
|
var reactData = $xeTableSelect.reactData;
|
|
43005
43044
|
var internalData = $xeTableSelect.internalData;
|
|
43006
43045
|
reactData.visiblePanel = false;
|
|
43007
|
-
internalData.hpTimeout =
|
|
43046
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
43008
43047
|
reactData.isAniVisible = false;
|
|
43009
43048
|
}, 350);
|
|
43010
43049
|
},
|
|
@@ -46948,7 +46987,7 @@ function tree_select_getOptUniqueId() {
|
|
|
46948
46987
|
var reactData = $xeTreeSelect.reactData;
|
|
46949
46988
|
var internalData = $xeTreeSelect.internalData;
|
|
46950
46989
|
reactData.visiblePanel = false;
|
|
46951
|
-
internalData.hpTimeout =
|
|
46990
|
+
internalData.hpTimeout = setTimeout(function () {
|
|
46952
46991
|
reactData.isAniVisible = false;
|
|
46953
46992
|
}, 350);
|
|
46954
46993
|
},
|