日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢(xún)
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
使Vue開(kāi)發(fā)如魚(yú)得水的VSCode擴(kuò)展

本文轉(zhuǎn)載自微信公眾號(hào)「前端有道」,作者星野丶。轉(zhuǎn)載本文請(qǐng)聯(lián)系前端有道公眾號(hào)。

創(chuàng)新互聯(lián)建站長(zhǎng)期為上1000+客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對(duì)不同對(duì)象提供差異化的產(chǎn)品和服務(wù);打造開(kāi)放共贏平臺(tái),與合作伙伴共同營(yíng)造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為重慶企業(yè)提供專(zhuān)業(yè)的網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè),重慶網(wǎng)站改版等技術(shù)服務(wù)。擁有十多年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開(kāi)發(fā)。

作為一個(gè) Vue 搬磚工,我一直在為 Vue 開(kāi)發(fā)尋找合適的 VS Code 擴(kuò)展。以下是一些好用的擴(kuò)展,可以讓我們?cè)诎岽u時(shí)更加輕松。

目錄

  • Vetur 開(kāi)發(fā)Vue的童鞋必裝插件之一
  • Volar 開(kāi)發(fā)Vue3.0的童鞋必裝插件之一
  • Simplified Language 簡(jiǎn)體語(yǔ)言包
  • 翻譯(英漢詞典)
  • Material Icon Theme 圖標(biāo)主題
  • VSCode Icons 圖標(biāo)主題
  • Bracket Pair Colorizer 彩色的括號(hào)
  • GitLens 增強(qiáng)Git工具
  • Git History
  • Path Intellisense 路徑智能提示
  • Auto Rename Tag 自動(dòng)關(guān)閉標(biāo)簽
  • Auto Close Tag 自動(dòng)修改標(biāo)簽名
  • Code Runner 運(yùn)行代碼
  • Live Server 搭建本地服務(wù)器的靜態(tài)頁(yè)面
  • Prettier - Code formatter 代碼格式化
  • ESlint 代碼檢測(cè)

Vetur

這款插件相信不用我多說(shuō),想必大家都知道或者用過(guò),它提供了 Vue 特定的語(yǔ)法語(yǔ)義突出顯示、代碼片段和API語(yǔ)法以錯(cuò)誤檢查調(diào)試等。圖片

官方地址:https://marketplace.visualstudio.com/items?itemName=octref.vetur

Volar(Vue3.0開(kāi)發(fā))

如果你的項(xiàng)目Vue3.0推薦用這款插件,體驗(yàn)上會(huì)更好。

Volar 是一個(gè)專(zhuān)為 Vue 3 構(gòu)建的語(yǔ)言支持插件,它基于@vue/reactivity按需計(jì)算 TypeScript 來(lái)優(yōu)化類(lèi)似于原生 TypeScript 語(yǔ)言服務(wù)的性能。

官方地址:https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar

Chinese (Simplified) Language Pack for Visual Studio Code

這款插件把VSCode的英文轉(zhuǎn)換成中文。對(duì)我我這種英語(yǔ)渣渣特別剛需。而且這個(gè)是官方漢化包,理解沒(méi)毛病。

每當(dāng)VS code軟件更新后,有變會(huì)英文,只需要關(guān)閉軟件重啟就行,或者重新安裝一下這款插件。

官方地址:Chinese (Simplified) Language Pack for Visual Studio Code

翻譯(英漢詞典) 代碼翻譯

在線翻譯,翻譯出來(lái)的結(jié)果真慢,吐槽。這款本地77萬(wàn)詞條英漢詞典,不依賴(lài)任何在線翻譯API,無(wú)查詢(xún)次數(shù)限制,秒輸出結(jié)果。

這款插件支持駝峰、小駝峰、下劃線等等寫(xiě)法來(lái)寫(xiě)變量名、屬性名、類(lèi)名和方法名的。

-w1205

官方地址:https://marketplace.visualstudio.com/items?itemName=CodeInChinese.EnglishChineseDictionary

Material Icon Theme

