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

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
@@ -11900,7 +11900,8 @@ var Component$h = defineComponent({
11900
11900
  placeholder: PropTypes.string.def("\u8BF7\u9009\u62E9"),
11901
11901
  selectAllText: PropTypes.string.def("\u5168\u90E8"),
11902
11902
  scrollLoading: PropTypes.bool.def(false),
11903
- allowCreate: PropTypes.bool.def(false)
11903
+ allowCreate: PropTypes.bool.def(false),
11904
+ popoverOptions: PropTypes.object.def({})
11904
11905
  },
11905
11906
  emits: ["update:modelValue", "change", "toggle", "clear", "scroll-end"],
11906
11907
  setup(props, {
@@ -12266,12 +12267,21 @@ var Component$h = defineComponent({
12266
12267
  [this.size]: true,
12267
12268
  [this.behavior]: true
12268
12269
  });
12269
- const modifiers = [{
12270
- name: "offset",
12271
- options: {
12272
- offset: [0, 4]
12273
- }
12274
- }];
12270
+ const popoverOptions = Object.assign({
12271
+ theme: "light bk-select-popover",
12272
+ trigger: "manual",
12273
+ width: this.popperWidth,
12274
+ arrow: false,
12275
+ placement: "bottom",
12276
+ isShow: this.isPopoverShow,
12277
+ modifiers: [{
12278
+ name: "offset",
12279
+ options: {
12280
+ offset: [0, 4]
12281
+ }
12282
+ }],
12283
+ handleFirstUpdate: this.onPopoverFirstUpdate
12284
+ }, this.popoverOptions);
12275
12285
  const suffixIcon = () => {
12276
12286
  if (this.loading) {
12277
12287
  return createVNode(BkLoading, {
@@ -12375,17 +12385,9 @@ var Component$h = defineComponent({
12375
12385
  };
12376
12386
  return withDirectives(createVNode("div", {
12377
12387
  "class": selectClass
12378
- }, [createVNode(BkPopover, {
12379
- "ref": "popoverRef",
12380
- "theme": "light",
12381
- "trigger": "manual",
12382
- "width": this.popperWidth,
12383
- "arrow": false,
12384
- "placement": "bottom",
12385
- "isShow": this.isPopoverShow,
12386
- "modifiers": modifiers,
12387
- "handleFirstUpdate": this.onPopoverFirstUpdate
12388
- }, {
12388
+ }, [createVNode(BkPopover, mergeProps({
12389
+ "ref": "popoverRef"
12390
+ }, popoverOptions), {
12389
12391
  default: () => renderSelectTrigger(),
12390
12392
  content: () => renderSelectContent()
12391
12393
  })]), [[resolveDirective("clickoutside"), this.handleClickOutside]]);
@@ -12534,6 +12536,9 @@ var Component$f = defineComponent({
12534
12536
  });
12535
12537
  defaultSteps.value.splice(0, defaultSteps.value.length, ...defaults);
12536
12538
  };
12539
+ const updateCurStep = (curStep) => {
12540
+ stepsProps.curStep = curStep;
12541
+ };
12537
12542
  const init = () => {
12538
12543
  var _a;
12539
12544
  defaultSteps.value.splice(0, defaultSteps.value.length, ...[{
@@ -12567,6 +12572,16 @@ var Component$f = defineComponent({
12567
12572
  }
12568
12573
  };
12569
12574
  onMounted(init);
12575
+ watch(() => props.steps, () => {
12576
+ updateSteps(props.steps);
12577
+ }, {
12578
+ deep: true
12579
+ });
12580
+ watch(() => props.curStep, () => {
12581
+ updateCurStep(props.curStep);
12582
+ }, {
12583
+ deep: true
12584
+ });
12570
12585
  return {
12571
12586
  defaultSteps,
12572
12587
  jumpTo
@@ -12592,7 +12607,12 @@ var Component$f = defineComponent({
12592
12607
  }
12593
12608
  return typeof step === "string";
12594
12609
  };
12595
- const isIcon = (index, step) => step.icon ? step.icon : index + 1;
12610
+ const isNumberIcon = (index, step) => {
12611
+ if (!step.icon) {
12612
+ step.icon = index;
12613
+ }
12614
+ return !isNaN(step.icon);
12615
+ };
12596
12616
  const isLoadingStatus = (step) => step.status === "loading";
12597
12617
  const isErrorStatus = (step) => step.status === "error";
12598
12618
  const renderIcon = (index, step) => {
@@ -12611,7 +12631,7 @@ var Component$f = defineComponent({
12611
12631
  "class": "bk-steps-icon"
12612
12632
  }, null);
12613
12633
  }
12614
- return createVNode("span", null, [isIcon(index, step)]);
12634
+ return createVNode("span", null, [isNumberIcon(index, step) ? index + 1 : createVNode(step.icon, null, null)]);
12615
12635
  };
12616
12636
  return createVNode("div", {
12617
12637
  "class": stepsCls
@@ -12620,7 +12640,7 @@ var Component$f = defineComponent({
12620
12640
  return createVNode("div", {
12621
12641
  "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
12642
  }, [createVNode("span", {
12623
- "class": ["bk-step-indicator", `bk-step-${iconType(step) ? "icon" : "number"}`],
12643
+ "class": ["bk-step-indicator", `bk-step-${iconType(step) ? "icon" : "number"}`, `bk-step-icon${step.status}`],
12624
12644
  "style": {
12625
12645
  cursor: this.controllable ? "pointer" : ""
12626
12646
  },
@@ -13256,7 +13276,7 @@ const tableProps = {
13256
13276
  rowKey: PropTypes.oneOfType([
13257
13277
  PropTypes.string,
13258
13278
  PropTypes.func
13259
- ]).def(void 0)
13279
+ ]).def(TABLE_ROW_ATTRIBUTE.ROW_INDEX)
13260
13280
  };
13261
13281
  function _isSlot$2(s2) {
13262
13282
  return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
@@ -14002,7 +14022,7 @@ const resolveHeadConfig = (props) => {
14002
14022
  };
14003
14023
  const getRowText = (row, key, column) => {
14004
14024
  if (column.type === "index") {
14005
- return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX];
14025
+ return row[TABLE_ROW_ATTRIBUTE.ROW_INDEX] + 1;
14006
14026
  }
14007
14027
  return row[key];
14008
14028
  };
@@ -14018,8 +14038,11 @@ const formatPropAsArray = (prop, args) => {
14018
14038
  }
14019
14039
  return [];
14020
14040
  };
14021
- const getRowKey = (item, props) => {
14041
+ const getRowKey = (item, props, index) => {
14022
14042
  if (typeof props.rowKey === "string") {
14043
+ if (props.rowKey === TABLE_ROW_ATTRIBUTE.ROW_INDEX) {
14044
+ return `__ROW_INDEX_${index}`;
14045
+ }
14023
14046
  const keys = props.rowKey.split(".");
14024
14047
  return keys.reduce((pre, cur) => {
14025
14048
  if (Object.prototype.hasOwnProperty.call(pre, cur)) {
@@ -14685,7 +14708,9 @@ class TableRender {
14685
14708
  cell: true,
14686
14709
  "expand-cell": column.type === "expand"
14687
14710
  };
14711
+ const cellKey = `__CELL_${rowIndex}_${index}`;
14688
14712
  return createVNode("td", {
14713
+ "key": cellKey,
14689
14714
  "class": cellClass,
14690
14715
  "style": cellStyle,
14691
14716
  "colspan": 1,
@@ -14753,7 +14778,7 @@ class TableRender {
14753
14778
  }
14754
14779
  const cell = getRowText(row, resolvePropVal(column, "field", [column, row]), column);
14755
14780
  if (typeof column.render === "function") {
14756
- return column.render(cell, row, index, rows);
14781
+ return column.render(cell, this.props.data[row[TABLE_ROW_ATTRIBUTE.ROW_INDEX]], row, column, index, rows);
14757
14782
  }
14758
14783
  return cell;
14759
14784
  }
@@ -15067,9 +15092,9 @@ const useInit = (props) => {
15067
15092
  const indexData = reactive([]);
15068
15093
  const initIndexData = (keepLocalAction = false) => {
15069
15094
  indexData.splice(0, indexData.length, ...props.data.map((item, index) => {
15070
- const rowId = getRowKey(item, props);
15095
+ const rowId = getRowKey(item, props, index);
15071
15096
  return __spreadProps(__spreadValues({}, item), {
15072
- [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index + 1,
15097
+ [TABLE_ROW_ATTRIBUTE.ROW_INDEX]: index,
15073
15098
  [TABLE_ROW_ATTRIBUTE.ROW_UID]: rowId,
15074
15099
  [TABLE_ROW_ATTRIBUTE.ROW_EXPAND]: keepLocalAction ? isRowExpand(rowId) : false
15075
15100
  });
@@ -24690,7 +24715,6 @@ var Component$1 = defineComponent({
24690
24715
  }) {
24691
24716
  const defaultTimelines = ref([]);
24692
24717
  const updateTimelines = (timelines) => {
24693
- console.log("timelines", timelines);
24694
24718
  const defaults = [];
24695
24719
  timelines.forEach((timeline2) => {
24696
24720
  var _a;
@@ -24731,6 +24755,11 @@ var Component$1 = defineComponent({
24731
24755
  }
24732
24756
  };
24733
24757
  onMounted(init);
24758
+ watch(() => props.list, () => {
24759
+ updateTimelines(props.list);
24760
+ }, {
24761
+ deep: true
24762
+ });
24734
24763
  return {
24735
24764
  defaultTimelines,
24736
24765
  titleSelect