Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
893f3c79
V
vue-vben-admin
项目概览
啊嘞嘞EC
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
893f3c79
编写于
6月 20, 2021
作者:
V
Vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(css): refactored windicss to tailwindcss
上级
e8d6f885
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
3075 addition
and
1425 deletion
+3075
-1425
.vscode/settings.json
.vscode/settings.json
+3
-1
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+8
-1
build/vite/plugin/index.ts
build/vite/plugin/index.ts
+0
-4
jest.config.mjs
jest.config.mjs
+0
-1
package.json
package.json
+4
-5
postcss.config.js
postcss.config.js
+1
-0
src/design/tailwind.css
src/design/tailwind.css
+1742
-0
src/main.ts
src/main.ts
+1
-2
src/utils/mitt.ts
src/utils/mitt.ts
+8
-0
src/views/dashboard/analysis/components/GrowCard.vue
src/views/dashboard/analysis/components/GrowCard.vue
+2
-2
src/views/dashboard/analysis/index.vue
src/views/dashboard/analysis/index.vue
+1
-1
src/views/dashboard/workbench/components/ProjectCard.vue
src/views/dashboard/workbench/components/ProjectCard.vue
+1
-1
src/views/dashboard/workbench/index.vue
src/views/dashboard/workbench/index.vue
+5
-1
src/views/sys/login/LoginForm.vue
src/views/sys/login/LoginForm.vue
+1
-1
stylelint.config.js
stylelint.config.js
+12
-1
tailwind.config.js
tailwind.config.js
+27
-21
yarn.lock
yarn.lock
+1259
-1383
未找到文件。
.vscode/settings.json
浏览文件 @
893f3c79
...
...
@@ -122,11 +122,13 @@
"vben"
,
"windi"
,
"browserslist"
,
"tailwindcss"
,
"esnext"
,
"antv"
,
"tinymce"
,
"qrcode"
,
"sider"
,
"pinia"
"pinia"
,
"sider"
]
}
CHANGELOG.zh_CN.md
浏览文件 @
893f3c79
## Wip
## 2.5.0(2021-06-20)
## (破坏性更新) Breaking changes
-
将项目
`windicss`
改为
`tailwindcss`
,解决内存溢出问题
-
目前项目不兼容地方有
-
`!xl:m-4`
之类的写法需要改为
`xl:!m-4`
,注意只有
`!`
这个不兼容,没用到则不用改
-
`windicss`
自身新增的特性需要调整,比如
`Attribute`
模式不兼容
### ✨ Refactor
...
...
build/vite/plugin/index.ts
浏览文件 @
893f3c79
...
...
@@ -5,7 +5,6 @@ import vueJsx from '@vitejs/plugin-vue-jsx';
import
legacy
from
'
@vitejs/plugin-legacy
'
;
import
purgeIcons
from
'
vite-plugin-purge-icons
'
;
import
windiCSS
from
'
vite-plugin-windicss
'
;
import
{
configHtmlPlugin
}
from
'
./html
'
;
import
{
configPwaConfig
}
from
'
./pwa
'
;
...
...
@@ -46,9 +45,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
// vite-plugin-svg-icons
vitePlugins
.
push
(
configSvgIconsPlugin
(
isBuild
));
// vite-plugin-windicss
vitePlugins
.
push
(
windiCSS
());
// vite-plugin-mock
VITE_USE_MOCK
&&
vitePlugins
.
push
(
configMockPlugin
(
isBuild
));
...
...
jest.config.mjs
浏览文件 @
893f3c79
...
...
@@ -17,7 +17,6 @@ export default {
],
transform
:
{
'
^.+
\\
.tsx?$
'
:
'
ts-jest
'
,
'
^.+
\\
.(vue)$
'
:
'
vue-jest
'
,
},
transformIgnorePatterns
:
[
'
<rootDir>/tests/__mocks__/
'
,
'
/node_modules/
'
],
// A map from regular expressions to module names that allow to stub out resources with a single module
...
...
package.json
浏览文件 @
893f3c79
...
...
@@ -87,9 +87,8 @@
"
@vitejs/plugin-vue
"
:
"
^1.2.3
"
,
"
@vitejs/plugin-vue-jsx
"
:
"
^1.1.5
"
,
"
@vue/compiler-sfc
"
:
"
3.0.11
"
,
"
@vue/test-utils
"
:
"
^2.0.0-rc.
6
"
,
"
@vue/test-utils
"
:
"
^2.0.0-rc.
7
"
,
"
autoprefixer
"
:
"
^10.2.6
"
,
"
babel-jest
"
:
"
^27.0.2
"
,
"
commitizen
"
:
"
^4.2.4
"
,
"
conventional-changelog-cli
"
:
"
^2.1.1
"
,
"
cross-env
"
:
"
^7.0.3
"
,
...
...
@@ -109,6 +108,7 @@
"
jest
"
:
"
^27.0.4
"
,
"
less
"
:
"
^4.1.1
"
,
"
lint-staged
"
:
"
^11.0.0
"
,
"
npm-run-all
"
:
"
^4.1.5
"
,
"
postcss
"
:
"
^8.3.5
"
,
"
prettier
"
:
"
^2.3.1
"
,
"
pretty-quick
"
:
"
^3.1.1
"
,
...
...
@@ -118,10 +118,11 @@
"
stylelint-config-prettier
"
:
"
^8.0.2
"
,
"
stylelint-config-standard
"
:
"
^22.0.0
"
,
"
stylelint-order
"
:
"
^4.1.0
"
,
"
tailwindcss
"
:
"
^2.2.2
"
,
"
ts-jest
"
:
"
^27.0.3
"
,
"
ts-node
"
:
"
^10.0.0
"
,
"
typescript
"
:
"
4.3.4
"
,
"
vite
"
:
"
2.3.
7
"
,
"
vite
"
:
"
2.3.
8
"
,
"
vite-plugin-compression
"
:
"
^0.2.5
"
,
"
vite-plugin-html
"
:
"
^2.0.7
"
,
"
vite-plugin-imagemin
"
:
"
^0.3.2
"
,
...
...
@@ -131,9 +132,7 @@
"
vite-plugin-style-import
"
:
"
^1.0.0
"
,
"
vite-plugin-svg-icons
"
:
"
^0.7.1
"
,
"
vite-plugin-theme
"
:
"
^0.8.1
"
,
"
vite-plugin-windicss
"
:
"
^1.0.4
"
,
"
vue-eslint-parser
"
:
"
^7.6.0
"
,
"
vue-jest
"
:
"
^5.0.0-alpha.10
"
,
"
vue-tsc
"
:
"
^0.1.7
"
},
"resolutions"
:
{
...
...
postcss.config.js
浏览文件 @
893f3c79
module
.
exports
=
{
plugins
:
{
tailwindcss
:
{},
autoprefixer
:
{},
},
};
src/design/tailwind.css
0 → 100644
浏览文件 @
893f3c79
此差异已折叠。
点击以展开。
src/main.ts
浏览文件 @
893f3c79
import
'
/@/design/index.less
'
;
import
'
/@/design/tailwind.css
'
;
// Register windi
import
'
virtual:windi.css
'
;
// Register icon sprite
import
'
virtual:svg-icons-register
'
;
...
...
src/utils/mitt.ts
浏览文件 @
893f3c79
...
...
@@ -27,6 +27,7 @@ export interface Emitter {
emit
<
T
=
any
>
(
type
:
EventType
,
event
?:
T
):
void
;
emit
(
type
:
'
*
'
,
event
?:
any
):
void
;
clear
():
void
;
}
/**
...
...
@@ -88,5 +89,12 @@ export default function mitt(all?: EventHandlerMap): Emitter {
handler
(
type
,
evt
);
});
},
/**
* Clear all
*/
clear
()
{
this
.
all
.
clear
();
},
};
}
src/views/dashboard/analysis/components/GrowCard.vue
浏览文件 @
893f3c79
...
...
@@ -5,8 +5,8 @@
size=
"small"
:loading=
"$attrs.loading"
:title=
"item.title"
class=
"md:w-1/4 w-full
!md:
mt-0 !mt-4"
:class=
"[index + 1
<
4
&&
'
!
md:
mr-4
']"
class=
"md:w-1/4 w-full
md:!
mt-0 !mt-4"
:class=
"[index + 1
<
4
&&
'
md:
!
mr-4
']"
:canExpan=
"false"
>
<template
#extra
>
...
...
src/views/dashboard/analysis/index.vue
浏览文件 @
893f3c79
...
...
@@ -6,7 +6,7 @@
<div
class=
"md:flex enter-y"
>
<VisitRadar
class=
"md:w-1/3 w-full"
:loading=
"loading"
/>
<VisitSource
class=
"md:w-1/3
!md:mx-4 !md:
my-0 !my-4 w-full"
:loading=
"loading"
/>
<VisitSource
class=
"md:w-1/3
md:!mx-4 md:!
my-0 !my-4 w-full"
:loading=
"loading"
/>
<SalesProductPie
class=
"md:w-1/3 w-full"
:loading=
"loading"
/>
</div>
</div>
...
...
src/views/dashboard/workbench/components/ProjectCard.vue
浏览文件 @
893f3c79
...
...
@@ -5,7 +5,7 @@
</
template
>
<
template
v-for=
"item in items"
:key=
"item"
>
<CardGrid
class=
"
!md:
w-1/3 !w-full"
>
<CardGrid
class=
"
md:!
w-1/3 !w-full"
>
<span
class=
"flex"
>
<Icon
:icon=
"item.icon"
:color=
"item.color"
size=
"30"
/>
<span
class=
"text-lg ml-4"
>
{{
item
.
title
}}
</span>
...
...
src/views/dashboard/workbench/index.vue
浏览文件 @
893f3c79
...
...
@@ -10,7 +10,11 @@
<QuickNav
:loading=
"loading"
class=
"enter-y"
/>
<Card
class=
"!my-4 enter-y"
:loading=
"loading"
>
<img
class=
"xl:h-50 h-30 mx-auto"
src=
"../../../assets/svg/illustration.svg"
/>
<img
style=
"height: 216px"
class=
"h-20 mx-auto"
src=
"../../../assets/svg/illustration.svg"
/>
</Card>
<SaleRadar
:loading=
"loading"
class=
"enter-y"
/>
...
...
src/views/sys/login/LoginForm.vue
浏览文件 @
893f3c79
...
...
@@ -53,7 +53,7 @@
{{
t
(
'
sys.login.mobileSignInFormTitle
'
)
}}
</Button>
</ACol>
<ACol
:md=
"8"
:xs=
"24"
class=
"!my-2
!md:
my-0 xs:mx-0 md:mx-2"
>
<ACol
:md=
"8"
:xs=
"24"
class=
"!my-2
md:!
my-0 xs:mx-0 md:mx-2"
>
<Button
block
@
click=
"setLoginState(LoginStateEnum.QR_CODE)"
>
{{
t
(
'
sys.login.qrSignInFormTitle
'
)
}}
</Button>
...
...
stylelint.config.js
浏览文件 @
893f3c79
...
...
@@ -18,7 +18,18 @@ module.exports = {
'
at-rule-no-unknown
'
:
[
true
,
{
ignoreAtRules
:
[
'
function
'
,
'
if
'
,
'
each
'
,
'
include
'
,
'
mixin
'
],
ignoreAtRules
:
[
'
tailwind
'
,
'
apply
'
,
'
variants
'
,
'
responsive
'
,
'
screen
'
,
'
function
'
,
'
if
'
,
'
each
'
,
'
include
'
,
'
mixin
'
,
],
},
],
'
no-empty-source
'
:
null
,
...
...
windi.config.t
s
→
tailwind.config.j
s
浏览文件 @
893f3c79
import
lineClamp
from
'
windicss/plugin/line-clamp
'
;
import
colors
from
'
windicss/colors
'
;
const
colors
=
require
(
'
tailwindcss/colors
'
);
import
{
defineConfig
}
from
'
vite-plugin-windicss
'
;
import
{
primaryColor
}
from
'
./build/config/themeConfig
'
;
export
default
defineConfig
({
darkMode
:
'
class
'
,
plugins
:
[
lineClamp
,
createEnterPlugin
()],
module
.
exports
=
{
mode
:
'
jit
'
,
// darkMode: 'class',
plugins
:
[
createEnterPlugin
()],
purge
:
{
enabled
:
false
,
content
:
[
'
./index.html
'
,
'
./src/**/*.{vue,ts,tsx}
'
],
},
theme
:
{
extend
:
{
colors
:
{
...
colors
,
primary
:
primaryColor
,
zIndex
:
{
'
-1
'
:
'
-1
'
,
},
screens
:
{
sm
:
'
576px
'
,
md
:
'
768px
'
,
lg
:
'
992px
'
,
xl
:
'
1200px
'
,
'
2xl
'
:
'
1600px
'
,
},
colors
:
{
...
colors
,
primary
:
{
DEFAULT
:
'
#0960bd
'
,
// dark: primaryColorDark
,
},
},
screens
:
{
sm
:
'
576px
'
,
md
:
'
768px
'
,
lg
:
'
992px
'
,
xl
:
'
1200px
'
,
'
2xl
'
:
'
1600px
'
,
},
},
});
};
/**
* Used for animation when the element is displayed
* @param maxOutput The larger the maxOutput output, the larger the generated css volume
*/
function
createEnterPlugin
(
maxOutput
=
10
)
{
const
createCss
=
(
index
:
number
,
d
=
'
x
'
)
=>
{
function
createEnterPlugin
(
maxOutput
=
6
)
{
const
createCss
=
(
index
,
d
=
'
x
'
)
=>
{
const
upd
=
d
.
toUpperCase
();
return
{
[
`*> .enter-
${
d
}
:nth-child(
${
index
}
)`
]:
{
...
...
yarn.lock
浏览文件 @
893f3c79
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录