使用vue开发XixunPlayer的功能.
实现清除播放器节目数据和文件
/**
* @Author: 858834013@qq.com
* @Name: clearPlayerTask
* @Date: 2022-04-26
* @Desc: XixunPlayer实现清除播放器节目数据和文件
*/
<template>
<div class="clearPlayerTask">
<el-popconfirm
title="确定要清除播放器节目数据和文件吗?"
@confirm="clearPlayerTask"
>
<el-button type="danger" class="mb20" slot="reference" size="mini">清除播放器节目数据和文件</el-button>
</el-popconfirm>
</div>
</template>
<script>
import { getdata } from '@/api/led/led'
export default {
name: 'clearPlayerTask',
components: {},
props: {
id: {
type: String | Number,
default () {
return {}
}
}
},
methods: {
// 清除播放器节目数据和文件
clearPlayerTask () {
var that = this
getdata(that.id, {
'type': 'clearPlayerTask'
}).then(function (res) {
if (res._type == 'success') {
that.$message({
message: '操作成功',
type: 'success'
})
} else {
that.$message.error('重启失败')
}
})
},
}
}
</script>
<style lang="scss" scoped>
.editinfo {
display: inline-block;
}
</style>