caipin 4 лет назад
Родитель
Сommit
9b8af4c591
4 измененных файлов с 160 добавлено и 6 удалено
  1. 155 1
      .vscode/settings.json
  2. 2 2
      package.json
  3. 2 2
      src/components/Menu/index.tsx
  4. 1 1
      src/components/RuleModal/index.tsx

+ 155 - 1
.vscode/settings.json

@@ -9,10 +9,164 @@
 //   "scss.validate": false,
 //   "typescript.validate.enable": false
 // }
+
 {
   "editor.codeActionsOnSave": {
     "source.fixAll.eslint": true,
     "source.fixAll.stylelint": true,
     "source.organizeImports": true
-  }
+  },
+  "files.associations": {
+    "*.tag": "html",
+    "*.cshtml": "html",
+    "*.html": "html",
+    "*.njk": "html",
+    "*.mustache": "html",
+    "*.html.md": "html",
+    "*.json": "jsonc"
+  },
+  // 以下是性能优化
+  "files.exclude": {
+    "**/node_modules/**": true,
+    "**/.git": true,
+    "**/.DS_Store": true,
+    "**/__pycache__": true,
+    "**/.pytest_cache": true,
+    "venv": true,
+    "*.sublime-*": true,
+    "env*": true,
+    "dist": true
+  },
+  "search.exclude": {
+    "**/node_modules": true,
+    "**/bower_components": true,
+    "**/env": true,
+    "**/venv": true,
+    "dist": true
+  },
+  "files.watcherExclude": {
+    "**/.git/objects/**": true,
+    "**/.git/subtree-cache/**": true,
+    "**/node_modules/**": true,
+    "**/env/**": true,
+    "**/venv/**": true,
+    "env-*": true,
+    "dist": true
+  },
+  "eslint.validate": [
+    "javascript",
+    "javascriptreact",
+    "typescript",
+    "typescriptreact"
+  ],
+
+  "files.trimTrailingWhitespace": true,
+  "files.insertFinalNewline": true,
+  "editor.fontFamily": "Consolas, 'Courier New', monospace",
+  "editor.cursorBlinking": "phase",
+  "editor.fontLigatures": true,
+  "window.title": "${dirty} ${rootName}${separator}${activeEditorMedium}",
+  "breadcrumbs.enabled": true,
+  "editor.minimap.renderCharacters": false,
+  "editor.minimap.maxColumn": 200,
+  "editor.minimap.showSlider": "always",
+  "editor.unfoldOnClickAfterEndOfLine": true,
+  "editor.wordWrap": "on",
+  "editor.wordWrapColumn": 100,
+  "editor.rulers": [
+    {
+      "column": 100,
+      "color": "#2d3858"
+    }
+  ],
+  "editor.suggestSelection": "first",
+  "editor.autoClosingQuotes": "always",
+  "editor.suggest.localityBonus": true,
+  "editor.suggest.shareSuggestSelections": true,
+  // 格式化配置
+  "editor.formatOnSave": false,
+  // "editor.codeActionsOnSave": {
+  //   "source.fixAll.eslint": true,
+  //   "source.fixAll.stylelint": true,
+  //   "source.organizeImports": true
+  // },
+  "[scss]": {
+    "editor.formatOnSave": true,
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[json]": {
+    "editor.formatOnSave": false
+  },
+  "[jsonc]": {
+    "editor.formatOnSave": true,
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  // git相关配置
+  "git.confirmSync": false,
+  "git.autofetch": true,
+  "merge-conflict.autoNavigateNextConflict.enabled": true,
+  // 图标主题配置
+  "material-icon-theme.activeIconPack": "vue_vuex",
+  "material-icon-theme.folders.theme": "specific",
+  "material-icon-theme.hidesExplorerArrows": false,
+  "material-icon-theme.folders.color": "#26a69a",
+  // 主题配置
+  "workbench.iconTheme": "material-icon-theme",
+  "workbench.colorTheme": "SynthWave '84",
+  "editor.tokenColorCustomizations": {
+    "[SynthWave '84]": {
+      "comments": "#d4922f" // 注释颜色
+    }
+  },
+  // css智能提示
+  "html-css-class-completion.enableEmmetSupport": true,
+  "html-css-class-completion.enableScssFindUsage": true,
+  // "html-css-class-completion.excludeGlobPattern": "{node_modules,doc,docs,.bundle,vendor}/**",
+  "html-css-class-completion.includeGlobPattern": "**/src/assets/css/**",
+  // emmet语法
+  "emmet.showExpandedAbbreviation": "always",
+  "emmet.triggerExpansionOnTab": true,
+  "emmet.includeLanguages": {
+    "vue-html": "html",
+    "vue": "html",
+    "ejs": "html"
+  },
+  "git.enableSmartCommit": true,
+  // npm设置
+  "npm.enableTouchbar": true,
+  "npm.packageManager": "yarn",
+  "npm.enableRunFromFolder": true,
+  // log输出提示置顶
+  "editor.snippetSuggestions": "top",
+  "workbench.startupEditor": "welcomePage",
+  "typescript.validate.enable": false,
+  "javascript.updateImportsOnFileMove.enabled": "always",
+  // "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
+  // "terminal.integrated.shellArgs.windows": ["--login", "-i"],
+  "extensions.autoUpdate": true,
+  "terminal.integrated.fontSize": 13,
+  "editor.fontSize": 14,
+  "[javascript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[html]": {
+    "editor.defaultFormatter": "vscode.html-language-features"
+  },
+  "[javascriptreact]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[typescriptreact]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "[typescript]": {
+    "editor.defaultFormatter": "esbenp.prettier-vscode"
+  },
+  "explorer.confirmDelete": false,
+  "editor.tabSize": 2,
+  "typescript.updateImportsOnFileMove.enabled": "always",
+  "css.validate": false,
+  "less.validate": false,
+  "scss.validate": false
+  // "html-css-class-completion.includeGlobPattern": "**/src/**",
 }
