用 vant 定制主題

vue-cli3使用vant定制主題方法
參考鏈接: https://youzan.github.io/vant/#/zh-CN/theme

(一) 創(chuàng)建我的主題樣式文件

拷貝vant默認配置樣式到項目制定目錄,我的/src/assets/style/theme/my-theme.less

(二) 樣式按需加載

  1. // 在 babel.config.js 中配置按需引入樣式源文件
module.exports = {
  plugins: [
    [
      'import',
      {
        libraryName: 'vant',
        libraryDirectory: 'es',
        // 指定樣式路徑
        style: name => `${name}/style/less`
      },
      'vant'
    ]
  ]
};
  1. 按需加載樣式有兩種方式,一種是全局加載組件,另外一種是局部使用

    • 全局注冊組件,比如我需要全局注冊Button組件,在main.js添加如下代碼

      import Vue from 'vue'
      import {Button} from 'vant'
      Vue.use(Button)
      
    • 局部注冊組件,添加如下代碼

      <template>
         <div>
             <van-button type="default">默認按鈕</van-button>
             <van-button type="primary">主要按鈕</van-button>
         </div>
      </template>
      
      <script>
         import {Button} from 'vant';
        
        export default {
          components: {
            [Button.name]:Button
          }
        }
      
      </script>
      

(三) vue-cli3的配置

在根目錄新建vue.config.js,添加以下配置

const path = require("path");
const myTheme = path.resolve(__dirname, "src/assets/style/myTheme.less");
module.exports = {
      css: {
    loaderOptions: {
      less: {
        modifyVars: {
          hack: `true; @import "${themePath}";`
        }
      },
    }
  },
}

(四) 定義我的主題色

  1. 打開my-theme.less文件,文件內(nèi)容如下
  2. 定義我的主題顏色,比如我要定義一個橙色主題 @violet:#4b6fde;
  3. 在你需要改變樣式的組件里,去替換.比如要修改導航欄的文字和圖標,搜索NavBar,把NavBar樣式里的顏色默認為@blue,改成@violet即可
// Basic Colors
@black: #000;
@white: #fff;
@red: #ee0a24;
@blue: #1989fa;
@orange: #ff976a;
@orange-dark: #ed6a0c;
@orange-light: #fffbe8;
@green: #07c160;
@gray: #c8c9cc;
@gray-light: #e5e5e5;
@gray-darker: #7d7e80;
@gray-dark: #969799;
// 我的主題顏色
@violet:#4b6fde;

// Gradient Colors
@gradient-red: linear-gradient(to right, #ff6034, #ee0a24);
@gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);

// Component Colors
@text-color: #323233;
@active-color: #f2f3f5;
@active-opacity: .7;
@disabled-opacity: .5;
@background-color: #f8f8f8;
@background-color-light: #fafafa;

// Padding
@padding-base: 4px;
@padding-xs: @padding-base * 2;
@padding-sm: @padding-base * 3;
@padding-md: @padding-base * 4;
@padding-lg: @padding-base * 6;
@padding-xl: @padding-base * 8;

// Font
@font-size-xs: 10px;
@font-size-sm: 12px;
@font-size-md: 14px;
@font-size-lg: 16px;
@font-weight-bold: 500;

// Animation
@animation-duration-base: .3s;
@animation-duration-fast: .2s;

// Border
@border-color: #ebedf0;
@border-width-base: 1px;
@border-radius-sm: 2px;
@border-radius-md: 4px;
@border-radius-max: 999px;

// ActionSheet
@action-sheet-max-height: 90%;
@action-sheet-header-height: 44px;
@action-sheet-header-font-size: @font-size-lg;
@action-sheet-description-color: @gray-darker;
@action-sheet-description-font-size: @font-size-md;
@action-sheet-description-line-height: 20px;
@action-sheet-item-height: 50px;
@action-sheet-item-background: @white;
@action-sheet-item-font-size: @font-size-lg;
@action-sheet-item-text-color: @text-color;
@action-sheet-item-disabled-text-color: @gray;
@action-sheet-subname-color: @gray-darker;
@action-sheet-subname-font-size: @font-size-sm;
@action-sheet-close-icon-size: 18px;
@action-sheet-close-icon-color: @gray-dark;
@action-sheet-close-icon-padding: 0 @padding-sm;
@action-sheet-cancel-padding-top: @padding-xs;
@action-sheet-cancel-padding-color: @background-color;

