Numerous Pancakes Munched

    vue3-ts-picker
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.5 • Public • Published

    vue3-ts-picker

    npm version npm downloads vue

    描述 这是一款基于 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>

    Install

    npm i vue3-ts-picker

    DownloadsWeekly Downloads

    24

    Version

    2.2.5

    License

    MIT

    Unpacked Size

    302 kB

    Total Files

    34

    Last publish

    Collaborators

    • calmjack