bkui-vue 0.0.1-beta.93 → 0.0.1-beta.96
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 +16 -16
- package/dist/index.esm.js +41 -13
- package/dist/index.umd.js +17 -17
- package/dist/style.css +1 -1
- package/lib/input/index.js +1 -1
- package/lib/loading/loading.css +0 -1
- package/lib/loading/loading.less +0 -1
- package/lib/loading/loading.variable.css +0 -1
- package/lib/navigation/navigation.css +1 -0
- package/lib/navigation/navigation.less +1 -0
- package/lib/navigation/navigation.variable.css +1 -0
- package/lib/steps/index.js +1 -1
- package/lib/steps/steps.css +3 -0
- package/lib/steps/steps.less +6 -0
- package/lib/steps/steps.variable.css +3 -0
- package/lib/table/index.js +1 -1
- package/lib/table/utils.d.ts +1 -1
- package/lib/timeline/index.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -9078,9 +9078,10 @@ var Component$w = defineComponent({
|
|
9078
9078
|
var _a2;
|
9079
9079
|
isFocused.value = false;
|
9080
9080
|
ctx.emit(EVENTS$2.BLUR, e);
|
9081
|
-
if (isNumberInput.value && e.target.value > props.max) {
|
9082
|
-
|
9083
|
-
ctx.emit(EVENTS$2.
|
9081
|
+
if (isNumberInput.value && (e.target.value > props.max || e.target.value < props.min)) {
|
9082
|
+
const val = e.target.value > props.max ? props.max : props.min;
|
9083
|
+
ctx.emit(EVENTS$2.UPDATE, val);
|
9084
|
+
ctx.emit(EVENTS$2.CHANGE, val);
|
9084
9085
|
}
|
9085
9086
|
(_a2 = formItem == null ? void 0 : formItem.validate) == null ? void 0 : _a2.call(formItem, "blur");
|
9086
9087
|
}
|
@@ -12533,6 +12534,9 @@ var Component$f = defineComponent({
|
|
12533
12534
|
});
|
12534
12535
|
defaultSteps.value.splice(0, defaultSteps.value.length, ...defaults);
|
12535
12536
|
};
|
12537
|
+
const updateCurStep = (curStep) => {
|
12538
|
+
stepsProps.curStep = curStep;
|
12539
|
+
};
|
12536
12540
|
const init = () => {
|
12537
12541
|
var _a;
|
12538
12542
|
defaultSteps.value.splice(0, defaultSteps.value.length, ...[{
|
@@ -12566,6 +12570,16 @@ var Component$f = defineComponent({
|
|
12566
12570
|
}
|
12567
12571
|
};
|
12568
12572
|
onMounted(init);
|
12573
|
+
watch(() => props.steps, () => {
|
12574
|
+
updateSteps(props.steps);
|
12575
|
+
}, {
|
12576
|
+
deep: true
|
12577
|
+
});
|
12578
|
+
watch(() => props.curStep, () => {
|
12579
|
+
updateCurStep(props.curStep);
|
12580
|
+
}, {
|
12581
|
+
deep: true
|
12582
|
+
});
|
12569
12583
|
return {
|
12570
12584
|
defaultSteps,
|
12571
12585
|
jumpTo
|
@@ -12591,7 +12605,12 @@ var Component$f = defineComponent({
|
|
12591
12605
|
}
|
12592
12606
|
return typeof step === "string";
|
12593
12607
|
};
|
12594
|
-
const
|
12608
|
+
const isNumberIcon = (index, step) => {
|
12609
|
+
if (!step.icon) {
|
12610
|
+
step.icon = index;
|
12611
|
+
}
|
12612
|
+
return !isNaN(step.icon);
|
12613
|
+
};
|
12595
12614
|
const isLoadingStatus = (step) => step.status === "loading";
|
12596
12615
|
const isErrorStatus = (step) => step.status === "error";
|
12597
12616
|
const renderIcon = (index, step) => {
|
@@ -12610,7 +12629,7 @@ var Component$f = defineComponent({
|
|
12610
12629
|
"class": "bk-steps-icon"
|
12611
12630
|
}, null);
|
12612
12631
|
}
|
12613
|
-
return createVNode("span", null, [
|
12632
|
+
return createVNode("span", null, [isNumberIcon(index, step) ? index + 1 : createVNode(step.icon, null, null)]);
|
12614
12633
|
};
|
12615
12634
|
return createVNode("div", {
|
12616
12635
|
"class": stepsCls
|
@@ -12619,7 +12638,7 @@ var Component$f = defineComponent({
|
|
12619
12638
|
return createVNode("div", {
|
12620
12639
|
"class": ["bk-step", !step.title ? "bk-step-no-content" : "", isDone(index) ? "done" : "", isCurrent(index) ? "current" : "", isCurrent(index) && this.status === "error" ? "isError" : "", step.status && isCurrent(index) ? [`bk-step-${step.status}`] : ""]
|
12621
12640
|
}, [createVNode("span", {
|
12622
|
-
"class": ["bk-step-indicator", `bk-step-${iconType(step) ? "icon" : "number"}`],
|
12641
|
+
"class": ["bk-step-indicator", `bk-step-${iconType(step) ? "icon" : "number"}`, `bk-step-icon${step.status}`],
|
12623
12642
|
"style": {
|
12624
12643
|
cursor: this.controllable ? "pointer" : ""
|
12625
12644
|
},
|
@@ -13255,7 +13274,7 @@ const tableProps = {
|
|
13255
13274
|
rowKey: PropTypes.oneOfType([
|
13256
13275
|
PropTypes.string,
|
13257
13276
|
PropTypes.func
|
13258
|
-
]).def(
|
13277
|
+
]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX)
|
13259
13278
|
};
|
13260
13279
|
function _isSlot$2(s2) {
|
13261
13280
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
@@ -14001,7 +14020,7 @@ const resolveHeadConfig = (props) => {
|
|
14001
14020
|
};
|
14002
14021
|
const getRowText = (row, key, column) => {
|
14003
14022
|
if (column.type === "index") {
|
14004
|
-
return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX];
|
14023
|
+
return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX] + 1;
|
14005
14024
|
}
|
14006
14025
|
return row[key];
|
14007
14026
|
};
|
@@ -14017,8 +14036,11 @@ const formatPropAsArray = (prop, args) => {
|
|
14017
14036
|
}
|
14018
14037
|
return [];
|
14019
14038
|
};
|
14020
|
-
const getRowKey = (item, props) => {
|
14039
|
+
const getRowKey = (item, props, index) => {
|
14021
14040
|
if (typeof props.rowKey === "string") {
|
14041
|
+
if (props.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
|
14042
|
+
return `__ROW_INDEX_${index}`;
|
14043
|
+
}
|
14022
14044
|
const keys = props.rowKey.split(".");
|
14023
14045
|
return keys.reduce((pre, cur) => {
|
14024
14046
|
if (Object.prototype.hasOwnProperty.call(pre, cur)) {
|
@@ -14684,7 +14706,9 @@ class TableRender {
|
|
14684
14706
|
cell: true,
|
14685
14707
|
"expand-cell": column.type === "expand"
|
14686
14708
|
};
|
14709
|
+
const cellKey = `__CELL_${rowIndex}_${index}`;
|
14687
14710
|
return createVNode("td", {
|
14711
|
+
"key": cellKey,
|
14688
14712
|
"class": cellClass,
|
14689
14713
|
"style": cellStyle,
|
14690
14714
|
"colspan": 1,
|
@@ -14752,7 +14776,7 @@ class TableRender {
|
|
14752
14776
|
}
|
14753
14777
|
const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
|
14754
14778
|
if (typeof column.render === "function") {
|
14755
|
-
return column.render(cell, row, index, rows);
|
14779
|
+
return column.render(cell, this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]], row, column, index, rows);
|
14756
14780
|
}
|
14757
14781
|
return cell;
|
14758
14782
|
}
|
@@ -15066,9 +15090,9 @@ const useInit = (props) => {
|
|
15066
15090
|
const indexData = reactive([]);
|
15067
15091
|
const initIndexData = (keepLocalAction = false) => {
|
15068
15092
|
indexData.splice(0, indexData.length, ...props.data.map((item, index) => {
|
15069
|
-
const rowId = getRowKey(item, props);
|
15093
|
+
const rowId = getRowKey(item, props, index);
|
15070
15094
|
return __spreadProps(__spreadValues({}, item), {
|
15071
|
-
[TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index
|
15095
|
+
[TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
|
15072
15096
|
[TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
|
15073
15097
|
[TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false
|
15074
15098
|
});
|
@@ -24689,7 +24713,6 @@ var Component$1 = defineComponent({
|
|
24689
24713
|
}) {
|
24690
24714
|
const defaultTimelines = ref([]);
|
24691
24715
|
const updateTimelines = (timelines) => {
|
24692
|
-
console.log("timelines", timelines);
|
24693
24716
|
const defaults = [];
|
24694
24717
|
timelines.forEach((timeline2) => {
|
24695
24718
|
var _a;
|
@@ -24730,6 +24753,11 @@ var Component$1 = defineComponent({
|
|
24730
24753
|
}
|
24731
24754
|
};
|
24732
24755
|
onMounted(init);
|
24756
|
+
watch(() => props.list, () => {
|
24757
|
+
updateTimelines(props.list);
|
24758
|
+
}, {
|
24759
|
+
deep: true
|
24760
|
+
});
|
24733
24761
|
return {
|
24734
24762
|
defaultTimelines,
|
24735
24763
|
titleSelect
|