// AddressEdit
@address-edit-buttons-padding: @padding-xl @padding-md;
@address-edit-button-margin-bottom: @padding-sm;
@address-edit-detail-finish-color: @blue;
@address-edit-detail-finish-font-size: @font-size-sm;

// AddressList
@address-list-disabled-text-color: @gray-dark;
@address-list-disabled-text-font-size: @font-size-sm;
@address-list-disabled-text-line-height: 30px;
@address-list-add-button-z-index: 999;
@address-list-item-padding: @padding-md;
@address-list-item-text-color: @gray-darker;
@address-list-item-disabled-text-color: @gray-dark;
@address-list-item-font-size: @font-size-sm;
@address-list-item-line-height: 16px;
@address-list-item-radio-icon-color: @red;
@address-list-edit-icon-size: 16px;

// Button
@button-mini-height: 22px;
@button-mini-min-width: 50px;
@button-mini-font-size: @font-size-xs;
@button-mini-line-height: 20px;
@button-small-height: 30px;
@button-small-font-size: @font-size-sm;
@button-small-min-width: 60px;
@button-small-line-height: 28px;
@button-normal-font-size: @font-size-md;
@button-large-height: 50px;
@button-large-line-height: 48px;
@button-default-height: 44px;
@button-default-line-height: 42px;
@button-default-font-size: @font-size-lg;
@button-default-color: @text-color;
@button-default-background-color: @white;
@button-default-border-color: @border-color;
@button-primary-color: @white;
@button-primary-background-color: @green;
@button-primary-border-color: @green;
@button-info-color: @white;
@button-info-background-color: @blue;
@button-info-border-color: @blue;
@button-danger-color: @white;
@button-danger-background-color: @red;
@button-danger-border-color: @red;
@button-warning-color: @white;
@button-warning-background-color: @orange;
@button-warning-border-color: @orange;
@button-border-width: @border-width-base;
@button-border-radius: @border-radius-sm;
@button-round-border-radius: @border-radius-max;
@button-plain-background-color: @white;
@button-disabled-opacity: @disabled-opacity;

// Card
@card-padding: @padding-xs @padding-md;
@card-font-size: @font-size-sm;
@card-text-color: @text-color;
@card-background-color: @background-color-light;
@card-thumb-size: 90px;
@card-title-line-height: 16px;
@card-desc-color: @gray-darker;
@card-desc-line-height: 20px;
@card-price-color: @red;
@card-origin-price-color: @gray-darker;
@card-origin-price-font-size: @font-size-xs;

// Cell
@cell-font-size: @font-size-md;
@cell-line-height: 24px;
@cell-vertical-padding: 10px;
@cell-horizontal-padding: @padding-md;
@cell-text-color: @text-color;
@cell-background-color: @white;
@cell-border-color: @border-color;
@cell-active-color: @active-color;
@cell-required-color: @red;
@cell-label-color: @gray-dark;
@cell-label-font-size: @font-size-sm;
@cell-label-line-height: 18px;
@cell-label-margin-top: 3px;
@cell-value-color: @gray-dark;
@cell-icon-size: 16px;
@cell-right-icon-color: @gray-dark;
@cell-large-vertical-padding: @padding-sm;
@cell-large-title-font-size: @font-size-lg;
@cell-large-label-font-size: @font-size-md;

// CellGroup
@cell-group-background-color: @white;
@cell-group-title-color: @gray-dark;
@cell-group-title-padding: @padding-md @padding-md @padding-xs;
@cell-group-title-font-size: @font-size-md;
@cell-group-title-line-height: 16px;

