Skip to content

Commit ae7d8d1

Browse files
fix: 修复待办挂件显示和富文本编辑器不一致问题
1 parent 8cd1461 commit ae7d8d1

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iTime",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "基于electron+vue3+arco design开发的桌面效率工具",
55
"author": "AlbertZhang<han892577@qq.com>",
66
"private": true,

src/assets/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ol li{
6868
}
6969
/* 原本没有间距 */
7070
li {
71-
margin: 0.7em 0;
71+
margin: 0.8em 0;
7272
}
7373
/* marker用于定制元素的样式(比如大小颜色),before用于改变样式,比如改变标点符号,必须加!important,不然会被覆盖 */
7474
/* 无序列表 */

src/views/desktop/CustomToDo.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const todoContent = ref(""); // 页面渲染的内容
66
window.electron.loadHtmlContent((title, content) => {
77
todoTitle.value = title;
88
todoContent.value = content;
9+
console.log(todoContent.value);
910
});
1011
const draggable = ref(true);
1112
const isShowContent = ref(true);
@@ -18,7 +19,6 @@ const handleDBLClick = () => {
1819
// 隐藏下方内容
1920
isShowContent.value = !isShowContent.value;
2021
};
21-
2222
</script>
2323
<template>
2424
<div
@@ -76,7 +76,12 @@ const handleDBLClick = () => {
7676

7777
<hr v-if="isShowContent" />
7878
<!-- 内容部分 -->
79-
<div v-html="todoContent" class="content" v-if="isShowContent"></div>
79+
<div
80+
v-html="todoContent"
81+
style="white-space: pre-wrap"
82+
class="content"
83+
v-if="isShowContent"
84+
></div>
8085
</div>
8186
</template>
8287
<style scoped>
@@ -114,6 +119,8 @@ const handleDBLClick = () => {
114119
}
115120
.content {
116121
padding: 8px 1vw;
122+
font-family: Helvetica, Arial, sans-serif;
123+
tab-size: 4;
117124
}
118125
/* 可拖拽 */
119126
.draggable {

0 commit comments

Comments
 (0)