vue.js - Element doesn't show -
i'm trying use color picker element-ui (http://element.eleme.io/#/en-us/component/color-picker). doesn't show up... clues whats wrong?
<template> <div class="color"> <span class="demonstration">color picker</span> <el-color-picker v-model="color"></el-color-picker> </div> </template> <script> import vue 'vue' import colorpicker 'element-ui' vue.use(colorpicker) export default { name: 'color', data () { return { color: '#20a0ff' } } } </script>
import default-theme css too:
<template> <div class="color"> <span class="demonstration">color picker</span> <el-color-picker v-model="color"></el-color-picker> </div> </template> <script> import vue 'vue' import colorpicker 'element-ui' import 'element-ui/lib/theme-default/index.css' vue.use(colorpicker) export default { name: 'color', data () { return { color: '#20a0ff' } } } </script>
reference: http://element.eleme.io/#/en-us/component/quickstart#import-element
Comments
Post a Comment