bkui-vue 0.0.1-beta.94 → 0.0.1-beta.95

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.esm.js CHANGED
@@ -12534,6 +12534,9 @@ var Component$f = defineComponent({
12534
12534
  });
12535
12535
  defaultSteps.value.splice(0, defaultSteps.value.length, ...defaults);
12536
12536
  };
12537
+ const updateCurStep = (curStep) => {
12538
+ stepsProps.curStep = curStep;
12539
+ };
12537
12540
  const init = () => {
12538
12541
  var _a;
12539
12542
  defaultSteps.value.splice(0, defaultSteps.value.length, ...[{
@@ -12567,6 +12570,16 @@ var Component$f = defineComponent({
12567
12570
  }
12568
12571
  };
12569
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
+ });
12570
12583
  return {
12571
12584
  defaultSteps,
12572
12585
  jumpTo
@@ -12592,7 +12605,12 @@ var Component$f = defineComponent({
12592
12605
  }
12593
12606
  return typeof step === "string";
12594
12607
  };
12595
- const isIcon = (index, step) => step.icon ? step.icon : index + 1;
12608
+ const isNumberIcon = (index, step) => {
12609
+ if (!step.icon) {
12610
+ step.icon = index;
12611
+ }
12612
+ return !isNaN(step.icon);
12613
+ };
12596
12614
  const isLoadingStatus = (step) => step.status === "loading";
12597
12615
  const isErrorStatus = (step) => step.status === "error";
12598
12616
  const renderIcon = (index, step) => {
@@ -12611,7 +12629,7 @@ var Component$f = defineComponent({
12611
12629
  "class": "bk-steps-icon"
12612
12630
  }, null);
12613
12631
  }
12614
- return createVNode("span", null, [isIcon(index, step)]);
12632
+ return createVNode("span", null, [isNumberIcon(index, step) ? index + 1 : createVNode(step.icon, null, null)]);
12615
12633
  };
12616
12634
  return createVNode("div", {
12617
12635
  "class": stepsCls
@@ -12620,7 +12638,7 @@ var Component$f = defineComponent({
12620
12638
  return createVNode("div", {
12621
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}`] : ""]
12622
12640
  }, [createVNode("span", {
12623
- "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}`],
12624
12642
  "style": {
12625
12643
  cursor: this.controllable ? "pointer" : ""
12626
12644
  },
@@ -13256,7 +13274,7 @@ const tableProps = {
13256
13274
  rowKey: PropTypes.oneOfType([
13257
13275
  PropTypes.string,
13258
13276
  PropTypes.func
13259
- ]).def(void 0)
13277
+ ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX)
13260
13278
  };
13261
13279
  function _isSlot$2(s2) {
13262
13280
  return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
@@ -14002,7 +14020,7 @@ const resolveHeadConfig = (props) => {
14002
14020
  };
14003
14021
  const getRowText = (row, key, column) => {
14004
14022
  if (column.type === "index") {
14005
- return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX];
14023
+ return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX] + 1;
14006
14024
  }
14007
14025
  return row[key];
14008
14026
  };
@@ -14018,8 +14036,11 @@ const formatPropAsArray = (prop, args) => {
14018
14036
  }
14019
14037
  return [];
14020
14038
  };
14021
- const getRowKey = (item, props) => {
14039
+ const getRowKey = (item, props, index) => {
14022
14040
  if (typeof props.rowKey === "string") {
14041
+ if (props.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
14042
+ return `__ROW_INDEX_${index}`;
14043
+ }
14023
14044
  const keys = props.rowKey.split(".");
14024
14045
  return keys.reduce((pre, cur) => {
14025
14046
  if (Object.prototype.hasOwnProperty.call(pre, cur)) {
@@ -14685,7 +14706,9 @@ class TableRender {
14685
14706
  cell: true,
14686
14707
  "expand-cell": column.type === "expand"
14687
14708
  };
14709
+ const cellKey = `__CELL_${rowIndex}_${index}`;
14688
14710
  return createVNode("td", {
14711
+ "key": cellKey,
14689
14712
  "class": cellClass,
14690
14713
  "style": cellStyle,
14691
14714
  "colspan": 1,
@@ -14753,7 +14776,7 @@ class TableRender {
14753
14776
  }
14754
14777
  const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
14755
14778
  if (typeof column.render === "function") {
14756
- 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);
14757
14780
  }
14758
14781
  return cell;
14759
14782
  }
@@ -15067,9 +15090,9 @@ const useInit = (props) => {
15067
15090
  const indexData = reactive([]);
15068
15091
  const initIndexData = (keepLocalAction = false) => {
15069
15092
  indexData.splice(0, indexData.length, ...props.data.map((item, index) => {
15070
- const rowId = getRowKey(item, props);
15093
+ const rowId = getRowKey(item, props, index);
15071
15094
  return __spreadProps(__spreadValues({}, item), {
15072
- [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index + 1,
15095
+ [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
15073
15096
  [TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
15074
15097
  [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false
15075
15098
  });
@@ -24690,7 +24713,6 @@ var Component$1 = defineComponent({
24690
24713
  }) {
24691
24714
  const defaultTimelines = ref([]);
24692
24715
  const updateTimelines = (timelines) => {
24693
- console.log("timelines", timelines);
24694
24716
  const defaults = [];
24695
24717
  timelines.forEach((timeline2) => {
24696
24718
  var _a;
@@ -24731,6 +24753,11 @@ var Component$1 = defineComponent({
24731
24753
  }
24732
24754
  };
24733
24755
  onMounted(init);
24756
+ watch(() => props.list, () => {
24757
+ updateTimelines(props.list);
24758
+ }, {
24759
+ deep: true
24760
+ });
24734
24761
  return {
24735
24762
  defaultTimelines,
24736
24763
  titleSelect