@tmagic/form 1.2.0-beta.11 → 1.2.0-beta.13

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.
@@ -1315,8 +1315,11 @@
1315
1315
  const toggleRowSelection = (row, selected) => {
1316
1316
  tMagicTable.value?.toggleRowSelection.call(tMagicTable.value, row, selected);
1317
1317
  };
1318
- const makeConfig = (config) => {
1318
+ const makeConfig = (config, row) => {
1319
1319
  const newConfig = lodashEs.cloneDeep(config);
1320
+ if (typeof config.itemsFunction === "function") {
1321
+ newConfig.items = config.itemsFunction(row);
1322
+ }
1320
1323
  delete newConfig.display;
1321
1324
  return newConfig;
1322
1325
  };
@@ -1580,7 +1583,7 @@
1580
1583
  labelWidth: "0",
1581
1584
  prop: getProp(scope.$index),
1582
1585
  rules: column.rules,
1583
- config: makeConfig(column),
1586
+ config: makeConfig(column, scope.row),
1584
1587
  model: scope.row,
1585
1588
  size: __props.size,
1586
1589
  onChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("change", __props.model[vue.unref(modelName)]))
@@ -2138,7 +2141,7 @@
2138
2141
  placeholder: __props.config.placeholder,
2139
2142
  disabled: __props.disabled,
2140
2143
  format: __props.config.format,
2141
- "value-format": __props.config.format || "YYYY-MM-DD HH:mm:ss",
2144
+ "value-format": __props.config.valueFormat || "YYYY-MM-DD HH:mm:ss",
2142
2145
  onChange: changeHandler
2143
2146
  }, null, 8, ["modelValue", "size", "placeholder", "disabled", "format", "value-format"]);
2144
2147
  };
@@ -3576,11 +3579,13 @@
3576
3579
  return vue.openBlock(), vue.createBlock(vue.unref(design.TMagicTimePicker), {
3577
3580
  modelValue: __props.model[__props.name],
3578
3581
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => __props.model[__props.name] = $event),
3582
+ "value-format": __props.config.valueFormat || "HH:mm:ss",
3583
+ format: __props.config.format || "HH:mm:ss",
3579
3584
  size: __props.size,
3580
3585
  placeholder: __props.config.placeholder,
3581
3586
  disabled: __props.disabled,
3582
3587
  onChange: changeHandler
3583
- }, null, 8, ["modelValue", "size", "placeholder", "disabled"]);
3588
+ }, null, 8, ["modelValue", "value-format", "format", "size", "placeholder", "disabled"]);
3584
3589
  };
3585
3590
  }
3586
3591
  });