未验证 提交 76e1f67e 编写于 作者: S scTaoFelix 提交者: GitHub

TS type declaration for supplementary basic components & vetur (#777)

* fix(types): complete ts type

* fix: complete ts type 1

* fix(types/ test/): complete ts types

* docs: test

* fix(test types): complete ts types test-dts

* docs: updata Partial EventsProps

* docs: update ts events

* docs: add ts development tooling

* docs: update ts development tooling docs

* chore: supplement the TS declaration of the basic component & vetur
Co-authored-by: Nshanchuntao <shanchuntao@didiglobal.com>
上级 d4b743cb
...@@ -35,8 +35,13 @@ ...@@ -35,8 +35,13 @@
"files": [ "files": [
"src", "src",
"lib", "lib",
"types" "types",
"vetur"
], ],
"vetur": {
"tags": "vetur/tags.json",
"attributes": "vetur/attributes.json"
},
"publishConfig": { "publishConfig": {
"registry": "https://registry.npmjs.org" "registry": "https://registry.npmjs.org"
}, },
......
import { CubeUIComponent } from '../component'
export type ButtonType = 'button' | 'submit'
export declare class CubeButton extends CubeUIComponent {
type?: ButtonType
active?: boolean
disabled?: boolean
icon?: string
light?: string
inline?: boolean
outline?: boolean
primary?: boolean
}
import { CubeUIComponent } from '../component'
import { IRadioOptionData } from './common'
export declare class CubeCheckbox extends CubeUIComponent {
option?: IRadioOptionData | string | boolean
position?: 'left' | 'right'
shape?: 'circle' | 'square'
hollowStyle?: boolean
label?: string | boolean
value?: string | boolean
disabled?: boolean
}
import { IRadioOptionData } from './common'
import { CubeUIComponent } from '../component'
export declare class CubeCheckboxGroup extends CubeUIComponent {
value?: []
options?: IRadioOptionData[] | string
horizontal?: boolean
colNum?: number
shape?: 'circle' | 'square'
hollowStyle?: boolean
min?: number
max?: number
}
import { CubeUIComponent } from '../component'
export interface ICheckerOptionData {
value?: string | number
text?: string
disabled?: boolean
}
export declare class CubeChecker extends CubeUIComponent {
value?: string | number | ICheckerOptionData[]
options?: ICheckerOptionData[]
type?: 'checkbox' | 'radio'
min?: number
max?: number
}
import { CubeUIComponent } from '../component'
export declare class CubeDrawer extends CubeUIComponent {
title?: string
data?: any[]
selectedIndex?: number[]
visible?: boolean
refill: (index?: number, data?: any[], item?: any[]) => void
show: () => void
hide: () => void
}
import { CubeUIComponent } from '../component'
interface IField {
type?: string
component?: string | object
modelKey?: string
label?: string
props?: object
events?: object
rules?: object
trigger?: 'blur' | 'change'
debounce?: number | boolean
messages?: string
key?: string
}
interface IFields {
fields: IField[]
}
interface IGroups {
groups: {
legend?: string
fields?: IField[]
}
}
interface IValidity {
valid?: boolean | undefined
result?: {}
dirty?: boolean
}
interface IValidateParams {
validity?: IValidity
valid?: boolean | undefined
invalid?: boolean
dirty?: boolean
firstInvalidFieldIndex?: number
}
export declare class CubeForm extends CubeUIComponent {
model?: object
schema?: IFields | IGroups
immediateValidate?: boolean
action?: string | undefined
options?: {
scrollToInvalidField?: boolean
layout?: 'standard' | 'classic' | 'fresh'
}
submitAlwaysValidate?: boolean
submit: (skipValidate?: boolean) => void
reset: () => void
validate: (cb?: Function) => Promise<boolean | undefined> | undefined
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
import { BsOption } from 'better-scroll'
export interface IndexListSlots {
title: VNode[]
pulldown: VNode[]
pullup: VNode[]
[key: string]: VNode[]
}
export declare class CubeIndexList extends CubeUIComponent {
title?: string
data?: []
navbar?: boolean
speed?: number
options?: BsOption
pullUpLoad?: boolean | object
pullDownRefresh?: boolean | object
$slots: IndexListSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
interface IClearable {
visible?: boolean
blurHidden?: boolean
}
interface IEye {
open?: boolean
reverse?: boolean
}
export interface InputSlots {
prepend: VNode[]
append: VNode[]
[key: string]: VNode[]
}
export declare class CubeInput extends CubeUIComponent {
value?: string | number
type?: 'text' | 'number' | 'password' | 'date'
disabled?: boolean
readonly?: boolean
maxlength?: number
placeholder?: string
autofocus?: boolean
autocomplete?: boolean
clearable?: boolean | IClearable
eye?: boolean | IEye
focus: (e?: FocusEvent) => void
blur: (e?: FocusEvent) => void
$slots: InputSlots
}
import { CubeUIComponent } from '../component'
export declare class CubeLoading extends CubeUIComponent {
size?: number
}
import { IRadioOptionData } from './common'
import { CubeUIComponent } from '../component'
export declare class CubeRadio extends CubeUIComponent {
value?: string | number
option?: IRadioOptionData | string
position?: 'left' | 'right'
hollowStyle?: boolean
}
import { IRadioOptionData } from './common'
import { CubeUIComponent } from '../component'
export declare class CubeRadioGroup extends CubeUIComponent {
value?: string | number
options?: IRadioOptionData[] | string
position?: 'left' | 'right'
horizontal?: boolean
colNum?: number
hollowStyle?: boolean
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
export interface RateSlots {
default: VNode[]
[key: string]: VNode[]
}
export declare class CubeRate extends CubeUIComponent {
value?: number
max?: number
disabled?: boolean
justify?: boolean
$slots: RateSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
export interface RecycleListSlots {
default: VNode[]
tombstone: VNode[]
item: VNode[]
spinner: VNode[]
noMore: VNode[]
[key: string]: VNode[]
}
export declare class CubeRecycleList extends CubeUIComponent {
infinite?: boolean
size?: number
offset?: number
onFetch: Promise<any[] | false>
reset: () => void
$slots: RecycleListSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
import { BsOption } from 'better-scroll'
type IScrollEvents = 'scroll' | 'before-scroll-start' | 'scroll-end'
export interface ScrollSlots {
default: VNode[]
pulldown: VNode[]
pullup: VNode[]
[key: string]: VNode[]
}
export declare class CubeScroll extends CubeUIComponent {
data?: []
direction?: 'vertical' | 'horizontal'
options?: BsOption
scrollEvents?: IScrollEvents[]
listenScroll?: boolean
listenBeforeScroll?: boolean
refreshDelay?: number
nestMode?: 'none' | 'native' | 'free'
scrollTo: (x?: number, y?: number, time?: number, ease?: object) => void
forceUpdate: (dirty?: boolean, nomore?: boolean) => void
disable: () => void
enable: () => void
resetPullUpTxt: () => void
refresh: () => void
$slots: ScrollSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
import { BsOption } from 'better-scroll'
export interface ScrollNavSlots {
default: VNode[]
prepend: VNode[]
bar: VNode[]
[key: string]: VNode[]
}
export declare class CubeScrollNav extends CubeUIComponent {
data?: []
side?: boolean
current?: string | number
speed?: number
options?: BsOption
refresh: () => void
$slots: ScrollNavSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
import { BsOption } from 'better-scroll'
export interface ScrollNavBarSlots {
default: VNode[]
[key: string]: VNode[]
}
export declare class CubeScrollNavBar extends CubeUIComponent {
direction?: 'horizontal' | 'vertical'
labels?: []
txts?: []
current?: string | number
options?: BsOption
refresh: () => void
$slots: ScrollNavBarSlots
}
import { CubeUIComponent } from '../component'
interface IOptItem {
value?: any
text?: string
}
export declare class CubeSelect extends CubeUIComponent {
value?: any
options?: IOptItem[]
placeholder?: string
autoPop?: boolean
disabled?: boolean
title?: string
cancelTxt?: string
confirmTxt?: string
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
import { BsOption } from 'better-scroll'
interface SlideItem {
url?: string
image?: string
}
export interface SlideSlots {
default: VNode[]
dots: VNode[]
[key: string]: VNode[]
}
export declare class CubeSlide extends CubeUIComponent {
data?: SlideItem[]
initialIndex?: number
loop?: boolean
showDots?: boolean
autoPlay?: boolean
interval?: number
direction?: 'horizontal' | 'vertical'
options?: BsOption
threshold?: number
speed?: number
allowVertical?: boolean
stopPropagation?: boolean
refreshResetCurrent?: boolean
refresh: () => void
$slots: SlideSlots
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
export interface StickySlots {
default: VNode[]
fixed: VNode[]
[key: string]: VNode[]
}
export declare class CubeSticky extends CubeUIComponent {
pos?: number
checkTop?: boolean
fixedShowAni?: string
offset?: number
refresh: () => void
$slots: StickySlots
}
import { CubeUIComponent } from '../component'
interface IBtns {
[key: string]: string | number
text: string | number
color: string
}
interface IItem {
[key: string]: string | number
value: string | number
text: string | number
}
interface ISwipeItem {
item?: IItem
btns?: IBtns[]
}
export declare class CubeSwipe extends CubeUIComponent {
data?: ISwipeItem[]
autoShrink?: boolean
}
export declare class CubeSwipeItem extends CubeUIComponent {
item?: IItem
btns?: IBtns
index?: number
autoShrink?: boolean
shrink: () => void
}
import { CubeUIComponent } from '../component'
export declare class CubeSwitch extends CubeUIComponent {
disabled?: boolean
value?: boolean
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
export interface ITabBarData {
label: string | number
value?: string | number
icon?: string
}
export interface TabBarSlots {
default: VNode[]
icon: VNode[]
[key: string]: VNode[]
}
export declare class CubeTabBar extends CubeUIComponent {
value?: string | number
data?: ITabBarData[]
showSlider?: boolean
inline?: boolean
useTransition?: boolean
setSliderTransform: (offset: string | number) => void
$slots: TabBarSlots
}
import { CubeUIComponent } from '../component'
interface ITabPanelsData {
label: string | number // 必选
value?: string | number
}
export declare class CubeTabPanels extends CubeUIComponent {
value?: string | number
data?: ITabPanelsData[]
}
export declare class CubeTabPanel extends CubeUIComponent {
label?: string | number
value?: string | number
}
\ No newline at end of file
import { CubeUIComponent } from '../component'
interface IIndicator {
remain?: boolean
negative?: boolean
}
export declare class CubeTextarea extends CubeUIComponent {
value?: string
disabled?: boolean
readonly?: boolean
maxlength?: number
placeholder?: string
autofocus?: boolean
indicator?: boolean | IIndicator
autoExpand: boolean
focus?: (e?: FocusEvent) => void
blur?: (e?: FocusEvent) => void
}
import { CubeUIComponent } from '../component'
export type DirectionType = 'top' | 'bottom' | 'left' | 'right'
export declare class CubeTip extends CubeUIComponent {
direction?: DirectionType
offsetTop?: number | string
offsetBottom?: number | string
offsetLeft?: number | string
offsetRight?: number | string
visible?: boolean
close: () => void
show: () => void
hide: () => void
}
import { CubeUIComponent } from '../component'
interface IActions {
type?: 'button' | 'checkbox'
text?: string
checked?: boolean
action?: string
icon?: string
}
export declare class CubeToolbar extends CubeUIComponent {
actions?: IActions[]
moreActions?: IActions[]
}
import { CubeUIComponent } from '../component'
export interface IFile extends CubeUIComponent {
name?: string
size?: number
url?: string
base64?: string
status?: string
progress?: number
file?: File
response?: object | string | []
responseHeaders?: string
}
export declare class CubeUpload extends CubeUIComponent {
value?: IFile[]
action?: string | object
max?: number
auto?: boolean
simultaneousUploads?: number
multiple?: boolean
accept?: string
processFile?: (file?: File, next?: Function) => any
start?: () => void
pause?: () => void
retry?: () => void
removeFile?: (file: File) => void
}
import { VNode } from 'vue'
import { CubeUIComponent } from '../component'
type ValidatorType = 'string' | 'number' | 'array' | 'date' | 'email' | 'tel' | 'url'
export interface IValidatorRules {
required: boolean
type?: ValidatorType
min?: number
max?: number
len?: number
notWhitespace?: boolean
pattern?: RegExp
custom?: Function
}
export interface ValidatorSlots {
default: VNode[]
message: VNode[]
[key: string]: VNode[]
}
export declare class CubeValidator extends CubeUIComponent {
model?: any
value?: any
rules?: IValidatorRules
messages?: object | string
immediate?: boolean
disabled?: boolean
validate?: (cb?: Function) => any
addRule?: Function
addMessage?: Function
addType?: Function
addHelper?: Function
$slots: ValidatorSlots
}
...@@ -18,3 +18,9 @@ export type TransformFnKeys<T> = { ...@@ -18,3 +18,9 @@ export type TransformFnKeys<T> = {
} }
export type GetTransformFnKeys<T> = TransformFnKeys<Pick<T, GetFunctionNames<T>>> export type GetTransformFnKeys<T> = TransformFnKeys<Pick<T, GetFunctionNames<T>>>
export interface IRadioOptionData {
label?: string
value?: string | number
disabled?: boolean
}
...@@ -7,6 +7,37 @@ export interface CreateAPIFn<O, V> { ...@@ -7,6 +7,37 @@ export interface CreateAPIFn<O, V> {
(options: O, renderFn: IRenderFn, single: boolean):V (options: O, renderFn: IRenderFn, single: boolean):V
} }
// basic
export * from './Button'
export * from './Loading'
export * from './Tip'
export * from './Toolbar'
export * from './TabBar'
export * from './TabPanels'
export * from './Checkbox'
export * from './CheckboxGroup'
export * from './Radio'
export * from './RadioGroup'
export * from './Checker'
export * from './Input'
export * from './Textarea'
export * from './Select'
export * from './Switch'
export * from './Rate'
export * from './Validator'
export * from './Upload'
export * from './Form'
export * from './Drawer'
export * from './Scroll'
export * from './Slide'
export * from './IndexList'
export * from './Swipe'
export * from './Sticky'
export * from './ScrollNavBar'
export * from './ScrollNav'
export * from './RecycleList'
// create-API
export * from './Popup' export * from './Popup'
export * from './ActionSheet' export * from './ActionSheet'
export * from './Toast' export * from './Toast'
......
import Vue from 'vue' import Vue from 'vue'
import { CubeUIComponent } from './component' import { CubeUIComponent } from './component'
import { IPopup, IToast, IPicker, ICascadePicker, IDatePicker, ITimePicker, ISegmentPicker, IDialog, IActionSheet, IImagePreview, CreateAPIFn } from './components' import {
// basic
CubeButton,
CubeLoading,
CubeTip,
CubeToolbar,
CubeTabBar,
CubeTabPanels,
CubeCheckbox,
CubeCheckboxGroup,
CubeRadio,
CubeRadioGroup,
CubeChecker,
CubeInput,
CubeTextarea,
CubeSelect,
CubeSwitch,
CubeRate,
CubeValidator,
CubeUpload,
CubeForm,
CubeDrawer,
CubeScroll,
CubeSlide,
CubeIndexList,
CubeSwipe,
CubeSticky,
CubeScrollNavBar,
CubeScrollNav,
CubeRecycleList,
// create-API
IPopup,
IToast,
IPicker,
ICascadePicker,
IDatePicker,
ITimePicker,
ISegmentPicker,
IDialog,
IActionSheet,
IImagePreview,
CreateAPIFn
} from './components'
/** /**
* CubeUI 组件 * CubeUI 组件
* CubeUI component common definition * CubeUI component common definition
...@@ -46,44 +88,58 @@ export class Style {} ...@@ -46,44 +88,58 @@ export class Style {}
// basic // basic
/** Button Component */ /** Button Component */
export class Button extends CubeUIComponent {} export class Button extends CubeButton {}
/** Loading Component */ /** Loading Component */
export class Loading extends CubeUIComponent {} export class Loading extends CubeLoading {
}
/** Tip Component */ /** Tip Component */
export class Tip extends CubeUIComponent {} export class Tip extends CubeTip {}
/** Toolbar Component */ /** Toolbar Component */
export class Toolbar extends CubeUIComponent {} export class Toolbar extends CubeToolbar {
}
/** TabBar Component */ /** TabBar Component */
export class TabBar extends CubeUIComponent {} export class TabBar extends CubeTabBar {
}
/** TabPanels Component */ /** TabPanels Component */
export class TabPanels extends CubeUIComponent {} export class TabPanels extends CubeTabPanels {}
// form // form
/** Checkbox Component */ /** Checkbox Component */
export class Checkbox extends CubeUIComponent {} export class Checkbox extends CubeCheckbox {
ICheckbox: CubeCheckbox
}
/** Checkbox Group Component */ /** Checkbox Group Component */
export class CheckboxGroup extends CubeUIComponent {} export class CheckboxGroup extends CubeCheckboxGroup {
ICheckboxGroup: CubeCheckboxGroup
}
/** Checker Component */ /** Checker Component */
export class Checker extends CubeUIComponent {} export class Checker extends CubeChecker {
IChecker: CubeChecker
}
/** Radio Component */ /** Radio Component */
export class Radio extends CubeUIComponent {} export class Radio extends CubeRadio {
IRadio: CubeRadio
}
/** Radio Group Component */ /** Radio Group Component */
export class RadioGroup extends CubeUIComponent {} export class RadioGroup extends CubeRadioGroup {
IRadioGroup: CubeRadioGroup
}
/** Input Component */ /** Input Component */
export class Input extends CubeUIComponent {} export class Input extends CubeInput {
}
/** Textarea Component */ /** Textarea Component */
export class Textarea extends CubeUIComponent {} export class Textarea extends CubeTextarea {}
/** Select Component */ /** Select Component */
export class Select extends CubeUIComponent {} export class Select extends CubeSelect {}
/** Switch Component */ /** Switch Component */
export class Switch extends CubeUIComponent {} export class Switch extends CubeSwitch {}
/** Rate Component */ /** Rate Component */
export class Rate extends CubeUIComponent {} export class Rate extends CubeRate {}
/** Validator Component */ /** Validator Component */
export class Validator extends CubeUIComponent {} export class Validator extends CubeValidator {}
/** Upload Component */ /** Upload Component */
export class Upload extends CubeUIComponent {} export class Upload extends CubeUpload {}
/** Form Component */ /** Form Component */
export class Form extends CubeUIComponent {} export class Form extends CubeForm {}
/** base CreatApi CubeUIComponent */ /** base CreatApi CubeUIComponent */
export class CreateApiCubeUIComponent extends CubeUIComponent { export class CreateApiCubeUIComponent extends CubeUIComponent {
...@@ -142,28 +198,24 @@ export class ImagePreview extends CreateApiCubeUIComponent { ...@@ -142,28 +198,24 @@ export class ImagePreview extends CreateApiCubeUIComponent {
static $create(options: IImagePreview): ImagePreview static $create(options: IImagePreview): ImagePreview
} }
/** Drawer Component */ /** Drawer Component */
export class Drawer extends CubeUIComponent { export class Drawer extends CubeDrawer {}
show(): void
hide(): void
static $create(options: object): Drawer
}
// scroll // scroll
/** Scroll Component */ /** Scroll Component */
export class Scroll extends CubeUIComponent {} export class Scroll extends CubeScroll {}
/** Slide Component */ /** Slide Component */
export class Slide extends CubeUIComponent {} export class Slide extends CubeSlide {}
/** Index List Component */ /** Index List Component */
export class IndexList extends CubeUIComponent {} export class IndexList extends CubeIndexList {}
/** Swipe Component */ /** Swipe Component */
export class Swipe extends CubeUIComponent {} export class Swipe extends CubeSwipe {}
/** Sticky Component */ /** Sticky Component */
export class Sticky extends CubeUIComponent {} export class Sticky extends CubeSticky {}
/** ScrollNavBar Component */ /** ScrollNavBar Component */
export class ScrollNavBar extends CubeUIComponent {} export class ScrollNavBar extends CubeScrollNavBar {}
/** ScrollNav Component */ /** ScrollNav Component */
export class ScrollNav extends CubeUIComponent {} export class ScrollNav extends CubeScrollNav {}
/** RecycleList Component */ /** RecycleList Component */
export class RecycleList extends CubeUIComponent {} export class RecycleList extends CubeRecycleList {}
// Vue prototype $createXx // Vue prototype $createXx
declare module 'vue/types/vue' { declare module 'vue/types/vue' {
......
{
"cube-button/type": { "description": "cube-button type: 'button' | 'submit'", "type": "string", "options": ["button", "submit"] },
"cube-checker/type": { "description": "cube-checker type: 'checkbox' | 'radio'", "type": "string", "defalut": "checkbox", "options": ["checkbox", "radio"] },
"cube-input/type": { "description": "cube-input type: 'text' | 'number' | 'password' | 'date'", "type": "string", "options": ["text" , "number" , "password" , "date"] },
"disabled": { "type": "boolean" },
"cube-button/active": { "type": "boolean" },
"cube-swipe-item/active": { "type": "method" },
"icon": { "type": "string", "description": "the class of icon" },
"light": { "type": "boolean", "description": "light style" },
"inline": { "type": "boolean", "description": "inline style" },
"outline": { "type": "boolean", "description": "outline style" },
"primary": { "type": "boolean", "description": "primary style" },
"size": { "type": "number" },
"cube-tip/direction": { "type": "string", "description": "the direction of the small triangle, options: top | bottom | left | right", "options": ["top", "bottom", "left", "right"] },
"cube-scroll/direction": { "type": "string", "description": "slide direction, options: horizontal | vertical", "options": ["horizontal", "vertical"] },
"cube-slide/direction": { "type": "string", "description": "slide direction, options: horizontal | vertical", "options": ["horizontal", "vertical"] },
"cube-scroll-nav-bar/direction": { "type": "string", "description": "slide direction, options: horizontal | vertical", "options": ["horizontal", "vertical"] },
"cube-tip/offsetLeft": { "type": "number", "description": "the distance between the small triangle and the left part of x axis" },
"cube-tip/offsetTop": { "type": "number", "description": "the distance between the small triangle and the origin of y axis" },
"cube-tip/offsetRight": { "type": "number", "description": "the distance between the small triangle and the right part of x axis" },
"cube-tip/offsetBottom": { "type": "number", "description": "the distance between the small triangle and the bottom part of y axis" },
"cube-toolbar/actions": { "type": "array", "description": "actions description, type array" },
"cube-toolbar/more-actions": { "type": "array", "description": "more actions, type array" }
}
{
"cube-button": {
"attributes": ["type", "active", "disabled", "icon", "light", "inline", "outline", "primary"],
"defaults": [],
"description": "cube-button"
},
"cube-loading": {
"attributes": ["size"],
"defaults": [],
"subtags": [],
"description": "cube-loading"
},
"cube-tip": {
"attributes": ["direction", "offsetTop", "offsetBottom", "offsetLeft", "offsetRight", "visible", "close"],
"defaults": [],
"subtags": [],
"description": "cube-tip"
},
"cube-toolbar": {
"attributes": ["actions", "more-actions", "more-click"],
"defaults": [],
"description": "cube-toolbar"
},
"cube-tab-bar": {
"attributes": ["value", "data", "show-slider", "inline", "use-transition"],
"defaults": [],
"description": "cube-tab-bar"
},
"cube-checkbox": {
"attributes": ["option", "position", "shape", "hollow-style", "label", "value", "disabled"],
"defaults": [],
"description": "cube-checkbox"
},
"cube-checkbox-group": {
"attributes": ["value", "options", "horizontal", "colNum", "shape", "hollow-style", "min", "max", "checked", "cancel-checked", "input"],
"defaults": ["data"],
"description": "cube-checkbox-group"
},
"cube-radio": {
"attributes": ["value", "option", "position", "hollow-style"],
"defaults": [],
"description": "cube-radio"
},
"cube-radio-group": {
"attributes": ["value", "options", "position", "horizontal", "colNum", "hollow-style"],
"defaults": ["options"],
"description": "cube-radio-group"
},
"cube-checker": {
"attributes": ["value", "options", "type", "min", "max"],
"defaults": ["options"],
"description": "cube-checker"
},
"cube-input": {
"attributes": ["value", "type", "disabled", "readonly", "maxlength", "placeholder", "autofocus", "autocomplete", "clearable", "eye"],
"defaults": ["type"],
"description": "cube-input"
},
"cube-textarea": {
"attributes": ["value", "disabled", "readonly", "maxlength", "placeholder", "autofocus", "indicator", "auto-expand"],
"defaults": [],
"description": "cube-textarea"
},
"cube-select": {
"attributes": ["value", "options", "placeholder", "auto-pop", "disabled", "title", "cancelTxt", "confirmTxt", "picker-show", "picker-hide"],
"defaults": [],
"description": "cube-select"
},
"cube-switch": {
"attributes": ["disabled", "value"],
"defaults": [],
"description": "cube-switch"
},
"cube-rate": {
"attributes": ["value", "max", "disabled", "justify"],
"defaults": ["justify"],
"description": "cube-rate"
},
"cube-validator": {
"attributes": ["model", "value", "rules", "messages", "immediate", "disabled", "validated", "validating", "msg-click", "input"],
"defaults": ["model"],
"description": "cube-validator"
},
"cube-upload": {
"attributes": ["value", "action", "max", "auto", "simultaneousUploads", "multiple", "action", "files-added", "file-submitted", "file-removed", "file-success", "file-error", "file-click"],
"defaults": ["title"],
"description": "cube-upload"
},
"cube-form": {
"attributes": ["model", "schema", "immediate-validate", "action", "options", "submit-always-validate", "submit", "reset", "validate", "valid", "invalid"],
"defaults": ["model"],
"subtags": ["cube-form-group"],
"description": "cube-form"
},
"cube-form-group": {
"attributes": ["legend", "fields"],
"defaults": ["legend"],
"subtags": ["cube-form-item"],
"description": "cube-form-group"
},
"cube-form-item": {
"attributes": ["field"],
"defaults": ["field"],
"subtags": [],
"description": "cube-formitem"
},
"cube-drawer": {
"attributes": ["title", "data", "selected-index", "visible", "cancel"],
"defaults": ["title"],
"subtags": ["cube-drawer-panel"],
"description": "cube-drawer"
},
"cube-drawer-panel": {
"attributes": ["data", "index"],
"defaults": ["data"],
"subtags": ["cube-drawer-item"],
"description": "cube-drawer-panel"
},
"cube-drawer-item": {
"attributes": ["data", "index"],
"defaults": ["data"],
"description": "cube-drawer-item"
},
"cube-scroll": {
"attributes": ["data", "direction", "options", "scroll-events", "listen-scroll", "listen-before-scroll", "refresh-delay", "nest-mode", "before-scroll-start", "scroll-end", "pulling-down", "pulling-up"],
"defaults": ["data"],
"description": "cube-scroll"
},
"cube-slide": {
"attributes": ["data", "initial-index", "loop", "show-dots", "auto-play", "interval", "direction", "options", "threshold", "speed", "allow-vertical", "stop-propagation", "refresh-reset-current", "scroll-end"],
"defaults": ["data"],
"subtags": ["cube-slide-item"],
"description": "cube-slide"
},
"cube-slide-item": {
"attributes": ["url", "image"],
"defaults": [],
"description": "cube-slide-item"
},
"cube-index-list": {
"attributes": ["title", "data", "navbar", "speed", "options", "pull-up-load", "pull-down-refresh", "title-click", "pulling-up", "pulling-down"],
"defaults": [],
"description": "cube-index-list"
},
"cube-swipe": {
"attributes": ["data", "auto-shrink", "item-click", "btn-click"],
"defaults": [],
"subtags": ["cube-swipe-item"],
"description": "cube-swipe"
},
"cube-swipe-item": {
"attributes": ["item", "btns", "index", "auto-shrink", "item-click", "btn-click", "active"],
"defaults": ["item"],
"description": "cube-swipe-item"
},
"cube-sticky": {
"attributes": ["pos", "check-top", "fixed-show-ani", "offset", "diff-change", "change"],
"defaults": [],
"subtags": ["cube-sticky-ele"],
"description": "cube-sticky"
},
"cube-scroll-nav-bar": {
"attributes": ["direction", "labels", "txts", "current", "options"],
"defaults": [],
"description": "cube-scroll-nav-bar"
},
"cube-scroll-nav": {
"attributes": ["data", "side", "current", "speed", "options", "sticky-change"],
"defaults": ["data"],
"subtags": ["cube-scroll-nav-panel"],
"description": "cube-scroll-nav"
},
"cube-recycle-list": {
"attributes": ["infinite", "size", "offset", "on-fetch"],
"defaults": [],
"description": "cube-recycle-list"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册