// Checkbox
@checkbox-size: 20px;
@checkbox-border-color: @gray-light;
@checkbox-transition-duration: @animation-duration-fast;
@checkbox-label-margin: @padding-xs;
@checkbox-label-color: @text-color;
@checkbox-checked-icon-color: @blue;
@checkbox-disabled-icon-color: @gray;
@checkbox-disabled-label-color: @gray;
@checkbox-disabled-background-color: @border-color;

// Circle
@circle-text-color: @text-color;
@circle-text-font-weight: @font-weight-bold;
@circle-text-font-size: @font-size-md;
@circle-text-line-height: 18px;

// Collapse
@collapse-item-transition-duration: @animation-duration-base;
@collapse-item-content-padding: @padding-md;
@collapse-item-content-font-size: 13px;
@collapse-item-content-line-height: 1.5;
@collapse-item-content-text-color: @gray-dark;
@collapse-item-content-background-color: @white;
@collapse-item-title-disabled-color: @gray;

// ContactCard
@contact-card-padding: @padding-md;
@contact-card-add-icon-size: 40px;
@contact-card-add-icon-color: @blue;
@contact-card-value-line-height: 20px;

// ContactEdit
@contact-edit-buttons-padding: @padding-xl @padding-md;
@contact-edit-button-margin-bottom: @padding-sm;
@contact-edit-field-label-width: 65px;

// ContactList
@contact-list-edit-icon-size: 16px;
@contact-list-add-button-z-index: 999;
@contact-list-item-padding: @padding-md;

// CountDown
@count-down-text-color: @text-color;
@count-down-font-size: @font-size-md;
@count-down-line-height: 20px;

// Coupon
@coupon-margin: 0 @padding-md @padding-md;
@coupon-content-height: 100px;
@coupon-content-padding: @padding-lg 0 0 @padding-md;
@coupon-background-color: @white;
@coupon-active-background-color: @active-color;
@coupon-border-radius: @border-radius-md;
@coupon-box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
@coupon-head-width: 85px;
@coupon-amount-color: @red;
@coupon-amount-font-size: 24px;
@coupon-currency-font-size: 50%;
@coupon-name-font-size: @font-size-lg;
@coupon-disabled-text-color: @gray-dark;
@coupon-description-padding: @padding-xs @padding-md;
@coupon-description-background-color: @background-color-light;
@coupon-description-border-color: @border-color;

// CouponCell
@coupon-cell-selected-text-color: @text-color;

// CouponList
@coupon-list-background-color: @background-color;
@coupon-list-field-padding: @padding-xs @padding-md;
@coupon-list-exchange-button-height: 32px;
@coupon-list-empty-image-size: 200px;
@coupon-list-empty-tip-color: @gray-dark;
@coupon-list-empty-tip-font-size: @font-size-md;
@coupon-list-empty-tip-line-height: 20px;

// Dialog
@dialog-width: 320px;
@dialog-small-screen-width: 90%;
@dialog-font-size: @font-size-lg;
@dialog-transition: @animation-duration-base;
@dialog-border-radius: 16px;
@dialog-background-color: @white;
@dialog-header-font-weight: @font-weight-bold;
@dialog-header-line-height: 24px;
@dialog-header-padding-top: @padding-lg;
@dialog-header-isolated-padding: @padding-lg 0;
@dialog-message-padding: @padding-lg;
@dialog-message-font-size: @font-size-md;
@dialog-message-line-height: 20px;
@dialog-message-max-height: 60vh;
@dialog-has-title-message-text-color: @gray-darker;
@dialog-has-title-message-padding-top: @padding-sm;
@dialog-confirm-button-text-color: @blue;

// Divider
@divider-margin: @padding-md 0;
@divider-text-color: @gray-dark;
@divider-font-size: @font-size-md;
@divider-line-height: 24px;
@divider-border-color: @border-color;
@divider-content-padding: @padding-md;
@divider-content-left-width: 10%;
@divider-content-right-width: 10%;

