liyongli před 5 měsíci
rodič
revize
c20a27f45f
1 změnil soubory, kde provedl 10 přidání a 12 odebrání
  1. 10 12
      src/views/SitePage.vue

+ 10 - 12
src/views/SitePage.vue

@@ -95,8 +95,8 @@
 <script setup lang="ts">
 import type { SiteList } from '@/types/Site'
 import type { CatalogTreeOri } from '@/types/Catalog'
-import { reactive, ref } from 'vue'
-import { ElMessage, ElNotification } from 'element-plus'
+import { reactive, ref, h } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
 import { getSiteList, deleteAsTree, getAsTree, updateAsTree, createAsTree } from '@/api/index'
 
 import { formatDateSite } from '@/tool/index'
@@ -187,16 +187,14 @@ const copyCode = (row: CatalogTreeOri) => {
   const slots = row.slots || []
   const ele = document.createElement('script')
   ele.src = `http://cxzx.smcic.net/ad/catalog/${row.catalogId}.js`
-  ElNotification({
-    title: '请复制下文',
-    message: ele.outerHTML,
-    duration: 0,
-  })
-  ElNotification({
-    title: '当前id为:',
-    message: slots.map((v) => '#sxtv-ad-' + v.slotId).join(','),
-    duration: 0,
-    offset: 200,
+  ElMessageBox({
+    title: row.catalogName,
+    message: h('div', null, [
+      h('h3', null, '代码'),
+      h('div', null, ele.outerHTML),
+      h('h3', null, 'id:'),
+      h('div', null, slots.map((v) => '#sxtv-ad-' + v.slotId).join(',')),
+    ]),
   })
   // #sxtv-ad- + id
   // try {