vue组件修改样式不起作用

需要在全局样式文件去定义,在组件里无法修改样式

在全局定义样式文件在main.js中引入

import '@/styles/index.scss' // global css
 
 //to reset element-ui default css
 .el-upload {
     input[type="file"] {
         display: none !important;
     }
 }

 .sui-upload {
     .show-delete {
         .el-upload-list__item-delete {
             display: none !important;
         }
     }
     .upload-hidden {
         .el-upload {
             display: none;
         }
     }
     .upload-show-upload {
         .el-upload {
             display: none;
         }
     }
     .el-upload__input {
         display: none;
     }
 }

 //暂时性解决diolag 问题 https://github.com/ElemeFE/element/issues/2461
 .el-dialog {
     transform: none;
     left: 0;
     position: relative;
     margin: 0 auto;
 } //element ui upload
 .upload-container {
     .el-upload {
         width: 100%;
         .el-upload-dragger {
             width: 100%;
             height: 200px;
         }
     }
 }
/* 修改样式 地址选择器样式 */
 .distpicker {
     select {
         font-size: 13px!important;
     }
 }

 

posted @ 2018-09-29 17:47  sunniejs  阅读(5218)  评论(0编辑  收藏  举报