// DropdownMenu
@dropdown-menu-height: 50px;
@dropdown-menu-background-color: @white;
@dropdown-menu-title-font-size: 15px;
@dropdown-menu-title-text-color: @text-color;
@dropdown-menu-title-active-text-color: @blue;
@dropdown-menu-title-disabled-text-color: @gray-dark;
@dropdown-menu-title-padding: 0 @padding-xs;
@dropdown-menu-title-line-height: 18px;
@dropdown-menu-option-active-color: @blue;
@dropdown-menu-content-max-height: 80%;

// Field
@field-label-width: 90px;
@field-input-text-color: @text-color;
@field-input-error-text-color: @red;
@field-input-disabled-text-color: @gray-dark;
@field-placeholder-text-color: @gray-dark;
@field-icon-size: 16px;
@field-clear-icon-size: 16px;
@field-clear-icon-color: @gray;
@field-right-icon-color: @gray-dark;
@field-error-message-color: @red;
@field-error-message-text-color: 12px;
@field-text-area-min-height: 60px;
@field-word-limit-color: @gray-darker;
@field-word-limit-font-size: @font-size-sm;
@field-word-limit-line-height: 16px;

// GridItem
@grid-item-content-padding: @padding-md @padding-xs;
@grid-item-content-background-color: @white;
@grid-item-content-active-color: @active-color;
@grid-item-icon-size: 28px;
@grid-item-text-color: @gray-darker;
@grid-item-text-font-size: @font-size-sm;

// GoodsAction
@goods-action-background-color: @white;
@goods-action-icon-width: 48px;
@goods-action-icon-height: 50px;
@goods-action-icon-color: @text-color;
@goods-action-icon-size: 18px;
@goods-action-icon-font-size: @font-size-xs;
@goods-action-icon-active-color: @active-color;
@goods-action-icon-text-color: @gray-darker;
@goods-action-button-height: 40px;
@goods-action-button-warning-color: @gradient-orange;
@goods-action-button-danger-color: @gradient-red;

// IndexAnchor
@index-anchor-padding: 0 @padding-md;
@index-anchor-text-color: @text-color;
@index-anchor-font-weight: @font-weight-bold;
@index-anchor-font-size: @font-size-md;
@index-anchor-line-height: 32px;
@index-anchor-background-color: transparent;
@index-anchor-sticky-background-color: @white;

// IndexBar
@index-bar-index-font-size: @font-size-xs;
@index-bar-index-line-height: 14px;

// Info
@info-size: 16px;
@info-color: @white;
@info-padding: 0 3px;
@info-font-size: @font-size-sm;
@info-font-weight: @font-weight-bold;
@info-border-width: @border-width-base;
@info-background-color: @red;
@info-dot-color: @red;
@info-dot-size: 8px;
@info-font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;

// Image
@image-placeholder-text-color: @gray-dark;
@image-placeholder-font-size: @font-size-md;
@image-placeholder-background-color: @background-color;

// ImagePreview
@image-preview-index-text-color: @white;
@image-preview-index-font-size: @font-size-md;
@image-preview-overlay-background-color: rgba(0, 0, 0, .9);

// List
@list-icon-margin-right: 5px;
@list-text-color: @gray-dark;
@list-text-font-size: @font-size-md;
@list-text-line-height: 50px;

// Loading
@loading-text-color: @gray-dark;
@loading-text-font-size: @font-size-md;
@loading-spinner-color: @gray;
@loading-spinner-size: 30px;
@loading-spinner-animation-duration: .8s;

// NavBar
@nav-bar-height: 46px;
@nav-bar-background-color: @white;
@nav-bar-arrow-size: 16px;
@nav-bar-icon-color: @blue;
@nav-bar-text-color: @blue;
@nav-bar-title-font-size: @font-size-lg;
@nav-bar-title-text-color: @text-color;

// NoticeBar
@notice-bar-height: 40px;
@notice-bar-padding: 0 @padding-md;
@notice-bar-wrapable-padding: @padding-xs @padding-md;
@notice-bar-text-color: @orange-dark;
@notice-bar-font-size: @font-size-md;
@notice-bar-line-height: 24px;
@notice-bar-background-color: @orange-light;
@notice-bar-icon-size: 16px;
@notice-bar-icon-min-width: 22px;

