bkui-vue 0.0.2-beta.91 → 0.0.2-beta.93
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/dist/index.cjs.js +12 -12
- package/dist/index.esm.js +215 -209
- package/dist/index.umd.js +12 -12
- package/lib/input/index.js +11 -3
- package/lib/tree/index.js +9 -3
- package/package.json +1 -1
package/lib/input/index.js
CHANGED
@@ -1000,6 +1000,11 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_inputEmit
|
|
1000
1000
|
(0,external_vue_namespaceObject.nextTick)(function () {
|
1001
1001
|
return resizeTextarea();
|
1002
1002
|
});
|
1003
|
+
// Hack: 修复autofocus属性失效问题 原生autofocus属性只在页面加载时生效
|
1004
|
+
if (Object.prototype.hasOwnProperty.call(ctx.attrs, 'autofocus')) {
|
1005
|
+
var _inputRef$value2, _inputRef$value2$focu;
|
1006
|
+
(_inputRef$value2 = inputRef.value) === null || _inputRef$value2 === void 0 || (_inputRef$value2$focu = _inputRef$value2.focus) === null || _inputRef$value2$focu === void 0 ? void 0 : _inputRef$value2$focu.call(_inputRef$value2);
|
1007
|
+
}
|
1003
1008
|
});
|
1004
1009
|
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
1005
1010
|
resizeObserver.disconnect();
|
@@ -1011,8 +1016,8 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_inputEmit
|
|
1011
1016
|
clear: clear
|
1012
1017
|
});
|
1013
1018
|
function detectOverflow() {
|
1014
|
-
var _inputRef$
|
1015
|
-
return ((_inputRef$
|
1019
|
+
var _inputRef$value3, _inputRef$value4;
|
1020
|
+
return ((_inputRef$value3 = inputRef.value) === null || _inputRef$value3 === void 0 ? void 0 : _inputRef$value3.scrollWidth) > ((_inputRef$value4 = inputRef.value) === null || _inputRef$value4 === void 0 ? void 0 : _inputRef$value4.clientWidth) + 2;
|
1016
1021
|
}
|
1017
1022
|
function clear() {
|
1018
1023
|
if (props.disabled) return;
|
@@ -1051,7 +1056,7 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_inputEmit
|
|
1051
1056
|
}
|
1052
1057
|
}
|
1053
1058
|
if (eventName === EVENTS.KEYDOWN && (e.code === 'Enter' || e.key === 'Enter' || e.keyCode === 13)) {
|
1054
|
-
ctx.emit(EVENTS.ENTER, e.target.value, e);
|
1059
|
+
ctx.emit(EVENTS.ENTER, isNumberInput.value ? handleNumber(e.target.value, 0) : e.target.value, e);
|
1055
1060
|
}
|
1056
1061
|
if (isCNInput.value && [EVENTS.INPUT, EVENTS.CHANGE, EVENTS.KEYDOWN].some(function (e) {
|
1057
1062
|
return eventName === e;
|
@@ -1090,6 +1095,9 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_inputEmit
|
|
1090
1095
|
var precision = Number.isInteger(props.precision) ? props.precision : 0;
|
1091
1096
|
var val = Number(modelValue);
|
1092
1097
|
var factor = Number.isInteger(numStep) ? numStep : 1;
|
1098
|
+
if (Number.isNaN(val)) {
|
1099
|
+
return Number.isInteger(props.min) ? props.min : 0;
|
1100
|
+
}
|
1093
1101
|
var newVal = val + (INC ? factor : -1 * factor);
|
1094
1102
|
if (Number.isInteger(props.max)) {
|
1095
1103
|
newVal = Math.min(newVal, props.max);
|
package/lib/tree/index.js
CHANGED
@@ -1223,15 +1223,16 @@ var use_node_action_this = undefined;
|
|
1223
1223
|
if (!props.showCheckbox) {
|
1224
1224
|
return null;
|
1225
1225
|
}
|
1226
|
-
return (0,external_vue_namespaceObject.createVNode)(
|
1226
|
+
return (0,external_vue_namespaceObject.createVNode)("span", {
|
1227
|
+
"onClick": handleNodeCheckboxClick
|
1228
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_checkbox_namespaceObject["default"], {
|
1227
1229
|
"size": "small",
|
1228
1230
|
"modelValue": isNodeChecked(item),
|
1229
1231
|
"indeterminate": isIndeterminate(item),
|
1230
|
-
"onClick": handleNodeCheckboxClick,
|
1231
1232
|
"onChange": function onChange(val, event) {
|
1232
1233
|
return handleNodeItemCheckboxChange(item, !!val, event);
|
1233
1234
|
}
|
1234
|
-
}, null);
|
1235
|
+
}, null)]);
|
1235
1236
|
};
|
1236
1237
|
/**
|
1237
1238
|
* 设置指定节点是否展开
|
@@ -2427,6 +2428,11 @@ var use_tree_init_this = undefined;
|
|
2427
2428
|
var getData = function getData() {
|
2428
2429
|
return flatData;
|
2429
2430
|
};
|
2431
|
+
(0,external_vue_namespaceObject.watch)(function () {
|
2432
|
+
return [props.checked];
|
2433
|
+
}, function () {
|
2434
|
+
setChecked(props.checked, true);
|
2435
|
+
});
|
2430
2436
|
ctx.expose({
|
2431
2437
|
handleTreeNodeClick: handleTreeNodeClick,
|
2432
2438
|
isNodeChecked: isNodeChecked,
|