perf: 整体优化细节

This commit is contained in:
橙子
2025-02-06 12:54:48 +08:00
parent 9c94953e0e
commit 37b16e8395
7 changed files with 33 additions and 20 deletions

View File

@@ -11,7 +11,7 @@ const onClickText=()=>{
</script>
<template>
<el-card class="box-card" shadow="never" :body-style="{padding: isPadding===false?'0px 20px':'20px 20px'}">
<el-card class="box-card" shadow="never" :body-style="{padding: props.isPadding===false?'0px 0px':'20px 20px'}">
<template #header>
<div class="card-header">
<span>{{ props.header }}</span>

View File

@@ -1,9 +1,10 @@
<template>
<!-- @node-click="handleNodeClick"-->
<el-tree
empty-text="无子文章"
:data="props.data == '' ? [] : props.data"
:props="defaultProps"
@node-click="handleNodeClick"
:expand-on-click-node="false"
node-key="id"
:default-expand-all="true"
@@ -18,7 +19,7 @@
:content="data.name"
placement="right"
>
<span class="title-name">{{ data.name }}</span>
<span @click="handleNodeClick(data)" class="title-name">{{ data.name }}</span>
</el-tooltip>
<span>
@@ -44,6 +45,7 @@
删除
</a>
</span>
</span>
</template>
</el-tree>
@@ -79,7 +81,7 @@ const { isHasPermission: isRemoveArticle } = getPermission("bbs:article:del");
</script>
<style scoped>
.custom-tree-node {
width: 100%;
flex: 1;
display: flex;
align-items: center;