对比新文件 |
| | |
| | | import { defineComponent } from 'vue' |
| | | import styles from './Flow.module.scss' |
| | | import Tag from '../Tag/Tag' |
| | | export default defineComponent({ |
| | | name: '娴佺▼鏄剧ずtag', |
| | | props: { |
| | | modelValue: { |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | disabled: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | emits: ['click'], |
| | | setup(props, { attrs, slots, emit }) { |
| | | return () => { |
| | | return ( |
| | | <div |
| | | class={{ |
| | | [styles.flows_pick]: true, |
| | | [styles.disabled]: props.disabled, |
| | | }} |
| | | > |
| | | {!props.modelValue?.length ? ( |
| | | <span class={styles.flowTag}>鍏宠仈娴佺▼</span> |
| | | ) : ( |
| | | props.modelValue.map((item: any) => { |
| | | return ( |
| | | <Tag style={{ marginRight: '5px', marginBottom: '5px' }}> |
| | | {item.name || item.description} |
| | | </Tag> |
| | | ) |
| | | }) |
| | | )} |
| | | </div> |
| | | ) |
| | | } |
| | | }, |
| | | }) |