浏览代码

图片问题修复

tianyun 1 年之前
父节点
当前提交
c2e3f9c0ca
共有 1 个文件被更改,包括 12 次插入4 次删除
  1. 12 4
      simple-demo/send_memos.html

+ 12 - 4
simple-demo/send_memos.html

@@ -5,16 +5,19 @@
     <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
     <title>memos记录</title>
     <!-- 引入Quill样式 -->
-<!--    <link rel="stylesheet" href="./js/quill.snow.css">-->
+    <!--    <link rel="stylesheet" href="./js/quill.snow.css">-->
     <link rel="stylesheet" href="https://cdn.staticfile.org/lxgw-wenkai-screen-webfont/1.6.0/lxgwwenkaiscreen.css"></link>
     <script src="js/util.js"></script>
     <style>
-        body{font-family: "LXGW WenKai Screen", sans-serif !important;}
+        body {
+            font-family: "LXGW WenKai Screen", sans-serif !important;
+        }
 
         .border {
             border: 1px solid #b7b6b6;
             border-radius: 5px;
         }
+
         .editor {
             height: 130px;
             padding: 10px;
@@ -174,9 +177,11 @@
 
     const myEdit = document.querySelector('#editor');
     const model = document.querySelector('#editorModel');
+
     function getEditContent() {
         return myEdit.value;
     }
+
     function getModelContent() {
         return model.value;
     }
@@ -267,12 +272,13 @@
     let tmpId;
 
 
-
     function formatTimeStr(timeStr) {
         //  "2024-04-25T08:25:54" 转为 "2024-04-25 08:25:54"
         return timeStr.replace('T', ' ').substring(0, 19);
     }
+
     let resourceMap = {};
+
     // 更新数据
     async function updateById() {
         let content = getModelContent();
@@ -295,6 +301,7 @@
             }
         });
     }
+
     function appendImg(tmpDiv, id) {
         // tmpDiv 新增一个换行
         tmpDiv.appendChild(document.createElement('br'));
@@ -313,6 +320,7 @@
     }
 
     function search() {
+        resourceMap = {};
         // 页面滚动到顶部
         document.documentElement.scrollTo(0, 0);
 
@@ -392,7 +400,7 @@
 
                 let tmpDiv = document.createElement('div');
                 tmpDiv.id = id;
-                tmpDiv.innerText =  item['content'];
+                tmpDiv.innerText = item['content'];
                 // 宽度100%
                 tmpDiv.style.width = '100%';
                 // 样式加上border,点击跳转到对应的url https://memos.tianyunperfect.cn/m/ + item['resource_name']