Package Exports
- kingcwt-ui-color-selector
- kingcwt-ui-color-selector/lib/main.js
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 (kingcwt-ui-color-selector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ColorSelector
This is a color selector because Vue ant design does not have a built-in color selector like React ant design, and no one was found in the color selector about the Vue technology stack. However, we can only refer to and extract the source code of Vue designing Vue, and then package it for our own use
- vue3-ColorSelector
parameter | type | describe |
---|---|---|
color | String | The value of the current color |
handleChangeColor | Function | Method of manipulating colors |
- install
// yarn
yarn add kingcwt-ui-color-selector -D
// pnpm
pnpm i kingcwt-ui-color-selector -D
// npm
npm i kingcwt-ui-color-selector -D
- Usage method
import { ref } from 'vue';
import {ColorSelector } from 'kingcwt-ui-color-selector'
import "kingcwt-ui-color-selector/es/style.css"
const color = ref('#f5f6f7')
const handleChangeColor = (str:string)=>{
console.log(str,'color')
color.value = str;
}
<template>
<ColorSelector :color="color" :handleChangeColor="handleChangeColor" />
</template>