@tmagic/form 1.0.3 → 1.0.6
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/tmagic-form.es.js +37 -45
- package/dist/tmagic-form.es.js.map +1 -1
- package/dist/tmagic-form.umd.js +37 -45
- package/dist/tmagic-form.umd.js.map +1 -1
- package/dist/types/src/containers/Table.vue.d.ts +3 -653
- package/dist/types/src/fields/Date.vue.d.ts +1 -2
- package/package.json +2 -2
- package/src/containers/Fieldset.vue +0 -1
- package/src/containers/Table.vue +2 -2
- package/src/fields/Date.vue +12 -16
- package/src/fields/Time.vue +8 -10
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.6",
|
|
3
3
|
"name": "@tmagic/form",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"dist/*",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@element-plus/icons": "0.0.11",
|
|
36
|
-
"@tmagic/utils": "1.0.
|
|
36
|
+
"@tmagic/utils": "1.0.6",
|
|
37
37
|
"element-plus": "^2.2.6",
|
|
38
38
|
"lodash-es": "^4.17.21",
|
|
39
39
|
"moment": "^2.29.2",
|
package/src/containers/Table.vue
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
/* eslint-disable no-param-reassign */
|
|
155
155
|
import { computed, defineComponent, inject, onMounted, PropType, ref, toRefs } from 'vue';
|
|
156
156
|
import { ArrowDown, ArrowUp, Delete, FullScreen, Grid } from '@element-plus/icons';
|
|
157
|
-
import { ElMessage,
|
|
157
|
+
import { ElMessage, UploadFile } from 'element-plus';
|
|
158
158
|
import { cloneDeep } from 'lodash-es';
|
|
159
159
|
import Sortable, { SortableEvent } from 'sortablejs';
|
|
160
160
|
|
|
@@ -223,7 +223,7 @@ export default defineComponent({
|
|
|
223
223
|
let timer: NodeJS.Timeout | null = null;
|
|
224
224
|
const mForm = inject<FormState | undefined>('mForm');
|
|
225
225
|
|
|
226
|
-
const elTable = ref<
|
|
226
|
+
const elTable = ref<any>();
|
|
227
227
|
const excelBtn = ref<any>();
|
|
228
228
|
const mTable = ref<HTMLDivElement>();
|
|
229
229
|
|
package/src/fields/Date.vue
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
></el-date-picker>
|
|
13
|
-
</div>
|
|
2
|
+
<el-date-picker
|
|
3
|
+
v-model="model[name]"
|
|
4
|
+
type="date"
|
|
5
|
+
:size="size"
|
|
6
|
+
:placeholder="config.placeholder"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:format="config.format"
|
|
9
|
+
:value-format="config.format || 'YYYY-MM-DD HH:mm:ss'"
|
|
10
|
+
@change="changeHandler"
|
|
11
|
+
></el-date-picker>
|
|
14
12
|
</template>
|
|
15
13
|
|
|
16
14
|
<script lang="ts">
|
|
17
|
-
import {
|
|
15
|
+
import { defineComponent, PropType } from 'vue';
|
|
18
16
|
|
|
19
17
|
import { datetimeFormatter } from '@tmagic/utils';
|
|
20
18
|
|
|
@@ -38,10 +36,8 @@ export default defineComponent({
|
|
|
38
36
|
setup(props, { emit }) {
|
|
39
37
|
useAddField(props.prop);
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
props.model[modelName.value] = datetimeFormatter(props.model[modelName.value], '');
|
|
39
|
+
props.model[props.name] = datetimeFormatter(props.model[props.name], '');
|
|
43
40
|
return {
|
|
44
|
-
modelName,
|
|
45
41
|
changeHandler(v: string) {
|
|
46
42
|
emit('change', v);
|
|
47
43
|
},
|
package/src/fields/Time.vue
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
></el-time-picker>
|
|
11
|
-
</div>
|
|
2
|
+
<el-time-picker
|
|
3
|
+
v-model="model[name]"
|
|
4
|
+
:size="size"
|
|
5
|
+
value-format="HH:mm:ss"
|
|
6
|
+
:placeholder="config.placeholder"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
@change="changeHandler"
|
|
9
|
+
></el-time-picker>
|
|
12
10
|
</template>
|
|
13
11
|
|
|
14
12
|
<script lang="ts">
|