This commit is contained in:
kclf
2022-12-06 19:15:06 +08:00
parent db9c26cf46
commit 4f866fd70c

View File

@@ -14,8 +14,8 @@
<p>公告内容</p>
<!-- 预览 -->
<template v-if="!editOn">
<div style="height: 120px; border: 1px solid rgb(217, 217, 217">
{{ noticeContent }}
<div class="txt-content">
{{ noticeContent ? noticeContent : "暂无公告" }}
</div>
<div class="btn-content">
<a-button type="primary" @click="handleEdit">编辑</a-button>
@@ -23,9 +23,13 @@
</template>
<!-- 编辑 -->
<template v-if="editOn">
<div style="height: 120px; border: 1px solid rgb(217, 217, 217">
{{ noticeContent }}
<div class="txt-contain">
<span>预览</span>
<div class="txt-content">
{{ noticeContent }}
</div>
</div>
<p>编辑</p>
<a-textarea
v-model:value="noticeContent"
:maxlength="150"
@@ -69,6 +73,7 @@ export default {
getTask({ projectId: props.projectId }).then((res) => {
console.log("公告获取项目", res.data.data.projectInfo);
state.projectInfo = res.data.data.projectInfo;
state.noticeContent = state.projectInfo.notice;
});
};
@@ -183,5 +188,35 @@ export default {
margin-right: 10px;
}
}
.txt-content {
margin: 24px 0 32px;
text-indent: 2em;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 22px;
}
.txt-contain {
margin-bottom: 18px;
display: flex;
span {
display: inline-block;
width: 50px;
}
.txt-content-tip {
width: calc(100% - 50px);
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 22px;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
word-break: break-all;
}
}
}
</style>