优化代码
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
class="anchor-library-list"
|
||||
style="overflow: auto"
|
||||
v-infinite-scroll="load"
|
||||
v-if="list.length !== 0"
|
||||
>
|
||||
<div class="anchor-library-card" v-for="(item, index) in list" :key="index">
|
||||
<div class="card-content">
|
||||
@@ -46,6 +47,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="chatNotDeta" v-if="list.length === 0">
|
||||
<div class="chatNotDeta-text">您还没有主播,快去添加吧!</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-splitter-panel>
|
||||
<el-splitter-panel size="25%" :collapsible="true" :resizable="false">
|
||||
@@ -102,7 +106,8 @@
|
||||
</el-splitter>
|
||||
</div>
|
||||
<!-- 确认删除弹窗 -->
|
||||
<el-dialog center
|
||||
<el-dialog
|
||||
center
|
||||
class="center-dialog"
|
||||
v-model="centerDialogVisible"
|
||||
title="提示"
|
||||
@@ -147,7 +152,7 @@ const genderOptions = [
|
||||
const gendervalue = ref(null); // 性别值
|
||||
const countryvalue = ref(null); //国家
|
||||
const anchorName = ref(null); // 主播名称
|
||||
const list = ref([{}, {}, {}, {}, {}, {}]);
|
||||
const list = ref([]);
|
||||
const user = ref(null); // 用户信息
|
||||
const AnchorProfilePicture = ref(null); // 主播头像
|
||||
const centerDialogVisible = ref(false); // 确认删除弹窗
|
||||
@@ -189,11 +194,13 @@ function cancel() {
|
||||
// 删除主播
|
||||
const deleteAnchorID = ref(null);
|
||||
const deleteAnchor = () => {
|
||||
delAnchor({ id: deleteAnchorID.value }).then((res) => {
|
||||
centerDialogVisible.value = false;
|
||||
ElMessage.success("删除成功");
|
||||
AnchorList();
|
||||
});
|
||||
delAnchor({ id: deleteAnchorID.value })
|
||||
.then((res) => {
|
||||
centerDialogVisible.value = false;
|
||||
ElMessage.success("删除成功");
|
||||
AnchorList();
|
||||
})
|
||||
.catch((err) => {});
|
||||
};
|
||||
function anchordelete(id) {
|
||||
deleteAnchorID.value = id;
|
||||
@@ -320,6 +327,19 @@ onUnmounted(() => {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.chatNotDeta{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.chatNotDeta-text{
|
||||
font-size: 20px;
|
||||
color: #03aba8;
|
||||
font-weight: bold;
|
||||
}
|
||||
.anchor-library-card {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
|
||||
Reference in New Issue
Block a user