vue3-ts-picker
vue3-ts-picker
描述 这是一款基于 vue3+ts 的轻量级颜色取色器插件

npm
npm install --save vue3-ts-picker
yarn
$ yarn add save vue3-ts-picker
code
main.js:
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import {ColorPicker} from "vue3-ts-picker"
import "vue3-ts-picker/dist/vue3-ts-picker.css"
const app = createApp(App)
app.component('ColorPicker', ColorPicker)
app.mount('#app')
template:
<template>
<div id="nav">
<ColorPicker @changePickerColorBen="changeFontSize" :color="color"/>
</div>
</template>
<script lang="ts">
import {defineComponent,ref} from 'vue'
export default defineComponent({
name: 'picker',
setup() {
const color = ref("#ccc")
const changeFontSize = (color: string) => {
console.log("color",color)
}
return {
changeFontSize,
color
}
}
})
</script>
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.2.5 | ^3.2.25 | MIT | |
| 2.2.4 | ^3.2.25 | MIT | |
| 2.2.3 | ^3.2.25 | MIT | |
| 2.2.2 | ^3.2.25 | MIT | |
| 2.2.1 | ^3.0.0 | MIT | |
| 2.2.0 | ^3.0.0 | MIT | |
| 2.1.4 | ^3.0.0 | MIT | |
| 2.1.3 | ^3.0.0 | MIT | |
| 2.1.2 | ^3.0.0 | MIT | |
| 2.1.1 | ^3.0.0 | MIT | |
| 2.1.0 | ^3.0.0 | MIT | |
| 2.0.3 | ^3.0.0 | MIT | |
| 2.0.2 | ^3.0.0 | MIT | |
| 2.0.1 | ^3.0.0 | MIT | |
| 2.0.0 | ^3.0.0 | MIT | |
| 1.1.33 | ^3.0.0 | MIT | |
| 1.1.32 | ^3.0.0 | MIT | |
| 1.1.31 | ^3.0.0 | MIT | |
| 1.1.9 | ^3.0.0 | MIT | |
| 1.1.8 | ^3.0.0 | MIT | |
| 1.1.7 | ^3.0.0 | MIT | |
| 1.1.6 | ^3.0.0 | MIT | |
| 1.1.3 | ^3.0.0 | MIT | |
| 1.1.2 | ^3.0.0 | MIT | |
| 1.1.1 | ^3.0.0 | MIT | |
| 1.1.0 | ^3.0.0 | MIT | |
| 0.1.0 | ^3.0.0 | MIT |