// Notify
@notify-padding: @padding-xs @padding-md;
@notify-font-size: @font-size-md;
@notify-line-height: 20px;
@notify-primary-background-color: @blue;
@notify-success-background-color: @green;
@notify-danger-background-color: @red;
@notify-warning-background-color: @orange;

// NumberKeyboard
@number-keyboard-background-color: @white;
@number-keyboard-key-height: 54px;
@number-keyboard-key-background: #ebedf0;
@number-keyboard-key-font-size: 24px;
@number-keyboard-key-active-color: @active-color;
@number-keyboard-delete-font-size: @font-size-lg;
@number-keyboard-title-color: @gray-darker;
@number-keyboard-title-height: 30px;
@number-keyboard-title-font-size: @font-size-md;
@number-keyboard-close-padding: 0 @padding-md;
@number-keyboard-close-color: @blue;
@number-keyboard-close-font-size: @font-size-md;
@number-keyboard-button-text-color: @white;
@number-keyboard-button-background-color: @blue;
@number-keyboard-cursor-color: @text-color;
@number-keyboard-cursor-width: 1px;
@number-keyboard-cursor-height: 40%;
@number-keyboard-cursor-animation-duration: 1s;

// Overlay
@overlay-background-color: rgba(0, 0, 0, 0.7);

// Pagination
@pagination-height: 40px;
@pagination-font-size: @font-size-md;
@pagination-item-width: 36px;
@pagination-item-default-color: @blue;
@pagination-item-disabled-color: @gray-darker;
@pagination-item-disabled-background-color: @background-color;
@pagination-background-color: @white;
@pagination-desc-color: @gray-darker;
@pagination-disabled-opacity: @disabled-opacity;

// Panel
@panel-background-color: @white;
@panel-header-value-color: @red;
@panel-footer-padding: @padding-xs @padding-md;

// PasswordInput
@password-input-height: 50px;
@password-input-margin: 0 @padding-md;
@password-input-font-size: 20px;
@password-input-border-radius: 6px;
@password-input-background-color: @white;
@password-input-info-color: @gray-dark;
@password-input-info-font-size: @font-size-md;
@password-input-error-info-color: @red;
@password-input-dot-size: 10px;
@password-input-dot-color: @black;

// Picker
@picker-background-color: @white;
@picker-toolbar-height: 44px;
@picker-title-font-size: @font-size-lg;
@picker-action-padding: 0 @padding-md;
@picker-action-font-size: @font-size-md;
@picker-action-text-color: @blue;
@picker-action-active-color: @active-color;
@picker-option-font-size: @font-size-lg;
@picker-option-text-color: @black;
@picker-option-disabled-opacity: .3;
@picker-loading-icon-color: @blue;
@picker-loading-mask-color: rgba(255, 255, 255, .9);

// Popup
@popup-background-color: @white;
@popup-transition: transform @animation-duration-base ease-out;
@popup-round-border-radius: 20px;
@popup-close-icon-size: 18px;
@popup-close-icon-color: @gray-dark;
@popup-close-icon-margin: 16px;
@popup-close-icon-z-index: 1;

// Progress
@progress-height: 4px;
@progress-color: @blue;
@progress-background-color: @gray-light;
@progress-pivot-padding: 0 5px;
@progress-pivot-text-color: @white;
@progress-pivot-font-size: @font-size-xs;
@progress-pivot-line-height: 1.6;
@progress-pivot-background-color: @blue;

// PullRefresh
@pull-refresh-head-height: 50px;
@pull-refresh-head-font-size: @font-size-md;
@pull-refresh-head-text-color: @gray-dark;

// Radio
@radio-size: 20px;
@radio-border-color: @gray-light;
@radio-transition-duration: @animation-duration-fast;
@radio-label-margin: @padding-xs;
@radio-label-color: @text-color;
@radio-checked-icon-color: @blue;
@radio-disabled-icon-color: @gray;
@radio-disabled-label-color: @gray;
@radio-disabled-background-color: @border-color;

