lyc-dev #24

Merged
lyc merged 4 commits from lyc-dev into main 2024-07-15 19:42:14 +08:00
3 changed files with 29 additions and 13 deletions
Showing only changes of commit d8ce99b53f - Show all commits

View File

@ -13,8 +13,8 @@ const props = defineProps({
default: ''
},
size: {
type: String,
default: '30'
type: Number,
default: 30
}
})

View File

@ -18,9 +18,11 @@
</div>
</div>
<div class="item-btns" @click.stop>
<el-popover placement="bottom-end" trigger="click" popper-class="custom-popover">
<el-popover placement="bottom-end" trigger="hover" popper-class="custom-popover"
:visible="item.showPopover">
<template #reference>
<el-button link type="primary"> <i class="iconfont icon-shenglvehao"></i></el-button>
<el-button link type="primary" > <i
class="iconfont icon-shenglvehao"></i></el-button>
</template>
<template #default>
<div class="item-popover">
@ -28,7 +30,7 @@
<i class="iconfont icon-bianji"></i>
<span>编辑</span>
</div>
<div class="item-popover-item">
<div class="item-popover-item" @click="delRow(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
</div>
@ -57,16 +59,28 @@
</template>
<script setup>
import { deleteSmarttalk } from '@/api/file'
import useResoureStore from '../store'
import FileImage from '@/components/file-image/index.vue'
import { ElMessage } from 'element-plus'
const sourceStore = useResoureStore()
const handleSizeChange = () => { }
const handleCurrentChange = () => { }
//
const delRow = (item) => {
sourceStore.loading = true
try {
deleteSmarttalk(item.id).then(() => {
ElMessage.success('操作成功')
sourceStore.handleQuery()
})
} finally {
sourceStore.loading = false
}
}
</script>

View File

@ -102,9 +102,11 @@ export default defineStore('resource', {
},
changeTab(val) {
this.query.fileSource = val
this.handleQuery()
},
changeType(val) {
this.query.fileFlag = val
this.handleQuery()
}
}
})