Forráskód Böngészése

Merge branch 'testToMerge' into blueBranch

qymljy 3 hete
szülő
commit
41c75600c6

+ 43 - 0
src/components/dialogTemplate/index3.vue

@@ -0,0 +1,43 @@
+<template>
+  <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">
+        <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>
+</template>
+
+<script>
+export default {
+  name: "index3",
+  props:["btnTitle","disabled","btnType","content",'dialogTitle','type'],
+  data(){
+    return {
+      dialogTableVisible:false,
+    }
+  },
+  methods:{
+    dialogShow(){
+      this.dialogTableVisible = true
+      this.$emit('dialogShow')
+    },
+    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>

+ 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>