rkljw 1 tydzień temu
rodzic
commit
37696a23d0
2 zmienionych plików z 9 dodań i 41 usunięć
  1. 2 26
      pages/index_form.vue
  2. 7 15
      plugins/element-plus.js

+ 2 - 26
pages/index_form.vue

@@ -110,7 +110,8 @@
                     value-format="YYYY-MM-DD"
                     format="YYYY-MM-DD"
                     placeholder="选择日期"
-                    style="width: 100%">
+                    style="width: 100%"
+                    :locale="zhCn">
                 </el-date-picker>
                 <!-- 单文件上传 7 (新) -->
                 <el-upload
@@ -557,31 +558,6 @@ onBeforeUpdate(() => {
   uploadRefs.value = {};
 });
 
-let adImg = ref({}) 
-//广告1               
-let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=tsbb_index_1`
-const responseAd1 = await fetch(url, {
-    headers: {
-        'Content-Type': 'application/json',
-        'Userurl': $CwebUrl,
-        'Origin': $CwebUrl
-    }
-});
-const resultAd1 = await responseAd1.json();
-adImg.value = resultAd1.data[0];
- 
-let adImg_2 = ref({}) 
-//广告_2
-let url_2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=tsbb_index_2`
-const responseAd_2 = await fetch(url_2, {
-    headers: {
-        'Content-Type': 'application/json',
-        'Userurl': $CwebUrl,
-        'Origin': $CwebUrl
-    }
-});
-const resultAd_2 = await responseAd_2.json();
-adImg_2.value = resultAd_2.data[0];
 
 // 动态验证规则
 const rules_js = ref({})

+ 7 - 15
plugins/element-plus.js

@@ -1,17 +1,9 @@
-// import { defineNuxtPlugin } from '#app';
-// import ElementPlus from 'element - plus';
-// import 'element - plus/dist/index.css';
-// // 如果安装了图标相关插件,还需导入并注册图标
-// import * as ElementPlusIconsVue from '@element - plus/icons - vue';
+import { defineNuxtPlugin } from '#app'
+import ElementPlus from 'element-plus'
+import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
 
-// export default defineNuxtPlugin((nuxtApp) => {
-//   nuxtApp.vueApp.use(ElementPlus);
-//   // 注册图标
-//   for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
-//     nuxtApp.vueApp.component(key, component);
-//   }
-// });
-
-export default defineNuxtPlugin(() => {
-    
+export default defineNuxtPlugin((nuxtApp) => {
+  nuxtApp.vueApp.use(ElementPlus, {
+    locale: zhCn,
+  })
 })