import snippets from './snippets'; export default { snippets, componentName: 'AMTag', docUrl: 'https://mobile.ant.design/zh/components/tag', title: '标签', category: '数据展示', group: '基础组件', props: [ { name: 'children', title: { label: '内容', tip: 'children | 内容', }, propType: { type: 'oneOfType', value: ['node', 'string'], }, setter: ['SlotSetter', 'StringSetter', 'VariableSetter'], }, { name: 'color', title: { label: '标签色', tip: 'color | 标签色' }, propType: 'string', setter: [ { componentName: 'SelectSetter', props: { options: [ { title: '默认', value: 'default', }, { title: '主要', value: 'primary', }, { title: '成功', value: 'success', }, { title: '警告', value: 'warning', }, { title: '危险', value: 'danger', }, ], }, }, 'ColorSetter', ], }, { name: 'fill', title: { label: '填充模式', tip: 'fill | 填充模式', }, propType: { type: 'oneOf', value: ['solid', 'outline'], }, setter: [ { componentName: 'RadioGroupSetter', props: { options: [ { title: 'solid', value: 'solid', }, { title: 'outline', value: 'outline', }, ], }, }, 'VariableSetter', ], defaultValue: 'solid', }, { name: 'round', title: { label: '是否圆角', tip: 'round | 是否圆角' }, propType: 'bool', setter: 'BoolSetter', }, // { // title: 'CSS变量', // display: 'block', // type: 'group', // items: [ // color( // 'background', // '当 fill=solid 时,默认值为 color 属性对应的颜色;当 fill=outline 时,默认值为 #ffffff', // ), // color('border', '边框颜色', 'color 属性对应的颜色'), // width('track', '线条宽度'), // width('text', '文字内容的宽度'), // ], // }, ], configure: { supports: { style: true, events: [ { name: 'onClick', template: "onClick(e,${extParams}){\n// body 点击事件\nconsole.log('onClick', e);}", }, ], }, }, };