WGShare.Client.Wx/miniprogram_npm/tdesign-miniprogram/color-picker
yj dd589f646c 初始化 2024-11-20 17:29:49 +08:00
..
README.en-US.md 初始化 2024-11-20 17:29:49 +08:00
README.md 初始化 2024-11-20 17:29:49 +08:00
color-picker.d.ts 初始化 2024-11-20 17:29:49 +08:00
color-picker.js 初始化 2024-11-20 17:29:49 +08:00
color-picker.json 初始化 2024-11-20 17:29:49 +08:00
color-picker.wxml 初始化 2024-11-20 17:29:49 +08:00
color-picker.wxss 初始化 2024-11-20 17:29:49 +08:00
constants.d.ts 初始化 2024-11-20 17:29:49 +08:00
constants.js 初始化 2024-11-20 17:29:49 +08:00
interfaces.d.ts 初始化 2024-11-20 17:29:49 +08:00
interfaces.js 初始化 2024-11-20 17:29:49 +08:00
props.d.ts 初始化 2024-11-20 17:29:49 +08:00
props.js 初始化 2024-11-20 17:29:49 +08:00
template.wxml 初始化 2024-11-20 17:29:49 +08:00
type.d.ts 初始化 2024-11-20 17:29:49 +08:00
type.js 初始化 2024-11-20 17:29:49 +08:00
utils.d.ts 初始化 2024-11-20 17:29:49 +08:00
utils.js 初始化 2024-11-20 17:29:49 +08:00

README.en-US.md

:: BASE_DOC ::

API

ColorPicker Props

name type default description required
style Object - CSS(Cascading Style Sheets) N
custom-style Object - CSS(Cascading Style Sheets)used to set style on virtual component N
auto-close Boolean true - N
enable-alpha Boolean false - N
format String RGB options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS N
popup-props Object {} TypescriptPopupPropsPopup API Documentssee more ts definition N
swatch-colors Array - swatch colors。TypescriptArray<string> | null N
type String base options: base/multiple。TypescriptTypeEnum type TypeEnum = 'base' | 'multiple'see more ts definition N
use-popup Boolean false - N
value String - color value N
default-value String undefined color value。uncontrolled property N
visible Boolean false - N

ColorPicker Events

name params description
change (value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) see more ts definition
type ColorPickerChangeTrigger = 'palette-hue-bar' | 'palette-alpha-bar' | 'preset'
close (trigger: ColorPickerTrigger) see more ts definition
type ColorPickerTrigger = 'overlay'
palette-bar-change (detail: { color: ColorObject }) see more ts definition
interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; value: number;}