New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

canvas-color-disc

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-color-disc

Color disc realized by canvas

  • 1.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-82.35%
Maintainers
1
Weekly downloads
 
Created
Source

production

一个Vue的canvas色盘选择组件,支持移动端和PC端

avatar

## Build Setup
# install dependencies
npm install
# serve examples at localhost:8080
npm run start
<template>
    <div id="app">
        <p>RGB: {{RGB}}</p>
        <p>changing RGB: {{changingRGB}}</p>
        <canvas-color-disc
            vals="0"
            :rgb="RGB"
            :width="300"
            :height="240"
            @changing="changing"
            @change="change"></canvas-color-disc>
    </div>
</template>

<script>
import CanvasColorDisc from './components/CanvasColorDisc.vue'
export default {
    name: 'App',
    components: {
        CanvasColorDisc,
    },
    data() {
        return {
            RGB: { r: 255, g:255, b:255 },
            changingRGB: '',
        }
    },
    methods: {
        change(newRgb, utils) {
            console.log('change---', newRgb, utils)
            this.RGB = newRgb
        },
        changing(newRgb, utils) {
            console.log('changing---', newRgb, utils)
            this.changingRGB = JSON.stringify(newRgb)
        },
    },
}
</script>

<style>
    html {
        font-family: "Microsoft Sans Serif", Arial, Helvetica, sans-serif
    }
</style>

Keywords

FAQs

Package last updated on 16 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc