当前位置: 首页 > 工具软件 > Color Picker > 使用案例 >

vue color picker

华烈
2023-12-01

好用

yarn add vue-pop-colorpicker

<template>
  <color-picker v-model="color"></color-picker>
</template>
<script>
import { VueColorpicker } from 'vue-pop-colorpicker'
export default {
  components: {
    'color-picker': VueColorpicker
  },
  data() {
    return {
      color: '#ff0000'
    }
  }
}
</script>

 

不好用 

<template>
  <chrome-picker name="picker" v-model="colors" />
</template>
<script>
import { Material, Compact, Swatches, Slider, Sketch, Chrome, Photoshop } from 'vue-color'
export default {
  components: {
    'material-picker': Material,
    'compact-picker': Compact,
    'swatches-picker': Swatches,
    'slider-picker': Slider,
    'sketch-picker': Sketch,
    'chrome-picker': Chrome,
    'photoshop-picker': Photoshop
  },
  data() {
    return {
      colors: '#ff0000'
    }
  }
}
</script>

 

 类似资料:

相关阅读

相关文章

相关问答