浏览代码

less与scss替换

wangJJ 5 年之前
父节点
当前提交
203e03dc97

+ 8 - 0
README.md

@@ -19,3 +19,11 @@ npm run build --report
 ```
 
 For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
+
+
+# Private cloud configuration
+
+- 修改主题色
+> /src/style/main.scss 中更改 `$--color-primary`
+- 
+

+ 1 - 1
src/components/commons/HomeSlice.vue

@@ -96,7 +96,7 @@
     }
 </script>
 
-<style scoped lang="less">
+<style scoped lang="scss">
   .slice-info {
     font-size: 16px;
     font-family: Source Han Sans CN;

+ 2 - 0
src/config/index.js

@@ -0,0 +1,2 @@
+//配置主题色
+export const color_primary = '#B80000';

+ 1 - 1
src/pages/DetailPage/CrowdDetail.vue

@@ -167,7 +167,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
 
   .project-task {
     padding: 15px 0;

+ 2 - 3
src/pages/Homepage/Homepage.vue

@@ -23,6 +23,7 @@
               </div>
             </div>
           </div>
+
         </el-col>
         <el-col :span="6">
           <el-button type="primary pull-right" class="releaseBtn" @click="checkLogin()">免费发布众测需求</el-button>
@@ -195,7 +196,6 @@
       setFields() {
         getAllFields().then((res) => {
           this.homeTabArr.menuArr2 = res
-          // console.log(this.homeTabArr.menuArr2)
         })
       },
       checkLogin() {
@@ -203,7 +203,6 @@
       },
       checkCreateProjectAuth() {
         if (!this.isLogin) {
-          console.log("请登录后访问");
           notify('warning', '请登录后访问');
         } else if (this.isLogin) {
           Http.get(Apis.USER.IS_PART.replace('{userId}', this.user.id)).then((res) => {
@@ -270,7 +269,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
 
   .home-wrapper {
     /deep/ .square-tab .el-tabs__item {

+ 1 - 1
src/pages/HomepageSearch/AgencyList.vue

@@ -240,7 +240,7 @@
   }
 </script>
 <style scoped lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/HomepageSearch/AgencyResidentList.vue

@@ -204,7 +204,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/HomepageSearch/CompetitionList.vue

@@ -195,7 +195,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/HomepageSearch/CrowdList.vue

@@ -199,7 +199,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/HomepageSearch/ExpertList.vue

@@ -201,5 +201,5 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
 </style>

+ 1 - 1
src/pages/HomepageSearch/ResourceList.vue

@@ -244,7 +244,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/HomepageSearch/UserList.vue

@@ -214,7 +214,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .item-template {
     height: 80px;
   }

+ 1 - 1
src/pages/Square/PopularProjectAndTaskList.vue

@@ -259,7 +259,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
 
   .project-task {
     padding: 15px 0;

+ 1 - 1
src/pages/Square/Square2.0.vue

@@ -235,7 +235,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .project-task {
      padding: 15px 0;
     .el-card {

+ 1 - 1
src/pages/Technology/Technology2.0.vue

@@ -222,7 +222,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .technology-container {
     /deep/ .search-input,/deep/ .releaseBtn{
       margin: 20px 0 0 0 !important;

+ 1 - 1
src/pages/Technology/TechnologyMore.vue

@@ -172,7 +172,7 @@
 </script>
 
 <style lang="less">
-  @import "../../style/search-nav";
+  @import "../../style/search-nav.scss";
   .technology-container {
     /deep/ .search-input,/deep/ .releaseBtn{
       margin: 20px 0 0 0 !important;

+ 4 - 0
src/style/basic.scss

@@ -0,0 +1,4 @@
+//配置主题色
+$color-primary: #B80000;
+
+

+ 3 - 1
src/style/main.scss

@@ -1,5 +1,7 @@
+@import "./basic";
+
 /* 改变主题色变量 */
-$--color-primary: #4A90E2 ;
+$--color-primary:  $color-primary;
 
 /* 改变 icon 字体路径变量,必需 */
 $--font-path: '~element-ui/lib/theme-chalk/fonts';

+ 3 - 2
src/style/search-nav.less → src/style/search-nav.scss

@@ -1,3 +1,5 @@
+@import "../style/main";
+
 .nav{
   background:rgba(255,255,255,1);
   box-shadow:0px 4px 30px 0px rgba(8,5,6,0.08);
@@ -33,7 +35,7 @@
 /*}*/
 
 .search-button{
-  background-color: rgb(0, 118, 203) !important;
+  background-color: $--color-primary !important;
   border: none;
   border-radius: initial;
   padding: -1px;
@@ -47,7 +49,6 @@
 }
 
 .releaseBtn{
-  background-color: rgb(0, 118, 203);
   margin-top: 40px !important;
 }