Commit 4d7001bbcf3ff6e62deb967cb1c15b443b8aaff4

Authored by vben
1 parent 27c6f690

refactor(design): add windicss

.env.production
... ... @@ -10,7 +10,7 @@ VITE_DROP_CONSOLE = true
10 10 # Whether to enable gizp or brotli compression
11 11 # Optional: gzip | brotli | none
12 12 # If you need multiple forms, you can use `,` to separate
13   -VITE_BUILD_COMPRESS = 'gzip'
  13 +VITE_BUILD_COMPRESS = 'none'
14 14  
15 15 # Basic interface address SPA
16 16 VITE_GLOB_API_URL=/api
... ...
.vscode/extensions.json
1 1 {
2 2 "recommendations": [
  3 + "johnsoncodehk.volar",
3 4 "octref.vetur",
4 5 "dbaeumer.vscode-eslint",
5 6 "stylelint.vscode-stylelint",
... ...
.vscode/settings.json
1 1 {
2 2 "typescript.tsdk": "./node_modules/typescript/lib",
  3 + "volar.tsPlugin": true,
  4 + "volar.tsPluginStatus": false,
3 5 //===========================================
4 6 //============= Editor ======================
5 7 //===========================================
... ...
CHANGELOG.zh_CN.md
1 1 ## Wip
2 2  
  3 +### ✨ Refactor
  4 +
  5 +- 移除`global.less`,`mixin.less`,`design/helper`,由`windicss`代替,有用到的需要修改对应的样式
  6 +
3 7 ### ✨ Features
4 8  
5 9 - useModal 新增返回值函数 `redoModalHeight`,用于在 modal 内为动态内容时刷新 modal 高度
6 10 - 升级 husky 到 5.0
7 11 - 新增 `brotli`|`gzip`压缩及相关测试命令
  12 +- 重新引入 `windicss` (与`tailwind`一样).在速度上更快
8 13  
9 14 ### ⚡ Performance Improvements
10 15  
... ... @@ -23,7 +28,8 @@
23 28 ### 🎫 Chores
24 29  
25 30 - 文档更新
26   -- 升级 ant-design-vue 到 2.0.0
  31 +- 升级 ant-design-vue 到 `2.0.0`
  32 +- 升级 vite 到 `2.0.0`
27 33  
28 34 ## 2.0.0-rc.18 (2021-02-05)
29 35  
... ...
build/vite/plugin/index.ts
1 1 import type { Plugin } from 'vite';
2 2  
3   -import PurgeIcons from 'vite-plugin-purge-icons';
4 3 import vue from '@vitejs/plugin-vue';
5 4 import vueJsx from '@vitejs/plugin-vue-jsx';
6 5 import legacy from '@vitejs/plugin-legacy';
7 6  
  7 +import windiCSS from 'vite-plugin-windicss';
  8 +import PurgeIcons from 'vite-plugin-purge-icons';
  9 +
8 10 import { ViteEnv } from '../../utils';
9 11 import { configHtmlPlugin } from './html';
10 12 import { configPwaConfig } from './pwa';
... ... @@ -23,6 +25,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
23 25 vue(),
24 26 // have to
25 27 vueJsx(),
  28 + ...windiCSS(),
26 29 ];
27 30  
28 31 // @vitejs/plugin-legacy
... ...
package.json
... ... @@ -51,9 +51,9 @@
51 51 "devDependencies": {
52 52 "@commitlint/cli": "^11.0.0",
53 53 "@commitlint/config-conventional": "^11.0.0",
54   - "@iconify/json": "^1.1.299",
  54 + "@iconify/json": "^1.1.303",
55 55 "@ls-lint/ls-lint": "^1.9.2",
56   - "@purge-icons/generated": "^0.6.0",
  56 + "@purge-icons/generated": "^0.7.0",
57 57 "@types/echarts": "^4.9.3",
58 58 "@types/fs-extra": "^9.0.7",
59 59 "@types/http-proxy": "^1.17.5",
... ... @@ -99,15 +99,16 @@
99 99 "stylelint-order": "^4.1.0",
100 100 "ts-node": "^9.1.1",
101 101 "typescript": "^4.1.5",
102   - "vite": "2.0.0-beta.70",
  102 + "vite": "2.0.0",
103 103 "vite-plugin-compression": "^0.2.1",
104 104 "vite-plugin-html": "^2.0.0",
105 105 "vite-plugin-imagemin": "^0.2.6",
106 106 "vite-plugin-mock": "^2.1.4",
107   - "vite-plugin-purge-icons": "^0.6.0",
108   - "vite-plugin-pwa": "^0.4.6",
  107 + "vite-plugin-purge-icons": "^0.7.0",
  108 + "vite-plugin-pwa": "^0.4.7",
109 109 "vite-plugin-style-import": "^0.7.2",
110 110 "vite-plugin-theme": "^0.4.3",
  111 + "vite-plugin-windicss": "^0.2.2",
111 112 "vue-eslint-parser": "^7.5.0",
112 113 "yargs": "^16.2.0"
113 114 },
... ...
src/App.vue
1 1 <template>
2 2 <ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
3 3 <AppProvider>
4   - <router-view />
  4 + <RouterView />
5 5 </AppProvider>
6 6 </ConfigProvider>
7 7 </template>
... ...
src/components/Application/src/AppLogo.vue
... ... @@ -9,7 +9,11 @@
9 9 @click="handleGoHome"
10 10 >
11 11 <img src="../../../assets/images/logo.png" />
12   - <div class="ml-2 ellipsis" :class="[`${prefixCls}__title`]" v-show="showTitle">
  12 + <div
  13 + class="ml-2 truncate xs:opacity-0 md:opacity-100"
  14 + :class="`${prefixCls}__title`"
  15 + v-show="showTitle"
  16 + >
13 17 {{ title }}
14 18 </div>
15 19 </div>
... ... @@ -85,12 +89,7 @@
85 89 &__title {
86 90 font-size: 16px;
87 91 font-weight: 700;
88   - opacity: 0;
89 92 transition: all 0.5s;
90   -
91   - .respond-to(medium,{
92   - opacity: 1;
93   - });
94 93 }
95 94 }
96 95 </style>
... ...
src/components/Basic/src/BasicTitle.vue
... ... @@ -41,8 +41,8 @@
41 41 font-weight: 700;
42 42 line-height: 24px;
43 43 color: @text-color-base;
44   -
45   - .unselect();
  44 + cursor: pointer;
  45 + user-select: none;
46 46  
47 47 &.show-span::before {
48 48 position: absolute;
... ...
src/components/SimpleMenu/src/components/menu.less
... ... @@ -41,10 +41,6 @@
41 41 cursor: pointer;
42 42 transition: all @transition-time @ease-in-out;
43 43  
44   - // &:hover {
45   - // color: @primary-color;
46   - // }
47   -
48 44 &-icon {
49 45 position: absolute;
50 46 top: 50%;
... ... @@ -164,9 +160,10 @@
164 160 position: relative;
165 161 z-index: 1;
166 162 padding: 12px 24px;
  163 + overflow: hidden;
  164 + text-overflow: ellipsis;
  165 + white-space: nowrap;
167 166 cursor: pointer;
168   - .text-truncate();
169   - // transition: all @transition-time @ease-in-out;
170 167  
171 168 &:hover {
172 169 color: @primary-color;
... ...
src/components/SimpleMenu/src/index.less
... ... @@ -18,15 +18,19 @@
18 18 }
19 19  
20 20 .collapse-title {
  21 + overflow: hidden;
21 22 font-size: 12px;
22   - .text-truncate();
  23 + text-overflow: ellipsis;
  24 + white-space: nowrap;
23 25 }
24 26 }
25 27  
26 28 .@{simple-prefix-cls} {
27 29 &-sub-title {
  30 + overflow: hidden;
  31 + text-overflow: ellipsis;
  32 + white-space: nowrap;
28 33 transition: all 0.3s;
29   - .text-truncate();
30 34 }
31 35  
32 36 &-tag {
... ...
src/components/Upload/src/data.tsx
... ... @@ -40,7 +40,7 @@ export function createTableColumns(): BasicColumn[] {
40 40 }
41 41 return (
42 42 <span>
43   - <p class="ellipsis mb-1" title={text}>
  43 + <p class="truncate mb-1" title={text}>
44 44 {text}
45 45 </p>
46 46 <Progress percent={percent} size="small" status={status} />
... ...
src/design/ant/input.less
1   -@import '../mixins.less';
2 1 @import '../color.less';
3 2  
4 3 // input
... ...
src/design/config.less
1 1 @import 'color.less';
2 2 @import 'var/index.less';
3   -@import 'mixins.less';
... ...
src/design/global.less deleted 100644 → 0
1   -@import './helper/distance.less';
2   -.distance();
3   -
4   -.flex {
5   - display: flex;
6   -}
7   -
8   -.align-middle {
9   - vertical-align: middle;
10   -}
11   -
12   -.flex-wrap {
13   - flex-wrap: wrap;
14   -}
15   -
16   -.justify-center {
17   - justify-content: center;
18   -}
19   -
20   -.items-center {
21   - align-items: center;
22   -}
23   -
24   -.justify-start {
25   - justify-content: flex-start;
26   -}
27   -
28   -.justify-end {
29   - justify-content: flex-end;
30   -}
31   -
32   -.justify-around {
33   - justify-content: space-around;
34   -}
35   -
36   -.relative {
37   - position: relative;
38   -}
39   -
40   -.absolute {
41   - position: absolute;
42   -}
43   -
44   -.ellipsis {
45   - overflow: hidden;
46   - text-overflow: ellipsis;
47   - word-wrap: normal;
48   - white-space: nowrap;
49   -}
50   -
51   -.shadow-xs {
52   - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
53   -}
54   -
55   -.shadow-sm {
56   - box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
57   -}
58   -
59   -.shadow {
60   - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
61   -}
62   -
63   -.shadow-md {
64   - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
65   -}
66   -
67   -.shadow-lg {
68   - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
69   -}
70   -
71   -.shadow-xl {
72   - box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
73   -}
src/design/helper/distance.less deleted 100644 → 0
1   -@import 'loop.less';
2   -// margin 步长
3   -@margin-size-base: 4;
4   -
5   -// 最大生成
6   -@margin-size-max: 10;
7   -
8   -// padding步长
9   -@padding-size-base: 4;
10   -
11   -// 最大生成
12   -@padding-size-max: 10;
13   -
14   -.distance() {
15   - // 生成margin
16   - .loop (m, margin, 1, @margin-size-base, @margin-size-max);
17   - .loop (mt, margin-top, 1, @margin-size-base, @margin-size-max);
18   - .loop (mr, margin-right, 1, @margin-size-base, @margin-size-max);
19   - .loop (mb, margin-bottom, 1, @margin-size-base, @margin-size-max);
20   - .loop (ml, margin-left, 1, @margin-size-base, @margin-size-max);
21   - .loop (my, margin, 1, @margin-size-base, @margin-size-max, y);
22   - .loop (mx, margin, 1, @margin-size-base, @margin-size-max, x);
23   - .loop (mx-auto, margin, 1, @padding-size-base, @padding-size-max, autoX);
24   - .loop (my-auto, margin, 1, @padding-size-base, @padding-size-max, autoY);
25   - .loop (m-auto, margin, 1, @padding-size-base, @padding-size-max, auto);
26   -
27   - // 生成padding
28   - .loop (p, padding, 1, @padding-size-base, @padding-size-max);
29   - .loop (pt, padding-top, 1, @padding-size-base, @padding-size-max);
30   - .loop (pr, padding-right, 1, @padding-size-base, @padding-size-max);
31   - .loop (pb, padding-bottom, 1, @padding-size-base, @padding-size-max);
32   - .loop (pl, padding-left, 1, @padding-size-base, @padding-size-max);
33   - .loop (py, padding, 1, @padding-size-base, @padding-size-max, y);
34   - .loop (px, padding, 1, @padding-size-base, @padding-size-max, x);
35   - .loop (px-auto, padding, 1, @padding-size-base, @padding-size-max, autoX);
36   - .loop (py-auto, padding, 1, @padding-size-base, @padding-size-max, autoY);
37   - .loop (p-auto, padding, 1, @padding-size-base, @padding-size-max, auto);
38   -}
src/design/helper/loop.less deleted 100644 → 0
1   -.loop (@style-name, @tag-name, @i,@base-size, @max:10,@xy:none) when (@i <= @max) {
2   - @next: @i+1;
3   - .fn() when (@xy =none) {
4   - @size: @base-size * @i;
5   -
6   - .@{style-name}-@{i} {
7   - @{tag-name}: ~'@{size}px ';
8   - }
9   - .loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
10   - }
11   -
12   - .fn() when (@xy =x) {
13   - @size: @base-size * @i;
14   -
15   - @tnl: ~'@{tag-name}-left';
16   - @tnr: ~'@{tag-name}-right';
17   -
18   - .@{style-name}-@{i} {
19   - @{tnl}: ~'@{size}px';
20   - @{tnr}: ~'@{size}px';
21   - }
22   - .loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
23   - }
24   - .fn() when (@xy =y) {
25   - @size: @base-size * @i;
26   -
27   - @tnt: ~'@{tag-name}-top';
28   - @tnb: ~'@{tag-name}-bottom';
29   -
30   - .@{style-name}-@{i} {
31   - @{tnt}: ~'@{size}px';
32   - @{tnb}: ~'@{size}px';
33   - }
34   - .loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
35   - }
36   - .fn() when (@xy =auto) {
37   - @tnt: ~'@{tag-name}-top';
38   - @tnb: ~'@{tag-name}-bottom';
39   - @tnl: ~'@{tag-name}-left';
40   - @tnr: ~'@{tag-name}-right';
41   - .@{style-name} {
42   - @{tnl}: ~'auto';
43   - @{tnr}: ~'auto';
44   - @{tnt}: ~'auto';
45   - @{tnb}: ~'auto';
46   - }
47   - }
48   -
49   - .fn() when (@xy =autoX) {
50   - @tnl: ~'@{tag-name}-left';
51   - @tnr: ~'@{tag-name}-right';
52   - .@{style-name} {
53   - @{tnl}: ~'auto';
54   - @{tnr}: ~'auto';
55   - }
56   - }
57   -
58   - .fn() when (@xy =autoY) {
59   - @tnt: ~'@{tag-name}-top';
60   - @tnb: ~'@{tag-name}-bottom';
61   - .@{style-name} {
62   - @{tnt}: ~'auto';
63   - @{tnb}: ~'auto';
64   - }
65   - }
66   - .fn();
67   -}
src/design/index.less
1 1 @import 'transition/index.less';
2 2 @import 'var/index.less';
3 3 @import 'public.less';
4   -@import 'mixins.less';
5 4 @import 'ant/index.less';
6   -@import 'global.less';
7 5  
8 6 *,
9 7 *::before,
... ...
src/design/mixins.less deleted 100644 → 0
1   -// Text truncation
2   -.text-truncate() {
3   - overflow: hidden;
4   - text-overflow: ellipsis;
5   - white-space: nowrap;
6   -}
7   -
8   -/* Force no line break */
9   -.word-nowrap() {
10   - word-wrap: normal;
11   - white-space: nowrap;
12   -}
13   -
14   -/* Force line break */
15   -.break-all() {
16   - word-break: break-all;
17   - word-wrap: break-word;
18   - white-space: normal;
19   -}
20   -
21   -// Prohibit selection
22   -.unselect() {
23   - cursor: pointer;
24   - user-select: none;
25   -}
26   -
27   -/* Suitable for webkit core and mobile */
28   -.ellipsis-multiple(@num: 1) {
29   - display: -webkit-box;
30   - overflow: hidden;
31   - -webkit-box-orient: vertical;
32   - -webkit-line-clamp: @num;
33   -}
34   -
35   -.respond-to (small, @content) {
36   - @media only screen and (min-width: @screen-sm-min) {
37   - @content();
38   - }
39   -}
40   -.respond-to (medium, @content) {
41   - @media only screen and (min-width: @screen-md-min) {
42   - @content();
43   - }
44   -}
45   -.respond-to (large, @content) {
46   - @media only screen and (min-width: @screen-lg-min) {
47   - @content();
48   - }
49   -}
50   -.respond-to (xlarge, @content) {
51   - @media only screen and (min-width: @screen-xl-min) {
52   - @content();
53   - }
54   -}
55   -.respond-to (xsmall-only, @content) {
56   - @media only screen and (max-width: @screen-xs-max) {
57   - @content();
58   - }
59   -}
60   -.respond-to (small-only, @content) {
61   - @media only screen and (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
62   - @content();
63   - }
64   -}
65   -.respond-to (medium-only, @content) {
66   - @media only screen and (min-width: @screen-md-min) and (max-width: @screen-md-max) {
67   - @content();
68   - }
69   -}
70   -.respond-to (large-only, @content) {
71   - @media only screen and (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
72   - @content();
73   - }
74   -}
75   -
76   -.respond-to (xsmall-and-small, @content) {
77   - @media only screen and (max-width: @screen-sm-max) {
78   - @content();
79   - }
80   -}
81   -.respond-to (small-and-medium, @content) {
82   - @media only screen and (min-width: @screen-sm-min) and (max-width: @screen-md-max) {
83   - @content();
84   - }
85   -}
src/design/var/index.less
... ... @@ -35,7 +35,7 @@
35 35 // left-menu
36 36 @app-menu-item-height: 42px;
37 37  
38   -.bem(@n;@content) {
  38 +.bem(@n; @content) {
39 39 @{namespace}-@{n} {
40 40 @content();
41 41 }
... ...
src/layouts/page/ParentView.vue
... ... @@ -3,7 +3,7 @@
3 3 -->
4 4 <template>
5 5 <div>
6   - <router-view>
  6 + <RouterView>
7 7 <template #default="{ Component, route }">
8 8 <transition
9 9 :name="
... ... @@ -24,7 +24,7 @@
24 24 <component v-else :is="Component" v-bind="getKey(Component, route)" />
25 25 </transition>
26 26 </template>
27   - </router-view>
  27 + </RouterView>
28 28 </div>
29 29 </template>
30 30 <script lang="ts">
... ...
src/layouts/page/index.vue
1 1 <template>
2 2 <div>
3   - <router-view>
  3 + <RouterView>
4 4 <template #default="{ Component, route }">
5 5 <transition
6 6 :name="
... ... @@ -21,7 +21,7 @@
21 21 <component v-else :is="Component" v-bind="getKey(Component, route)" />
22 22 </transition>
23 23 </template>
24   - </router-view>
  24 + </RouterView>
25 25 <FrameLayout v-if="getCanEmbedIFramePage" />
26 26 </div>
27 27 </template>
... ...
src/main.ts
  1 +import '/@/design/index.less';
  2 +import 'windi.css';
  3 +
1 4 import { createApp } from 'vue';
2 5 import App from './App.vue';
3 6  
... ... @@ -11,8 +14,6 @@ import { registerGlobComp } from &#39;/@/components/registerGlobComp&#39;;
11 14  
12 15 import { isDevMode } from '/@/utils/env';
13 16  
14   -import '/@/design/index.less';
15   -
16 17 const app = createApp(App);
17 18  
18 19 registerGlobComp(app);
... ...
src/types/shims-volar.d.ts 0 → 100644
  1 +import { RouterLink, RouterView } from 'vue-router';
  2 +
  3 +import { Button } from '/@/components/Button';
  4 +import { Col, Row } from 'ant-design-vue';
  5 +
  6 +declare global {
  7 + interface __VLS_GlobalComponents {
  8 + RouterLink: typeof RouterLink;
  9 + RouterView: typeof RouterView;
  10 + 'a-button': typeof Button;
  11 + 'a-col': typeof Col;
  12 + 'a-row': typeof Row;
  13 + }
  14 +}
... ...
src/views/dashboard/analysis/index.vue
... ... @@ -70,9 +70,5 @@
70 70 <style lang="less" scoped>
71 71 .analysis {
72 72 width: 100%;
73   -
74   - .product-total {
75   - .respond-to(small-and-medium, {padding-right: 0;margin-bottom: 24px;});
76   - }
77 73 }
78 74 </style>
... ...
src/views/demo/feat/copy/index.vue
1 1 <template>
2 2 <PageWrapper title="文本复制示例">
3   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Copy Example">
  3 + <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Copy Example">
4 4 <div class="flex justify-center">
5 5 <a-input placeholder="请输入" v-model:value="value" />
6 6 <a-button type="primary" @click="handleCopy"> Copy </a-button>
... ...
src/views/demo/feat/full-screen/index.vue
1 1 <template>
2 2 <PageWrapper title="全屏示例">
3   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Window Full Screen">
  3 + <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Window Full Screen">
4 4 <a-button type="primary" @click="enterFullscreen" class="mr-2">
5 5 Enter Window Full Screen
6 6 </a-button>
... ... @@ -15,13 +15,13 @@
15 15 Current State: {{ isFullscreenRef }}
16 16 </CollapseContainer>
17 17  
18   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Dom Full Screen">
  18 + <CollapseContainer class="w-full mt-5 bg-white rounded-md" title="Dom Full Screen">
19 19 <a-button type="primary" @click="toggleDom" class="mr-2"> Enter Dom Full Screen </a-button>
20 20 </CollapseContainer>
21 21  
22 22 <div
23 23 ref="domRef"
24   - class="w-1/2 h-64 flex justify-center rounded-md items-center bg-white mx-auto mt-10"
  24 + class="flex items-center justify-center w-1/2 h-64 mx-auto mt-10 bg-white rounded-md"
25 25 >
26 26 <a-button type="primary" @click="toggleDom" class="mr-2"> Exit Dom Full Screen </a-button>
27 27 </div>
... ...
src/views/demo/feat/msg/index.vue
1 1 <template>
2 2 <PageWrapper title="消息示例">
3   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Message">
  3 + <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Message">
4 4 <a-button @click="infoMsg('Info message')" class="mr-2"> Info </a-button>
5 5 <a-button @click="successMsg('Success message')" class="mr-2" color="success">
6 6 Success
... ... @@ -12,14 +12,14 @@
12 12 <a-button @click="handleLoading" class="mr-2" type="primary"> Loading </a-button>
13 13 </CollapseContainer>
14 14  
15   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Comfirm">
  15 + <CollapseContainer class="w-full h-32 mt-5 bg-white rounded-md" title="Comfirm">
16 16 <a-button @click="handleConfirm('info')" class="mr-2"> Info </a-button>
17 17 <a-button @click="handleConfirm('warning')" color="warning" class="mr-2"> Warning </a-button>
18 18 <a-button @click="handleConfirm('success')" color="success" class="mr-2"> Success </a-button>
19 19 <a-button @click="handleConfirm('error')" color="error" class="mr-2"> Error </a-button>
20 20 </CollapseContainer>
21 21  
22   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Modal">
  22 + <CollapseContainer class="w-full h-32 mt-5 bg-white rounded-md" title="Modal">
23 23 <a-button @click="handleInfoModal" class="mr-2"> Info </a-button>
24 24 <a-button @click="handleSuccessModal" color="success" class="mr-2"> Success </a-button>
25 25 <a-button @click="handleErrorModal" color="error" class="mr-2"> Error </a-button>
... ... @@ -27,7 +27,7 @@
27 27 </CollapseContainer>
28 28  
29 29 <CollapseContainer
30   - class="px-20 bg-white w-full h-32 rounded-md mt-5"
  30 + class="w-full h-32 mt-5 bg-white rounded-md"
31 31 title="Notification 用法与上面一致"
32 32 >
33 33 <a-button @click="handleNotify" color="success" class="mr-2"> Success </a-button>
... ...
src/views/demo/feat/watermark/index.vue
1 1 <template>
2 2 <PageWrapper title="水印示例">
3   - <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Global WaterMark">
  3 + <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark">
4 4 <a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')">
5 5 Create
6 6 </a-button>
... ...
src/views/sys/login/Login.vue
1 1 <template>
2 2 <div class="login">
3   - <div class="login-mask"></div>
4   - <div class="login-form-wrap">
  3 + <div class="opacity-0 login-mask lg:opacity-100"></div>
  4 + <div class="justify-center login-form-wrap lg:justify-end">
5 5 <div class="mx-6 login-form">
6 6 <AppLocalePicker v-if="showLocale" class="login-form__locale" />
7 7 <div class="px-2 py-10 login-form__content">
... ... @@ -164,13 +164,10 @@
164 164 background-size: 100% 100%;
165 165  
166 166 &-mask {
167   - display: none;
168 167 height: 100%;
169 168 background: url(../../../assets/images/login/login-in.png) no-repeat;
170 169 background-position: 30% 30%;
171 170 background-size: 80% 80%;
172   -
173   - .respond-to(xlarge, { display: block;});
174 171 }
175 172  
176 173 &-form {
... ... @@ -182,7 +179,6 @@
182 179 border-width: 8px;
183 180 border-radius: 4px;
184 181 background-clip: padding-box;
185   - .respond-to(xlarge, { margin: 0 120px 0 50px});
186 182  
187 183 &__main {
188 184 margin: 30px auto 0 auto !important;
... ... @@ -195,12 +191,7 @@
195 191 display: flex;
196 192 width: 100%;
197 193 height: 100%;
198   - // height: 90%;
199   - justify-content: center;
200 194 align-items: center;
201   - .respond-to(xlarge, {
202   - justify-content: flex-end;
203   - });
204 195 }
205 196  
206 197 &__content {
... ...
tailwind.config.js 0 → 100644
  1 +/* eslint-disable @typescript-eslint/no-var-requires */
  2 +const colors = require('windicss/colors');
  3 +const defaultTheme = require('windicss/defaultTheme');
  4 +module.exports = {
  5 + darkMode: 'class',
  6 + plugins: [
  7 + require('windicss/plugin/forms'),
  8 + require('windicss/plugin/typography'),
  9 + require('windicss/plugin/line-clamp'),
  10 + require('windicss/plugin/aspect-ratio'),
  11 + ],
  12 + theme: {
  13 + extend: {
  14 + colors,
  15 + fontFamily: {
  16 + sans: ['Righteous', ...defaultTheme.fontFamily.sans],
  17 + },
  18 + },
  19 + },
  20 +};
... ...
yarn.lock
... ... @@ -1112,10 +1112,10 @@
1112 1112 dependencies:
1113 1113 cross-fetch "^3.0.6"
1114 1114  
1115   -"@iconify/json@^1.1.299":
1116   - version "1.1.299"
1117   - resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.299.tgz#e1aca556b83461316ba5ec04b232906b499a67a5"
1118   - integrity sha512-oYHUgp5RZNE2CT3wKE/MWbmGK7lmubi30PD5l33HUU7yh4CznmzPL0Ewgg51Wn86NkFveZDcT+odMBTaayh9Ew==
  1115 +"@iconify/json@^1.1.303":
  1116 + version "1.1.303"
  1117 + resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.303.tgz#364daf69a97c02647227cc0d851a2e79a893e8e3"
  1118 + integrity sha512-O8KDBcIVQolvUeVL9JiEIc2ifYKWyKu/5cX6PNC4EAPvtfvieOHs1YVPV4tphVhafjTTftR5XbZBmZHKG6uNIA==
1119 1119  
1120 1120 "@intlify/core-base@9.0.0-beta.16":
1121 1121 version "9.0.0-beta.16"
... ... @@ -1226,21 +1226,21 @@
1226 1226 "@nodelib/fs.scandir" "2.1.4"
1227 1227 fastq "^1.6.0"
1228 1228  
1229   -"@purge-icons/core@^0.6.0":
1230   - version "0.6.0"
1231   - resolved "https://registry.npmjs.org/@purge-icons/core/-/core-0.6.0.tgz#b966d042c504a256299b2d63b4d16ae26c9e0317"
1232   - integrity sha512-Gp7Fvx1mtPykejxldJ8+1o2C/Gzw54Mpv22JKNoKnaUlKGe1m4f0rAl2MgHDGJd/ghm4kDcfxFzjnna6Z4L5cA==
  1229 +"@purge-icons/core@^0.7.0":
  1230 + version "0.7.0"
  1231 + resolved "https://registry.npmjs.org/@purge-icons/core/-/core-0.7.0.tgz#097ba8d4d8b7e8d662df687bd2391eb8b83caba0"
  1232 + integrity sha512-PaCeTFjkQUX+MzBsNg3L8x5aCZqXwaUSNw1FY3Jn7wlLqNqxRNoShw5P//a1DQAy7hLlUHvEL6IGeDoN/xf98A==
1233 1233 dependencies:
1234 1234 "@iconify/iconify" "2.0.0-rc.6"
1235 1235 axios "^0.21.1"
1236 1236 debug "^4.3.2"
1237   - fast-glob "^3.2.4"
1238   - fs-extra "^9.0.1"
  1237 + fast-glob "^3.2.5"
  1238 + fs-extra "^9.1.0"
1239 1239  
1240   -"@purge-icons/generated@^0.6.0":
1241   - version "0.6.0"
1242   - resolved "https://registry.npmjs.org/@purge-icons/generated/-/generated-0.6.0.tgz#2aa9a78fef6a4dc79d265c84548e110375b554df"
1243   - integrity sha512-Xg2ckJu/wRSSNEloebCaKSIAamKMZffws4+2oOjA1J3JEyD5FlP3Ewt+kkcuun/i7Mo2czjTKJG9wwSwZgf0cg==
  1240 +"@purge-icons/generated@^0.7.0":
  1241 + version "0.7.0"
  1242 + resolved "https://registry.npmjs.org/@purge-icons/generated/-/generated-0.7.0.tgz#d87dbb3145e8b9a64e2e12ff660aa3cb13cbeb56"
  1243 + integrity sha512-4SHVpZnKaW5ekRTjhPY9b1pALVlF0pDuGIDRAlxAm0V+gQVOL0+Ghav6U9XqXFj2kiG1+eQ8swpvB+kd0a+tqg==
1244 1244 dependencies:
1245 1245 "@iconify/iconify" ">=2.0.0-rc.6"
1246 1246  
... ... @@ -7859,13 +7859,13 @@ rollup-plugin-esbuild@^2.6.1:
7859 7859 joycon "^2.2.5"
7860 7860 strip-json-comments "^3.1.1"
7861 7861  
7862   -rollup-plugin-purge-icons@^0.6.0:
7863   - version "0.6.0"
7864   - resolved "https://registry.npmjs.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.6.0.tgz#cfddf4935107180bdb14385228449c0d8b0557a2"
7865   - integrity sha512-8huBXnq7D1Lj2gPZP/rOjuj2hkZ3AXoGQc2r5+MK3lcD3xEgfuONd+G4WIk7P8wJTEVGux5xJ2Ho7nSISLqP1A==
  7862 +rollup-plugin-purge-icons@^0.7.0:
  7863 + version "0.7.0"
  7864 + resolved "https://registry.npmjs.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.7.0.tgz#4419b810d5d75f1bba3af72a238e70b4a675f03c"
  7865 + integrity sha512-zAff7SrjC2nA7TCm6gaOclh1cZ2IBupX1tnebn+sfvcvrezu+avS7k0BhhAC2pAtfhdOvD6G/2a+kkkm6hvpiw==
7866 7866 dependencies:
7867   - "@purge-icons/core" "^0.6.0"
7868   - "@purge-icons/generated" "^0.6.0"
  7867 + "@purge-icons/core" "^0.7.0"
  7868 + "@purge-icons/generated" "^0.7.0"
7869 7869  
7870 7870 rollup-plugin-terser@^7.0.0:
7871 7871 version "7.0.2"
... ... @@ -9334,19 +9334,19 @@ vite-plugin-mock@^2.1.4:
9334 9334 rollup "^2.38.4"
9335 9335 rollup-plugin-esbuild "^2.6.1"
9336 9336  
9337   -vite-plugin-purge-icons@^0.6.0:
9338   - version "0.6.0"
9339   - resolved "https://registry.npmjs.org/vite-plugin-purge-icons/-/vite-plugin-purge-icons-0.6.0.tgz#f165266f157d88368edcc7ae3baf933d6d92e779"
9340   - integrity sha512-YGW3wh+Pj4Tob23x29+NgVkslru5tAInIMTY0J2eltDNy32RKxSRh8ohb+W0O/X9h2xKkMeiUpNI7mY6k8Uzsw==
  9337 +vite-plugin-purge-icons@^0.7.0:
  9338 + version "0.7.0"
  9339 + resolved "https://registry.npmjs.org/vite-plugin-purge-icons/-/vite-plugin-purge-icons-0.7.0.tgz#c460037438fd71372153360ccb9e7d97b030fb58"
  9340 + integrity sha512-oGZUKFAL4waIZIeiCPT5KZvGbBA500AO/03oxW+ODTKUMq+0jbh9s+T8NPzfJQFC1jtE7eUb2ium82IP/gxZjA==
9341 9341 dependencies:
9342   - "@purge-icons/core" "^0.6.0"
9343   - "@purge-icons/generated" "^0.6.0"
9344   - rollup-plugin-purge-icons "^0.6.0"
  9342 + "@purge-icons/core" "^0.7.0"
  9343 + "@purge-icons/generated" "^0.7.0"
  9344 + rollup-plugin-purge-icons "^0.7.0"
9345 9345  
9346   -vite-plugin-pwa@^0.4.6:
9347   - version "0.4.6"
9348   - resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.4.6.tgz#e759b7840211f83cae367d306654da505cecbceb"
9349   - integrity sha512-3LonumSG4EcH9FT61d7wWouHkCmEciy3RPfvt25b835HMx9gb2Dt71t140+85Z5d+uANMSguC3miBnnGzagAMA==
  9346 +vite-plugin-pwa@^0.4.7:
  9347 + version "0.4.7"
  9348 + resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.4.7.tgz#32d934171fc7ec5cada741c559b5fbf2fe5a39af"
  9349 + integrity sha512-KsC9tenzn1r6AG/Hda4wg9Es6AokVRz2RqQp+R+uM3qvfNDbdDjJWAEhB/2zUx7D0YDu5Y0h+cDC0zD0vxBoog==
9350 9350 dependencies:
9351 9351 debug "^4.3.2"
9352 9352 fast-glob "^3.2.5"
... ... @@ -9376,10 +9376,18 @@ vite-plugin-theme@^0.4.3:
9376 9376 es-module-lexer "^0.3.26"
9377 9377 tinycolor2 "^1.4.2"
9378 9378  
9379   -vite@2.0.0-beta.70:
9380   - version "2.0.0-beta.70"
9381   - resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.70.tgz#ec0d4f2bfd02f31d2c59aa9760f27c26647f41ce"
9382   - integrity sha512-rbuAYZE8T0jNOUykkyfjiiKmz4MpW2KqzHO8++WCCDXyxzIg56ICQ/B6NLZzVpWyk0iSKiUKr2k8NMkmDlZAQQ==
  9379 +vite-plugin-windicss@^0.2.2:
  9380 + version "0.2.2"
  9381 + resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.2.2.tgz#2abf1533153f5dc214a9e1a06fb58274e5892c19"
  9382 + integrity sha512-P+iyrcuLjLfjiYP+bBisfKbg9bmeQMUBpjsTFJ9kWWX2fyqo968CHmS3euz+MzRcK5ZECccpOxx60ZXzc12VAw==
  9383 + dependencies:
  9384 + fast-glob "^3.2.5"
  9385 + windicss "^2.1.11"
  9386 +
  9387 +vite@2.0.0:
  9388 + version "2.0.0"
  9389 + resolved "https://registry.npmjs.org/vite/-/vite-2.0.0.tgz#156f35eadaa7947629aa8a24eb23129b07116ee3"
  9390 + integrity sha512-rNli5g0DaQ6+btlRqkmaR06neWaJGApmt40gocqrYDNi2XoEXYQgKiHSWzMeUgc1Cdva2HduqazaE+RaKjBpdQ==
9383 9391 dependencies:
9384 9392 esbuild "^0.8.34"
9385 9393 postcss "^8.2.1"
... ... @@ -9507,6 +9515,11 @@ which@^2.0.1:
9507 9515 dependencies:
9508 9516 isexe "^2.0.0"
9509 9517  
  9518 +windicss@^2.1.11:
  9519 + version "2.1.11"
  9520 + resolved "https://registry.npmjs.org/windicss/-/windicss-2.1.11.tgz#35dc9d683488dcfacf94331967b59765a505f18b"
  9521 + integrity sha512-79mPoUmvamwdJb+MJ/ug+XILxFzrTNCXo/HmacUn3V9sRQ6w5lA9KkpTrG70N7Oab0hbIFaq+X3Yva+QLSV0Pw==
  9522 +
9510 9523 wmf@~1.0.1:
9511 9524 version "1.0.2"
9512 9525 resolved "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da"
... ...