@tmagic/form 1.0.0-beta.15 → 1.0.0-beta.16

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.
Files changed (57) hide show
  1. package/coverage/clover.xml +207 -206
  2. package/coverage/coverage-final.json +2 -2
  3. package/coverage/lcov-report/index.html +18 -18
  4. package/coverage/lcov-report/src/Form.vue.html +1 -1
  5. package/coverage/lcov-report/src/FormDialog.vue.html +1 -1
  6. package/coverage/lcov-report/src/containers/Col.vue.html +1 -1
  7. package/coverage/lcov-report/src/containers/Container.vue.html +25 -13
  8. package/coverage/lcov-report/src/containers/Fieldset.vue.html +1 -1
  9. package/coverage/lcov-report/src/containers/GroupList.vue.html +1 -1
  10. package/coverage/lcov-report/src/containers/GroupListItem.vue.html +1 -1
  11. package/coverage/lcov-report/src/containers/Panel.vue.html +1 -1
  12. package/coverage/lcov-report/src/containers/Row.vue.html +1 -1
  13. package/coverage/lcov-report/src/containers/Step.vue.html +1 -1
  14. package/coverage/lcov-report/src/containers/Table.vue.html +28 -4
  15. package/coverage/lcov-report/src/containers/Tabs.vue.html +1 -1
  16. package/coverage/lcov-report/src/containers/index.html +19 -19
  17. package/coverage/lcov-report/src/fields/Cascader.vue.html +1 -1
  18. package/coverage/lcov-report/src/fields/Checkbox.vue.html +1 -1
  19. package/coverage/lcov-report/src/fields/CheckboxGroup.vue.html +1 -1
  20. package/coverage/lcov-report/src/fields/ColorPicker.vue.html +1 -1
  21. package/coverage/lcov-report/src/fields/Date.vue.html +1 -1
  22. package/coverage/lcov-report/src/fields/DateTime.vue.html +1 -1
  23. package/coverage/lcov-report/src/fields/Daterange.vue.html +1 -1
  24. package/coverage/lcov-report/src/fields/Display.vue.html +1 -1
  25. package/coverage/lcov-report/src/fields/DynamicField.vue.html +1 -1
  26. package/coverage/lcov-report/src/fields/Hidden.vue.html +1 -1
  27. package/coverage/lcov-report/src/fields/Link.vue.html +2 -2
  28. package/coverage/lcov-report/src/fields/Number.vue.html +1 -1
  29. package/coverage/lcov-report/src/fields/RadioGroup.vue.html +1 -1
  30. package/coverage/lcov-report/src/fields/Select.vue.html +1 -1
  31. package/coverage/lcov-report/src/fields/Switch.vue.html +1 -1
  32. package/coverage/lcov-report/src/fields/Text.vue.html +1 -1
  33. package/coverage/lcov-report/src/fields/Textarea.vue.html +1 -1
  34. package/coverage/lcov-report/src/fields/Time.vue.html +1 -1
  35. package/coverage/lcov-report/src/fields/index.html +1 -1
  36. package/coverage/lcov-report/src/index.html +1 -1
  37. package/coverage/lcov-report/src/index.ts.html +1 -1
  38. package/coverage/lcov-report/src/theme/index.html +1 -1
  39. package/coverage/lcov-report/src/theme/index.scss.html +1 -1
  40. package/coverage/lcov-report/src/utils/config.ts.html +1 -1
  41. package/coverage/lcov-report/src/utils/createForm.ts.html +1 -1
  42. package/coverage/lcov-report/src/utils/fieldProps.ts.html +1 -1
  43. package/coverage/lcov-report/src/utils/form.ts.html +1 -1
  44. package/coverage/lcov-report/src/utils/index.html +1 -1
  45. package/coverage/lcov-report/src/utils/useAddField.ts.html +1 -1
  46. package/coverage/lcov.info +465 -460
  47. package/dist/style.css +7 -9
  48. package/dist/tmagic-form.es.js +12 -4
  49. package/dist/tmagic-form.es.js.map +1 -1
  50. package/dist/tmagic-form.umd.js +12 -4
  51. package/dist/tmagic-form.umd.js.map +1 -1
  52. package/dist/types/src/containers/Container.vue.d.ts +1 -0
  53. package/package.json +3 -3
  54. package/src/containers/Container.vue +7 -3
  55. package/src/containers/Table.vue +10 -2
  56. package/src/fields/Link.vue +1 -1
  57. package/src/theme/form.scss +24 -17
@@ -236,6 +236,7 @@
236
236
  }
