vxe-pc-ui 3.17.24 → 3.17.25
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/icon/style.css +1 -1
- package/es/number-input/src/number-input.js +70 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/index.js +8 -1
- package/es/tooltip/src/tooltip.js +7 -2
- package/es/ui/index.js +5 -1
- package/es/ui/src/log.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +92 -5
- package/lib/index.umd.min.js +1 -1
- package/lib/number-input/src/number-input.js +71 -0
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/index.js +8 -1
- package/lib/tooltip/index.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +7 -2
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +5 -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/package.json +1 -1
- package/packages/number-input/src/number-input.ts +76 -1
- package/packages/tooltip/index.ts +8 -1
- package/packages/tooltip/src/tooltip.ts +7 -2
- package/packages/ui/index.ts +4 -0
- package/types/components/number-input.d.ts +16 -0
- package/types/components/tooltip.d.ts +15 -1
- /package/es/icon/{iconfont.1788249693859.ttf → iconfont.1788311132322.ttf} +0 -0
- /package/es/icon/{iconfont.1788249693859.woff → iconfont.1788311132322.woff} +0 -0
- /package/es/icon/{iconfont.1788249693859.woff2 → iconfont.1788311132322.woff2} +0 -0
- /package/es/{iconfont.1788249693859.ttf → iconfont.1788311132322.ttf} +0 -0
- /package/es/{iconfont.1788249693859.woff → iconfont.1788311132322.woff} +0 -0
- /package/es/{iconfont.1788249693859.woff2 → iconfont.1788311132322.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1788249693859.ttf → iconfont.1788311132322.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1788249693859.woff → iconfont.1788311132322.woff} +0 -0
- /package/lib/icon/style/{iconfont.1788249693859.woff2 → iconfont.1788311132322.woff2} +0 -0
- /package/lib/{iconfont.1788249693859.ttf → iconfont.1788311132322.ttf} +0 -0
- /package/lib/{iconfont.1788249693859.woff → iconfont.1788311132322.woff} +0 -0
- /package/lib/{iconfont.1788249693859.woff2 → iconfont.1788311132322.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -13284,7 +13284,7 @@ var es_array_join = __webpack_require__(8598);
|
|
|
13284
13284
|
|
|
13285
13285
|
|
|
13286
13286
|
var log_log = VxeUI.log;
|
|
13287
|
-
var uiVersion = "ui v".concat("3.17.
|
|
13287
|
+
var uiVersion = "ui v".concat("3.17.25");
|
|
13288
13288
|
function createComponentLog(name) {
|
|
13289
13289
|
var tableVersion = VxeUI.tableVersion ? "table v".concat(VxeUI.tableVersion) : '';
|
|
13290
13290
|
var ganttVersion = VxeUI.ganttVersion ? "gantt v".concat(VxeUI.ganttVersion) : '';
|
|
@@ -13304,7 +13304,7 @@ var errLog = log_log.create('error', uiVersion);
|
|
|
13304
13304
|
|
|
13305
13305
|
|
|
13306
13306
|
|
|
13307
|
-
var ui_version = "3.17.
|
|
13307
|
+
var ui_version = "3.17.25";
|
|
13308
13308
|
VxeUI.uiVersion = ui_version;
|
|
13309
13309
|
VxeUI.dynamicApp = dynamicApp;
|
|
13310
13310
|
function config(options) {
|
|
@@ -13598,6 +13598,10 @@ setConfig({
|
|
|
13598
13598
|
showButton: true,
|
|
13599
13599
|
isWheel: true,
|
|
13600
13600
|
isArrow: true
|
|
13601
|
+
},
|
|
13602
|
+
tooltipConfig: {
|
|
13603
|
+
enterable: true,
|
|
13604
|
+
enterDelay: 0
|
|
13601
13605
|
}
|
|
13602
13606
|
},
|
|
13603
13607
|
optgroup: {},
|
|
@@ -16451,6 +16455,7 @@ function createInternalData() {
|
|
|
16451
16455
|
arrowStyle: null
|
|
16452
16456
|
});
|
|
16453
16457
|
$xeTooltip.updateValue(false);
|
|
16458
|
+
$xeTooltip.dispatchEvent('hide', {}, null);
|
|
16454
16459
|
return $xeTooltip.$nextTick();
|
|
16455
16460
|
},
|
|
16456
16461
|
toVisible: function toVisible(target, content) {
|
|
@@ -16496,6 +16501,7 @@ function createInternalData() {
|
|
|
16496
16501
|
defaultLeft: left,
|
|
16497
16502
|
placement: placement,
|
|
16498
16503
|
defaultPlacement: defaultPlacement,
|
|
16504
|
+
isMinWidth: false,
|
|
16499
16505
|
teleportTo: true
|
|
16500
16506
|
});
|
|
16501
16507
|
var panelStyle = Object.assign(ppObj.style, {
|
|
@@ -16503,7 +16509,7 @@ function createInternalData() {
|
|
|
16503
16509
|
});
|
|
16504
16510
|
tipStore.placement = ppObj.placement;
|
|
16505
16511
|
tipStore.style = panelStyle;
|
|
16506
|
-
tipStore.arrowStyle.left = "".concat(ppObj.arrowLeft, "px");
|
|
16512
|
+
tipStore.arrowStyle.left = ppObj.arrowLeft ? "".concat(ppObj.arrowLeft, "px") : '';
|
|
16507
16513
|
},
|
|
16508
16514
|
updatePlacement: function updatePlacement() {
|
|
16509
16515
|
var $xeTooltip = this;
|
|
@@ -16672,8 +16678,11 @@ function createInternalData() {
|
|
|
16672
16678
|
if (showDelayTip) {
|
|
16673
16679
|
showDelayTip();
|
|
16674
16680
|
}
|
|
16681
|
+
$xeTooltip.dispatchEvent('show', {}, evnt || null);
|
|
16675
16682
|
} else {
|
|
16676
|
-
|
|
16683
|
+
var rest = $xeTooltip.showTip();
|
|
16684
|
+
$xeTooltip.dispatchEvent('show', {}, evnt || null);
|
|
16685
|
+
return rest;
|
|
16677
16686
|
}
|
|
16678
16687
|
}
|
|
16679
16688
|
return $xeTooltip.$nextTick();
|
|
@@ -16898,11 +16907,14 @@ var TooltipController = {
|
|
|
16898
16907
|
return Promise.resolve();
|
|
16899
16908
|
},
|
|
16900
16909
|
close: function close() {
|
|
16910
|
+
var globalTooltip = dynamicStore.globalTooltip;
|
|
16911
|
+
if (!globalTooltip || !globalTooltip.value) {
|
|
16912
|
+
return Promise.resolve();
|
|
16913
|
+
}
|
|
16901
16914
|
var $tooltip = dynamicStore.$refs.refTooltip;
|
|
16902
16915
|
if ($tooltip) {
|
|
16903
16916
|
$tooltip.handleCloseEvent();
|
|
16904
16917
|
} else {
|
|
16905
|
-
var globalTooltip = dynamicStore.globalTooltip;
|
|
16906
16918
|
if (globalTooltip) {
|
|
16907
16919
|
globalTooltip.value = false;
|
|
16908
16920
|
}
|
|
@@ -16910,6 +16922,10 @@ var TooltipController = {
|
|
|
16910
16922
|
return Promise.resolve();
|
|
16911
16923
|
},
|
|
16912
16924
|
destroy: function destroy() {
|
|
16925
|
+
var globalTooltip = dynamicStore.globalTooltip;
|
|
16926
|
+
if (!globalTooltip || !globalTooltip.value) {
|
|
16927
|
+
return Promise.resolve();
|
|
16928
|
+
}
|
|
16913
16929
|
var $tooltip = dynamicStore.$refs.refTooltip;
|
|
16914
16930
|
if ($tooltip) {
|
|
16915
16931
|
return $tooltip.close().then(function () {
|
|
@@ -31404,6 +31420,9 @@ function hexToRgb(str) {
|
|
|
31404
31420
|
|
|
31405
31421
|
|
|
31406
31422
|
|
|
31423
|
+
|
|
31424
|
+
var number_input_createComponentLog = createComponentLog('number-input'),
|
|
31425
|
+
number_input_errLog = number_input_createComponentLog.errLog;
|
|
31407
31426
|
var handleNumberString = function handleNumberString(val) {
|
|
31408
31427
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(val)) {
|
|
31409
31428
|
return '';
|
|
@@ -31536,6 +31555,13 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
31536
31555
|
prefixConfig: Object,
|
|
31537
31556
|
suffixIcon: String,
|
|
31538
31557
|
suffixConfig: Object,
|
|
31558
|
+
showTooltip: {
|
|
31559
|
+
type: Boolean,
|
|
31560
|
+
default: function _default() {
|
|
31561
|
+
return getConfig().numberInput.showTooltip;
|
|
31562
|
+
}
|
|
31563
|
+
},
|
|
31564
|
+
tooltipConfig: Object,
|
|
31539
31565
|
// 已废弃
|
|
31540
31566
|
controls: {
|
|
31541
31567
|
type: Boolean,
|
|
@@ -31632,6 +31658,11 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
31632
31658
|
var props = $xeNumberInput;
|
|
31633
31659
|
return Object.assign({}, getConfig().numberInput.suffixConfig, props.suffixConfig);
|
|
31634
31660
|
},
|
|
31661
|
+
computeTooltipOpts: function computeTooltipOpts() {
|
|
31662
|
+
var $xeNumberInput = this;
|
|
31663
|
+
var props = $xeNumberInput;
|
|
31664
|
+
return Object.assign({}, getConfig().numberInput.tooltipConfig, props.tooltipConfig);
|
|
31665
|
+
},
|
|
31635
31666
|
computeDecimalsType: function computeDecimalsType() {
|
|
31636
31667
|
var $xeNumberInput = this;
|
|
31637
31668
|
var props = $xeNumberInput;
|
|
@@ -31939,6 +31970,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
31939
31970
|
reactData.inputValue = eqEmptyValue(inputValue) ? '' : "".concat(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue));
|
|
31940
31971
|
reactData.isFocus = true;
|
|
31941
31972
|
reactData.isActivated = true;
|
|
31973
|
+
$xeNumberInput.handleShowTip();
|
|
31942
31974
|
$xeNumberInput.triggerEvent(evnt);
|
|
31943
31975
|
}
|
|
31944
31976
|
},
|
|
@@ -31963,6 +31995,9 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
31963
31995
|
$xeNumberInput.dispatchEvent('lazy-change', {
|
|
31964
31996
|
value: value
|
|
31965
31997
|
}, evnt);
|
|
31998
|
+
$xeNumberInput.$nextTick(function () {
|
|
31999
|
+
$xeNumberInput.handleShowTip();
|
|
32000
|
+
});
|
|
31966
32001
|
},
|
|
31967
32002
|
clickSuffixEvent: function clickSuffixEvent(evnt) {
|
|
31968
32003
|
var $xeNumberInput = this;
|
|
@@ -32120,6 +32155,16 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32120
32155
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
32121
32156
|
}
|
|
32122
32157
|
},
|
|
32158
|
+
mouseleaveEvent: function mouseleaveEvent() {
|
|
32159
|
+
var $xeNumberInput = this;
|
|
32160
|
+
var props = $xeNumberInput;
|
|
32161
|
+
var showTooltip = props.showTooltip;
|
|
32162
|
+
if (showTooltip) {
|
|
32163
|
+
if (VxeUI.tooltip) {
|
|
32164
|
+
VxeUI.tooltip.close();
|
|
32165
|
+
}
|
|
32166
|
+
}
|
|
32167
|
+
},
|
|
32123
32168
|
// 数值
|
|
32124
32169
|
numberChange: function numberChange(isPlus, evnt) {
|
|
32125
32170
|
var $xeNumberInput = this;
|
|
@@ -32152,6 +32197,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32152
32197
|
$xeNumberInput.numberChange(true, evnt);
|
|
32153
32198
|
}
|
|
32154
32199
|
reactData.isActivated = true;
|
|
32200
|
+
$xeNumberInput.handleShowTip();
|
|
32155
32201
|
$xeNumberInput.dispatchEvent('plus-number', {
|
|
32156
32202
|
value: reactData.inputValue
|
|
32157
32203
|
}, evnt);
|
|
@@ -32173,6 +32219,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32173
32219
|
$xeNumberInput.numberChange(false, evnt);
|
|
32174
32220
|
}
|
|
32175
32221
|
reactData.isActivated = true;
|
|
32222
|
+
$xeNumberInput.handleShowTip();
|
|
32176
32223
|
$xeNumberInput.dispatchEvent('minus-number', {
|
|
32177
32224
|
value: reactData.inputValue
|
|
32178
32225
|
}, evnt);
|
|
@@ -32197,6 +32244,35 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32197
32244
|
}
|
|
32198
32245
|
}
|
|
32199
32246
|
},
|
|
32247
|
+
handleShowTip: function handleShowTip() {
|
|
32248
|
+
var $xeNumberInput = this;
|
|
32249
|
+
var props = $xeNumberInput;
|
|
32250
|
+
var reactData = $xeNumberInput.reactData;
|
|
32251
|
+
var showTooltip = props.showTooltip;
|
|
32252
|
+
var inputValue = reactData.inputValue;
|
|
32253
|
+
if (showTooltip) {
|
|
32254
|
+
if (VxeUI.tooltip) {
|
|
32255
|
+
var numLabel = $xeNumberInput.computeNumLabel;
|
|
32256
|
+
var tooltipOpts = $xeNumberInput.computeTooltipOpts;
|
|
32257
|
+
var contentMethod = tooltipOpts.contentMethod;
|
|
32258
|
+
var inputElem = $xeNumberInput.$refs.refInputTarget;
|
|
32259
|
+
var content = getText(contentMethod ? contentMethod({
|
|
32260
|
+
inputValue: inputElem.value,
|
|
32261
|
+
value: inputValue || '',
|
|
32262
|
+
label: numLabel
|
|
32263
|
+
}) : numLabel);
|
|
32264
|
+
if (content) {
|
|
32265
|
+
VxeUI.tooltip.open(inputElem, Object.assign({}, _objectSpread2(_objectSpread2({}, tooltipOpts), {}, {
|
|
32266
|
+
content: content
|
|
32267
|
+
}), {
|
|
32268
|
+
contentMethod: undefined
|
|
32269
|
+
}));
|
|
32270
|
+
} else {
|
|
32271
|
+
VxeUI.tooltip.close();
|
|
32272
|
+
}
|
|
32273
|
+
}
|
|
32274
|
+
}
|
|
32275
|
+
},
|
|
32200
32276
|
keydownEvent: function keydownEvent(evnt) {
|
|
32201
32277
|
var $xeNumberInput = this;
|
|
32202
32278
|
var props = $xeNumberInput;
|
|
@@ -32231,6 +32307,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32231
32307
|
},
|
|
32232
32308
|
keyupEvent: function keyupEvent(evnt) {
|
|
32233
32309
|
var $xeNumberInput = this;
|
|
32310
|
+
$xeNumberInput.handleShowTip();
|
|
32234
32311
|
$xeNumberInput.triggerEvent(evnt);
|
|
32235
32312
|
},
|
|
32236
32313
|
// 数值
|
|
@@ -32337,6 +32414,7 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32337
32414
|
},
|
|
32338
32415
|
clickEvent: function clickEvent(evnt) {
|
|
32339
32416
|
var $xeNumberInput = this;
|
|
32417
|
+
$xeNumberInput.handleShowTip();
|
|
32340
32418
|
$xeNumberInput.triggerEvent(evnt);
|
|
32341
32419
|
},
|
|
32342
32420
|
// 全局事件
|
|
@@ -32603,6 +32681,9 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32603
32681
|
class: ['vxe-number-input', "type--".concat(type), isControls ? "ctl--".concat(layout === 'right' || layout === 'left' ? layout : 'default') : '', className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "size--".concat(vSize), vSize), "is--".concat(align), align), 'is--controls', isControls && !inputReadonly), 'is--prefix', !!prefixSlot || prefixIcon), 'is--suffix', !!suffixSlot || suffixIcon), 'is--disabled', isDisabled), 'is--active', isActivated), 'show--clear', isClearable && !isDisabled && !(inputValue === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(inputValue)))],
|
|
32604
32682
|
attrs: {
|
|
32605
32683
|
spellcheck: false
|
|
32684
|
+
},
|
|
32685
|
+
on: {
|
|
32686
|
+
mouseleave: $xeNumberInput.mouseleaveEvent
|
|
32606
32687
|
}
|
|
32607
32688
|
}, isControls ? layout === 'right' ? [$xeNumberInput.renderInput(h), $xeNumberInput.renderSideControl(h), $xeNumberInput.renderFloat(h)] : layout === 'left' ? [$xeNumberInput.renderSideControl(h), $xeNumberInput.renderInput(h), $xeNumberInput.renderFloat(h)] : [$xeNumberInput.renderMinusBtn(h), $xeNumberInput.renderInput(h), $xeNumberInput.renderPlusBtn(h), $xeNumberInput.renderFloat(h)] : [$xeNumberInput.renderInput(h), $xeNumberInput.renderFloat(h)]);
|
|
32608
32689
|
}
|
|
@@ -32635,6 +32716,12 @@ var handleNumberString = function handleNumberString(val) {
|
|
|
32635
32716
|
},
|
|
32636
32717
|
mounted: function mounted() {
|
|
32637
32718
|
var $xeNumberInput = this;
|
|
32719
|
+
var props = $xeNumberInput;
|
|
32720
|
+
if (props.showTooltip) {
|
|
32721
|
+
if (!VxeUI.tooltip) {
|
|
32722
|
+
number_input_errLog('vxe.error.reqComp', ['vxe-tooltip']);
|
|
32723
|
+
}
|
|
32724
|
+
}
|
|
32638
32725
|
var targetElem = $xeNumberInput.$refs.refInputTarget;
|
|
32639
32726
|
if (targetElem) {
|
|
32640
32727
|
targetElem.addEventListener('wheel', $xeNumberInput.wheelEvent, {
|