+

+ 2 - 2
package.json

@@ -156,7 +156,7 @@
     "react-app-polyfill": "^1.0.6",
     "react-dev-utils": "^10.2.1",
     "resolve": "1.15.0",
-    "resolve-url-loader": "3.1.1",
+    "resolve-url-loader": "^3.1.2",
     "sass-loader": "8.0.2",
     "semver": "6.3.0",
     "style-loader": "0.23.1",
@@ -179,7 +179,7 @@
   "dependencies": {
     "@ant-design/icons": "^4.2.2",
     "antd": "^4.6.4",
-    "axios": "^0.20.0",
+    "axios": "^0.21.1",
     "dayjs": "^1.9.6",
     "mobx": "^5.15.4",
     "mobx-react": "^6.1.7",

+ 2 - 2
src/components/Menu/index.tsx

@@ -14,7 +14,7 @@ interface iMenuProps {
 @observer
 class NavSider extends Component<iMenuProps, any> {
   render() {
-    const { list: MeunList } = this.props
+    const { list: MeunList } = this.props;
     return (
       <div className="main-nav">
         <div className="logo"><img src={logo}></img></div>
@@ -41,7 +41,7 @@ class NavSider extends Component<iMenuProps, any> {
                 return (
                   <Menu>
                     <Menu.Item key="0">
-                      <Link to="/acount/safe">账号资料</Link>
+                      <Link to="/acount/info">账号资料</Link>
                     </Menu.Item>
                     <Menu.Item key="1">
                       <Link to="/acount/safe">账号安全</Link>

+ 1 - 1
src/components/RuleModal/index.tsx

@@ -6,7 +6,7 @@ import consts from '@/utils/consts'
 import { dayjsFormat } from '@/utils/util'
 import { Form, Input, InputNumber, Modal, Select, Tabs, Tag } from 'antd'
 import { TweenOneGroup } from 'rc-tween-one'
-import React, { useEffect, useState } from 'react'
+import React, { MouseEvent, useEffect, useState } from 'react'
 import styles from './index.module.scss'
 const { TabPane } = Tabs
 const { Option } = Select