JSPM

  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q45975F

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-picker-plus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    截图

    Usage

    <!DOCTYPE html>
    <template>
       <div class="w-[160px] mt-[50px] ml-[20px] ">
            <ColorPicker @register="register" v-model:value="color">
           </ColorPicker>
       </div>
    </template>
    <script>
       import {ColorPicker} from 'color-picker-plus';
       const color= ref()
        const[register]=useColor({
           type:'hsl', //类型,在下面props里面有说明
           usuallyColorBlock:['#FF0000', '#55FF00', '#0015FF'], //常用的色块
           defaultColor:'#f50' //默认选中颜色 可以为color
        )
    </script>

    Props

    属性 类型 默认值 说明
    type string 'hsl' 'hsl','hex','rgb','rgba'
    usuallyColorBlock string Array[] ['#FF0000', '#55FF00', '#0015FF']
    defaultColor string '' ''

    Install

    npm i color-picker-plus