Compare commits

..

No commits in common. "f60fdbafa0222d09fdc7a661f32746c3791ed973" and "67320f897e58ed37250a2b474efff661f095f846" have entirely different histories.

1 changed files with 3 additions and 10 deletions

View File

@ -94,14 +94,13 @@
</div>
</template>
<template v-else>
<!-- 判断是不是自己创建的课件-->
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<div class="item-popover-item">
<el-button text @click="editTalk(item, index)">
<i class="iconfont icon-bianji"></i>
<span>重命名</span>
</el-button>
</div>
<div class="item-popover-item" v-if="userInfo.userId === Number(item.createUserId)">
<div class="item-popover-item">
<el-button text @click="deleteTalk(item)">
<i class="iconfont icon-shanchu"></i>
<span>删除</span>
@ -141,7 +140,6 @@ import { asyncLocalFile } from '@/utils/talkFile'
import { toTimeText } from '@/utils/date'
import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteSmarttalk, updateSmarttalk, getPrepareById } from '@/api/file'
import useUserStore from '@/store/modules/user'
const { ipcRenderer } = window.electron || {}
export default {
@ -164,13 +162,11 @@ export default {
emits: { 'on-move': null, 'on-delete': null, 'on-set': null, 'on-delhomework': null },
data() {
return {
listenList: [],
userInfo:{}
listenList: []
}
},
methods: {
editTalk(item) {
console.log(item,this.userInfo,'this.userInfo')
ElMessageBox.prompt('请输入新的名称', '重命名', {
confirmButtonText: '确认',
cancelButtonText: '取消',
@ -257,9 +253,6 @@ export default {
deleteHomework(item){
this.$emit('on-delhomework', item)
}
},
mounted() {
this.userInfo = useUserStore().user
}
}
</script>