提交 4d7001bb 编写于 作者: V vben

refactor(design): add windicss

上级 27c6f690
...@@ -10,7 +10,7 @@ VITE_DROP_CONSOLE = true ...@@ -10,7 +10,7 @@ VITE_DROP_CONSOLE = true
# Whether to enable gizp or brotli compression # Whether to enable gizp or brotli compression
# Optional: gzip | brotli | none # Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate # If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'gzip' VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA # Basic interface address SPA
VITE_GLOB_API_URL=/api VITE_GLOB_API_URL=/api
......
{ {
"recommendations": [ "recommendations": [
"johnsoncodehk.volar",
"octref.vetur", "octref.vetur",
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint", "stylelint.vscode-stylelint",
......
{ {
"typescript.tsdk": "./node_modules/typescript/lib", "typescript.tsdk": "./node_modules/typescript/lib",
"volar.tsPlugin": true,
"volar.tsPluginStatus": false,
//=========================================== //===========================================
//============= Editor ====================== //============= Editor ======================
//=========================================== //===========================================
......
## Wip ## Wip
### ✨ Refactor
- 移除`global.less`,`mixin.less`,`design/helper`,由`windicss`代替,有用到的需要修改对应的样式
### ✨ Features ### ✨ Features
- useModal 新增返回值函数 `redoModalHeight`,用于在 modal 内为动态内容时刷新 modal 高度 - useModal 新增返回值函数 `redoModalHeight`,用于在 modal 内为动态内容时刷新 modal 高度
- 升级 husky 到 5.0 - 升级 husky 到 5.0
- 新增 `brotli`|`gzip`压缩及相关测试命令 - 新增 `brotli`|`gzip`压缩及相关测试命令
- 重新引入 `windicss` (与`tailwind`一样).在速度上更快
### ⚡ Performance Improvements ### ⚡ Performance Improvements
...@@ -23,7 +28,8 @@ ...@@ -23,7 +28,8 @@
### 🎫 Chores ### 🎫 Chores
- 文档更新 - 文档更新
- 升级 ant-design-vue 到 2.0.0 - 升级 ant-design-vue 到 `2.0.0`
- 升级 vite 到 `2.0.0`
## 2.0.0-rc.18 (2021-02-05) ## 2.0.0-rc.18 (2021-02-05)
......
import type { Plugin } from 'vite'; import type { Plugin } from 'vite';
import PurgeIcons from 'vite-plugin-purge-icons';
import vue from '@vitejs/plugin-vue'; import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx'; import vueJsx from '@vitejs/plugin-vue-jsx';
import legacy from '@vitejs/plugin-legacy'; import legacy from '@vitejs/plugin-legacy';
import windiCSS from 'vite-plugin-windicss';
import PurgeIcons from 'vite-plugin-purge-icons';
import { ViteEnv } from '../../utils'; import { ViteEnv } from '../../utils';
import { configHtmlPlugin } from './html'; import { configHtmlPlugin } from './html';
import { configPwaConfig } from './pwa'; import { configPwaConfig } from './pwa';
...@@ -23,6 +25,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { ...@@ -23,6 +25,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
vue(), vue(),
// have to // have to
vueJsx(), vueJsx(),
...windiCSS(),
]; ];
// @vitejs/plugin-legacy // @vitejs/plugin-legacy
......
...@@ -51,9 +51,9 @@ ...@@ -51,9 +51,9 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^11.0.0", "@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0", "@commitlint/config-conventional": "^11.0.0",
"@iconify/json": "^1.1.299", "@iconify/json": "^1.1.303",
"@ls-lint/ls-lint": "^1.9.2", "@ls-lint/ls-lint": "^1.9.2",
"@purge-icons/generated": "^0.6.0", "@purge-icons/generated": "^0.7.0",
"@types/echarts": "^4.9.3", "@types/echarts": "^4.9.3",
"@types/fs-extra": "^9.0.7", "@types/fs-extra": "^9.0.7",
"@types/http-proxy": "^1.17.5", "@types/http-proxy": "^1.17.5",
...@@ -99,15 +99,16 @@ ...@@ -99,15 +99,16 @@
"stylelint-order": "^4.1.0", "stylelint-order": "^4.1.0",
"ts-node": "^9.1.1", "ts-node": "^9.1.1",
"typescript": "^4.1.5", "typescript": "^4.1.5",
"vite": "2.0.0-beta.70", "vite": "2.0.0",
"vite-plugin-compression": "^0.2.1", "vite-plugin-compression": "^0.2.1",
"vite-plugin-html": "^2.0.0", "vite-plugin-html": "^2.0.0",
"vite-plugin-imagemin": "^0.2.6", "vite-plugin-imagemin": "^0.2.6",
"vite-plugin-mock": "^2.1.4", "vite-plugin-mock": "^2.1.4",
"vite-plugin-purge-icons": "^0.6.0", "vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.4.6", "vite-plugin-pwa": "^0.4.7",
"vite-plugin-style-import": "^0.7.2", "vite-plugin-style-import": "^0.7.2",
"vite-plugin-theme": "^0.4.3", "vite-plugin-theme": "^0.4.3",
"vite-plugin-windicss": "^0.2.2",
"vue-eslint-parser": "^7.5.0", "vue-eslint-parser": "^7.5.0",
"yargs": "^16.2.0" "yargs": "^16.2.0"
}, },
......
<template> <template>
<ConfigProvider v-bind="lockEvent" :locale="antConfigLocale"> <ConfigProvider v-bind="lockEvent" :locale="antConfigLocale">
<AppProvider> <AppProvider>
<router-view /> <RouterView />
</AppProvider> </AppProvider>
</ConfigProvider> </ConfigProvider>
</template> </template>
......
...@@ -9,7 +9,11 @@ ...@@ -9,7 +9,11 @@
@click="handleGoHome" @click="handleGoHome"
> >
<img src="../../../assets/images/logo.png" /> <img src="../../../assets/images/logo.png" />
<div class="ml-2 ellipsis" :class="[`${prefixCls}__title`]" v-show="showTitle"> <div
class="ml-2 truncate xs:opacity-0 md:opacity-100"
:class="`${prefixCls}__title`"
v-show="showTitle"
>
{{ title }} {{ title }}
</div> </div>
</div> </div>
...@@ -85,12 +89,7 @@ ...@@ -85,12 +89,7 @@
&__title { &__title {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
opacity: 0;
transition: all 0.5s; transition: all 0.5s;
.respond-to(medium,{
opacity: 1;
});
} }
} }
</style> </style>
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
font-weight: 700; font-weight: 700;
line-height: 24px; line-height: 24px;
color: @text-color-base; color: @text-color-base;
cursor: pointer;
.unselect(); user-select: none;
&.show-span::before { &.show-span::before {
position: absolute; position: absolute;
......
...@@ -41,10 +41,6 @@ ...@@ -41,10 +41,6 @@
cursor: pointer; cursor: pointer;
transition: all @transition-time @ease-in-out; transition: all @transition-time @ease-in-out;
// &:hover {
// color: @primary-color;
// }
&-icon { &-icon {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -164,9 +160,10 @@ ...@@ -164,9 +160,10 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
padding: 12px 24px; padding: 12px 24px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer; cursor: pointer;
.text-truncate();
// transition: all @transition-time @ease-in-out;
&:hover { &:hover {
color: @primary-color; color: @primary-color;
......
...@@ -18,15 +18,19 @@ ...@@ -18,15 +18,19 @@
} }
.collapse-title { .collapse-title {
overflow: hidden;
font-size: 12px; font-size: 12px;
.text-truncate(); text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.@{simple-prefix-cls} { .@{simple-prefix-cls} {
&-sub-title { &-sub-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
transition: all 0.3s; transition: all 0.3s;
.text-truncate();
} }
&-tag { &-tag {
......
...@@ -40,7 +40,7 @@ export function createTableColumns(): BasicColumn[] { ...@@ -40,7 +40,7 @@ export function createTableColumns(): BasicColumn[] {
} }
return ( return (
<span> <span>
<p class="ellipsis mb-1" title={text}> <p class="truncate mb-1" title={text}>
{text} {text}
</p> </p>
<Progress percent={percent} size="small" status={status} /> <Progress percent={percent} size="small" status={status} />
......
@import '../mixins.less';
@import '../color.less'; @import '../color.less';
// input // input
......
@import 'color.less'; @import 'color.less';
@import 'var/index.less'; @import 'var/index.less';
@import 'mixins.less';
@import './helper/distance.less';
.distance();
.flex {
display: flex;
}
.align-middle {
vertical-align: middle;
}
.flex-wrap {
flex-wrap: wrap;
}
.justify-center {
justify-content: center;
}
.items-center {
align-items: center;
}
.justify-start {
justify-content: flex-start;
}
.justify-end {
justify-content: flex-end;
}
.justify-around {
justify-content: space-around;
}
.relative {
position: relative;
}
.absolute {
position: absolute;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
word-wrap: normal;
white-space: nowrap;
}
.shadow-xs {
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.shadow-sm {
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.shadow {
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
.shadow-md {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.shadow-lg {
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.shadow-xl {
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
@import 'loop.less';
// margin 步长
@margin-size-base: 4;
// 最大生成
@margin-size-max: 10;
// padding步长
@padding-size-base: 4;
// 最大生成
@padding-size-max: 10;
.distance() {
// 生成margin
.loop (m, margin, 1, @margin-size-base, @margin-size-max);
.loop (mt, margin-top, 1, @margin-size-base, @margin-size-max);
.loop (mr, margin-right, 1, @margin-size-base, @margin-size-max);
.loop (mb, margin-bottom, 1, @margin-size-base, @margin-size-max);
.loop (ml, margin-left, 1, @margin-size-base, @margin-size-max);
.loop (my, margin, 1, @margin-size-base, @margin-size-max, y);
.loop (mx, margin, 1, @margin-size-base, @margin-size-max, x);
.loop (mx-auto, margin, 1, @padding-size-base, @padding-size-max, autoX);
.loop (my-auto, margin, 1, @padding-size-base, @padding-size-max, autoY);
.loop (m-auto, margin, 1, @padding-size-base, @padding-size-max, auto);
// 生成padding
.loop (p, padding, 1, @padding-size-base, @padding-size-max);
.loop (pt, padding-top, 1, @padding-size-base, @padding-size-max);
.loop (pr, padding-right, 1, @padding-size-base, @padding-size-max);
.loop (pb, padding-bottom, 1, @padding-size-base, @padding-size-max);
.loop (pl, padding-left, 1, @padding-size-base, @padding-size-max);
.loop (py, padding, 1, @padding-size-base, @padding-size-max, y);
.loop (px, padding, 1, @padding-size-base, @padding-size-max, x);
.loop (px-auto, padding, 1, @padding-size-base, @padding-size-max, autoX);
.loop (py-auto, padding, 1, @padding-size-base, @padding-size-max, autoY);
.loop (p-auto, padding, 1, @padding-size-base, @padding-size-max, auto);
}
.loop (@style-name, @tag-name, @i,@base-size, @max:10,@xy:none) when (@i <= @max) {
@next: @i+1;
.fn() when (@xy =none) {
@size: @base-size * @i;
.@{style-name}-@{i} {
@{tag-name}: ~'@{size}px ';
}
.loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
}
.fn() when (@xy =x) {
@size: @base-size * @i;
@tnl: ~'@{tag-name}-left';
@tnr: ~'@{tag-name}-right';
.@{style-name}-@{i} {
@{tnl}: ~'@{size}px';
@{tnr}: ~'@{size}px';
}
.loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
}
.fn() when (@xy =y) {
@size: @base-size * @i;
@tnt: ~'@{tag-name}-top';
@tnb: ~'@{tag-name}-bottom';
.@{style-name}-@{i} {
@{tnt}: ~'@{size}px';
@{tnb}: ~'@{size}px';
}
.loop(@style-name, @tag-name, @next, @base-size, @max, @xy);
}
.fn() when (@xy =auto) {
@tnt: ~'@{tag-name}-top';
@tnb: ~'@{tag-name}-bottom';
@tnl: ~'@{tag-name}-left';
@tnr: ~'@{tag-name}-right';
.@{style-name} {
@{tnl}: ~'auto';
@{tnr}: ~'auto';
@{tnt}: ~'auto';
@{tnb}: ~'auto';
}
}
.fn() when (@xy =autoX) {
@tnl: ~'@{tag-name}-left';
@tnr: ~'@{tag-name}-right';
.@{style-name} {
@{tnl}: ~'auto';
@{tnr}: ~'auto';
}
}
.fn() when (@xy =autoY) {
@tnt: ~'@{tag-name}-top';
@tnb: ~'@{tag-name}-bottom';
.@{style-name} {
@{tnt}: ~'auto';
@{tnb}: ~'auto';
}
}
.fn();
}
@import 'transition/index.less'; @import 'transition/index.less';
@import 'var/index.less'; @import 'var/index.less';
@import 'public.less'; @import 'public.less';
@import 'mixins.less';
@import 'ant/index.less'; @import 'ant/index.less';
@import 'global.less';
*, *,
*::before, *::before,
......
// Text truncation
.text-truncate() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* Force no line break */
.word-nowrap() {
word-wrap: normal;
white-space: nowrap;
}
/* Force line break */
.break-all() {
word-break: break-all;
word-wrap: break-word;
white-space: normal;
}
// Prohibit selection
.unselect() {
cursor: pointer;
user-select: none;
}
/* Suitable for webkit core and mobile */
.ellipsis-multiple(@num: 1) {
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: @num;
}
.respond-to (small, @content) {
@media only screen and (min-width: @screen-sm-min) {
@content();
}
}
.respond-to (medium, @content) {
@media only screen and (min-width: @screen-md-min) {
@content();
}
}
.respond-to (large, @content) {
@media only screen and (min-width: @screen-lg-min) {
@content();
}
}
.respond-to (xlarge, @content) {
@media only screen and (min-width: @screen-xl-min) {
@content();
}
}
.respond-to (xsmall-only, @content) {
@media only screen and (max-width: @screen-xs-max) {
@content();
}
}
.respond-to (small-only, @content) {
@media only screen and (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
@content();
}
}
.respond-to (medium-only, @content) {
@media only screen and (min-width: @screen-md-min) and (max-width: @screen-md-max) {
@content();
}
}
.respond-to (large-only, @content) {
@media only screen and (min-width: @screen-lg-min) and (max-width: @screen-lg-max) {
@content();
}
}
.respond-to (xsmall-and-small, @content) {
@media only screen and (max-width: @screen-sm-max) {
@content();
}
}
.respond-to (small-and-medium, @content) {
@media only screen and (min-width: @screen-sm-min) and (max-width: @screen-md-max) {
@content();
}
}
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
// left-menu // left-menu
@app-menu-item-height: 42px; @app-menu-item-height: 42px;
.bem(@n;@content) { .bem(@n; @content) {
@{namespace}-@{n} { @{namespace}-@{n} {
@content(); @content();
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
--> -->
<template> <template>
<div> <div>
<router-view> <RouterView>
<template #default="{ Component, route }"> <template #default="{ Component, route }">
<transition <transition
:name=" :name="
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<component v-else :is="Component" v-bind="getKey(Component, route)" /> <component v-else :is="Component" v-bind="getKey(Component, route)" />
</transition> </transition>
</template> </template>
</router-view> </RouterView>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
......
<template> <template>
<div> <div>
<router-view> <RouterView>
<template #default="{ Component, route }"> <template #default="{ Component, route }">
<transition <transition
:name=" :name="
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<component v-else :is="Component" v-bind="getKey(Component, route)" /> <component v-else :is="Component" v-bind="getKey(Component, route)" />
</transition> </transition>
</template> </template>
</router-view> </RouterView>
<FrameLayout v-if="getCanEmbedIFramePage" /> <FrameLayout v-if="getCanEmbedIFramePage" />
</div> </div>
</template> </template>
......
import '/@/design/index.less';
import 'windi.css';
import { createApp } from 'vue'; import { createApp } from 'vue';
import App from './App.vue'; import App from './App.vue';
...@@ -11,8 +14,6 @@ import { registerGlobComp } from '/@/components/registerGlobComp'; ...@@ -11,8 +14,6 @@ import { registerGlobComp } from '/@/components/registerGlobComp';
import { isDevMode } from '/@/utils/env'; import { isDevMode } from '/@/utils/env';
import '/@/design/index.less';
const app = createApp(App); const app = createApp(App);
registerGlobComp(app); registerGlobComp(app);
......
import { RouterLink, RouterView } from 'vue-router';
import { Button } from '/@/components/Button';
import { Col, Row } from 'ant-design-vue';
declare global {
interface __VLS_GlobalComponents {
RouterLink: typeof RouterLink;
RouterView: typeof RouterView;
'a-button': typeof Button;
'a-col': typeof Col;
'a-row': typeof Row;
}
}
...@@ -70,9 +70,5 @@ ...@@ -70,9 +70,5 @@
<style lang="less" scoped> <style lang="less" scoped>
.analysis { .analysis {
width: 100%; width: 100%;
.product-total {
.respond-to(small-and-medium, {padding-right: 0;margin-bottom: 24px;});
}
} }
</style> </style>
<template> <template>
<PageWrapper title="文本复制示例"> <PageWrapper title="文本复制示例">
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Copy Example"> <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Copy Example">
<div class="flex justify-center"> <div class="flex justify-center">
<a-input placeholder="请输入" v-model:value="value" /> <a-input placeholder="请输入" v-model:value="value" />
<a-button type="primary" @click="handleCopy"> Copy </a-button> <a-button type="primary" @click="handleCopy"> Copy </a-button>
......
<template> <template>
<PageWrapper title="全屏示例"> <PageWrapper title="全屏示例">
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Window Full Screen"> <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Window Full Screen">
<a-button type="primary" @click="enterFullscreen" class="mr-2"> <a-button type="primary" @click="enterFullscreen" class="mr-2">
Enter Window Full Screen Enter Window Full Screen
</a-button> </a-button>
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
Current State: {{ isFullscreenRef }} Current State: {{ isFullscreenRef }}
</CollapseContainer> </CollapseContainer>
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Dom Full Screen"> <CollapseContainer class="w-full mt-5 bg-white rounded-md" title="Dom Full Screen">
<a-button type="primary" @click="toggleDom" class="mr-2"> Enter Dom Full Screen </a-button> <a-button type="primary" @click="toggleDom" class="mr-2"> Enter Dom Full Screen </a-button>
</CollapseContainer> </CollapseContainer>
<div <div
ref="domRef" ref="domRef"
class="w-1/2 h-64 flex justify-center rounded-md items-center bg-white mx-auto mt-10" class="flex items-center justify-center w-1/2 h-64 mx-auto mt-10 bg-white rounded-md"
> >
<a-button type="primary" @click="toggleDom" class="mr-2"> Exit Dom Full Screen </a-button> <a-button type="primary" @click="toggleDom" class="mr-2"> Exit Dom Full Screen </a-button>
</div> </div>
......
<template> <template>
<PageWrapper title="消息示例"> <PageWrapper title="消息示例">
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Message"> <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Message">
<a-button @click="infoMsg('Info message')" class="mr-2"> Info </a-button> <a-button @click="infoMsg('Info message')" class="mr-2"> Info </a-button>
<a-button @click="successMsg('Success message')" class="mr-2" color="success"> <a-button @click="successMsg('Success message')" class="mr-2" color="success">
Success Success
...@@ -12,14 +12,14 @@ ...@@ -12,14 +12,14 @@
<a-button @click="handleLoading" class="mr-2" type="primary"> Loading </a-button> <a-button @click="handleLoading" class="mr-2" type="primary"> Loading </a-button>
</CollapseContainer> </CollapseContainer>
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Comfirm"> <CollapseContainer class="w-full h-32 mt-5 bg-white rounded-md" title="Comfirm">
<a-button @click="handleConfirm('info')" class="mr-2"> Info </a-button> <a-button @click="handleConfirm('info')" class="mr-2"> Info </a-button>
<a-button @click="handleConfirm('warning')" color="warning" class="mr-2"> Warning </a-button> <a-button @click="handleConfirm('warning')" color="warning" class="mr-2"> Warning </a-button>
<a-button @click="handleConfirm('success')" color="success" class="mr-2"> Success </a-button> <a-button @click="handleConfirm('success')" color="success" class="mr-2"> Success </a-button>
<a-button @click="handleConfirm('error')" color="error" class="mr-2"> Error </a-button> <a-button @click="handleConfirm('error')" color="error" class="mr-2"> Error </a-button>
</CollapseContainer> </CollapseContainer>
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Modal"> <CollapseContainer class="w-full h-32 mt-5 bg-white rounded-md" title="Modal">
<a-button @click="handleInfoModal" class="mr-2"> Info </a-button> <a-button @click="handleInfoModal" class="mr-2"> Info </a-button>
<a-button @click="handleSuccessModal" color="success" class="mr-2"> Success </a-button> <a-button @click="handleSuccessModal" color="success" class="mr-2"> Success </a-button>
<a-button @click="handleErrorModal" color="error" class="mr-2"> Error </a-button> <a-button @click="handleErrorModal" color="error" class="mr-2"> Error </a-button>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</CollapseContainer> </CollapseContainer>
<CollapseContainer <CollapseContainer
class="px-20 bg-white w-full h-32 rounded-md mt-5" class="w-full h-32 mt-5 bg-white rounded-md"
title="Notification 用法与上面一致" title="Notification 用法与上面一致"
> >
<a-button @click="handleNotify" color="success" class="mr-2"> Success </a-button> <a-button @click="handleNotify" color="success" class="mr-2"> Success </a-button>
......
<template> <template>
<PageWrapper title="水印示例"> <PageWrapper title="水印示例">
<CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Global WaterMark"> <CollapseContainer class="w-full h-32 bg-white rounded-md" title="Global WaterMark">
<a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')"> <a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')">
Create Create
</a-button> </a-button>
......
<template> <template>
<div class="login"> <div class="login">
<div class="login-mask"></div> <div class="opacity-0 login-mask lg:opacity-100"></div>
<div class="login-form-wrap"> <div class="justify-center login-form-wrap lg:justify-end">
<div class="mx-6 login-form"> <div class="mx-6 login-form">
<AppLocalePicker v-if="showLocale" class="login-form__locale" /> <AppLocalePicker v-if="showLocale" class="login-form__locale" />
<div class="px-2 py-10 login-form__content"> <div class="px-2 py-10 login-form__content">
...@@ -164,13 +164,10 @@ ...@@ -164,13 +164,10 @@
background-size: 100% 100%; background-size: 100% 100%;
&-mask { &-mask {
display: none;
height: 100%; height: 100%;
background: url(../../../assets/images/login/login-in.png) no-repeat; background: url(../../../assets/images/login/login-in.png) no-repeat;
background-position: 30% 30%; background-position: 30% 30%;
background-size: 80% 80%; background-size: 80% 80%;
.respond-to(xlarge, { display: block;});
} }
&-form { &-form {
...@@ -182,7 +179,6 @@ ...@@ -182,7 +179,6 @@
border-width: 8px; border-width: 8px;
border-radius: 4px; border-radius: 4px;
background-clip: padding-box; background-clip: padding-box;
.respond-to(xlarge, { margin: 0 120px 0 50px});
&__main { &__main {
margin: 30px auto 0 auto !important; margin: 30px auto 0 auto !important;
...@@ -195,12 +191,7 @@ ...@@ -195,12 +191,7 @@
display: flex; display: flex;
width: 100%; width: 100%;
height: 100%; height: 100%;
// height: 90%;
justify-content: center;
align-items: center; align-items: center;
.respond-to(xlarge, {
justify-content: flex-end;
});
} }
&__content { &__content {
......
/* eslint-disable @typescript-eslint/no-var-requires */
const colors = require('windicss/colors');
const defaultTheme = require('windicss/defaultTheme');
module.exports = {
darkMode: 'class',
plugins: [
require('windicss/plugin/forms'),
require('windicss/plugin/typography'),
require('windicss/plugin/line-clamp'),
require('windicss/plugin/aspect-ratio'),
],
theme: {
extend: {
colors,
fontFamily: {
sans: ['Righteous', ...defaultTheme.fontFamily.sans],
},
},
},
};
...@@ -1112,10 +1112,10 @@ ...@@ -1112,10 +1112,10 @@
dependencies: dependencies:
cross-fetch "^3.0.6" cross-fetch "^3.0.6"
"@iconify/json@^1.1.299": "@iconify/json@^1.1.303":
version "1.1.299" version "1.1.303"
resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.299.tgz#e1aca556b83461316ba5ec04b232906b499a67a5" resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.303.tgz#364daf69a97c02647227cc0d851a2e79a893e8e3"
integrity sha512-oYHUgp5RZNE2CT3wKE/MWbmGK7lmubi30PD5l33HUU7yh4CznmzPL0Ewgg51Wn86NkFveZDcT+odMBTaayh9Ew== integrity sha512-O8KDBcIVQolvUeVL9JiEIc2ifYKWyKu/5cX6PNC4EAPvtfvieOHs1YVPV4tphVhafjTTftR5XbZBmZHKG6uNIA==
"@intlify/core-base@9.0.0-beta.16": "@intlify/core-base@9.0.0-beta.16":
version "9.0.0-beta.16" version "9.0.0-beta.16"
...@@ -1226,21 +1226,21 @@ ...@@ -1226,21 +1226,21 @@
"@nodelib/fs.scandir" "2.1.4" "@nodelib/fs.scandir" "2.1.4"
fastq "^1.6.0" fastq "^1.6.0"
"@purge-icons/core@^0.6.0": "@purge-icons/core@^0.7.0":
version "0.6.0" version "0.7.0"
resolved "https://registry.npmjs.org/@purge-icons/core/-/core-0.6.0.tgz#b966d042c504a256299b2d63b4d16ae26c9e0317" resolved "https://registry.npmjs.org/@purge-icons/core/-/core-0.7.0.tgz#097ba8d4d8b7e8d662df687bd2391eb8b83caba0"
integrity sha512-Gp7Fvx1mtPykejxldJ8+1o2C/Gzw54Mpv22JKNoKnaUlKGe1m4f0rAl2MgHDGJd/ghm4kDcfxFzjnna6Z4L5cA== integrity sha512-PaCeTFjkQUX+MzBsNg3L8x5aCZqXwaUSNw1FY3Jn7wlLqNqxRNoShw5P//a1DQAy7hLlUHvEL6IGeDoN/xf98A==
dependencies: dependencies:
"@iconify/iconify" "2.0.0-rc.6" "@iconify/iconify" "2.0.0-rc.6"
axios "^0.21.1" axios "^0.21.1"
debug "^4.3.2" debug "^4.3.2"
fast-glob "^3.2.4" fast-glob "^3.2.5"
fs-extra "^9.0.1" fs-extra "^9.1.0"
"@purge-icons/generated@^0.6.0": "@purge-icons/generated@^0.7.0":
version "0.6.0" version "0.7.0"
resolved "https://registry.npmjs.org/@purge-icons/generated/-/generated-0.6.0.tgz#2aa9a78fef6a4dc79d265c84548e110375b554df" resolved "https://registry.npmjs.org/@purge-icons/generated/-/generated-0.7.0.tgz#d87dbb3145e8b9a64e2e12ff660aa3cb13cbeb56"
integrity sha512-Xg2ckJu/wRSSNEloebCaKSIAamKMZffws4+2oOjA1J3JEyD5FlP3Ewt+kkcuun/i7Mo2czjTKJG9wwSwZgf0cg== integrity sha512-4SHVpZnKaW5ekRTjhPY9b1pALVlF0pDuGIDRAlxAm0V+gQVOL0+Ghav6U9XqXFj2kiG1+eQ8swpvB+kd0a+tqg==
dependencies: dependencies:
"@iconify/iconify" ">=2.0.0-rc.6" "@iconify/iconify" ">=2.0.0-rc.6"
...@@ -7859,13 +7859,13 @@ rollup-plugin-esbuild@^2.6.1: ...@@ -7859,13 +7859,13 @@ rollup-plugin-esbuild@^2.6.1:
joycon "^2.2.5" joycon "^2.2.5"
strip-json-comments "^3.1.1" strip-json-comments "^3.1.1"
rollup-plugin-purge-icons@^0.6.0: rollup-plugin-purge-icons@^0.7.0:
version "0.6.0" version "0.7.0"
resolved "https://registry.npmjs.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.6.0.tgz#cfddf4935107180bdb14385228449c0d8b0557a2" resolved "https://registry.npmjs.org/rollup-plugin-purge-icons/-/rollup-plugin-purge-icons-0.7.0.tgz#4419b810d5d75f1bba3af72a238e70b4a675f03c"
integrity sha512-8huBXnq7D1Lj2gPZP/rOjuj2hkZ3AXoGQc2r5+MK3lcD3xEgfuONd+G4WIk7P8wJTEVGux5xJ2Ho7nSISLqP1A== integrity sha512-zAff7SrjC2nA7TCm6gaOclh1cZ2IBupX1tnebn+sfvcvrezu+avS7k0BhhAC2pAtfhdOvD6G/2a+kkkm6hvpiw==
dependencies: dependencies:
"@purge-icons/core" "^0.6.0" "@purge-icons/core" "^0.7.0"
"@purge-icons/generated" "^0.6.0" "@purge-icons/generated" "^0.7.0"
rollup-plugin-terser@^7.0.0: rollup-plugin-terser@^7.0.0:
version "7.0.2" version "7.0.2"
...@@ -9334,19 +9334,19 @@ vite-plugin-mock@^2.1.4: ...@@ -9334,19 +9334,19 @@ vite-plugin-mock@^2.1.4:
rollup "^2.38.4" rollup "^2.38.4"
rollup-plugin-esbuild "^2.6.1" rollup-plugin-esbuild "^2.6.1"
vite-plugin-purge-icons@^0.6.0: vite-plugin-purge-icons@^0.7.0:
version "0.6.0" version "0.7.0"
resolved "https://registry.npmjs.org/vite-plugin-purge-icons/-/vite-plugin-purge-icons-0.6.0.tgz#f165266f157d88368edcc7ae3baf933d6d92e779" resolved "https://registry.npmjs.org/vite-plugin-purge-icons/-/vite-plugin-purge-icons-0.7.0.tgz#c460037438fd71372153360ccb9e7d97b030fb58"
integrity sha512-YGW3wh+Pj4Tob23x29+NgVkslru5tAInIMTY0J2eltDNy32RKxSRh8ohb+W0O/X9h2xKkMeiUpNI7mY6k8Uzsw== integrity sha512-oGZUKFAL4waIZIeiCPT5KZvGbBA500AO/03oxW+ODTKUMq+0jbh9s+T8NPzfJQFC1jtE7eUb2ium82IP/gxZjA==
dependencies: dependencies:
"@purge-icons/core" "^0.6.0" "@purge-icons/core" "^0.7.0"
"@purge-icons/generated" "^0.6.0" "@purge-icons/generated" "^0.7.0"
rollup-plugin-purge-icons "^0.6.0" rollup-plugin-purge-icons "^0.7.0"
vite-plugin-pwa@^0.4.6: vite-plugin-pwa@^0.4.7:
version "0.4.6" version "0.4.7"
resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.4.6.tgz#e759b7840211f83cae367d306654da505cecbceb" resolved "https://registry.npmjs.org/vite-plugin-pwa/-/vite-plugin-pwa-0.4.7.tgz#32d934171fc7ec5cada741c559b5fbf2fe5a39af"
integrity sha512-3LonumSG4EcH9FT61d7wWouHkCmEciy3RPfvt25b835HMx9gb2Dt71t140+85Z5d+uANMSguC3miBnnGzagAMA== integrity sha512-KsC9tenzn1r6AG/Hda4wg9Es6AokVRz2RqQp+R+uM3qvfNDbdDjJWAEhB/2zUx7D0YDu5Y0h+cDC0zD0vxBoog==
dependencies: dependencies:
debug "^4.3.2" debug "^4.3.2"
fast-glob "^3.2.5" fast-glob "^3.2.5"
...@@ -9376,10 +9376,18 @@ vite-plugin-theme@^0.4.3: ...@@ -9376,10 +9376,18 @@ vite-plugin-theme@^0.4.3:
es-module-lexer "^0.3.26" es-module-lexer "^0.3.26"
tinycolor2 "^1.4.2" tinycolor2 "^1.4.2"
vite@2.0.0-beta.70: vite-plugin-windicss@^0.2.2:
version "2.0.0-beta.70" version "0.2.2"
resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.70.tgz#ec0d4f2bfd02f31d2c59aa9760f27c26647f41ce" resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.2.2.tgz#2abf1533153f5dc214a9e1a06fb58274e5892c19"
integrity sha512-rbuAYZE8T0jNOUykkyfjiiKmz4MpW2KqzHO8++WCCDXyxzIg56ICQ/B6NLZzVpWyk0iSKiUKr2k8NMkmDlZAQQ== integrity sha512-P+iyrcuLjLfjiYP+bBisfKbg9bmeQMUBpjsTFJ9kWWX2fyqo968CHmS3euz+MzRcK5ZECccpOxx60ZXzc12VAw==
dependencies:
fast-glob "^3.2.5"
windicss "^2.1.11"
vite@2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/vite/-/vite-2.0.0.tgz#156f35eadaa7947629aa8a24eb23129b07116ee3"
integrity sha512-rNli5g0DaQ6+btlRqkmaR06neWaJGApmt40gocqrYDNi2XoEXYQgKiHSWzMeUgc1Cdva2HduqazaE+RaKjBpdQ==
dependencies: dependencies:
esbuild "^0.8.34" esbuild "^0.8.34"
postcss "^8.2.1" postcss "^8.2.1"
...@@ -9507,6 +9515,11 @@ which@^2.0.1: ...@@ -9507,6 +9515,11 @@ which@^2.0.1:
dependencies: dependencies:
isexe "^2.0.0" isexe "^2.0.0"
windicss@^2.1.11:
version "2.1.11"
resolved "https://registry.npmjs.org/windicss/-/windicss-2.1.11.tgz#35dc9d683488dcfacf94331967b59765a505f18b"
integrity sha512-79mPoUmvamwdJb+MJ/ug+XILxFzrTNCXo/HmacUn3V9sRQ6w5lA9KkpTrG70N7Oab0hbIFaq+X3Yva+QLSV0Pw==
wmf@~1.0.1: wmf@~1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da" resolved "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz#7d19d621071a08c2bdc6b7e688a9c435298cc2da"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册