Skip to content

Commit 09c5a52

Browse files
committed
修复 Form Actions 取消按钮事件
1 parent 47650a8 commit 09c5a52

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=bd89b077f08d1b3fe3c8",
2+
"/app.js": "/app.js?id=56b921be10395873e06e",
33
"/manifest.js": "/manifest.js?id=8991394a854ee5cdffc3",
44
"/vendor.js": "/vendor.js?id=df0be4950fcb717193ba"
55
}

resources/js/components/Root.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
</el-footer>
153153
</el-container>
154154
</el-container>
155-
<el-backtop :bottom="80"></el-backtop>
155+
<el-backtop></el-backtop>
156156
<el-drawer :visible.sync="showAdminSet" size="250px">
157157
<div style="padding:0 10px;">
158158
<el-divider>主题风格</el-divider>

resources/js/components/form/Form.vue

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,10 @@
100100
</template>
101101
</component>
102102
</component>
103-
<component :is="attrs.actions.fixed?'Affix':'div'" :offset-bottom="2">
103+
<component
104+
:is="attrs.actions.fixed ? 'Affix' : 'div'"
105+
:offset-bottom="20"
106+
>
104107
<div
105108
class="form-bottom-actions flex padding-tb"
106109
:class="{ 'form-bottom-actions-fixedxxx': attrs.actions.fixed }"
@@ -133,7 +136,7 @@
133136
:icon="attrs.actions.cancelButton.icon"
134137
:autofocus="attrs.actions.cancelButton.autofocus"
135138
:loading="loading"
136-
@click="attrs.attrs.isDialog ? closeDialog : $router.go(-1)"
139+
@click="onCancel"
137140
><template v-if="attrs.actions.cancelButton.content">{{
138141
attrs.actions.cancelButton.content
139142
}}</template>
@@ -299,6 +302,9 @@ export default {
299302
resetForm(formName) {
300303
this.$refs[formName].resetFields();
301304
},
305+
onCancel() {
306+
this.attrs.attrs.isDialog ? this.closeDialog() : this.$router.go(-1);
307+
},
302308
closeDialog() {
303309
this.$bus.emit("showDialogGridFrom", { isShow: false });
304310
},
@@ -318,14 +324,15 @@ export default {
318324
align-items: center;
319325
justify-content: space-between;
320326
}
321-
.form-bottom-actions-fixed {
322-
position: fixed;
323-
bottom: 15px;
324-
left: 0;
325-
right: 0;
326-
padding: 15px;
327-
background: #ffffff;
327+
.admin-affix {
328+
.form-bottom-actions {
329+
padding: 6px;
330+
background: #ffffff;
331+
border-radius: 4px;
332+
border: 1px solid #EBEEF5;
333+
}
328334
}
335+
329336
.form-item-help {
330337
color: #999;
331338
}

0 commit comments

Comments
 (0)