瀏覽代碼

fix: element conflict

bzkf3 2 年之前
父節點
當前提交
3e8bbccf98
共有 5 個文件被更改,包括 7 次插入4 次删除
  1. 3 0
      element.scss
  2. 1 1
      public/course_health.html
  3. 1 1
      src/App.vue
  4. 1 1
      src/pages/teacher/consult.vue
  5. 1 1
      vite.config.ts

+ 3 - 0
element.scss

@@ -0,0 +1,3 @@
+@forward 'element-plus/theme-chalk/src/mixins/config.scss' with (
+  $namespace: 'ep'
+);

+ 1 - 1
public/course_health.html

@@ -10,7 +10,7 @@
   <link rel="stylesheet" href="../src/css/zj/ziyuanfont.css">
   <link rel="stylesheet" href="../lib/animate/animate.css">
   <link rel="stylesheet" href="../src/css/public.css?v=1.7.2">
-  <link rel="stylesheet" href="../src/css/zj/course.css?v=20220812">
+  <!-- <link rel="stylesheet" href="../src/css/zj/course.css?v=20220812"> -->
   <script type="module" crossorigin src="/assets/index-e7983f21.js"></script>
   <link rel="stylesheet" href="/assets/index-489f9013.css">
 

+ 1 - 1
src/App.vue

@@ -10,7 +10,7 @@ if (UserRole === 'other') {
 </script>
 
 <template>
-  <el-config-provider :message="{ max: 3 }" :z-index="100" :locale="zhCn">
+  <el-config-provider :message="{ max: 3 }" :z-index="100" :locale="zhCn" namespace="ep">
     <suspense>
       <div class="bg w-full h-672px flex justify-center items-center">
         <!-- try to fix auto complete -->

+ 1 - 1
src/pages/teacher/consult.vue

@@ -307,7 +307,7 @@ function emitUpdateInfo(info: type_dyaw_xlfw_zxhd_log, isUpdate?: boolean) {
     <div class="w-320px p-10px h-full flex flex-col justify-start bg-white space-y-4">
       <el-input autocomplete="off" name="searchValue" v-model="searchValue" size="large" :prefix-icon="Search"
         @focus="searchValue = ''" clearable placeholder="搜索"
-        :style="`${searchValue === '搜索' && '--el-input-text-color:var(--el-text-color-placeholder);'}`"></el-input>
+        :style="`${searchValue === '搜索' && '--ep-input-text-color:var(--ep-text-color-placeholder);'}`"></el-input>
       <div
         class="max-h-520px flex flex-col flex-none divide-y scrollbar scrollbar-thin scrollbar-thumb-rounded-md scrollbar-thumb-gray-200 scrollbar-track-transparent">
         <chat-stu-card v-for="item in dyaw_xlfw_zxhd_list" :d="item" @click="handleClickStuCard(item)"

+ 1 - 1
vite.config.ts

@@ -33,7 +33,7 @@ export default defineConfig({
   css: {
     preprocessorOptions: {
       scss: {
-        // additionalData: '@use "~/styles/element/index.scss" as *;',
+        additionalData: '@use "./element.scss" as *;',
       },
     },
   },