// Rate
@rate-icon-size: 20px;
@rate-icon-gutter: 4px;

// Search
@search-padding: 10px @padding-sm;
@search-background-color: #f7f8fA;
@search-input-height: 34px;
@search-label-padding: 0 5px;
@search-label-color: @text-color;
@search-label-font-size: @font-size-md;
@search-left-icon-color: @gray-dark;
@search-action-padding: 0 @padding-xs;
@search-action-text-color: @text-color;
@search-action-font-size: @font-size-md;

// Sidebar
@sidebar-width: 85px;

// SidebarItem
@sidebar-font-size: @font-size-md;
@sidebar-line-height: 20px;
@sidebar-text-color: @text-color;
@sidebar-disabled-text-color: @gray;
@sidebar-padding: 20px @padding-sm 20px @padding-xs;
@sidebar-active-color: @active-color;
@sidebar-background-color: @background-color-light;
@sidebar-selected-font-weight: @font-weight-bold;
@sidebar-selected-text-color: @text-color;
@sidebar-selected-border-color: @red;
@sidebar-selected-background-color: @white;

// Skeleton
@skeleton-row-height: 16px;
@skeleton-row-background-color: @active-color;
@skeleton-row-margin-top: @padding-sm;
@skeleton-avatar-background-color: @active-color;
@skeleton-animation-duration: 1.2s;

// Slider
@slider-active-background-color: @blue;
@slider-inactive-background-color: @gray-light;
@slider-disabled-opacity: @disabled-opacity;
@slider-button-width: 24px;
@slider-button-height: 24px;
@slider-button-border-radius: 50%;
@slider-button-background-color: @white;
@slider-button-box-shadow: 0 1px 2px rgba(0, 0, 0, .5);

// Step
@step-text-color: @gray-dark;
@step-process-text-color: @text-color;
@step-font-size: @font-size-md;
@step-line-color: @border-color;
@step-finish-line-color: @green;
@step-finish-text-color: @text-color;
@step-icon-size: 12px;
@step-circle-size: 5px;
@step-circle-color: @gray-dark;
@step-horizontal-title-font-size: @font-size-sm;

// Steps
@steps-background-color: @white;

// Sticky
@sticky-z-index: 99;

// Stepper
@stepper-active-color: #e8e8e8;
@stepper-background-color: @active-color;
@stepper-button-icon-color: @text-color;
@stepper-button-disabled-color: #f7f8fa;
@stepper-button-disabled-icon-color: @gray;
@stepper-input-width: 32px;
@stepper-input-height: 28px;
@stepper-input-font-size: @font-size-md;
@stepper-input-text-color: @text-color;
@stepper-input-disabled-text-color: @gray;
@stepper-input-disabled-background-color: @active-color;
@stepper-border-radius: @border-radius-md;

// SubmitBar
@submit-bar-height: 50px;
@submit-bar-z-index: 100;
@submit-bar-background-color: @white;
@submit-bar-button-width: 110px;
@submit-bar-price-color: @red;
@submit-bar-price-font-size: 18px;
@submit-bar-currency-font-size: @font-size-md;
@submit-bar-text-color: @text-color;
@submit-bar-text-font-size: @font-size-md;
@submit-bar-tip-padding: @padding-xs @padding-sm;
@submit-bar-tip-font-size: @font-size-sm;
@submit-bar-tip-line-height: 1.5;
@submit-bar-tip-color: #f56723;
@submit-bar-tip-background-color: #fff7cc;
@submit-bar-tip-icon-size: 12px;

// Swipe
@swipe-indicator-size: 6px;
@swipe-indicator-margin: @padding-sm;
@swipe-indicator-active-opacity: 1;
@swipe-indicator-inactive-opacity: .3;
@swipe-indicator-active-background-color: @blue;
@swipe-indicator-inactive-background-color: @border-color;

