@tmagic/form 1.2.0-beta.1 → 1.2.0-beta.2

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.0-beta.1",
2
+ "version": "1.2.0-beta.2",
3
3
  "name": "@tmagic/form",
4
4
  "sideEffects": [
5
5
  "dist/*",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@element-plus/icons-vue": "^2.0.9",
38
- "@tmagic/utils": "1.2.0-beta.1",
38
+ "@tmagic/utils": "1.2.0-beta.2",
39
39
  "element-plus": "^2.2.17",
40
40
  "lodash-es": "^4.17.21",
41
41
  "sortablejs": "^1.14.0",
@@ -1,53 +1,55 @@
1
1
  <template>
2
- <teleport to="body">
3
- <div class="m-form-dialog" v-show="dialogVisible">
4
- <el-dialog
5
- v-model="dialogVisible"
6
- top="20px"
7
- :title="title"
8
- :width="width"
9
- :fullscreen="fullscreen"
10
- :close-on-click-modal="false"
11
- @close="closeHandler"
12
- >
13
- <div class="m-dialog-body" :style="`max-height: ${bodyHeight}; overflow-y: auto; overflow-x: hidden;`">
14
- <m-form
15
- v-model="stepActive"
16
- ref="form"
17
- :size="size"
18
- :config="config"
19
- :init-values="values"
20
- :parent-values="parentValues"
21
- :label-width="labelWidth"
22
- @change="changeHandler"
23
- ></m-form>
24
- <slot></slot>
25
- </div>
26
-
27
- <template #footer>
28
- <el-row class="dialog-footer">
29
- <el-col :span="12" style="text-align: left">
30
- <div style="min-height: 1px">
31
- <slot name="left"></slot>
32
- </div>
33
- </el-col>
34
- <el-col :span="12">
35
- <slot name="footer">
36
- <el-button @click="cancel" size="small">取 消</el-button>
37
- <el-button v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep">上一步</el-button>
38
- <el-button v-if="hasStep && stepCount > stepActive" type="info" size="small" @click="nextStep"
39
- >下一步</el-button
40
- >
41
- <el-button v-else type="primary" size="small" :loading="saveFetch" @click="save">{{
42
- confirmText
43
- }}</el-button>
44
- </slot>
45
- </el-col>
46
- </el-row>
47
- </template>
48
- </el-dialog>
2
+ <el-dialog
3
+ v-model="dialogVisible"
4
+ class="m-form-dialog"
5
+ top="20px"
6
+ append-to-body
7
+ :title="title"
8
+ :width="width"
9
+ :fullscreen="fullscreen"
10
+ :close-on-click-modal="false"
11
+ @close="closeHandler"
12
+ >
13
+ <div
14
+ v-if="dialogVisible"
15
+ class="m-dialog-body"
16
+ :style="`max-height: ${bodyHeight}; overflow-y: auto; overflow-x: hidden;`"
17
+ >
18
+ <m-form
19
+ v-model="stepActive"
20
+ ref="form"
21
+ :size="size"
22
+ :config="config"
23
+ :init-values="values"
24
+ :parent-values="parentValues"
25
+ :label-width="labelWidth"
26
+ @change="changeHandler"
27
+ ></m-form>
28
+ <slot></slot>
49
29
  </div>
50
- </teleport>
30
+
31
+ <template #footer>
32
+ <el-row class="dialog-footer">
33
+ <el-col :span="12" style="text-align: left">
34
+ <div style="min-height: 1px">
35
+ <slot name="left"></slot>
36
+ </div>
37
+ </el-col>
38
+ <el-col :span="12">
39
+ <slot name="footer">
40
+ <el-button @click="cancel" size="small">取 消</el-button>
41
+ <el-button v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep">上一步</el-button>
42
+ <el-button v-if="hasStep && stepCount > stepActive" type="info" size="small" @click="nextStep"
43
+ >下一步</el-button
44
+ >
45
+ <el-button v-else type="primary" size="small" :loading="saveFetch" @click="save">{{
46
+ confirmText
47
+ }}</el-button>
48
+ </slot>
49
+ </el-col>
50
+ </el-row>
51
+ </template>
52
+ </el-dialog>
51
53
  </template>
52
54
 
53
55
  <script lang="ts">