<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[EMLOG]]></title> 
<description><![CDATA[使用emlog搭建的站点]]></description>
<link>http://emlog.aoxuelingshuang.com/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
    <title>打发大水</title>
    <link>http://emlog.aoxuelingshuang.com/4.html</link>
    <description><![CDATA[<p>掉沙发撒旦法是的范德萨的</p>]]></description>
    <pubDate>Sat, 11 Feb 2023 22:14:31 +0800</pubDate>
    <author>用户1pZ9AC</author>
    <guid>http://emlog.aoxuelingshuang.com/4.html</guid>

</item>
<item>
    <title>Vscode 扩展插件</title>
    <link>http://emlog.aoxuelingshuang.com/vscode.html</link>
    <description><![CDATA[<h3>常用插件</h3>
<ol>
<li>open in browser    快速打开html页面，快捷键（alt+b）</li>
<li>Chinese (Simplified) (简体中文) Language Pack for Visual Studio Code    中文包</li>
<li>egg.js    扩展egg，命令（egg）可以快速初始化</li>
<li>Vetur    扩展vue，格式化vue</li>
<li>JS-CSS-HTML Formatter    格式化html、js、css
<h3>配置格式化文件</h3>
<p>ctrl+shift+p搜索<em>Fromatter Config</em>进入配置文件</p>
<pre><code class="language-json">{
"onSave": false,
"javascript": {
    "indent_size": 4,
    "indent_char": " ",
    "eol": "auto",
    "preserve_newlines": true,
    "break_chained_methods": false,
    "max_preserve_newlines": 0,
    "space_in_paren": false,
    "space_in_empty_paren": false,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "keep_array_indentation": false,
    "space_before_conditional": true,
    "unescape_strings": false,
    "wrap_line_length": 0,
    "e4x": false,
    "end_with_newline": false,
    "comma_first": false,
    "brace_style": "collapse-preserve-inline"
},
"css": {
    "indent_size": 4,
    "indentCharacter": " ",
    "indent_char": " ",
    "selector_separator_newline": true,
    "end_with_newline": false,
    "newline_between_rules": true,
    "eol": "auto"
},
"html": {
    "indent_inner_html": false,
    "indent_size": 4,
    "indent_char": " ",
    "indent_character": " "
}
}</code></pre>
<h3>setting.json设置</h3>
<p>左下角设置，右上角进入<em>setting.json</em></p>
<pre><code class="language-json">{
// tab 大小为2个空格
"editor.tabSize": 2,
// // 保存时格式化
"editor.formatOnSave": true,
// // 开启 vscode 文件路径导航
"breadcrumbs.enabled": true,
//  显示 markdown 中英文切换时产生的特殊字符
"editor.renderControlCharacters": true,
// #让prettier使用eslint的代码格式进行校验
"prettier.eslintIntegration": true,
// #去掉代码结尾的分号
"prettier.semi": false,
// #使用带引号替代双引号
"prettier.singleQuote": true,
// #让函数(名)和后面的括号之间加个空格
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
// #让vue中的js按编辑器自带的ts格式进行格式化
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
  "wrap_attributes": "auto"
},
"prettyhtml": {
  "printWidth": 200,
  "singleQuote": false,
  "wrapAttributes": false,
  "sortAttributes": false
},
"prettier": {
  "semi": false,
  "singleQuote": true
}
},
"[json]": {
"editor.quickSuggestions": {
  "strings": true
},
"editor.suggest.insertMode": "replace"
},
"[jsonc]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "e**enp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
//回车自动格式化
"editor.formatOnType": true
}</code></pre></li>
</ol>]]></description>
    <pubDate>Sat, 30 Apr 2022 16:15:43 +0800</pubDate>
    <author>默永</author>
    <guid>http://emlog.aoxuelingshuang.com/vscode.html</guid>

</item>
<item>
    <title>写手机端用的rem文件</title>
    <link>http://emlog.aoxuelingshuang.com/JS/rem.html</link>
    <description><![CDATA[<pre><code class="language-javascript">(function (doc, win) {
  var docEl = doc.documentElement,
    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
    recalc = function () {
      var clientWidth = docEl.clientWidth;
      if (!clientWidth) return;
      docEl.style.fontSize = 100 * (clientWidth / 640) + 'px';
      //苹果4：320；苹果5、6、7：640；p系列都是720设计图的宽度,50是一个基准宽度(html的font-size值)
    };
  if (!doc.addEventListener) return;
  win.addEventListener(resizeEvt, recalc, false);
  doc.addEventListener('DOMContentLoaded', recalc, false);
  })(document, window);</code></pre>
<p>把这个加入手机端页面就可以使用rem</p>]]></description>
    <pubDate>Sat, 30 Apr 2022 16:13:38 +0800</pubDate>
    <author>默永</author>
    <guid>http://emlog.aoxuelingshuang.com/JS/rem.html</guid>

</item></channel>
</rss>