// Switch
@switch-width: 2em;
@switch-height: 1em;
@switch-node-size: 1em;
@switch-node-z-index: 1;
@switch-node-background-color: @white;
@switch-node-box-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05), 0 2px 2px 0 rgba(0, 0, 0, .1), 0 3px 3px 0 rgba(0, 0, 0, .05);
@switch-background-color: @white;
@switch-on-background-color: @blue;
@switch-transition-duration: @animation-duration-base;
@switch-disabled-opacity: @disabled-opacity;
@switch-border: @border-width-base solid rgba(0, 0, 0, .1);

// SwitchCell
@switch-cell-padding-top: @cell-vertical-padding - 1px;
@switch-cell-padding-bottom: @cell-vertical-padding - 1px;
@switch-cell-large-padding-top: @cell-large-vertical-padding - 1px;
@switch-cell-large-padding-bottom: @cell-large-vertical-padding - 1px;

// Tabbar
@tabbar-height: 50px;
@tabbar-background-color: @white;

// TabbarItem
@tabbar-item-font-size: @font-size-sm;
@tabbar-item-text-color: @gray-darker;
@tabbar-item-active-color: @blue;
@tabbar-item-line-height: 1;
@tabbar-item-icon-size: 18px;
@tabbar-item-margin-bottom: 5px;

// Tab
@tab-text-color: @gray-darker;
@tab-active-text-color: @text-color;
@tab-disabled-text-color: @gray;
@tab-font-size: @font-size-md;

// Tabs
@tabs-default-color: @red;
@tabs-line-height: 44px;
@tabs-card-height: 30px;
@tabs-nav-background-color: @white;
@tabs-bottom-bar-height: 3px;
@tabs-bottom-bar-color: @tabs-default-color;

// Tag
@tag-padding: .2em .5em;
@tag-font-size: @font-size-xs;
@tag-medium-font-size: @font-size-sm;
@tag-large-font-size: @font-size-md;
@tag-text-color: @white;
@tag-border-radius: .2em;
@tag-round-border-radius: @border-radius-max;
@tag-dander-color: @red;
@tag-primary-color: @blue;
@tag-success-color: @green;
@tag-warning-color: @orange;
@tag-default-color: @gray-dark;
@tag-plain-background-color: @white;

// Toast
@toast-max-width: 70%;
@toast-font-size: @font-size-md;
@toast-text-color: @white;
@toast-loading-icon-color: @white;
@toast-line-height: 20px;
@toast-border-radius: @border-radius-md;
@toast-background-color: rgba(@text-color, .88);
@toast-icon-size: 40px;
@toast-text-min-width: 96px;
@toast-text-padding: @padding-xs @padding-sm;
@toast-default-padding: @padding-md;
@toast-default-width: 90px;
@toast-default-min-height: 90px;
@toast-position-top-distance: 50px;
@toast-position-bottom-distance: 50px;

// TreeSelect
@tree-select-font-size: @font-size-md;
@tree-select-nav-background-color: @background-color-light;
@tree-select-content-background-color: @white;
@tree-select-nav-item-padding: @padding-sm @padding-xs @padding-sm @padding-sm;
@tree-select-item-height: 44px;
@tree-select-item-active-color: @red;
@tree-select-item-disabled-color: @gray;

// Uploader
@uploader-size: 80px;
@uploader-icon-size: 24px;
@uploader-icon-color: @gray-dark;
@uploader-text-color: @gray-dark;
@uploader-text-font-size: @font-size-sm;
@uploader-upload-border-color: @gray-light;
@uploader-upload-border-radius: 4px;
@uploader-upload-background-color: @white;
@uploader-delete-color: @gray-dark;
@uploader-delete-icon-size: 18px;
@uploader-delete-background-color: @white;
@uploader-file-background-color: @background-color;
@uploader-file-icon-size: 20px;
@uploader-file-icon-color: @gray-darker;
@uploader-file-name-padding: 0 @padding-base;
@uploader-file-name-margin-top: @padding-xs;
@uploader-file-name-font-size: @font-size-sm;
@uploader-file-name-text-color: @gray-darker;

