1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- import { defaultButtonConfigMap } from './config'
- export const propsScheme = {
- buttonType: {
- type: String,
- options: Object.keys(defaultButtonConfigMap),
- intro: '预设按钮类型'
- },
- size: {
- type: String,
- default: 'default',
- intro: '大小',
- options: ['small', 'default', 'large'],
- validate: true,
- attr: true
- },
- icon: {
- type: [String, Object, Function],
- intro: '图标类名/组件'
- },
- type: {
- type: String,
- intro: '按钮类型',
- options: ['default', 'primary', 'info', 'warning', 'danger', 'success'],
- validate: true,
- attr: true
- },
- map: {
- type: Boolean,
- intro: '是否地图按钮'
- },
- plain: {
- type: Boolean,
- intro: '是否朴素按钮',
- attr: true
- },
- round: {
- type: Boolean,
- intro: '是否圆角按钮',
- attr: true
- },
- circle: {
- type: Boolean,
- intro: '是否圆形按钮',
- attr: true
- },
- square: {
- type: Boolean,
- intro: '是否方形按钮'
- },
- loading: {
- type: Boolean,
- intro: '是否加载中状态',
- attr: true
- },
- disabled: {
- type: Boolean,
- intro: '是否禁用状态',
- attr: true
- }
- }
- export const eventsScheme = {
- click: {
- cbVar: 'e'
- }
- }
- export const slotsScheme = {
- default: {
- cbVar: 'text'
- }
- }
- export const componentScheme = {
- propsScheme,
- slotsScheme,
- eventsScheme
- }
|