0728更新
This commit is contained in:
parent
faf52461a4
commit
d9c8c7c44d
|
@ -5551,8 +5551,8 @@
|
||||||
},
|
},
|
||||||
"editor.md": {
|
"editor.md": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/editor.md/-/editor.md-1.5.0.tgz",
|
"resolved": "https://registry.npmmirror.com/editor.md/-/editor.md-1.5.0.tgz",
|
||||||
"integrity": "sha1-b+Y2qIo5uFYT9T7ubst7c0irI78="
|
"integrity": "sha512-oQBKZdXTkGogGNXV5jomogXZ2v8FNPBDbTC0NOVkicypPGr+NLKeEBfAe/gujCivkDG4Tn5yAGHCr0tsp9o44Q=="
|
||||||
},
|
},
|
||||||
"ee-first": {
|
"ee-first": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
|
@ -11090,9 +11090,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"marked": {
|
"marked": {
|
||||||
"version": "1.2.9",
|
"version": "2.1.3",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/marked/-/marked-1.2.9.tgz",
|
"resolved": "https://registry.npmmirror.com/marked/-/marked-2.1.3.tgz",
|
||||||
"integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw=="
|
"integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA=="
|
||||||
},
|
},
|
||||||
"material-colors": {
|
"material-colors": {
|
||||||
"version": "1.2.6",
|
"version": "1.2.6",
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"loglevel": "^1.6.8",
|
"loglevel": "^1.6.8",
|
||||||
"marked": "^1.0.0",
|
"marked": "^2.1.0",
|
||||||
"material-ui": "^1.0.0-beta.40",
|
"material-ui": "^1.0.0-beta.40",
|
||||||
"md5": "^2.2.1",
|
"md5": "^2.2.1",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
|
|
|
@ -1595,7 +1595,6 @@
|
||||||
var height = $(this).height();
|
var height = $(this).height();
|
||||||
var scrollTop = $(this).scrollTop();
|
var scrollTop = $(this).scrollTop();
|
||||||
var percent = (scrollTop / ($(this)[0].scrollHeight-100));
|
var percent = (scrollTop / ($(this)[0].scrollHeight-100));
|
||||||
console.log(percent);
|
|
||||||
var tocHeight = 0;
|
var tocHeight = 0;
|
||||||
|
|
||||||
preview.find(".markdown-toc-list").each(function () {
|
preview.find(".markdown-toc-list").each(function () {
|
||||||
|
|
|
@ -76,7 +76,8 @@ body {
|
||||||
}
|
}
|
||||||
/* md多空格 */
|
/* md多空格 */
|
||||||
.markdown-body p {
|
.markdown-body p {
|
||||||
/* margin:10px 0px!important; */
|
/* 同步gitee样式,md段落添加mb */
|
||||||
|
margin-bottom: 16px !important;
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,14 +20,21 @@ function NewsDetail(props){
|
||||||
const zonedetail = props.data;
|
const zonedetail = props.data;
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
let initialContent = undefined;
|
||||||
if(IsPC() && zonedetail){
|
if(IsPC() && zonedetail){
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
window.scrollTo(0,1);
|
window.scrollTo(0,1);
|
||||||
if(detail)
|
if(detail)
|
||||||
document.title = detail.name;
|
document.title = detail.name;
|
||||||
},100);
|
},100);
|
||||||
|
initialContent = document.querySelector('meta[name="viewport"]').getAttribute('content');
|
||||||
document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width, user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0');
|
document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width, user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0');
|
||||||
}
|
}
|
||||||
|
return()=>{
|
||||||
|
if(IsPC()){
|
||||||
|
document.querySelector('meta[name="viewport"]').setAttribute('content', initialContent);
|
||||||
|
}
|
||||||
|
}
|
||||||
},[zonedetail,detail])
|
},[zonedetail,detail])
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
|
|
@ -46,7 +46,10 @@ function ChooseMenu({
|
||||||
const refBox = useRef(null);
|
const refBox = useRef(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.addEventListener('click', clickMe , false);
|
document.addEventListener('mousedown', clickMe , false);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("mousedown", clickMe, false);
|
||||||
|
}
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const clickMe = ({ target }) => {
|
const clickMe = ({ target }) => {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
ul,ol,dl{
|
ul,ol,dl{
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
.markdown-body{
|
|
||||||
overflow: inherit;
|
|
||||||
}
|
|
||||||
.markdown-body .editormd-tex .katex-display>.katex{
|
.markdown-body .editormd-tex .katex-display>.katex{
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,9 @@
|
||||||
|
|
||||||
.markdown-body img{
|
.markdown-body img{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
/* 行内样式 */
|
||||||
|
max-width: 100% !important;
|
||||||
|
height: auto !important;
|
||||||
}
|
}
|
||||||
.markdown-body pre ol.linenums,.markdown-body pre ul.linenums{
|
.markdown-body pre ol.linenums,.markdown-body pre ul.linenums{
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
|
@ -52,7 +55,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body video{
|
.markdown-body video{
|
||||||
max-width: 100%;
|
/* 行内样式 */
|
||||||
|
max-width: 100% !important;
|
||||||
|
height: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
ol,
|
ol,
|
||||||
|
|
|
@ -9,7 +9,7 @@ import 'codemirror/lib/codemirror.css';
|
||||||
import './css/newquestion.css';
|
import './css/newquestion.css';
|
||||||
const $ = window.$
|
const $ = window.$
|
||||||
|
|
||||||
const mdIcons = ["bold", "italic", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear","fullscreen"];
|
const mdIcons = ["bold", "italic", "del", "|", "list-ul", "list-ol", "|", "code", "code-block", "link", "|", "inline-latex", "latex", '|', "image", "table", '|', "line-break", "watch", "clear","fullscreen"];
|
||||||
|
|
||||||
const NULL_CH = '▁';
|
const NULL_CH = '▁';
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ export default ({ mdID, onChange, onCMBeforeChange, onCMBlur, error = false, cla
|
||||||
{users && users.map((item,key)=>{
|
{users && users.map((item,key)=>{
|
||||||
return(
|
return(
|
||||||
<div key={key} className={`at_who ${key===0 && `active`}`} onClick={()=>{selectAtWho(item.username)}} onMouseOver={()=>{onMouseOver(key)}}>
|
<div key={key} className={`at_who ${key===0 && `active`}`} onClick={()=>{selectAtWho(item.username)}} onMouseOver={()=>{onMouseOver(key)}}>
|
||||||
{item.image_url && <img src={getImageUrl(`/${item.image_url}`)}></img>}
|
{item.image_url && <img src={getImageUrl(`/${item.image_url}`)} alt=''></img>}
|
||||||
<span>{item.username}</span>
|
<span>{item.username}</span>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue