bkui-vue 2.0.1-beta.45 → 2.0.1-beta.47
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 +31 -31
- package/dist/index.esm.js +2351 -2339
- package/dist/index.umd.js +25 -25
- package/lib/index.js +1 -1
- package/lib/input/index.js +8 -5
- package/lib/tree/index.js +4 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
package/lib/input/index.js
CHANGED
@@ -1101,20 +1101,23 @@ var inputEmitEventsType = (_inputEmitEventsType = {}, _defineProperty(_definePro
|
|
1101
1101
|
isCNInput.value = false;
|
1102
1102
|
handleInput(e);
|
1103
1103
|
}
|
1104
|
+
function isNum(num) {
|
1105
|
+
return typeof num === 'number';
|
1106
|
+
}
|
1104
1107
|
function handleNumber(modelValue, step) {
|
1105
1108
|
var INC = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
1106
|
-
var numStep = Number(step);
|
1109
|
+
var numStep = Number(step) || 1;
|
1107
1110
|
var precision = Number.isInteger(props.precision) ? props.precision : 0;
|
1108
1111
|
var val = Number(modelValue);
|
1109
|
-
var factor =
|
1112
|
+
var factor = isNum(numStep) ? numStep : 1;
|
1110
1113
|
if (Number.isNaN(val)) {
|
1111
|
-
return
|
1114
|
+
return isNum(props.min) ? props.min : 0;
|
1112
1115
|
}
|
1113
1116
|
var newVal = val + (INC ? factor : -1 * factor);
|
1114
|
-
if (
|
1117
|
+
if (isNum(props.max)) {
|
1115
1118
|
newVal = Math.min(newVal, props.max);
|
1116
1119
|
}
|
1117
|
-
if (
|
1120
|
+
if (isNum(props.min)) {
|
1118
1121
|
newVal = Math.max(newVal, props.min);
|
1119
1122
|
}
|
1120
1123
|
return +newVal.toFixed(precision);
|
package/lib/tree/index.js
CHANGED
@@ -19917,9 +19917,11 @@ var use_tree_init_this = undefined;
|
|
19917
19917
|
var filterFn = function filterFn(item) {
|
19918
19918
|
if (isSearchActive.value) {
|
19919
19919
|
if (showChildNodes) {
|
19920
|
+
var _getNodePath;
|
19921
|
+
var itemPath = (_getNodePath = getNodePath(item)) !== null && _getNodePath !== void 0 ? _getNodePath : '';
|
19922
|
+
var asParentPath = "".concat(itemPath, "-");
|
19920
19923
|
return checkNodeIsOpen(item) && (isNodeMatched(item) || matchedNodePath.some(function (path) {
|
19921
|
-
|
19922
|
-
return ((_getNodePath = getNodePath(item)) !== null && _getNodePath !== void 0 ? _getNodePath : '').indexOf(path) === 0;
|
19924
|
+
return asParentPath.indexOf("".concat(path, "-")) === 0;
|
19923
19925
|
}));
|
19924
19926
|
}
|
19925
19927
|
return checkNodeIsOpen(item) && isNodeMatched(item);
|