c mobile
1.0.0
Mobile UI elements for Vue 2.0
yarn add c-mobile
# or
npm install c-mobile --save import Vue from 'vue'
import Mobile from 'c-mobile'
import 'c-mobile/dist/index.css'
Vue . use ( Mobile )Create a scss file index.scss under the project and write the following content:
// 常用颜色
$primary : #39f ;
$success : #0c6 ;
$warning : #f90 ;
$danger : #f30 ;
// 文字颜色
$text : #737373 ;
$text-light : #a6a6a6 ;
// 边框颜色
$border : #d9d9d9 ;
@import ' ~c-mobile/dist/index.scss ' ;Then import the scss file in the entry file main.js:
import Vue from 'vue'
import Mobile from 'c-mobile'
import './index.scss'
Vue . use ( Mobile )viewport Add viewport-fit=cover to support iPhoneX and other special-shaped screens
< meta name =" viewport " content =" viewport-fit=cover " >