diff --git a/.env b/.env
index f5fa246e..51d5db51 100644
--- a/.env
+++ b/.env
@@ -2,7 +2,7 @@
VITE_PORT = 3100
# spa-title
-VITE_GLOB_APP_TITLE = vben admin 2.0
+VITE_GLOB_APP_TITLE = Vben Admin 2.0
# spa shortname
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin_2x
diff --git a/README.md b/README.md
index 8c133fdf..93a3588b 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,8 @@
[2.0 在线预览](https://vvbin.cn/next/)
+测试账号: vben/123456
+
diff --git a/package.json b/package.json
index 44b56a85..43e7bcc2 100644
--- a/package.json
+++ b/package.json
@@ -82,7 +82,6 @@
"stylelint-config-prettier": "^8.0.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-order": "^4.1.0",
- "tailwindcss": "^1.8.13",
"tasksfile": "^5.1.1",
"ts-node": "^9.0.0",
"typescript": "^4.0.3",
diff --git a/postcss.config.js b/postcss.config.js
index c0544b48..501d0498 100755
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -1,4 +1,4 @@
const path = require('path');
module.exports = {
- plugins: [require('tailwindcss'), require('autoprefixer'), require('postcss-import')],
+ plugins: [require('autoprefixer'), require('postcss-import')],
};
diff --git a/src/components/Basic/src/BasicArrow.vue b/src/components/Basic/src/BasicArrow.vue
index eb816d5e..00f5ad23 100644
--- a/src/components/Basic/src/BasicArrow.vue
+++ b/src/components/Basic/src/BasicArrow.vue
@@ -37,7 +37,7 @@
diff --git a/src/components/Container/src/collapse/CollapseContainer.vue b/src/components/Container/src/collapse/CollapseContainer.vue
index a3eb13bd..dfb5a271 100644
--- a/src/components/Container/src/collapse/CollapseContainer.vue
+++ b/src/components/Container/src/collapse/CollapseContainer.vue
@@ -1,5 +1,5 @@
-
+
@@ -92,7 +92,6 @@
diff --git a/src/components/Loading/FullLoading.vue b/src/components/Loading/FullLoading.vue
index e06a6489..ba82bc13 100644
--- a/src/components/Loading/FullLoading.vue
+++ b/src/components/Loading/FullLoading.vue
@@ -1,8 +1,5 @@
-
@@ -39,3 +36,13 @@
},
});
+
diff --git a/src/design/global.less b/src/design/global.less
new file mode 100644
index 00000000..e8f1d09d
--- /dev/null
+++ b/src/design/global.less
@@ -0,0 +1,50 @@
+@import './helper/distance.less';
+// 生成样式
+.distance();
+
+.hidden {
+ display: none !important;
+}
+
+.flex {
+ display: flex;
+}
+
+.flex-wrap {
+ flex-wrap: wrap;
+}
+
+.justify-center {
+ justify-content: center;
+}
+
+.items-center {
+ align-items: center;
+}
+
+.justify-start {
+ justify-content: start;
+}
+
+.justify-end {
+ justify-content: 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;
+}
diff --git a/src/design/helper/distance.less b/src/design/helper/distance.less
new file mode 100644
index 00000000..de9e8b9f
--- /dev/null
+++ b/src/design/helper/distance.less
@@ -0,0 +1,38 @@
+@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);
+}
diff --git a/src/design/helper/loop.less b/src/design/helper/loop.less
new file mode 100644
index 00000000..62d02724
--- /dev/null
+++ b/src/design/helper/loop.less
@@ -0,0 +1,67 @@
+.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();
+}
diff --git a/src/design/index.less b/src/design/index.less
index 1bf272e6..542632b4 100644
--- a/src/design/index.less
+++ b/src/design/index.less
@@ -3,6 +3,7 @@
@import 'public.less';
@import 'mixins.less';
@import 'ant/index.less';
+@import './global.less';
*,
*::before,
diff --git a/src/design/main.postcss b/src/design/main.postcss
deleted file mode 100644
index a31e4441..00000000
--- a/src/design/main.postcss
+++ /dev/null
@@ -1,3 +0,0 @@
-@import 'tailwindcss/base';
-@import 'tailwindcss/components';
-@import 'tailwindcss/utilities';
diff --git a/src/design/mixins.less b/src/design/mixins.less
index 2346a040..e028e5b9 100644
--- a/src/design/mixins.less
+++ b/src/design/mixins.less
@@ -42,13 +42,6 @@
user-select: none;
}
-.ellipsis {
- overflow: hidden;
- text-overflow: ellipsis;
- word-wrap: normal;
- white-space: nowrap;
-}
-
/* 适用于webkit内核和移动端 */
.ellipsis-multiple(@num: 1) {
display: -webkit-box;
@@ -56,3 +49,54 @@
-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();
+ }
+}
diff --git a/src/layouts/Logo.vue b/src/layouts/Logo.vue
index 545e7fce..38235686 100644
--- a/src/layouts/Logo.vue
+++ b/src/layouts/Logo.vue
@@ -1,9 +1,7 @@
-
+
-
{{
- globSetting.title
- }}
+
{{ globSetting.title }}
+
diff --git a/src/layouts/default/LayoutBreadcrumb.tsx b/src/layouts/default/LayoutBreadcrumb.tsx
index 0a07cf29..ec4554f1 100644
--- a/src/layouts/default/LayoutBreadcrumb.tsx
+++ b/src/layouts/default/LayoutBreadcrumb.tsx
@@ -65,7 +65,7 @@ export default defineComponent({
return () => (
<>
-
+
{() => (
<>
diff --git a/src/layouts/default/LayoutHeader.tsx b/src/layouts/default/LayoutHeader.tsx
index 9356871f..9ef2c8bf 100644
--- a/src/layouts/default/LayoutHeader.tsx
+++ b/src/layouts/default/LayoutHeader.tsx
@@ -55,23 +55,17 @@ export default defineComponent({
const isSidebarType = menuType === MenuTypeEnum.SIDEBAR;
return (
-
+