diff --git a/static/js/lib/common/MyUtils.js b/static/js/lib/common/MyUtils.js
index b735676..0c1260b 100644
--- a/static/js/lib/common/MyUtils.js
+++ b/static/js/lib/common/MyUtils.js
@@ -287,7 +287,7 @@ export class MyUtils {
*/
RefreshRootFrontSize() {
let curDoc = document.documentElement;//当前文档的 root 元素
- let curClientW = document.documentElement.clientWidth || document.body.clientWidth;
+ let curClientW = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if (!curClientW) {
return
}
@@ -304,6 +304,7 @@ export class MyUtils {
"\n isMobile :" + /mobi|android|iphone|ipad|ipod/i.test(navigator.userAgent.toLocaleLowerCase()) +
"\n isIOS :" + /iphone|ipad|ipod/.test(window.navigator.userAgent.toLocaleLowerCase()) +
"\n isAndroid :" + /android/.test(window.navigator.userAgent.toLocaleLowerCase()) +
+ "\n window.width :" + window.innerWidth +
"\n curClientW :" + curClientW +
" \n designWidth: " + designWidth +
"\n 1rem = " + nowFrontSize;
diff --git a/static/js/lib/main.js b/static/js/lib/main.js
index a87b222..561b34d 100644
--- a/static/js/lib/main.js
+++ b/static/js/lib/main.js
@@ -8,7 +8,7 @@ import {MyEventListener} from "./event/MyEventListener.js";
const userAgent = window.navigator.userAgent;
// 获取屏幕宽度
// const screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- const screenWidth = document.documentElement.clientWidth || document.body.clientWidth;
+ const screenWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
// 判断是否是手机
const isMobile = /mobi|android|iphone|ipad|ipod/i.test(userAgent.toLocaleLowerCase()) || screenWidth < 768;
const isIOS = /iphone|ipad|ipod/i.test(userAgent.toLocaleLowerCase()) || screenWidth < 768;
@@ -39,9 +39,9 @@ import {MyEventListener} from "./event/MyEventListener.js";
isAndroid: isAndroid,
//判断是否是平板电脑
isTablet: isTablet,
- screenWidth: document.documentElement.clientWidth || document.body.clientWidth,
+ screenWidth: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
//高度 for android
- screenHeight: document.documentElement.clientHeight || document.body.clientHeight,
+ screenHeight: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight,
/**
* 默认body front-size 单位px
*/
@@ -161,7 +161,7 @@ window.onload = function () {
newParagraph.setAttribute("id", uuid)
newParagraph.setAttribute("data-order", curOrder)
newParagraph.onkeyup = window.myEdit.eventListener.KeydownListener
- // newParagraph.innerHTML = "
"
+ newParagraph.innerHTML = "
"
//添加一行
window.myEdit.utils.AddNewParagraph(newParagraph);
diff --git a/static/yanxuelu.html b/static/yanxuelu.html
index 8a529a3..475185c 100644
--- a/static/yanxuelu.html
+++ b/static/yanxuelu.html
@@ -125,7 +125,7 @@
测试编辑
-