12345678910111213141516171819202122232425262728 |
- import { defineComponent , toRefs, reactive, onMounted, ref } from 'vue'
- import { ElTag } from 'element-plus'
- import classes from './index.module.less'
- export default defineComponent({
- name: 'tagItem',
- emits:['searchTag'],
- props: {
- title: {
- type: String,
- default: ''
- }
- },
- setup(props, conent) {
- const state = reactive({
- title:props.title
- })
- const shioseTag =(key:string)=>{
- conent.emit('searchTag',key)
- }
- return () => (
- <>
- <ElTag size="large" onClick={()=>shioseTag(state.title)} class={classes.tag}>{state.title}</ElTag>
- </>
- )
- }
- })
|