vxe-pc-ui 4.17.13 → 4.17.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/README.md +1 -1
- package/dist/all.esm.js +57 -16
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/backtop/src/backtop.js +1 -4
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +4 -0
- package/es/input/style.css +2 -2
- package/es/input/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/textarea/src/textarea.js +49 -11
- package/es/textarea/style.css +23 -1
- package/es/textarea/style.min.css +1 -1
- package/es/ui/index.js +3 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-input/style.css +2 -2
- package/es/vxe-input/style.min.css +1 -1
- package/es/vxe-textarea/style.css +23 -1
- package/es/vxe-textarea/style.min.css +1 -1
- package/lib/backtop/src/backtop.js +1 -4
- package/lib/backtop/src/backtop.min.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 +46 -12
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +3 -0
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +2 -2
- package/lib/input/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +38 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/textarea/style/style.css +23 -1
- package/lib/textarea/style/style.min.css +1 -1
- package/lib/ui/index.js +3 -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-input/style/style.css +2 -2
- package/lib/vxe-input/style/style.min.css +1 -1
- package/lib/vxe-textarea/style/style.css +23 -1
- package/lib/vxe-textarea/style/style.min.css +1 -1
- package/package.json +3 -3
- package/packages/backtop/src/backtop.ts +1 -4
- package/packages/input/src/input.ts +3 -0
- package/packages/textarea/src/textarea.ts +49 -11
- package/packages/ui/index.ts +3 -0
- package/styles/components/input.scss +2 -2
- package/styles/components/textarea.scss +31 -1
- package/types/components/grid.d.ts +5 -5
- package/types/components/textarea.d.ts +5 -0
- package/types/ui/global-icon.d.ts +3 -0
- /package/es/icon/{iconfont.1787300576676.ttf → iconfont.1787558434119.ttf} +0 -0
- /package/es/icon/{iconfont.1787300576676.woff → iconfont.1787558434119.woff} +0 -0
- /package/es/icon/{iconfont.1787300576676.woff2 → iconfont.1787558434119.woff2} +0 -0
- /package/es/{iconfont.1787300576676.ttf → iconfont.1787558434119.ttf} +0 -0
- /package/es/{iconfont.1787300576676.woff → iconfont.1787558434119.woff} +0 -0
- /package/es/{iconfont.1787300576676.woff2 → iconfont.1787558434119.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1787300576676.ttf → iconfont.1787558434119.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1787300576676.woff → iconfont.1787558434119.woff} +0 -0
- /package/lib/icon/style/{iconfont.1787300576676.woff2 → iconfont.1787558434119.woff2} +0 -0
- /package/lib/{iconfont.1787300576676.ttf → iconfont.1787558434119.ttf} +0 -0
- /package/lib/{iconfont.1787300576676.woff → iconfont.1787558434119.woff} +0 -0
- /package/lib/{iconfont.1787300576676.woff2 → iconfont.1787558434119.woff2} +0 -0
package/README.md
CHANGED
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.17.
|
|
84
|
+
const uiVersion = `ui v${"4.17.15"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$i = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.17.
|
|
98
|
+
const version = "4.17.15";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -622,6 +622,8 @@ setIcon({
|
|
|
622
622
|
CHECKBOX_CHECKED: iconPrefix + 'checkbox-checked-fill',
|
|
623
623
|
CHECKBOX_UNCHECKED: iconPrefix + 'checkbox-unchecked',
|
|
624
624
|
CHECKBOX_DISABLED_UNCHECKED: iconPrefix + 'checkbox-unchecked-fill',
|
|
625
|
+
// textarea
|
|
626
|
+
TEXTAREA_CLEAR: iconPrefix + 'error-circle-fill',
|
|
625
627
|
// input
|
|
626
628
|
INPUT_CLEAR: iconPrefix + 'error-circle-fill',
|
|
627
629
|
INPUT_SEARCH: iconPrefix + 'search',
|
|
@@ -4079,11 +4081,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4079
4081
|
return;
|
|
4080
4082
|
}
|
|
4081
4083
|
if (XEUtils.isString(target)) {
|
|
4082
|
-
const tEl = document.querySelector(target);
|
|
4083
|
-
if (!tEl) {
|
|
4084
|
-
errLog$j('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
4085
|
-
}
|
|
4086
4084
|
const { targetEl } = internalData;
|
|
4085
|
+
const tEl = document.querySelector(target) || document.body;
|
|
4087
4086
|
if (targetEl !== tEl) {
|
|
4088
4087
|
removeScrollEvent();
|
|
4089
4088
|
internalData.targetEl = tEl;
|
|
@@ -9863,6 +9862,9 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9863
9862
|
if (!inpImmediate) {
|
|
9864
9863
|
handleChange(value, evnt);
|
|
9865
9864
|
}
|
|
9865
|
+
else {
|
|
9866
|
+
updateDomValue();
|
|
9867
|
+
}
|
|
9866
9868
|
afterCheckValue();
|
|
9867
9869
|
if (!reactData.visiblePanel) {
|
|
9868
9870
|
reactData.isActivated = false;
|
|
@@ -11630,6 +11632,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11630
11632
|
'is--prefix': !!prefix,
|
|
11631
11633
|
'is--suffix': !!suffix,
|
|
11632
11634
|
'is--visible': visiblePanel,
|
|
11635
|
+
'is--clear': isClearable,
|
|
11633
11636
|
'is--count': isWordCount,
|
|
11634
11637
|
'is--disabled': isDisabled,
|
|
11635
11638
|
'is--active': isActivated,
|
|
@@ -40453,6 +40456,10 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40453
40456
|
type: Boolean,
|
|
40454
40457
|
default: null
|
|
40455
40458
|
},
|
|
40459
|
+
clearable: {
|
|
40460
|
+
type: Boolean,
|
|
40461
|
+
default: () => getConfig$3().textarea.clearable
|
|
40462
|
+
},
|
|
40456
40463
|
placeholder: String,
|
|
40457
40464
|
maxLength: [String, Number],
|
|
40458
40465
|
trim: {
|
|
@@ -40469,6 +40476,10 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40469
40476
|
},
|
|
40470
40477
|
showWordCount: Boolean,
|
|
40471
40478
|
countMethod: Function,
|
|
40479
|
+
autoFocus: {
|
|
40480
|
+
type: Boolean,
|
|
40481
|
+
default: null
|
|
40482
|
+
},
|
|
40472
40483
|
/**
|
|
40473
40484
|
* 已废弃,被 auto-size 替换
|
|
40474
40485
|
* @deprecated
|
|
@@ -40502,6 +40513,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40502
40513
|
'change',
|
|
40503
40514
|
'focus',
|
|
40504
40515
|
'blur',
|
|
40516
|
+
'clear',
|
|
40505
40517
|
'lazy-change'
|
|
40506
40518
|
],
|
|
40507
40519
|
setup(props, context) {
|
|
@@ -40664,13 +40676,21 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40664
40676
|
reactData.inputValue = value;
|
|
40665
40677
|
emit('update:modelValue', value);
|
|
40666
40678
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
40667
|
-
|
|
40679
|
+
dispatchEvent('change', { value }, evnt);
|
|
40668
40680
|
// 自动更新校验状态
|
|
40669
40681
|
if ($xeForm && formItemInfo) {
|
|
40670
40682
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
40671
40683
|
}
|
|
40672
40684
|
}
|
|
40673
40685
|
};
|
|
40686
|
+
const clearValueEvent = (evnt, value) => {
|
|
40687
|
+
const { autoFocus } = props;
|
|
40688
|
+
if (autoFocus || autoFocus === null) {
|
|
40689
|
+
focus();
|
|
40690
|
+
}
|
|
40691
|
+
handleChange('', evnt);
|
|
40692
|
+
dispatchEvent('clear', { value }, evnt);
|
|
40693
|
+
};
|
|
40674
40694
|
const inputEvent = (evnt) => {
|
|
40675
40695
|
const { immediate } = props;
|
|
40676
40696
|
const textElem = evnt.target;
|
|
@@ -40704,6 +40724,9 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40704
40724
|
if (!immediate) {
|
|
40705
40725
|
handleChange(inputValue, evnt);
|
|
40706
40726
|
}
|
|
40727
|
+
else {
|
|
40728
|
+
updateDomValue();
|
|
40729
|
+
}
|
|
40707
40730
|
dispatchEvent('blur', { value: inputValue }, evnt);
|
|
40708
40731
|
};
|
|
40709
40732
|
const textareaMethods = {
|
|
@@ -40721,7 +40744,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40721
40744
|
};
|
|
40722
40745
|
Object.assign($xeTextarea, textareaMethods);
|
|
40723
40746
|
const renderVN = () => {
|
|
40724
|
-
const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols } = props;
|
|
40747
|
+
const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols, clearable } = props;
|
|
40725
40748
|
const { inputValue } = reactData;
|
|
40726
40749
|
const vSize = computeSize.value;
|
|
40727
40750
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -40749,8 +40772,10 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40749
40772
|
'is--autosize': autosize || autoSize,
|
|
40750
40773
|
'is--count': showWordCount,
|
|
40751
40774
|
'is--disabled': isDisabled,
|
|
40775
|
+
'is-clear': clearable,
|
|
40752
40776
|
'is--rows': !XEUtils.eqNull(rows),
|
|
40753
|
-
'is--cols': !XEUtils.eqNull(cols)
|
|
40777
|
+
'is--cols': !XEUtils.eqNull(cols),
|
|
40778
|
+
'show--clear': clearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
|
|
40754
40779
|
}],
|
|
40755
40780
|
spellcheck: false
|
|
40756
40781
|
}, [
|
|
@@ -40777,13 +40802,29 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40777
40802
|
onFocus: triggerEvent,
|
|
40778
40803
|
onBlur: blurEvent
|
|
40779
40804
|
}),
|
|
40780
|
-
showWordCount
|
|
40781
|
-
? h('
|
|
40782
|
-
class:
|
|
40783
|
-
|
|
40784
|
-
|
|
40785
|
-
|
|
40786
|
-
|
|
40805
|
+
clearable || showWordCount
|
|
40806
|
+
? h('div', {
|
|
40807
|
+
class: 'vxe-textarea--suffix'
|
|
40808
|
+
}, [
|
|
40809
|
+
clearable
|
|
40810
|
+
? h('div', {
|
|
40811
|
+
class: 'vxe-textarea--clear-icon',
|
|
40812
|
+
onClick: clearValueEvent
|
|
40813
|
+
}, [
|
|
40814
|
+
h('i', {
|
|
40815
|
+
class: getIcon$2().TEXTAREA_CLEAR
|
|
40816
|
+
})
|
|
40817
|
+
])
|
|
40818
|
+
: renderEmptyElement($xeTextarea),
|
|
40819
|
+
showWordCount
|
|
40820
|
+
? h('span', {
|
|
40821
|
+
class: ['vxe-textarea--count', {
|
|
40822
|
+
'is--error': isCountError
|
|
40823
|
+
}]
|
|
40824
|
+
}, countMethod ? `${countMethod({ value: inputValue })}` : `${inputCount}${inpMaxLength ? `/${inpMaxLength}` : ''}`)
|
|
40825
|
+
: renderEmptyElement($xeTextarea)
|
|
40826
|
+
])
|
|
40827
|
+
: renderEmptyElement($xeTextarea)
|
|
40787
40828
|
]);
|
|
40788
40829
|
};
|
|
40789
40830
|
watch(() => props.modelValue, (val) => {
|