Commit acacb32bb592345cd0a90b4bbeb60a9b6ab1ac3c

Authored by vben
1 parent 186b274f

fix(tailwindcss): remove console warnings

CHANGELOG.zh_CN.md
@@ -38,6 +38,8 @@ @@ -38,6 +38,8 @@
38 - 修复锁屏功能可以通过刷新页面或复制 URL 打开新的浏览器标签来跳过锁定状态的问题 38 - 修复锁屏功能可以通过刷新页面或复制 URL 打开新的浏览器标签来跳过锁定状态的问题
39 - 修复多个窗口同时打开页面时,`Token` 不会同步的问题 39 - 修复多个窗口同时打开页面时,`Token` 不会同步的问题
40 - 修复`ROLE`权限模式下`hasPermission`不工作的问题 40 - 修复`ROLE`权限模式下`hasPermission`不工作的问题
  41 +- **Table** 修复`handleSearchInfoFn`的参数包含多余空白键的问题
  42 +- **Tailwindcss** 移除控制台警告
41 43
42 ## 2.5.2(2021-06-27) 44 ## 2.5.2(2021-06-27)
43 45
package.json
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 "bootstrap": "yarn install", 10 "bootstrap": "yarn install",
11 "serve": "npm run dev", 11 "serve": "npm run dev",
12 "dev": "vite", 12 "dev": "vite",
13 - "build": "vite build && esno ./build/script/postBuild.ts", 13 + "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
14 "build:no-cache": "yarn clean:cache && npm run build", 14 "build:no-cache": "yarn clean:cache && npm run build",
15 "report": "cross-env REPORT=true npm run build", 15 "report": "cross-env REPORT=true npm run build",
16 "type:check": "vue-tsc --noEmit --skipLibCheck", 16 "type:check": "vue-tsc --noEmit --skipLibCheck",
@@ -93,9 +93,9 @@ @@ -93,9 +93,9 @@
93 "conventional-changelog-cli": "^2.1.1", 93 "conventional-changelog-cli": "^2.1.1",
94 "cross-env": "^7.0.3", 94 "cross-env": "^7.0.3",
95 "dotenv": "^10.0.0", 95 "dotenv": "^10.0.0",
96 - "eslint": "^7.29.0", 96 + "eslint": "^7.30.0",
97 "eslint-config-prettier": "^8.3.0", 97 "eslint-config-prettier": "^8.3.0",
98 - "eslint-define-config": "^1.0.8", 98 + "eslint-define-config": "^1.0.9",
99 "eslint-plugin-jest": "^24.3.6", 99 "eslint-plugin-jest": "^24.3.6",
100 "eslint-plugin-prettier": "^3.4.0", 100 "eslint-plugin-prettier": "^3.4.0",
101 "eslint-plugin-vue": "^7.12.1", 101 "eslint-plugin-vue": "^7.12.1",
@@ -122,7 +122,7 @@ @@ -122,7 +122,7 @@
122 "ts-jest": "^27.0.3", 122 "ts-jest": "^27.0.3",
123 "ts-node": "^10.0.0", 123 "ts-node": "^10.0.0",
124 "typescript": "4.3.5", 124 "typescript": "4.3.5",
125 - "vite": "2.4.0-beta.3", 125 + "vite": "2.4.0-beta.2",
126 "vite-plugin-compression": "^0.2.5", 126 "vite-plugin-compression": "^0.2.5",
127 "vite-plugin-html": "^2.0.7", 127 "vite-plugin-html": "^2.0.7",
128 "vite-plugin-imagemin": "^0.3.2", 128 "vite-plugin-imagemin": "^0.3.2",
src/components/Button/src/BasicButton.vue
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 <script lang="ts"> 10 <script lang="ts">
11 import { defineComponent, computed } from 'vue'; 11 import { defineComponent, computed } from 'vue';
12 import { Button } from 'ant-design-vue'; 12 import { Button } from 'ant-design-vue';
13 - import { Icon } from '/@/components/Icon'; 13 + import Icon from '/@/components/Icon/src/Icon.vue';
14 import { buttonProps } from './props'; 14 import { buttonProps } from './props';
15 15
16 export default defineComponent({ 16 export default defineComponent({
src/components/Icon/src/Icon.vue
@@ -25,7 +25,6 @@ @@ -25,7 +25,6 @@
25 computed, 25 computed,
26 CSSProperties, 26 CSSProperties,
27 } from 'vue'; 27 } from 'vue';
28 -  
29 import SvgIcon from './SvgIcon.vue'; 28 import SvgIcon from './SvgIcon.vue';
30 import Iconify from '@purge-icons/generated'; 29 import Iconify from '@purge-icons/generated';
31 import { isString } from '/@/utils/is'; 30 import { isString } from '/@/utils/is';
@@ -33,7 +32,7 @@ @@ -33,7 +32,7 @@
33 32
34 const SVG_END_WITH_FLAG = '|svg'; 33 const SVG_END_WITH_FLAG = '|svg';
35 export default defineComponent({ 34 export default defineComponent({
36 - name: 'GIcon', 35 + name: 'Icon',
37 components: { SvgIcon }, 36 components: { SvgIcon },
38 props: { 37 props: {
39 // icon name 38 // icon name
tailwind.config.js
1 -const { sky: color_sky, ...colors } = require('tailwindcss/colors');  
2 -  
3 module.exports = { 1 module.exports = {
4 mode: 'jit', 2 mode: 'jit',
5 // darkMode: 'class', 3 // darkMode: 'class',
6 plugins: [createEnterPlugin()], 4 plugins: [createEnterPlugin()],
7 purge: { 5 purge: {
8 - enabled: false, 6 + enable: process.env.NODE_ENV === 'production',
9 content: ['./index.html', './src/**/*.{vue,ts,tsx}'], 7 content: ['./index.html', './src/**/*.{vue,ts,tsx}'],
10 }, 8 },
11 theme: { 9 theme: {
@@ -13,21 +11,19 @@ module.exports = { @@ -13,21 +11,19 @@ module.exports = {
13 zIndex: { 11 zIndex: {
14 '-1': '-1', 12 '-1': '-1',
15 }, 13 },
16 - },  
17 - colors: {  
18 - ...colors,  
19 - sky: color_sky,  
20 - primary: {  
21 - DEFAULT: '#0960bd',  
22 - // dark: primaryColorDark, 14 + colors: {
  15 + primary: {
  16 + DEFAULT: '#0960bd',
  17 + // dark: primaryColorDark,
  18 + },
  19 + },
  20 + screens: {
  21 + sm: '576px',
  22 + md: '768px',
  23 + lg: '992px',
  24 + xl: '1200px',
  25 + '2xl': '1600px',
23 }, 26 },
24 - },  
25 - screens: {  
26 - sm: '576px',  
27 - md: '768px',  
28 - lg: '992px',  
29 - xl: '1200px',  
30 - '2xl': '1600px',  
31 }, 27 },
32 }, 28 },
33 }; 29 };
yarn.lock
@@ -1165,6 +1165,20 @@ @@ -1165,6 +1165,20 @@
1165 dependencies: 1165 dependencies:
1166 "@hapi/hoek" "^8.3.0" 1166 "@hapi/hoek" "^8.3.0"
1167 1167
  1168 +"@humanwhocodes/config-array@^0.5.0":
  1169 + version "0.5.0"
  1170 + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
  1171 + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==
  1172 + dependencies:
  1173 + "@humanwhocodes/object-schema" "^1.2.0"
  1174 + debug "^4.1.1"
  1175 + minimatch "^3.0.4"
  1176 +
  1177 +"@humanwhocodes/object-schema@^1.2.0":
  1178 + version "1.2.0"
  1179 + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf"
  1180 + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==
  1181 +
1168 "@iconify/iconify@2.0.0-rc.6": 1182 "@iconify/iconify@2.0.0-rc.6":
1169 version "2.0.0-rc.6" 1183 version "2.0.0-rc.6"
1170 resolved "https://registry.npmjs.org/@iconify/iconify/-/iconify-2.0.0-rc.6.tgz#e3f5376b63b441dcb3696317784b98e2e678cf46" 1184 resolved "https://registry.npmjs.org/@iconify/iconify/-/iconify-2.0.0-rc.6.tgz#e3f5376b63b441dcb3696317784b98e2e678cf46"
@@ -4959,10 +4973,10 @@ eslint-config-prettier@^8.3.0: @@ -4959,10 +4973,10 @@ eslint-config-prettier@^8.3.0:
4959 resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" 4973 resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a"
4960 integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew== 4974 integrity sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==
4961 4975
4962 -eslint-define-config@^1.0.8:  
4963 - version "1.0.8"  
4964 - resolved "https://registry.npmjs.org/eslint-define-config/-/eslint-define-config-1.0.8.tgz#56cb61f1bcba8ec7a29beec58a85d2ce9299297a"  
4965 - integrity sha512-Vfjv/3l112BQ0s+Ua+WGNxtEyxj++IaFCiBkhjT1wlBWtbHpuZcI0t8eCnJZnJrdv0b9n2GK0mcmQsPRRjVCXg== 4976 +eslint-define-config@^1.0.9:
  4977 + version "1.0.9"
  4978 + resolved "https://registry.yarnpkg.com/eslint-define-config/-/eslint-define-config-1.0.9.tgz#72e5e2410c576667a6ba1b5bff9801eeda476256"
  4979 + integrity sha512-LRzNlRo9sv43BAXY+nhZIUCZLRisTMEXXSqlGc2uZ8emAGyJv3FDSew2MIVRMwThexEjVxjNmeqduaexJ/GT3Q==
4966 4980
4967 eslint-plugin-jest@^24.3.6: 4981 eslint-plugin-jest@^24.3.6:
4968 version "24.3.6" 4982 version "24.3.6"
@@ -5020,13 +5034,14 @@ eslint-visitor-keys@^2.0.0: @@ -5020,13 +5034,14 @@ eslint-visitor-keys@^2.0.0:
5020 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" 5034 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
5021 integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== 5035 integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
5022 5036
5023 -eslint@^7.29.0:  
5024 - version "7.29.0"  
5025 - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.29.0.tgz#ee2a7648f2e729485e4d0bd6383ec1deabc8b3c0"  
5026 - integrity sha512-82G/JToB9qIy/ArBzIWG9xvvwL3R86AlCjtGw+A29OMZDqhTybz/MByORSukGxeI+YPCR4coYyITKk8BFH9nDA== 5037 +eslint@^7.30.0:
  5038 + version "7.30.0"
  5039 + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.30.0.tgz#6d34ab51aaa56112fd97166226c9a97f505474f8"
  5040 + integrity sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg==
5027 dependencies: 5041 dependencies:
5028 "@babel/code-frame" "7.12.11" 5042 "@babel/code-frame" "7.12.11"
5029 "@eslint/eslintrc" "^0.4.2" 5043 "@eslint/eslintrc" "^0.4.2"
  5044 + "@humanwhocodes/config-array" "^0.5.0"
5030 ajv "^6.10.0" 5045 ajv "^6.10.0"
5031 chalk "^4.0.0" 5046 chalk "^4.0.0"
5032 cross-spawn "^7.0.2" 5047 cross-spawn "^7.0.2"
@@ -12296,10 +12311,10 @@ vite-plugin-theme@^0.8.1: @@ -12296,10 +12311,10 @@ vite-plugin-theme@^0.8.1:
12296 esbuild-plugin-alias "^0.1.2" 12311 esbuild-plugin-alias "^0.1.2"
12297 tinycolor2 "^1.4.2" 12312 tinycolor2 "^1.4.2"
12298 12313
12299 -vite@2.4.0-beta.3:  
12300 - version "2.4.0-beta.3"  
12301 - resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.0-beta.3.tgz#81da5e6cbfb4cb710610e5757567cbe58b667c44"  
12302 - integrity sha512-sSUbH0mPMbqqOVZ1/LD/Wiu347yvn4BXjS/94mn5Q7E/zd50hxEnKU1NC4x59TBKq5OeboPhyXwibyCEpyAQKQ== 12314 +vite@2.4.0-beta.2:
  12315 + version "2.4.0-beta.2"
  12316 + resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.0-beta.2.tgz#ac1e0fcf5bb3a16f0a9ca9ee9ac18e209eee1880"
  12317 + integrity sha512-PpK8Zl8sBaO6FbDc/Lb+lfADwBpiBurZyT4g16etqTLmhK2YYIf/jTGyq7qNlU0TqfFcGhmtvlhfnAPr9GqDsQ==
12303 dependencies: 12318 dependencies:
12304 esbuild "^0.12.8" 12319 esbuild "^0.12.8"
12305 postcss "^8.3.5" 12320 postcss "^8.3.5"