Просмотр исходного кода

Merge branch 'testToMerge' into orangeUrgent

# Conflicts:
#	src/components/dialogTemplate/index3.vue
qymljy 3 недель назад
Родитель
Сommit
627846365f
2 измененных файлов с 48 добавлено и 3 удалено
  1. 3 3
      src/components/dialogTemplate/index3.vue
  2. 45 0
      src/components/dialogTemplate/index4.vue

+ 3 - 3
src/components/dialogTemplate/index3.vue

@@ -37,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>

+ 45 - 0
src/components/dialogTemplate/index4.vue

@@ -0,0 +1,45 @@
+<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>
+      <slot name="formRule"></slot>
+      <div slot="footer" class="dialog-footer" style="margin-top: 0 !important;">
+        <slot name="footerBtn"></slot>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index4",
+  props:["btnTitle","disabled","btnType","content","logTitle","iconShow","showClose","logWidth"],
+  data(){
+    return {
+      dialogTableVisible:false,
+    }
+  },
+  methods:{
+    dialogShow(){
+      this.dialogTableVisible = true
+      this.$emit('showDialog')
+    },
+    onCancel(){
+      this.dialogTableVisible = false
+      this.$emit('onCancel')
+    },
+    onSubmit(){
+      this.$emit('onSubmit')
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+/deep/ .el-dialog__body {
+  padding: 0 20px 20px 20px !important;
+}
+</style>