Skip to content

Commit

Permalink
fix: 修复待办挂件显示和富文本编辑器不一致问题
Browse files Browse the repository at this point in the history
  • Loading branch information
AZCodingAccount committed Feb 2, 2024
1 parent 8cd1461 commit ae7d8d1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iTime",
"version": "1.0.1",
"version": "1.0.2",
"description": "基于electron+vue3+arco design开发的桌面效率工具",
"author": "AlbertZhang<han892577@qq.com>",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ol li{
}
/* 原本没有间距 */
li {
margin: 0.7em 0;
margin: 0.8em 0;
}
/* marker用于定制元素的样式(比如大小颜色),before用于改变样式,比如改变标点符号,必须加!important,不然会被覆盖 */
/* 无序列表 */
Expand Down
11 changes: 9 additions & 2 deletions src/views/desktop/CustomToDo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const todoContent = ref(""); // 页面渲染的内容
window.electron.loadHtmlContent((title, content) => {
todoTitle.value = title;
todoContent.value = content;
console.log(todoContent.value);
});
const draggable = ref(true);
const isShowContent = ref(true);
Expand All @@ -18,7 +19,6 @@ const handleDBLClick = () => {
// 隐藏下方内容
isShowContent.value = !isShowContent.value;
};
</script>
<template>
<div
Expand Down Expand Up @@ -76,7 +76,12 @@ const handleDBLClick = () => {

<hr v-if="isShowContent" />
<!-- 内容部分 -->
<div v-html="todoContent" class="content" v-if="isShowContent"></div>
<div
v-html="todoContent"
style="white-space: pre-wrap"
class="content"
v-if="isShowContent"
></div>
</div>
</template>
<style scoped>
Expand Down Expand Up @@ -114,6 +119,8 @@ const handleDBLClick = () => {
}
.content {
padding: 8px 1vw;
font-family: Helvetica, Arial, sans-serif;
tab-size: 4;
}
/* 可拖拽 */
.draggable {
Expand Down

0 comments on commit ae7d8d1

Please sign in to comment.