非常齊全的圖標(biāo),可以說(shuō)你想要包含在這里面,只截了其中一小部分圖。

-w895

官方地址:https://marketplace.visualstudio.com/items?itemName=PKief.material-icon-theme

vscode-icons

這一款是VSCode官方的圖標(biāo)主題包,看個(gè)人喜好選擇圖標(biāo)庫(kù)。效果如下

-w330

官方地址:https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons

Bracket Pair Colorizer

這個(gè)插件使用顏色來(lái)標(biāo)識(shí)匹配的括號(hào)。代碼非常多的情況,括號(hào)也就變的非常多,如果刪除某個(gè)屬性名對(duì)象,沒(méi)有顏色區(qū)分可以就會(huì)誤刪。

不過(guò)正常來(lái)說(shuō)不推薦括號(hào)寫(xiě)的很多,推薦用扁平化寫(xiě)法,雖然顏色區(qū)分代碼過(guò)長(zhǎng),看的也是腦殼疼。

官方地址:https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer

GitLens

增強(qiáng)Git功能構(gòu)建到Visual Studio代碼可視化代碼作者一眼就通過(guò)Git指責(zé)注釋和代碼鏡頭,無(wú)縫導(dǎo)航和探索Git存儲(chǔ)庫(kù)。

官方地址:https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens

Git History

查看git日志、文件歷史、比較分支或提交。

當(dāng)我們需要查看文件的歷史,可能會(huì)借助另外一個(gè)Git UI工具查看,耶,只要點(diǎn)擊文件的右上角圖標(biāo)就能看到歷史代碼還有代碼差異性。

官方地址:https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory

Path Intellisense 路徑智能提示

當(dāng)我們需要引入某個(gè)文件或者圖片,文件夾層級(jí)可能很多,我們可以通過(guò)這款插件來(lái)提示我們當(dāng)前下的文件有哪些。

官方地址:https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense

Auto Rename Tag

自動(dòng)重命名成對(duì)的HTML/XML標(biāo)簽。

當(dāng)我們修改 的標(biāo)簽時(shí)就會(huì)生成 。

官方地址:https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag

Auto Close Tag

自動(dòng)添加HTML/XML關(guān)閉標(biāo)簽。

當(dāng)我們寫(xiě)下 時(shí)就會(huì)生成 。

官方地址:https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag

Code Runner

運(yùn)行代碼片段或多種語(yǔ)言的代碼文件,支持C、Java、JavaScript、PHP、Python等

只需要點(diǎn)擊鼠標(biāo)右鍵,選擇 Run Code 就能得到結(jié)果

官方地址:https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner

Live Server

在本地服務(wù)器搭建自動(dòng)重新加載靜態(tài)特性HTML頁(yè)面。

html頁(yè)面中鼠標(biāo)右鍵選擇 open with Live Server

官方地址:https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

Prettier - Code formatter

Prettier是一個(gè)代碼格式化程序。它通過(guò)解析代碼并使用它自己的規(guī)則重新打印代碼來(lái)強(qiáng)制實(shí)現(xiàn)一致的樣式,這些規(guī)則考慮到最大行長(zhǎng)度,在必要時(shí)格式化代碼。

 
 
 
 
  1. // vscode setting.json
  2. {
  3.   "editor.formatOnSave": false, // 在保存時(shí)格式化文件
  4.   "editor.defaultFormatter": "esbenp.prettier-vscode",
  5.   "[javascript]": {
  6.     "editor.defaultFormatter": "esbenp.prettier-vscode"
  7.   },
  8.   "[vue]": {
  9.     "editor.defaultFormatter": "esbenp.prettier-vscode"
  10.   }
  11. }

官方地址:https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode

ESlint

在一個(gè)多人協(xié)同開(kāi)發(fā)的團(tuán)隊(duì)中,統(tǒng)一的代碼編寫(xiě)規(guī)范非常重要。一套規(guī)范可以讓我們編寫(xiě)的代碼達(dá)到一致的風(fēng)格,提高代碼的可讀性和統(tǒng)一性。自然維護(hù)性也會(huì)有所提高。

