npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aurouscia/au-color-picker

v1.1.0

Published

vue3颜色选择器组件

Readme

au-color-picker

vue3颜色选择控件,支持鼠标/手指的点击和拖动

au-color-picker预览效果

用法

npm i @aurouscia/au-color-picker
//main.ts(必须导入样式)
import '@aurouscia/au-color-picker/style.css'

//xxx.vue
import { AuColorPicker } from '@aurouscia/au-color-picker';
import { AuColorPickerPresetsNested } from '@aurouscia/au-color-picker';

仅自定义

<AuColorPicker
    v-model="'绑定颜色值'"
    :initial="'初始值(优先级低于v-model)'"
    @done="'面板关闭回调'"
    ></AuColorPicker>

预设+自定义

⚠️注意:“选中的预设”是与“自定义颜色”独立的两个状态
这使得模型的颜色可以依赖于系统全局配置(预设的颜色)

const presets:NamedPreset[] = [
  {
    name: '水系', //名称不可重复
    colorHex: '#c3e5eb'
  },
  {
    name: '绿地',
    colorHex: '#ceeda4'
  },
]
<AuColorPickerPresetsNested 
    :presets="'预设列表'"
    v-model="'绑定颜色值'"
    :initial="'初始值(优先级低于v-model)'"
    v-model:model-value-selected-preset="'绑定预设name'"
    :initial-selected-preset="'初始选择预设(优先级低于v-model)'"
    @done="'面板关闭回调'"
    ></AuColorPickerPresetsNested>

覆盖当前值(旧版,新版直接赋值v-model)

const picker = ref<InstanceType<typeof AuColorPicker>>()
const pickerNested = ref<InstanceType<typeof AuColorPickerPresetsNested>>()
function enforceToDemo(){
  picker.value?.enforceTo('#ff00ff')
  pickerNested.value?.enforceCustomValueTo('#ff00ff')
  pickerNested.value?.enforcePresetTo('水系')
}

组件属性定义

//位置描述
type Pos = 'left'|'right'|number

//AuColorPicker的属性
export interface PickerProps{
    initial?: string //初始值
    entryStyles?: CSSProperties //入口按钮的样式
    entryActiveStyles?: CSSProperties //入口按钮的样式(当面板展开)
    entryClassName?: string //入口按钮的类名
    pos?: Pos //面板位置描述
    panelBaseZIndex?:number //面板的zIndex基础值
    entryRespondDelay?:number //入口按钮点击后,面板展开的延迟(ms)
    panelClickStopPropagation?:boolean //面板点击是否阻止冒泡
    showPackageName?:boolean //是否显示包名
}

//AuColorPickerPresetsNested的属性
export interface PickerWithPresetsProps extends PickerProps{
    initialSelectedPreset?:string //初始选择预设名称(undefined即为自定义)
    presets?: NamedPreset[] //预设列表
    posInternal?: Pos //使用自定义时,自定义颜色选择器面板的位置描述
}

//预设列表项描述
export interface NamedPreset{
    colorHex:string,
    name:string
}

更新记录

1.0.0

修改了api

1.1.0

修复了旧浏览器上失效的问题(消除过新的context.reset函数)

许可证

MIT