237
237
  return display(mForm, props.config.display, props);
238
238
  });
239
+ const itemLabelWidth = vue.computed(() => props.config.labelWidth || props.labelWidth);
239
240
  vue.watchEffect(() => {
240
241
  expand.value = props.expandMore;
241
242
  });
@@ -296,6 +297,7 @@
296
297
  itemProp,
297
298
  items,
298
299
  display: display$1,
300
+ itemLabelWidth,
299
301
  tagName,
300
302
  rule,
301
303
  tooltip,
@@ -343,13 +345,14 @@
343
345
  prop: _ctx.itemProp,
344
346
  "step-active": _ctx.stepActive,
345
347
  "expand-more": _ctx.expand,
346
- "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
348
+ "label-width": _ctx.itemLabelWidth,
347
349
  onChange: _ctx.onChangeHandler
348
350
  }, null, 8, ["size", "model", "config", "name", "prop", "step-active", "expand-more", "label-width", "onChange"])) : _ctx.type && _ctx.display ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
349
351
  vue.createVNode(_component_el_form_item, {
350
352
  style: vue.normalizeStyle(_ctx.config.tip ? "flex: 1" : ""),
353
+ class: vue.normalizeClass({ hidden: _ctx.itemLabelWidth === 0 || !_ctx.config.text }),
351
354
  prop: _ctx.itemProp,
352
- "label-width": _ctx.config.text ? _ctx.config.labelWidth || _ctx.labelWidth : "0",
355
+ "label-width": _ctx.itemLabelWidth,
353
356
  rules: _ctx.rule
354
357
  }, {
355
358
  label: vue.withCtx(() => [
@@ -392,7 +395,7 @@
392
395
  }, null, 8, _hoisted_3$7)) : vue.createCommentVNode("", true)
393
396
  ]),
394
397
  _: 1
395
- }, 8, ["style", "prop", "label-width", "rules"]),
398
+ }, 8, ["style", "class", "prop", "label-width", "rules"]),
396
399
  _ctx.config.tip ? (vue.openBlock(), vue.createBlock(_component_el_tooltip, {
397
400
  key: 0,
398
401
  placement: "left"
@@ -421,7 +424,7 @@
421
424
  size: _ctx.size,
422
425
  "step-active": _ctx.stepActive,
423
426
  "expand-more": _ctx.expand,
424
- "label-width": _ctx.config.labelWidth || _ctx.labelWidth,
427
+ "label-width": _ctx.itemLabelWidth,
425
428
  prop: _ctx.itemProp,
426
429
  onChange: _ctx.onChangeHandler
427
430
  }, null, 8, ["model", "config", "size", "step-active", "expand-more", "label-width", "prop", "onChange"]);
@@ -1696,6 +1699,7 @@
1696
1699
  vue.createVNode(_component_el_button, {
1697
1700
  plain: "",
1698
1701
  size: "small",
1702
+ type: "primary",
1699
1703
  icon: _ctx.ArrowUp,
1700
1704
  text: "",
1701
1705
  onClick: ($event) => _ctx.upHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
@@ -1713,6 +1717,7 @@
1713
1717
  vue.createVNode(_component_el_button, {
1714
1718
  plain: "",
1715
1719
  size: "small",
1720
+ type: "primary",
1716
1721
  icon: _ctx.ArrowDown,
1717
1722
  text: "",
1718
1723
  onClick: ($event) => _ctx.downHandler(scope.$index + 1 + _ctx.pagecontext * _ctx.pagesize - 1),
@@ -1791,6 +1796,7 @@
1791
1796
  key: 1,
1792
1797
  icon: _ctx.Grid,
1793
1798
  size: "small",
1799
+ type: "primary",
1794
1800
  onClick: _ctx.toggleMode
1795
1801
  }, {
1796
1802
  default: vue.withCtx(() => [
@@ -1802,6 +1808,7 @@
1802
1808
  key: 2,
1803
1809
  icon: _ctx.FullScreen,
1804
1810
  size: "small",
1811
+ type: "primary",
1805
1812
  onClick: _ctx.toggleFullscreen
1806
1813
  }, {
1807
1814
  default: vue.withCtx(() => [
@@ -2702,6 +2709,7 @@
2702
2709
  }, vue.toDisplayString(_ctx.displayText), 5)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
2703
2710
  vue.createVNode(_component_el_button, {
2704
2711
  text: "",
2712
+ type: "primary",
2705
2713
  onClick: _ctx.editHandler
2706
2714
  }, {
2707
2715
  default: vue.withCtx(() => [