lifanagju_citu 9 kuukautta sitten
vanhempi
commit
510b816472
2 muutettua tiedostoa jossa 32 lisäystä ja 14 poistoa
  1. 27 13
      src/plugins/curtain/components/message.vue
  2. 5 1
      src/views/headhunting/index.vue

+ 27 - 13
src/plugins/curtain/components/message.vue

@@ -3,20 +3,21 @@
   <v-app>
   <v-app>
     <v-dialog
     <v-dialog
       v-model="dialog"
       v-model="dialog"
-      max-width="400"
+      :max-width="dialogWidth"
       :persistent="persistent || false"
       :persistent="persistent || false"
     >
     >
       <div class="white-bgc pa-5" style="border-radius: 2px; max-height: 600px; overflow-y: auto;">
       <div class="white-bgc pa-5" style="border-radius: 2px; max-height: 600px; overflow-y: auto;">
-        <template v-if="list?.length">
-          <!-- 数组 -->
-          <div
-            v-for="(item, index) in list" :key="'curtainPoint' + index"
-            :style="{color:color}"
-          >
-            {{ item }}
-          </div>
-        </template>
-        <div v-else :style="{color:color}">{{message}}</div>
+        <div class="d-flex align-center">
+          <!-- 前置图标 -->
+          <span
+            v-if="icon"
+            :style="{color: iconColor? iconColor : color, fontSize: iconFontSize}"
+            :class="[icon]"
+            class="ml-2 mr-2"
+          ></span>
+          <!-- 文字 -->
+          <div :style="{color:color}">{{message}}</div>
+        </div>
       </div>
       </div>
       <div class="text-center mt-3">
       <div class="text-center mt-3">
         <span style="color: white; font-size: 28px;" class="mdi mdi-close-circle-outline cursor-pointer" @click="dialog = false"></span>
         <span style="color: white; font-size: 28px;" class="mdi mdi-close-circle-outline cursor-pointer" @click="dialog = false"></span>
@@ -30,12 +31,25 @@ import { ref } from 'vue'
 defineOptions({name: 'curtain-message'})
 defineOptions({name: 'curtain-message'})
 defineProps({
 defineProps({
   message: String, // 单条数据,也可以用list['']
   message: String, // 单条数据,也可以用list['']
-  list: Array, // 多条数据一起展示传list['', '']
+  // list: Array, // 多条数据一起展示传list['', '']
   persistent: Boolean, // false: 点击遮罩层关闭dialog
   persistent: Boolean, // false: 点击遮罩层关闭dialog
-  color: { // 文本颜色
+  icon: String, // 前置图标
+  dialogWidth: {
+    type: [Number, String],
+    default: '450'
+  },
+  iconFontSize: {
+    type: String,
+    default: '50px'
+  },
+  color: {
     type: String,
     type: String,
     default: 'darkorange'
     default: 'darkorange'
   },
   },
+  iconColor: {
+    type: String,
+    default: ''
+  },
 })
 })
 
 
 const dialog = ref(true)
 const dialog = ref(true)

+ 5 - 1
src/views/headhunting/index.vue

@@ -41,7 +41,11 @@ const handleSubmit = async () => {
     const params = JSON.parse(JSON.stringify(obj))
     const params = JSON.parse(JSON.stringify(obj))
     await huntSubmit(params)
     await huntSubmit(params)
     showDialog.value = false
     showDialog.value = false
-    Curtain('message', { message: t('headhunting.submitSuccess') })
+    Curtain('message', {
+      message: t('headhunting.submitSuccess'),
+      icon: 'mdi mdi-check-circle-outline',
+      iconColor: 'green',
+    })
   } catch (error) {
   } catch (error) {
     console.error('error', error)
     console.error('error', error)
   }
   }