\r\n```\r\n\r\n以上代碼測試過了有效果,但我并沒有太多的時間去一個個手機端測試.只我自己的手機測試了.所有不保證對你有所幫助.只借鑒用吧了.\r\n\r\n\r\n\r\n[^1]: https://github.com/serbanghita/Mobile-Detect "Mobile-Detect"', isCircle: true, isCode:true }, computed: { compiledMarkdown: function () { /** TODO 使用DOMPurify var config = { KEEP_TEXT: true}; var clean = DOMPurify.sanitize(this.input); console.log(this.input); console.log(clean); */ return marked(this.input,{ breaks:true, gfm:false, headerIds:true, headerPrefix:'', mangle:false, pedantic:false }) + copyRight(); }, isCircleInner: function(){ return !this.isCircle; }, isCode3:function(){ return !this.isCode; } }, methods: { updateEditor: _.debounce(function (e) { this.input = e.target.value }, 300), changeCircle: function(){ this.isCircle = !this.isCircle; }, changeCode: function(){ this.isCode = !this.isCode; $('#editor-code').toggle(); } } });