diff --git a/.eslintrc b/.eslintrc index 34ec7c1..4c54be6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -46,6 +46,20 @@ "import/prefer-default-export": "off", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" - } + "@typescript-eslint/explicit-module-boundary-types": "off", + "vue/first-attribute-linebreak": 0 + }, + "overrides": [ + { + "files": ["*.vue"], + "rules": { + "vue/component-name-in-template-casing": [2, "kebab-case"], + "vue/require-default-prop": 0, + "vue/multi-word-component-names": 0, + "vue/no-reserved-props": 0, + "vue/no-v-html": 0, + + } + } + ] } \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7fcb48a..f3ead78 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -11,7 +11,18 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: '14' + node-version: 14 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - run: npm install shell: bash - - run: npm run lint \ No newline at end of file + - run: npm run lint diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8236c69..2b7cd18 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,7 +9,18 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: '14' + node-version: 14 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - run: npm install shell: bash - run: echo '${{ github.ref }} ... ${{ github.sha }}' @@ -24,4 +35,4 @@ jobs: npx surge --project ./dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }} echo the preview URL is $DEPLOY_DOMAIN if: ${{ success() }} - - run: echo "🚀 This job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "🚀 This job's status is ${{ job.status }}." diff --git a/README.md b/README.md index 4ac73e7..3a4ed6d 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ TDesign Starter 基于 TDesign UI 组件,旨在提供项目开箱即用的、 npm install // 启动项目 -npm run start +npm run dev // 项目构建 - 体验环境 npm run build:test diff --git a/package.json b/package.json index f893557..a68e2cb 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "tdesign-vue-next-starter", "version": "0.0.1", "scripts": { - "start:mock": "vite --open --mode mock", - "start": "vite --open --mode development", + "dev:mock": "vite --open --mode mock", + "dev": "vite --open --mode development", "build:test": "vite build --mode test", "build": "vue-tsc --noEmit && vite build --mode release", "preview": "vite preview", @@ -14,10 +14,10 @@ }, "dependencies": { "dayjs": "^1.10.6", - "echarts": "^5.2.1", + "echarts": "~5.1.1", "nprogress": "^0.2.0", "qrcode.vue": "^3.2.2", - "tdesign-vue-next": "^0.4.1", + "tdesign-vue-next": "^0.5.0", "vue": "^3.1.5", "vue-router": "^4.0.11", "vue3-clipboard": "^1.0.0", @@ -27,6 +27,7 @@ "@commitlint/cli": "^15.0.0", "@commitlint/config-conventional": "^13.1.0", "@types/echarts": "^4.9.10", + "@types/ws": "^8.2.2", "@typescript-eslint/eslint-plugin": "^4.29.3", "@typescript-eslint/parser": "^4.29.3", "@vitejs/plugin-vue": "^1.3.0", @@ -52,7 +53,7 @@ "stylelint-order": "^4.1.0", "stylelint-scss": "^4.0.0", "typescript": "^4.4.3", - "vite": "^2.4.4", + "vite": "^2.7.1", "vite-plugin-mock": "^2.9.6", "vite-plugin-svg-sprite-component": "^1.0.10", "vite-svg-loader": "^3.1.0", diff --git a/src/App.vue b/src/App.vue index f7d008e..9b1bff9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,4 +1,28 @@ - + + diff --git a/src/assets/assets-login-bg-black.png b/src/assets/assets-login-bg-black.png new file mode 100644 index 0000000..4f7bfaa Binary files /dev/null and b/src/assets/assets-login-bg-black.png differ diff --git a/src/assets/assets-login-bg-white.png b/src/assets/assets-login-bg-white.png new file mode 100644 index 0000000..af68aa2 Binary files /dev/null and b/src/assets/assets-login-bg-white.png differ diff --git a/src/assets/assets-logo-full.svg b/src/assets/assets-logo-full.svg new file mode 100644 index 0000000..5bb515d --- /dev/null +++ b/src/assets/assets-logo-full.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/t-logo.svg b/src/assets/assets-t-logo.svg similarity index 100% rename from src/assets/t-logo.svg rename to src/assets/assets-t-logo.svg diff --git a/src/assets/tencent-logo.png b/src/assets/assets-tencent-logo.png similarity index 100% rename from src/assets/tencent-logo.png rename to src/assets/assets-tencent-logo.png diff --git a/src/components/card/index.vue b/src/components/card/index.vue index 849e5a6..1d599be 100644 --- a/src/components/card/index.vue +++ b/src/components/card/index.vue @@ -1,10 +1,11 @@