@tmagic/form 1.0.0-beta.2 → 1.0.0-beta.3

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 (44) hide show
  1. package/package.json +3 -2
  2. package/src/containers/Table.vue +8 -6
  3. package/src/theme/table.scss +0 -1
  4. package/dist/style.css +0 -161
  5. package/dist/tmagic-form.es.js +0 -3751
  6. package/dist/tmagic-form.es.js.map +0 -1
  7. package/dist/tmagic-form.umd.js +0 -3792
  8. package/dist/tmagic-form.umd.js.map +0 -1
  9. package/dist/types/src/Form.vue.d.ts +0 -301
  10. package/dist/types/src/FormDialog.vue.d.ts +0 -638
  11. package/dist/types/src/containers/Container.vue.d.ts +0 -69
  12. package/dist/types/src/containers/Fieldset.vue.d.ts +0 -56
  13. package/dist/types/src/containers/GroupList.vue.d.ts +0 -56
  14. package/dist/types/src/containers/GroupListItem.vue.d.ts +0 -72
  15. package/dist/types/src/containers/Panel.vue.d.ts +0 -41
  16. package/dist/types/src/containers/Row.vue.d.ts +0 -42
  17. package/dist/types/src/containers/Step.vue.d.ts +0 -45
  18. package/dist/types/src/containers/Table.vue.d.ts +0 -1401
  19. package/dist/types/src/containers/Tabs.vue.d.ts +0 -45
  20. package/dist/types/src/fields/Cascader.vue.d.ts +0 -1748
  21. package/dist/types/src/fields/Checkbox.vue.d.ts +0 -59
  22. package/dist/types/src/fields/CheckboxGroup.vue.d.ts +0 -56
  23. package/dist/types/src/fields/Date.vue.d.ts +0 -58
  24. package/dist/types/src/fields/DateTime.vue.d.ts +0 -57
  25. package/dist/types/src/fields/Daterange.vue.d.ts +0 -57
  26. package/dist/types/src/fields/Display.vue.d.ts +0 -3
  27. package/dist/types/src/fields/DynamicField.vue.d.ts +0 -76
  28. package/dist/types/src/fields/Hidden.vue.d.ts +0 -3
  29. package/dist/types/src/fields/Link.vue.d.ts +0 -1358
  30. package/dist/types/src/fields/Number.vue.d.ts +0 -59
  31. package/dist/types/src/fields/RadioGroup.vue.d.ts +0 -55
  32. package/dist/types/src/fields/Select.vue.d.ts +0 -975
  33. package/dist/types/src/fields/Switch.vue.d.ts +0 -59
  34. package/dist/types/src/fields/Text.vue.d.ts +0 -61
  35. package/dist/types/src/fields/Textarea.vue.d.ts +0 -56
  36. package/dist/types/src/fields/Time.vue.d.ts +0 -54
  37. package/dist/types/src/index.d.ts +0 -36
  38. package/dist/types/src/schema.d.ts +0 -495
  39. package/dist/types/src/shims-vue.d.ts +0 -6
  40. package/dist/types/src/utils/config.d.ts +0 -3
  41. package/dist/types/src/utils/fieldProps.d.ts +0 -21
  42. package/dist/types/src/utils/form.d.ts +0 -8
  43. package/dist/types/src/utils/useAddField.d.ts +0 -1
  44. package/dist/types/src/vite-env.d.ts +0 -1
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
- "version": "1.0.0-beta.2",
2
+ "version": "1.0.0-beta.3",
3
3
  "name": "@tmagic/form",
4
+ "sideEffects": false,
4
5
  "main": "dist/tmagic-form.umd.js",
5
6
  "module": "dist/tmagic-form.es.js",
6
7
  "style": "dist/style.css",
@@ -27,7 +28,7 @@
27
28
  },
