diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..1a3ecc7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,10 @@ +{ + "printWidth": 160, + "tabWidth": 2, + "useTabs": false, + "semi": false, + "singleQuote": true, + "jsxSingleQuote": true, + "jsxBracketSameLine": true, + "trailingComma": "all" +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 66b2d38..2e4517d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "prettier.enable": false, "editor.defaultFormatter": "dbaeumer.vscode-eslint", // Set the default "editor.formatOnSave": true, @@ -20,4 +19,12 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, + "[css]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[scss]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, } diff --git a/package.json b/package.json index a892a78..a0b7ffa 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "cross-env": "^7.0.3", "eslint": "^8.28.0", "eslint-config-taro": "3.5.8", + "prettier": "^2.8.0", "react-refresh": "0.14.0", "stylelint": "14.15.0", "taro-iconfont-svg": "^1.0.19", diff --git a/src/components/cell/index.module.scss b/src/components/cell/index.module.scss index f0703d7..4f4cb32 100644 --- a/src/components/cell/index.module.scss +++ b/src/components/cell/index.module.scss @@ -5,11 +5,13 @@ align-items: center; font-size: 28px; padding: 12px 0; + .title { min-width: 140px; flex: none; color: #a9a9a9; } + .desc { display: flex; flex-flow: row nowrap; @@ -19,6 +21,7 @@ color: $color_font_one; } } + .descText { @include common_ellipsis(2); } diff --git a/yarn.lock b/yarn.lock index e5b96a9..6d72c04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10066,7 +10066,7 @@ prettier@^1.14.2: resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== -prettier@^2.7.1: +prettier@^2.7.1, prettier@^2.8.0: version "2.8.0" resolved "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9" integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==