@tmagic/form 1.6.0 → 1.7.0-beta.0

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 (43) hide show
  1. package/dist/style.css +29 -3
  2. package/dist/tmagic-form.js +1788 -1581
  3. package/dist/tmagic-form.umd.cjs +1830 -1619
  4. package/package.json +6 -6
  5. package/src/Form.vue +18 -5
  6. package/src/containers/Container.vue +109 -134
  7. package/src/containers/Fieldset.vue +31 -7
  8. package/src/containers/FlexLayout.vue +59 -0
  9. package/src/containers/Tabs.vue +11 -1
  10. package/src/fields/Cascader.vue +25 -16
  11. package/src/fields/Checkbox.vue +3 -3
  12. package/src/fields/CheckboxGroup.vue +1 -1
  13. package/src/fields/ColorPicker.vue +2 -2
  14. package/src/fields/Date.vue +2 -2
  15. package/src/fields/DateTime.vue +2 -2
  16. package/src/fields/Daterange.vue +2 -2
  17. package/src/fields/Number.vue +2 -2
  18. package/src/fields/NumberRange.vue +6 -6
  19. package/src/fields/RadioGroup.vue +18 -16
  20. package/src/fields/Select.vue +2 -2
  21. package/src/fields/Switch.vue +2 -2
  22. package/src/fields/Text.vue +21 -9
  23. package/src/fields/Textarea.vue +2 -2
  24. package/src/fields/Time.vue +2 -2
  25. package/src/fields/Timerange.vue +2 -2
  26. package/src/index.ts +5 -2
  27. package/src/table/ActionsColumn.vue +97 -0
  28. package/src/table/SortColumn.vue +101 -0
  29. package/src/table/Table.vue +170 -0
  30. package/src/table/type.ts +18 -0
  31. package/src/table/useAdd.ts +111 -0
  32. package/src/table/useFullscreen.ts +28 -0
  33. package/src/table/useImport.ts +68 -0
  34. package/src/table/usePagination.ts +30 -0
  35. package/src/table/useSelection.ts +34 -0
  36. package/src/table/useSortable.ts +48 -0
  37. package/src/table/useTableColumns.ts +194 -0
  38. package/src/theme/container.scss +17 -0
  39. package/src/theme/form.scss +15 -3
  40. package/src/theme/text.scss +6 -0
  41. package/src/utils/form.ts +56 -2
  42. package/types/index.d.ts +103 -56
  43. package/src/containers/Table.vue +0 -681
package/dist/style.css CHANGED
@@ -3,6 +3,17 @@
3
3
  display: inline-flex;
4
4
  }
5
5
 
6
+ .m-form-container.has-tip {
7
+ display: flex;
8
+ align-items: baseline;
9
+ }
10
+ .m-form-container.has-tip .tmagic-design-form-item {
11
+ flex: 1;
12
+ }
13
+ .m-form-container .tmagic-design-form-item.show-diff {
14
+ background: #f7dadd;
15
+ }
16
+
6
17
  .m-form-dialog .el-dialog__body {
7
18
  padding: 0 !important;
8
19
  }
@@ -40,23 +51,38 @@
40
51
  max-width: 50%;
41
52
  height: 100%;
42
53
  }
43
- .m-form .el-table .cell > div.m-form-container {
54
+ .m-form .tmagic-design-table .cell > div.m-form-container {
44
55
  display: block;
45
56
  }
46
- .m-form .el-tabs {
57
+ .m-form .tmagic-design-table .cell > div.m-form-container.has-tip {
58
+ display: flex;
59
+ }
60
+ .m-form .tmagic-design-tabs {
47
61
  margin-bottom: 10px;
48
62
  }
49
- .m-form .el-form-item.tmagic-form-hidden > .el-form-item__label {
63
+ .m-form .tmagic-design-form-item.tmagic-form-hidden > .el-form-item__label {
50
64
  display: none;
51
65
  }
52
66
  .m-form .t-form__item.tmagic-form-hidden > .t-form__label {
53
67
  display: none;
54
68
  }
69
+ .m-form .t-form__item.tmagic-form-hidden > .t-form__controls {
70
+ margin-left: 0 !important;
71
+ }
72
+ .m-form.t-form:not(.t-form-inline) .t-form__item:last-of-type {
73
+ margin-bottom: var(--td-comp-margin-xxl);
74
+ }
55
75
 
56
76
  .magic-datetime-picker-popper .el-picker-panel__footer button:first-child {
57
77
  display: none;
58
78
  }
59
79
 
80
+ .m-fields-text {
81
+ display: flex;
82
+ align-items: center;
83
+ width: 100%;
84
+ }
85
+
60
86
  .m-form-validate__warning {
61
87
  color: var(--el-color-warning);
62
88
  font-size: 12px;