28
29
  "dependencies": {
29
30
  "@element-plus/icons": "0.0.11",
30
- "@tmagic/utils": "^1.0.0-beta.2",
31
+ "@tmagic/utils": "^1.0.0-beta.3",
31
32
  "element-plus": "^2.0.2",
32
33
  "lodash-es": "^4.17.21",
33
34
  "moment": "^2.29.1",
@@ -21,7 +21,7 @@
21
21
  </template>
22
22
  </el-table-column>
23
23
 
24
- <el-table-column label="操作" width="50" :fixed="config.fixed === false ? undefined : 'left'">
24
+ <el-table-column label="操作" width="60" :fixed="config.fixed === false ? undefined : 'left'">
25
25
  <template v-slot="scope">
26
26
  <el-button
27
27
  v-show="showDelete(scope.$index + 1 + pagecontext * pagesize - 1)"
@@ -33,7 +33,7 @@
33
33
  </template>
34
34
  </el-table-column>
35
35
 
36
- <el-table-column v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="70">
36
+ <el-table-column v-if="sort && model[modelName] && model[modelName].length > 1" label="排序" width="60">
37
37
  <template v-slot="scope">
38
38
  <el-tooltip
39
39
  content="点击上移,双击置顶"
@@ -74,7 +74,7 @@
74
74
  width="45"
75
75
  ></el-table-column>
76
76
 
77
- <el-table-column width="50" label="序号">
77
+ <el-table-column width="60" label="序号">
78
78
  <template v-slot="scope">{{ scope.$index + 1 + pagecontext * pagesize }}</template>
79
79
  </el-table-column>
80
80
 
@@ -107,10 +107,10 @@
107
107
  </el-tooltip>
108
108
  <slot></slot>
109
109
  <el-button v-if="addable" size="small" type="primary" plain @click="newHandler()">添加</el-button> &nbsp;
110
- <el-button icon="el-icon-s-grid" size="small" @click="toggleMode" v-if="enableToggleMode && !isFullscreen"
110
+ <el-button :icon="Grid" size="small" @click="toggleMode" v-if="enableToggleMode && !isFullscreen"
111
111
  >展开配置</el-button
112
112
  >
113
- <el-button icon="el-icon-s-grid" size="small" @click="toggleFullscreen" v-if="config.enableFullscreen !== false">
113
+ <el-button :icon="FullScreen" size="small" @click="toggleFullscreen" v-if="config.enableFullscreen !== false">
114
114
  {{ isFullscreen ? '退出全屏' : '全屏编辑' }}
115
115
  </el-button>
116
116
  <el-upload
@@ -145,7 +145,7 @@
145
145
  <script lang="ts">
146
146
  /* eslint-disable no-param-reassign */
147
147
  import { computed, defineComponent, inject, onMounted, PropType, ref, toRefs } from 'vue';
148
- import { ArrowDown, ArrowUp, Delete } from '@element-plus/icons';
148
+ import { ArrowDown, ArrowUp, Delete, FullScreen, Grid } from '@element-plus/icons';
149
149
  import { ElMessage, ElTable, ElUpload } from 'element-plus';
150
150
  import { cloneDeep } from 'lodash-es';
151
151
  import Sortable, { SortableEvent } from 'sortablejs';
@@ -396,6 +396,8 @@ export default defineComponent({
396
396
  ArrowDown,
397
397
  ArrowUp,
398
398
  Delete,
399
+ FullScreen,
400
+ Grid,
399
401
 
400
402
  data: computed(() =>
401
403
  props.model[modelName.value].filter(
@@ -35,7 +35,6 @@
35
35
  }
36
36
 
37
37
  .el-table {
38
- td,
39
38
  th {
40
39
  padding: 0 !important;
41
40
  }
package/dist/style.css DELETED
@@ -1,161 +0,0 @@
1
- .m-form-dialog .el-dialog__body {
2
- padding: 0 !important;
3
- }
4
- .m-form-dialog .m-dialog-body {
5
- padding: 0 20px;
6
- }
7
- .m-form-dialog .el-table .m-form-item .el-form-item {
8
- margin-bottom: 0;
9
- }
10
-
11
- .fade-enter-active,
12
- .fade-leave-active {
13
- transition: opacity 0.5s;
14
- }
15
-
16
- .fade-enter, .fade-leave-to {
17
- opacity: 0;
18
- }
19
-
20
- .m-form,
21
- .m-form-panel.el-card .el-card__body {
22
- color: #333;
23
- background-color: #fff;
24
- }
25
-
26
- .m-form .m-form-tip {
27
- color: rgba(0, 0, 0, 0.45);
28
- font-size: 12px;
29
- transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
30
- }
31
-
32
- .m-form .m-form-schematic {
33
- max-width: 50%;
34
- height: 100%;
35
- }
36
-
37
- .el-table .cell > div.m-form-container {
38
- display: block;
39
- }
40
-
41
- .magic-datetime-picker-popper .el-picker-panel__footer button:first-child {
42
- display: none;
43
- }
44
-
45
- div.m-fields-link {
46
- width: fit-content;
47
- }
48
-
49
- fieldset.m-fieldset {
50
- position: relative;
51
- border: 1px solid #e5e5e5;
52
- margin-top: 10px;
53
- margin-bottom: 10px;
54
- min-inline-size: auto;
55
- }
56
- fieldset.m-fieldset legend {
57
- font-size: 14px;
58
- position: absolute;
59
- border: 0;
60
- top: -10px;
61
- left: 20px;
62
- background: white;
63
- width: auto;
64
- padding: 0px 3px;
65
- font-weight: bold;
66
- line-height: 20px;
67
- }
68
- fieldset.m-fieldset .m-form-tip {
69
- margin-left: 5px;
70
- }
71
-
72
- .m-fields-group-list .el-button--text {
73
- padding: 0;
74
- margin-bottom: 7px;
75
- }
76
- .m-fields-group-list .el-tree-node__expand-icon {
77
- padding: 0;
78
- margin-bottom: 7px;
79
- }
80
- .m-fields-group-list .el-tree-node__expand-icon.expand {
81
- transform: rotate(90deg);
82
- }
83
- .m-fields-group-list .m-fields-group-list-item {
84
- border-bottom: 1px solid #ebeef5;
85
- margin-bottom: 7px;
86
- }
87
- .m-fields-group-list .m-fields-group-list-item:last-of-type {
88
- border-bottom: 0;
89
- }
90
-
91
- .m-form-panel .el-card__header:hover {
92
- background: #f2f6fc;
93
- }
94
- .m-form-panel .el-card__header a {
95
- color: #409eff;
96
- }
97
- .m-form-panel .el-card__body {
98
- padding: 10px;
99
- }
100
- .m-form-panel .m-form-tip {
101
- margin-left: 5px;
102
- }
103
-
104
- .m-fields-table {
105
- width: 100%;
106
- }
107
- .m-fields-table.fixed {
108
- position: fixed;
109
- top: 0;
110
- right: 0;
111
- left: 0;
112
- bottom: 0;
113
- z-index: 100;
114
- }
115
- .m-fields-table.fixed::before {
116
- content: " ";
117
- display: block;
118
- background: rgba(0, 0, 0, 0.5);
119
- position: fixed;
120
- top: 0;
121
- right: 0;
122
- left: 0;
123
- bottom: 0;
124
- z-index: 100;
125
- }
126
- .m-fields-table.fixed > .el-form-item__content {
127
- z-index: 101;
128
- position: relative;
129
- margin: 10vh auto;
130
- max-width: fit-content;
131
- }
132
- .m-fields-table.fixed table {
133
- width: 95vw !important;
134
- }
135
- .m-fields-table th {
136
- background-color: #f2f2f2 !important;
137
- color: #333 !important;
138
- }
139
- .m-fields-table .el-table td,
140
- .m-fields-table .el-table th {
141
- padding: 0 !important;
142
- }
143
- .m-fields-table .el-table__column--dropable {
144
- cursor: move;
145
- }
146
- .m-fields-table .el-form-item__content .el-input-group {
147
- vertical-align: middle;
148
- }
149
- .m-fields-table.m-fields-table-item-extra tr.expanded td {
150
- border-bottom: 0;
151
- }
152
- .m-fields-table .el-table__expanded-cell .m-form-tip {
153
- margin-left: 80px;
154
- }
155
- .m-fields-table .el-form-item {
156
- margin-bottom: 0;
157
- }
158
-
159
- .m-select {
160
- width: 100%;
161
- }