【增加】AI 角色使用

This commit is contained in:
cherishsince
2024-05-15 23:57:41 +08:00
parent e7643c0343
commit 490b11aa3a
2 changed files with 23 additions and 4 deletions

View File

@ -33,7 +33,7 @@
</div>
<div class="btn-container">
<el-button type="primary" size="small">使用</el-button>
<el-button type="primary" size="small" @click="handleUseClick(role)">使用</el-button>
</div>
</div>
</el-card>
@ -53,7 +53,8 @@ const props = defineProps({
}
})
// 定义钩子
const emits = defineEmits(['onDelete', 'onEdit'])
const emits = defineEmits(['onDelete', 'onEdit', 'onUse'])
// more 点击
const handleMoreClick = async (data) => {
const type = data[0]
@ -65,6 +66,11 @@ const handleMoreClick = async (data) => {
}
}
// 使用
const handleUseClick = (role) => {
emits('onUse', role)
}
onMounted(() => {
console.log('props', props.roleList)
})