以下eslint規(guī)范代碼依托于 vue 官方的 eslint 規(guī)則 eslint-config-vue 做了少許的修改。大家可以按照自己的需求進(jìn)行定制化配置。

 
 
 
 
  1. // .eslintrc.js
  2. module.exports = {
  3.   root: true,
  4.   parserOptions: {
  5.     parser: 'babel-eslint',
  6.     sourceType: 'module'
  7.   },
  8.   env: {
  9.     browser: true,
  10.     node: true,
  11.     es6: true,
  12.   },
  13.   extends: ['plugin:vue/recommended', 'eslint:recommended'],
  14.   // add your custom rules here
  15.   //it is base on https://github.com/vuejs/eslint-config-vue
  16.   rules: {
  17.     "vue/max-attributes-per-line": [2, {
  18.       "singleline": 10,
  19.       "multiline": {
  20.         "max": 1,
  21.         "allowFirstLine": false
  22.       }
  23.     }],
  24.     "vue/singleline-html-element-content-newline": "off",
  25.     "vue/multiline-html-element-content-newline":"off",
  26.     "vue/name-property-casing": ["error", "PascalCase"],
  27.     "vue/no-v-html": "off",
  28.     'accessor-pairs': 2,
  29.     'arrow-spacing': [2, {
  30.       'before': true,
  31.       'after': true
  32.     }],
  33.     'block-spacing': [2, 'always'],
  34.     'brace-style': [2, '1tbs', {
  35.       'allowSingleLine': true
  36.     }],
  37.     'camelcase': [0, {
  38.       'properties': 'always'
  39.     }],
  40.     'comma-dangle': [2, 'never'],
  41.     'comma-spacing': [2, {
  42.       'before': false,
  43.       'after': true
  44.     }],
  45.     'comma-style': [2, 'last'],
  46.     'constructor-super': 2,
  47.     'curly': [2, 'multi-line'],
  48.     'dot-location': [2, 'property'],
  49.     'eol-last': 2,
  50.     'eqeqeq': ["error", "always", {"null": "ignore"}],
  51.     'generator-star-spacing': [2, {
  52.       'before': true,
  53.       'after': true
  54.     }],
  55.     'handle-callback-err': [2, '^(err|error)$'],
  56.     'indent': [2, 2, {
  57.       'SwitchCase': 1
  58.     }],
  59.     'jsx-quotes': [2, 'prefer-single'],
  60.     'key-spacing': [2, {
  61.       'beforeColon': false,
  62.       'afterColon': true
  63.     }],
  64.     'keyword-spacing': [2, {
  65.       'before': true,
  66.       'after': true
  67.     }],
  68.     'new-cap': [2, {
  69.       'newIsCap': true,
  70.       'capIsNew': false
  71.     }],
  72.     'new-parens': 2,
  73.     'no-array-constructor': 2,
  74.     'no-caller': 2,
  75.     'no-console': 'off',
  76.     'no-class-assign': 2,
  77.     'no-cond-assign': 2,
  78.     'no-const-assign': 2,
  79.     'no-control-regex': 0,
  80.     'no-delete-var': 2,
  81.     'no-dupe-args': 2,
  82.     'no-dupe-class-members': 2,
  83.     'no-dupe-keys': 2,
  84.     'no-duplicate-case': 2,
  85.     'no-empty-character-class': 2,
  86.     'no-empty-pattern': 2,
  87.     'no-eval': 2,
  88.     'no-ex-assign': 2,
  89.     'no-extend-native': 2,
  90.     'no-extra-bind': 2,
  91.     'no-extra-boolean-cast': 2,
  92.     'no-extra-parens': [2, 'functions'],
  93.     'no-fallthrough': 2,
  94.     'no-floating-decimal': 2,
  95.     'no-func-assign': 2,
  96.     'no-implied-eval': 2,
  97.     'no-inner-declarations': [2, 'functions'],
  98.     'no-invalid-regexp': 2,
  99.     'no-irregular-whitespace': 2,
  100.     'no-iterator': 2,
  101.     'no-label-var': 2,
  102.     'no-labels': [2, {
  103.       'allowLoop': false,
  104.       'allowSwitch': false
  105.     }],
  106.     'no-lone-blocks': 2,
  107.     'no-mixed-spaces-and-tabs': 2,
  108.     'no-multi-spaces': 2,
  109.     'no-multi-str': 2,
  110.     'no-multiple-empty-lines': [2, {
  111.       'max': 1
  112.     }],
  113.     'no-native-reassign': 2,
  114.     'no-negated-in-lhs': 2,
  115.     'no-new-object': 2,
  116.     'no-new-require': 2,
  117.     'no-new-symbol': 2,
  118.     'no-new-wrappers': 2,
  119.     'no-obj-calls': 2,
  120.     'no-octal': 2,
  121.     'no-octal-escape': 2,
  122.     'no-path-concat': 2,
  123.     'no-proto': 2,
  124.     'no-redeclare': 2,
  125.     'no-regex-spaces': 2,
  126.     'no-return-assign': [2, 'except-parens'],
  127.     'no-self-assign': 2,
  128.     'no-self-compare': 2,
  129.     'no-sequences': 2,
  130.     'no-shadow-restricted-names': 2,
  131.     'no-spaced-func': 2,
  132.     'no-sparse-arrays': 2,
  133.     'no-this-before-super': 2,
  134.     'no-throw-literal': 2,
  135.     'no-trailing-spaces': 2,
  136.     'no-undef': 2,
  137.     'no-undef-init': 2,
  138.     'no-unexpected-multiline': 2,
  139.     'no-unmodified-loop-condition': 2,
  140.     'no-unneeded-ternary': [2, {
  141.       'defaultAssignment': false
  142.     }],
  143.     'no-unreachable': 2,
  144.     'no-unsafe-finally': 2,
  145.     'no-unused-vars': [2, {
  146.       'vars': 'all',
  147.       'args': 'none'
  148.     }],
  149.     'no-useless-call': 2,
  150.     'no-useless-computed-key': 2,
  151.     'no-useless-constructor': 2,
  152.     'no-useless-escape': 0,
  153.     'no-whitespace-before-property': 2,
  154.     'no-with': 2,
  155.     'one-var': [2, {
  156.       'initialized': 'never'
  157.     }],
  158.     'operator-linebreak': [2, 'after', {
  159.       'overrides': {
  160.         '?': 'before',
  161.         ':': 'before'
  162.       }
  163.     }],
  164.     'padded-blocks': [2, 'never'],
  165.     'quotes': [2, 'single', {
  166.       'avoidEscape': true,
  167.       'allowTemplateLiterals': true
  168.     }],
  169.     'semi': [2, 'never'],
  170.     'semi-spacing': [2, {
  171.       'before': false,
  172.       'after': true
  173.     }],
  174.     'space-before-blocks': [2, 'always'],
  175.     'space-before-function-paren': [2, 'never'],
  176.     'space-in-parens': [2, 'never'],
  177.     'space-infix-ops': 2,
  178.     'space-unary-ops': [2, {
  179.       'words': true,
  180.       'nonwords': false
  181.     }],
  182.     'spaced-comment': [2, 'always', {
  183.       'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
  184.     }],
  185.     'template-curly-spacing': [2, 'never'],
  186.     'use-isnan': 2,
  187.     'valid-typeof': 2,
  188.     'wrap-iife': [2, 'any'],
  189.     'yield-star-spacing': [2, 'both'],
  190.     'yoda': [2, 'never'],
  191.     'prefer-const': 2,
  192.     'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  193.     'object-curly-spacing': [2, 'always', {
  194.       objectsInObjects: false
  195.     }],
  196.     'array-bracket-spacing': [2, 'never']
  197.   }
  198. }

官方地址:https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint


分享名稱(chēng):使Vue開(kāi)發(fā)如魚(yú)得水的VSCode擴(kuò)展
鏈接地址:http://www.dlmjj.cn/article/ccesioe.html