// Sku
@sku-item-background-color: #f7f8fa;
@sku-icon-gray-color: #dcdde0;
@sku-upload-mask-color: rgba(50, 50, 51, .8);
?著作權歸作者所有,轉載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末爷恳,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子杯矩,更是在濱河造成了極大的恐慌袖外,老刑警劉巖曼验,帶你破解...
    沈念sama閱讀 219,188評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件鬓照,死亡現(xiàn)場離奇詭異颖杏,居然都是意外死亡,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,464評論 3 395
  • 文/潘曉璐 我一進店門获讳,熙熙樓的掌柜王于貴愁眉苦臉地迎上來丐膝,“玉大人钾菊,你說我怎么就攤上這事煞烫≈拖辏” “怎么了?”我有些...
    開封第一講書人閱讀 165,562評論 0 356
  • 文/不壞的土叔 我叫張陵,是天一觀的道長岸啡。 經(jīng)常有香客問我原叮,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,893評論 1 295
  • 正文 為了忘掉前任奋隶,我火速辦了婚禮擂送,結果婚禮上,老公的妹妹穿的比我還像新娘达布。我一直安慰自己团甲,他們只是感情好,可當我...
    茶點故事閱讀 67,917評論 6 392
  • 文/花漫 我一把揭開白布黍聂。 她就那樣靜靜地躺著,像睡著了一般产还。 火紅的嫁衣襯著肌膚如雪匹厘。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,708評論 1 305
  • 那天脐区,我揣著相機與錄音愈诚,去河邊找鬼。 笑死牛隅,一個胖子當著我的面吹牛炕柔,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播媒佣,決...
    沈念sama閱讀 40,430評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼匕累,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了默伍?” 一聲冷哼從身側響起欢嘿,我...
    開封第一講書人閱讀 39,342評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎也糊,沒想到半個月后炼蹦,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,801評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡狸剃,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,976評論 3 337
  • 正文 我和宋清朗相戀三年掐隐,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片捕捂。...
    茶點故事閱讀 40,115評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡瑟枫,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出指攒,到底是詐尸還是另有隱情慷妙,我是刑警寧澤,帶...
    沈念sama閱讀 35,804評論 5 346
  • 正文 年R本政府宣布允悦,位于F島的核電站膝擂,受9級特大地震影響虑啤,放射性物質發(fā)生泄漏。R本人自食惡果不足惜架馋,卻給世界環(huán)境...
    茶點故事閱讀 41,458評論 3 331
  • 文/蒙蒙 一狞山、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧叉寂,春花似錦萍启、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,008評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至钓瞭,卻和暖如春驳遵,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背山涡。 一陣腳步聲響...
    開封第一講書人閱讀 33,135評論 1 272
  • 我被黑心中介騙來泰國打工堤结, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人鸭丛。 一個月前我還...
    沈念sama閱讀 48,365評論 3 373
  • 正文 我出身青樓竞穷,卻偏偏與公主長得像,于是被迫代替她去往敵國和親鳞溉。 傳聞我的和親對象是個殘疾皇子来庭,可洞房花燭夜當晚...
    茶點故事閱讀 45,055評論 2 355

推薦閱讀更多精彩內(nèi)容

  • 基于Vue的一些資料 內(nèi)容 UI組件 開發(fā)框架 實用庫 服務端 輔助工具 應用實例 Demo示例 element★...
    嘗了又嘗閱讀 1,154評論 0 1
  • vue-cli3定制vant主題色 安裝cnpm i babel-plugin-import -D babel.c...
    smaVivian閱讀 4,822評論 0 2
  • cube-ui 是滴滴去年底開源的一款基于 Vue.js 2.0 的移動端組件庫,主要核心目標是做到體驗極致穿挨、靈活...
    _雙眸閱讀 4,069評論 0 1
  • 1、 iView UI組件庫iView 是一套基于 Vue.js 的開源 UI 組件庫肴盏,主要服務于 PC 界面的中...
    何小鵬閱讀 2,171評論 1 10
  • 今天開始正式開始天使18班學習科盛,伙伴們大家一起挖坑吧!別把自己埋了就好菜皂!即便是埋了能出來也非常不錯贞绵!期待90天后能...
    620ebed8fc9c閱讀 74評論 0 0