|
|
@@ -1,12 +1,10 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button :type="disabled?'':btnType" size="mini" :disabled="disabled" @click="dialogShow">{{$t(btnTitle)}}</el-button>
|
|
|
- <el-dialog :title="logTitle?$t(logTitle):$t(`提示`)" :visible.sync="dialogTableVisible" append-to-body
|
|
|
- :show-close="showClose" :width="logWidth?logWidth:'600px'">
|
|
|
- <div style="margin-bottom: 20px"><i class="el-icon-warning" v-if="iconShow" style="color: #eda51c;margin-right: 10px"></i>{{$t(content) + '?'}}</div>
|
|
|
+ <el-dialog :title="dialogTitle?$t(dialogTitle):$t(`提示`)" :visible.sync="dialogTableVisible" append-to-body :show-close="false" width="600px">
|
|
|
<slot name="formRule"></slot>
|
|
|
- <div slot="footer" class="dialog-footer" style="margin-top: 0 !important;">
|
|
|
- <slot name="footerBtn"></slot>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="onCancel" size="small">{{$t(`取 消`)}}</el-button>
|
|
|
+ <el-button :disabled="type == '必填' && content.length == 0" :type="btnType?btnType:'primary'" @click="onSubmit" size="small">{{$t(`确 定`)}}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -14,8 +12,8 @@
|
|
|
|
|
|
<script>
|
|
|
export default {
|
|
|
- name: "index1",
|
|
|
- props:["btnTitle","disabled","btnType","content","logTitle","iconShow","showClose","logWidth"],
|
|
|
+ name: "index3",
|
|
|
+ props:["btnTitle","disabled","btnType","content",'dialogTitle','type'],
|
|
|
data(){
|
|
|
return {
|
|
|
dialogTableVisible:false,
|
|
|
@@ -24,7 +22,7 @@ export default {
|
|
|
methods:{
|
|
|
dialogShow(){
|
|
|
this.dialogTableVisible = true
|
|
|
- this.$emit('showDialog')
|
|
|
+ this.$emit('dialogShow')
|
|
|
},
|
|
|
onCancel(){
|
|
|
this.dialogTableVisible = false
|
|
|
@@ -39,7 +37,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- /deep/ .el-dialog__body {
|
|
|
- padding: 0 20px 20px 20px !important;
|
|
|
- }
|
|
|
+/deep/ .el-dialog__body {
|
|
|
+ padding: 0 20px 20px 20px !important;
|
|
|
+}
|
|
|
</style>
|