Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
一臭打代码的 aka 潘先生です
vue-vben-admin
提交
6392b7f0
V
vue-vben-admin
项目概览
一臭打代码的 aka 潘先生です
/
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 搜索 >>
提交
6392b7f0
编写于
1月 18, 2021
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: remove global import
上级
c2f6542b
变更
38
显示空白变更内容
内联
并排
Showing
38 changed file
with
256 addition
and
162 deletion
+256
-162
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+2
-0
build/vite/plugin/style-import.ts
build/vite/plugin/style-import.ts
+2
-13
package.json
package.json
+2
-3
src/assets/images/sidebar/dark.png
src/assets/images/sidebar/dark.png
+0
-0
src/components/Application/src/search/AppSearchModal.vue
src/components/Application/src/search/AppSearchModal.vue
+2
-1
src/components/Form/src/components/FormAction.vue
src/components/Form/src/components/FormAction.vue
+2
-1
src/components/Page/src/PageWrapper.vue
src/components/Page/src/PageWrapper.vue
+9
-5
src/components/registerGlobComp.ts
src/components/registerGlobComp.ts
+69
-71
src/design/ant/pagination.less
src/design/ant/pagination.less
+2
-2
src/layouts/default/header/components/Breadcrumb.vue
src/layouts/default/header/components/Breadcrumb.vue
+4
-2
src/layouts/default/header/components/notify/NoticeList.vue
src/layouts/default/header/components/notify/NoticeList.vue
+8
-1
src/locales/useLocale.ts
src/locales/useLocale.ts
+2
-4
src/views/dashboard/analysis/index.vue
src/views/dashboard/analysis/index.vue
+3
-1
src/views/dashboard/workbench/index.vue
src/views/dashboard/workbench/index.vue
+10
-1
src/views/demo/comp/button/index.vue
src/views/demo/comp/button/index.vue
+1
-0
src/views/demo/comp/loading/index.vue
src/views/demo/comp/loading/index.vue
+2
-1
src/views/demo/comp/upload/index.vue
src/views/demo/comp/upload/index.vue
+2
-1
src/views/demo/feat/copy/index.vue
src/views/demo/feat/copy/index.vue
+2
-1
src/views/demo/feat/download/index.vue
src/views/demo/feat/download/index.vue
+2
-1
src/views/demo/feat/tabs/index.vue
src/views/demo/feat/tabs/index.vue
+3
-1
src/views/demo/form/CustomerForm.vue
src/views/demo/form/CustomerForm.vue
+1
-1
src/views/demo/page/account/center/Application.vue
src/views/demo/page/account/center/Application.vue
+3
-1
src/views/demo/page/account/center/Project.vue
src/views/demo/page/account/center/Project.vue
+3
-1
src/views/demo/page/account/center/index.vue
src/views/demo/page/account/center/index.vue
+3
-1
src/views/demo/page/account/setting/BaseSetting.vue
src/views/demo/page/account/setting/BaseSetting.vue
+10
-2
src/views/demo/page/desc/basic/index.vue
src/views/demo/page/desc/basic/index.vue
+2
-1
src/views/demo/page/desc/high/index.vue
src/views/demo/page/desc/high/index.vue
+15
-1
src/views/demo/page/form/high/index.vue
src/views/demo/page/form/high/index.vue
+2
-1
src/views/demo/page/form/step/Step1.vue
src/views/demo/page/form/step/Step1.vue
+9
-1
src/views/demo/page/form/step/Step2.vue
src/views/demo/page/form/step/Step2.vue
+8
-1
src/views/demo/page/form/step/Step3.vue
src/views/demo/page/form/step/Step3.vue
+6
-2
src/views/demo/page/form/step/index.vue
src/views/demo/page/form/step/index.vue
+9
-1
src/views/demo/page/list/basic/index.vue
src/views/demo/page/list/basic/index.vue
+12
-2
src/views/demo/page/list/card/index.vue
src/views/demo/page/list/card/index.vue
+10
-1
src/views/demo/page/list/search/index.vue
src/views/demo/page/list/search/index.vue
+10
-1
src/views/sys/login/Login.vue
src/views/sys/login/Login.vue
+13
-24
vite.config.ts
vite.config.ts
+2
-1
yarn.lock
yarn.lock
+9
-9
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
6392b7f0
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
### ✨ Refactor
### ✨ Refactor
-
新增
`SimpleMenu`
组件替代左侧菜单组件(顶部菜单没有替换,功能尽量做到简单不卡)。解决菜单卡顿问题。
-
新增
`SimpleMenu`
组件替代左侧菜单组件(顶部菜单没有替换,功能尽量做到简单不卡)。解决菜单卡顿问题。
-
`ant-design-vue`
组件不再全局注册。以便于更好配合 css 按需引入。如果需要全局注册,需要自己加
### ✨ Features
### ✨ Features
...
@@ -13,6 +14,7 @@
...
@@ -13,6 +14,7 @@
-
修复
`TableAction`
图标问题
-
修复
`TableAction`
图标问题
-
修复菜单折叠按钮丢失问题
-
修复菜单折叠按钮丢失问题
-
修复菜单相关问题
-
修复菜单相关问题
-
修复 moment 多语言问题
## 2.0.0-rc.16 (2020-01-12)
## 2.0.0-rc.16 (2020-01-12)
...
...
build/vite/plugin/style-import.ts
浏览文件 @
6392b7f0
...
@@ -5,20 +5,9 @@ export function configStyleImportConfig() {
...
@@ -5,20 +5,9 @@ export function configStyleImportConfig() {
libs
:
[
libs
:
[
{
{
libraryName
:
'
ant-design-vue
'
,
libraryName
:
'
ant-design-vue
'
,
esModule
:
true
,
resolveStyle
:
(
name
)
=>
{
resolveStyle
:
(
name
)
=>
{
// ! col row popconfirm These three components have no corresponding css files after packaging. Need special treatment
return
`ant-design-vue/es/
${
name
}
/style/css`
;
if
([
'
col
'
,
'
row
'
].
includes
(
name
))
{
return
'
ant-design-vue/lib/grid/style/index.css
'
;
}
if
([
'
popconfirm
'
].
includes
(
name
))
{
return
[
'
ant-design-vue/lib/popover/style/index.css
'
,
'
ant-design-vue/lib/button/style/index.css
'
,
];
}
return
`ant-design-vue/lib/
${
name
}
/style/index.css`
;
},
},
},
},
],
],
...
...
package.json
浏览文件 @
6392b7f0
...
@@ -29,7 +29,6 @@
...
@@ -29,7 +29,6 @@
"
echarts
"
:
"
^4.9.0
"
,
"
echarts
"
:
"
^4.9.0
"
,
"
lodash-es
"
:
"
^4.17.20
"
,
"
lodash-es
"
:
"
^4.17.20
"
,
"
mockjs
"
:
"
^1.1.0
"
,
"
mockjs
"
:
"
^1.1.0
"
,
"
moment
"
:
"
^2.29.1
"
,
"
nprogress
"
:
"
^0.2.0
"
,
"
nprogress
"
:
"
^0.2.0
"
,
"
path-to-regexp
"
:
"
^6.2.0
"
,
"
path-to-regexp
"
:
"
^6.2.0
"
,
"
qrcode
"
:
"
^1.4.4
"
,
"
qrcode
"
:
"
^1.4.4
"
,
...
@@ -98,12 +97,12 @@
...
@@ -98,12 +97,12 @@
"
stylelint-order
"
:
"
^4.1.0
"
,
"
stylelint-order
"
:
"
^4.1.0
"
,
"
ts-node
"
:
"
^9.1.0
"
,
"
ts-node
"
:
"
^9.1.0
"
,
"
typescript
"
:
"
^4.1.3
"
,
"
typescript
"
:
"
^4.1.3
"
,
"
vite
"
:
"
^2.0.0-beta.3
0
"
,
"
vite
"
:
"
^2.0.0-beta.3
1
"
,
"
vite-plugin-html
"
:
"
^2.0.0-beta.5
"
,
"
vite-plugin-html
"
:
"
^2.0.0-beta.5
"
,
"
vite-plugin-mock
"
:
"
^2.0.0-beta.3
"
,
"
vite-plugin-mock
"
:
"
^2.0.0-beta.3
"
,
"
vite-plugin-purge-icons
"
:
"
^0.5.1
"
,
"
vite-plugin-purge-icons
"
:
"
^0.5.1
"
,
"
vite-plugin-pwa
"
:
"
^0.3.8
"
,
"
vite-plugin-pwa
"
:
"
^0.3.8
"
,
"
vite-plugin-style-import
"
:
"
^0.
2.1
"
,
"
vite-plugin-style-import
"
:
"
^0.
4.0
"
,
"
vue-eslint-parser
"
:
"
^7.3.0
"
,
"
vue-eslint-parser
"
:
"
^7.3.0
"
,
"
yargs
"
:
"
^16.2.0
"
"
yargs
"
:
"
^16.2.0
"
},
},
...
...
src/assets/images/sidebar/dark.png
已删除
100644 → 0
浏览文件 @
c2f6542b
24.8 KB
src/components/Application/src/search/AppSearchModal.vue
浏览文件 @
6392b7f0
...
@@ -63,10 +63,11 @@
...
@@ -63,10 +63,11 @@
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
import
{
useI18n
}
from
'
/@/hooks/web/useI18n
'
;
import
{
useAppInject
}
from
'
/@/hooks/web/useAppInject
'
;
import
{
useAppInject
}
from
'
/@/hooks/web/useAppInject
'
;
import
clickOutside
from
'
/@/directives/clickOutside
'
;
import
clickOutside
from
'
/@/directives/clickOutside
'
;
import
{
Input
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'
AppSearchModal
'
,
name
:
'
AppSearchModal
'
,
components
:
{
SearchOutlined
,
AppSearchFooter
},
components
:
{
SearchOutlined
,
AppSearchFooter
,
[
Input
.
name
]:
Input
},
emits
:
[
'
close
'
],
emits
:
[
'
close
'
],
props
:
{
props
:
{
...
...
src/components/Form/src/components/FormAction.vue
浏览文件 @
6392b7f0
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
import
type
{
ButtonProps
}
from
'
ant-design-vue/es/button/buttonTypes
'
;
import
type
{
ButtonProps
}
from
'
ant-design-vue/es/button/buttonTypes
'
;
import
{
defineComponent
,
computed
,
PropType
}
from
'
vue
'
;
import
{
defineComponent
,
computed
,
PropType
}
from
'
vue
'
;
import
{
Form
}
from
'
ant-design-vue
'
;
import
{
Form
,
Col
}
from
'
ant-design-vue
'
;
import
{
Button
}
from
'
/@/components/Button
'
;
import
{
Button
}
from
'
/@/components/Button
'
;
import
{
BasicArrow
}
from
'
/@/components/Basic/index
'
;
import
{
BasicArrow
}
from
'
/@/components/Basic/index
'
;
import
{
useFormContext
}
from
'
../hooks/useFormContext
'
;
import
{
useFormContext
}
from
'
../hooks/useFormContext
'
;
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
FormItem
:
Form
.
Item
,
FormItem
:
Form
.
Item
,
Button
,
Button
,
BasicArrow
,
BasicArrow
,
[
Col
.
name
]:
Col
,
},
},
props
:
{
props
:
{
showActionButtonGroup
:
propTypes
.
bool
.
def
(
true
),
showActionButtonGroup
:
propTypes
.
bool
.
def
(
true
),
...
...
src/components/Page/src/PageWrapper.vue
浏览文件 @
6392b7f0
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
setup
(
props
,
{
slots
})
{
setup
(
props
,
{
slots
})
{
const
headerRef
=
ref
<
ComponentRef
>
(
null
);
const
headerRef
=
ref
<
ComponentRef
>
(
null
);
const
footerRef
=
ref
<
ComponentRef
>
(
null
);
const
footerRef
=
ref
<
ComponentRef
>
(
null
);
const
footerHeight
=
ref
(
0
);
const
{
prefixCls
}
=
useDesign
(
'
page-wrapper
'
);
const
{
prefixCls
}
=
useDesign
(
'
page-wrapper
'
);
const
{
contentHeight
,
setPageHeight
,
pageHeight
}
=
usePageContext
();
const
{
contentHeight
,
setPageHeight
,
pageHeight
}
=
usePageContext
();
...
@@ -80,30 +81,33 @@
...
@@ -80,30 +81,33 @@
...
bg
,
...
bg
,
...
contentStyle
,
...
contentStyle
,
minHeight
:
`
${
unref
(
pageHeight
)}
px`
,
minHeight
:
`
${
unref
(
pageHeight
)}
px`
,
paddingBottom
:
`
${
unref
(
footerHeight
)}
px`
,
};
};
}
}
);
);
watch
(
watch
(
()
=>
contentHeight
?.
value
,
()
=>
[
contentHeight
?.
value
,
getShowFooter
.
value
]
,
(
height
)
=>
{
()
=>
{
if
(
!
props
.
contentFullHeight
)
{
if
(
!
props
.
contentFullHeight
)
{
return
;
return
;
}
}
nextTick
(()
=>
{
nextTick
(()
=>
{
const
footer
=
unref
(
footerRef
);
const
footer
=
unref
(
footerRef
);
const
header
=
unref
(
headerRef
);
const
header
=
unref
(
headerRef
);
let
footetHeight
=
0
;
footerHeight
.
value
=
0
;
const
footerEl
=
footer
?.
$el
;
const
footerEl
=
footer
?.
$el
;
if
(
footerEl
)
{
if
(
footerEl
)
{
foote
tHeight
+=
footerEl
?.
offsetHeight
??
0
;
foote
rHeight
.
value
+=
footerEl
?.
offsetHeight
??
0
;
}
}
let
headerHeight
=
0
;
let
headerHeight
=
0
;
const
headerEl
=
header
?.
$el
;
const
headerEl
=
header
?.
$el
;
if
(
headerEl
)
{
if
(
headerEl
)
{
headerHeight
+=
headerEl
?.
offsetHeight
??
0
;
headerHeight
+=
headerEl
?.
offsetHeight
??
0
;
}
}
setPageHeight
?.(
height
-
footetHeight
-
headerHeight
);
setPageHeight
?.(
unref
(
contentHeight
)
-
unref
(
footerHeight
)
-
headerHeight
);
});
});
},
},
{
{
...
...
src/components/registerGlobComp.ts
浏览文件 @
6392b7f0
...
@@ -5,48 +5,46 @@ import {
...
@@ -5,48 +5,46 @@ import {
Button
as
AntButton
,
Button
as
AntButton
,
// Optional
// Optional
Select
,
//
Select,
Alert
,
//
Alert,
Checkbox
,
//
Checkbox,
DatePicker
,
//
DatePicker,
Radio
,
//
Radio,
Switch
,
//
Switch,
Card
,
//
Card,
List
,
//
List,
Tabs
,
//
Tabs,
Descriptions
,
//
Descriptions,
Tree
,
//
Tree,
Table
,
//
Table,
Divider
,
//
Divider,
Modal
,
//
Modal,
Drawer
,
//
Drawer,
Dropdown
,
//
Dropdown,
Tag
,
//
Tag,
Tooltip
,
//
Tooltip,
Badge
,
//
Badge,
Popover
,
//
Popover,
Upload
,
//
Upload,
Transfer
,
//
Transfer,
Steps
,
//
Steps,
PageHeader
,
//
PageHeader,
Result
,
//
Result,
Empty
,
//
Empty,
Avatar
,
//
Avatar,
Menu
,
//
Menu,
Breadcrumb
,
//
Breadcrumb,
Form
,
//
Form,
Input
,
//
Input,
Row
,
//
Row,
Col
,
//
Col,
Spin
,
//
Spin,
}
from
'
ant-design-vue
'
;
}
from
'
ant-design-vue
'
;
// import 'ant-design-vue/dist/antd.css';
import
{
App
}
from
'
vue
'
;
import
{
App
}
from
'
vue
'
;
const
compList
=
[
Icon
,
Button
,
AntButton
.
Group
];
const
compList
=
[
Icon
,
Button
,
AntButton
.
Group
];
// Fix hmr multiple registered components
export
function
registerGlobComp
(
app
:
App
)
{
export
function
registerGlobComp
(
app
:
App
)
{
compList
.
forEach
((
comp
:
any
)
=>
{
compList
.
forEach
((
comp
:
any
)
=>
{
app
.
component
(
comp
.
name
,
comp
);
app
.
component
(
comp
.
name
,
comp
);
...
@@ -55,39 +53,39 @@ export function registerGlobComp(app: App) {
...
@@ -55,39 +53,39 @@ export function registerGlobComp(app: App) {
// Optional
// Optional
// If you need to customize global components, you can write here
// If you need to customize global components, you can write here
// If you don’t need it, you can delete it
// If you don’t need it, you can delete it
app
//
app
.
use
(
Select
)
//
.use(Select)
.
use
(
Alert
)
//
.use(Alert)
.
use
(
Breadcrumb
)
//
.use(Breadcrumb)
.
use
(
Checkbox
)
//
.use(Checkbox)
.
use
(
DatePicker
)
//
.use(DatePicker)
.
use
(
Radio
)
//
.use(Radio)
.
use
(
Switch
)
//
.use(Switch)
.
use
(
Card
)
//
.use(Card)
.
use
(
List
)
//
.use(List)
.
use
(
Descriptions
)
//
.use(Descriptions)
.
use
(
Tree
)
//
.use(Tree)
.
use
(
Table
)
//
.use(Table)
.
use
(
Divider
)
//
.use(Divider)
.
use
(
Modal
)
//
.use(Modal)
.
use
(
Drawer
)
//
.use(Drawer)
.
use
(
Dropdown
)
//
.use(Dropdown)
.
use
(
Tag
)
//
.use(Tag)
.
use
(
Tooltip
)
//
.use(Tooltip)
.
use
(
Badge
)
//
.use(Badge)
.
use
(
Popover
)
//
.use(Popover)
.
use
(
Upload
)
//
.use(Upload)
.
use
(
Transfer
)
//
.use(Transfer)
.
use
(
Steps
)
//
.use(Steps)
.
use
(
PageHeader
)
//
.use(PageHeader)
.
use
(
Result
)
//
.use(Result)
.
use
(
Empty
)
//
.use(Empty)
.
use
(
Avatar
)
//
.use(Avatar)
.
use
(
Menu
)
//
.use(Menu)
.
use
(
Tabs
)
//
.use(Tabs)
.
use
(
Form
)
//
.use(Form)
.
use
(
Input
)
//
.use(Input)
.
use
(
Row
)
//
.use(Row)
.
use
(
Col
)
//
.use(Col)
.
use
(
Spin
);
//
.use(Spin);
}
}
src/design/ant/pagination.less
浏览文件 @
6392b7f0
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
.ant-pagination-prev,
.ant-pagination-prev,
.ant-pagination-next,
.ant-pagination-next,
.ant-pagination-item {
.ant-pagination-item {
margin: 0 4px;
margin: 0 4px
!important
;
background: #f4f4f5 !important;
background: #f4f4f5 !important;
border: none;
border: none;
border-radius: none !important;
border-radius: none !important;
...
@@ -61,6 +61,6 @@
...
@@ -61,6 +61,6 @@
}
}
&-disabled {
&-disabled {
display: none;
display: none
!important
;
}
}
}
}
src/layouts/default/header/components/Breadcrumb.vue
浏览文件 @
6392b7f0
...
@@ -14,10 +14,12 @@
...
@@ -14,10 +14,12 @@
</div>
</div>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
type
{
RouteLocationMatched
}
from
'
vue-router
'
;
import
{
defineComponent
,
ref
,
toRaw
,
watchEffect
}
from
'
vue
'
;
import
{
defineComponent
,
ref
,
toRaw
,
watchEffect
}
from
'
vue
'
;
import
{
Breadcrumb
}
from
'
ant-design-vue
'
;
import
{
useI18n
}
from
'
vue-i18n
'
;
import
{
useI18n
}
from
'
vue-i18n
'
;
import
type
{
RouteLocationMatched
}
from
'
vue-router
'
;
import
{
useRouter
}
from
'
vue-router
'
;
import
{
useRouter
}
from
'
vue-router
'
;
import
{
filter
}
from
'
/@/utils/helper/treeHelper
'
;
import
{
filter
}
from
'
/@/utils/helper/treeHelper
'
;
import
{
REDIRECT_NAME
}
from
'
/@/router/constant
'
;
import
{
REDIRECT_NAME
}
from
'
/@/router/constant
'
;
...
@@ -35,7 +37,7 @@
...
@@ -35,7 +37,7 @@
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'
LayoutBreadcrumb
'
,
name
:
'
LayoutBreadcrumb
'
,
components
:
{
HomeOutlined
,
Icon
},
components
:
{
HomeOutlined
,
Icon
,
[
Breadcrumb
.
name
]:
Breadcrumb
},
props
:
{
props
:
{
theme
:
propTypes
.
oneOf
([
'
dark
'
,
'
light
'
]),
theme
:
propTypes
.
oneOf
([
'
dark
'
,
'
light
'
]),
},
},
...
...
src/layouts/default/header/components/notify/NoticeList.vue
浏览文件 @
6392b7f0
...
@@ -34,8 +34,15 @@
...
@@ -34,8 +34,15 @@
import
{
defineComponent
,
PropType
}
from
'
vue
'
;
import
{
defineComponent
,
PropType
}
from
'
vue
'
;
import
{
ListItem
}
from
'
./data
'
;
import
{
ListItem
}
from
'
./data
'
;
import
{
useDesign
}
from
'
/@/hooks/web/useDesign
'
;
import
{
useDesign
}
from
'
/@/hooks/web/useDesign
'
;
import
{
List
,
Avatar
,
Tag
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
[
Avatar
.
name
]:
Avatar
,
[
List
.
name
]:
List
,
[
List
.
Item
.
name
]:
List
.
Item
,
AListItemMeta
:
List
.
Item
.
Meta
,
[
Tag
.
name
]:
Tag
,
},
props
:
{
props
:
{
list
:
{
list
:
{
type
:
Array
as
PropType
<
ListItem
[]
>
,
type
:
Array
as
PropType
<
ListItem
[]
>
,
...
...
src/locales/useLocale.ts
浏览文件 @
6392b7f0
...
@@ -7,10 +7,10 @@ import type { Ref } from 'vue';
...
@@ -7,10 +7,10 @@ import type { Ref } from 'vue';
import
{
unref
,
ref
}
from
'
vue
'
;
import
{
unref
,
ref
}
from
'
vue
'
;
import
{
useLocaleSetting
}
from
'
/@/hooks/setting/useLocaleSetting
'
;
import
{
useLocaleSetting
}
from
'
/@/hooks/setting/useLocaleSetting
'
;
import
{
dateUtil
}
from
'
/@/utils/dateUtil
'
;
import
{
i18n
}
from
'
./setupI18n
'
;
import
{
i18n
}
from
'
./setupI18n
'
;
import
'
moment/locale/zh-cn
'
;
const
antConfigLocaleRef
=
ref
<
any
>
(
null
);
const
antConfigLocaleRef
=
ref
<
any
>
(
null
);
export
function
useLocale
()
{
export
function
useLocale
()
{
...
@@ -34,14 +34,12 @@ export function useLocale() {
...
@@ -34,14 +34,12 @@ export function useLocale() {
antConfigLocaleRef
.
value
=
locale
.
default
;
antConfigLocaleRef
.
value
=
locale
.
default
;
});
});
dateUtil
.
locale
(
'
cn
'
);
break
;
break
;
// English
// English
case
'
en
'
:
case
'
en
'
:
import
(
'
ant-design-vue/es/locale/en_US
'
).
then
((
locale
)
=>
{
import
(
'
ant-design-vue/es/locale/en_US
'
).
then
((
locale
)
=>
{
antConfigLocaleRef
.
value
=
locale
.
default
;
antConfigLocaleRef
.
value
=
locale
.
default
;
});
});
dateUtil
.
locale
(
'
en-us
'
);
break
;
break
;
// other
// other
...
...
src/views/dashboard/analysis/index.vue
浏览文件 @
6392b7f0
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
import
TaskCard
from
'
./components/TaskCard.vue
'
;
import
TaskCard
from
'
./components/TaskCard.vue
'
;
import
FlowAnalysis
from
'
./components/FlowAnalysis
'
;
import
FlowAnalysis
from
'
./components/FlowAnalysis
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
Row
,
Col
}
from
'
ant-design-vue
'
;
import
{
growCardList
,
taskList
}
from
'
./data
'
;
import
{
growCardList
,
taskList
}
from
'
./data
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
...
@@ -61,6 +61,8 @@
...
@@ -61,6 +61,8 @@
AnalysisBar
,
AnalysisBar
,
TaskCard
,
TaskCard
,
FlowAnalysis
,
FlowAnalysis
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
},
setup
()
{
setup
()
{
return
{
growCardList
,
taskList
};
return
{
growCardList
,
taskList
};
...
...
src/views/dashboard/workbench/index.vue
浏览文件 @
6392b7f0
...
@@ -19,9 +19,18 @@
...
@@ -19,9 +19,18 @@
import
Week
from
'
./components/Week.vue
'
;
import
Week
from
'
./components/Week.vue
'
;
import
NewsList
from
'
./components/NewsList.vue
'
;
import
NewsList
from
'
./components/NewsList.vue
'
;
import
ShortCuts
from
'
./components/ShortCuts.vue
'
;
import
ShortCuts
from
'
./components/ShortCuts.vue
'
;
import
{
Row
,
Col
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
ProdTotal
,
TodoList
,
Week
,
ShortCuts
,
NewsList
},
components
:
{
ProdTotal
,
TodoList
,
Week
,
ShortCuts
,
NewsList
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
setup
()
{
setup
()
{
return
{};
return
{};
},
},
...
...
src/views/demo/comp/button/index.vue
浏览文件 @
6392b7f0
<
template
>
<
template
>
<PageWrapper
<PageWrapper
contentFullHeight
title=
"基础组件"
title=
"基础组件"
content=
" 基础组件依赖于ant-design-vue,组件库已有的基础组件,项目中不会再次进行demo展示(二次封装组件除外)"
content=
" 基础组件依赖于ant-design-vue,组件库已有的基础组件,项目中不会再次进行demo展示(二次封装组件除外)"
>
>
...
...
src/views/demo/comp/loading/index.vue
浏览文件 @
6392b7f0
...
@@ -20,9 +20,10 @@
...
@@ -20,9 +20,10 @@
import
{
defineComponent
,
reactive
,
toRefs
,
ref
}
from
'
vue
'
;
import
{
defineComponent
,
reactive
,
toRefs
,
ref
}
from
'
vue
'
;
import
{
Loading
,
useLoading
}
from
'
/@/components/Loading
'
;
import
{
Loading
,
useLoading
}
from
'
/@/components/Loading
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Alert
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Loading
,
PageWrapper
},
components
:
{
Loading
,
PageWrapper
,
[
Alert
.
name
]:
Alert
},
setup
()
{
setup
()
{
const
wrapEl
=
ref
<
ElRef
>
(
null
);
const
wrapEl
=
ref
<
ElRef
>
(
null
);
...
...
src/views/demo/comp/upload/index.vue
浏览文件 @
6392b7f0
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'
/@/components/Form/index
'
;
import
{
BasicForm
,
FormSchema
,
useForm
}
from
'
/@/components/Form/index
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Alert
}
from
'
ant-design-vue
'
;
import
{
uploadApi
}
from
'
/@/api/sys/upload
'
;
import
{
uploadApi
}
from
'
/@/api/sys/upload
'
;
...
@@ -32,7 +33,7 @@
...
@@ -32,7 +33,7 @@
},
},
];
];
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicUpload
,
BasicForm
,
PageWrapper
},
components
:
{
BasicUpload
,
BasicForm
,
PageWrapper
,
[
Alert
.
name
]:
Alert
},
setup
()
{
setup
()
{
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
register
]
=
useForm
({
const
[
register
]
=
useForm
({
...
...
src/views/demo/feat/copy/index.vue
浏览文件 @
6392b7f0
...
@@ -14,10 +14,11 @@
...
@@ -14,10 +14,11 @@
import
{
useCopyToClipboard
}
from
'
/@/hooks/web/useCopyToClipboard
'
;
import
{
useCopyToClipboard
}
from
'
/@/hooks/web/useCopyToClipboard
'
;
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Input
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'
Copy
'
,
name
:
'
Copy
'
,
components
:
{
CollapseContainer
,
PageWrapper
},
components
:
{
CollapseContainer
,
PageWrapper
,
[
Input
.
name
]:
Input
},
setup
()
{
setup
()
{
const
valueRef
=
ref
(
''
);
const
valueRef
=
ref
(
''
);
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
...
...
src/views/demo/feat/download/index.vue
浏览文件 @
6392b7f0
...
@@ -25,9 +25,10 @@
...
@@ -25,9 +25,10 @@
}
from
'
/@/utils/file/download
'
;
}
from
'
/@/utils/file/download
'
;
import
imgBase64
from
'
./imgBase64
'
;
import
imgBase64
from
'
./imgBase64
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Alert
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
PageWrapper
},
components
:
{
PageWrapper
,
[
Alert
.
name
]:
Alert
},
setup
()
{
setup
()
{
function
handleDownByData
()
{
function
handleDownByData
()
{
downloadByData
(
'
text content
'
,
'
testName.txt
'
);
downloadByData
(
'
text content
'
,
'
testName.txt
'
);
...
...
src/views/demo/feat/tabs/index.vue
浏览文件 @
6392b7f0
...
@@ -19,9 +19,11 @@
...
@@ -19,9 +19,11 @@
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
useTabs
}
from
'
/@/hooks/web/useTabs
'
;
import
{
useTabs
}
from
'
/@/hooks/web/useTabs
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Input
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'
TabsDemo
'
,
name
:
'
TabsDemo
'
,
components
:
{
CollapseContainer
,
PageWrapper
},
components
:
{
CollapseContainer
,
PageWrapper
,
[
Input
.
name
]:
Input
},
setup
()
{
setup
()
{
const
{
closeAll
,
closeLeft
,
closeRight
,
closeOther
,
closeCurrent
,
refreshPage
}
=
useTabs
();
const
{
closeAll
,
closeLeft
,
closeRight
,
closeOther
,
closeCurrent
,
refreshPage
}
=
useTabs
();
...
...
src/views/demo/form/CustomerForm.vue
浏览文件 @
6392b7f0
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
},
},
];
];
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicForm
,
CollapseContainer
,
PageWrapper
},
components
:
{
BasicForm
,
CollapseContainer
,
PageWrapper
,
[
Input
.
name
]:
Input
},
setup
()
{
setup
()
{
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
const
[
register
,
{
setProps
}]
=
useForm
({
const
[
register
,
{
setProps
}]
=
useForm
({
...
...
src/views/demo/page/account/center/Application.vue
浏览文件 @
6392b7f0
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
List
,
Card
}
from
'
ant-design-vue
'
;
import
{
List
,
Card
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
{
applicationList
}
from
'
./data
'
;
import
{
applicationList
}
from
'
./data
'
;
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
ListItem
:
List
.
Item
,
ListItem
:
List
.
Item
,
Card
,
Card
,
Icon
,
Icon
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
},
setup
()
{
setup
()
{
return
{
return
{
...
...
src/views/demo/page/account/center/Project.vue
浏览文件 @
6392b7f0
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
List
,
Card
}
from
'
ant-design-vue
'
;
import
{
List
,
Card
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
demoImg
from
'
/@/assets/images/demo.png
'
;
import
demoImg
from
'
/@/assets/images/demo.png
'
;
import
{
projectList
}
from
'
./data
'
;
import
{
projectList
}
from
'
./data
'
;
...
@@ -28,6 +28,8 @@
...
@@ -28,6 +28,8 @@
List
,
List
,
ListItem
:
List
.
Item
,
ListItem
:
List
.
Item
,
Card
,
Card
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
},
setup
()
{
setup
()
{
return
{
return
{
...
...
src/views/demo/page/account/center/index.vue
浏览文件 @
6392b7f0
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Tag
,
Tabs
}
from
'
ant-design-vue
'
;
import
{
Tag
,
Tabs
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
...
@@ -72,6 +72,8 @@
...
@@ -72,6 +72,8 @@
Article
,
Article
,
Application
,
Application
,
Project
,
Project
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
},
setup
()
{
setup
()
{
return
{
return
{
...
...
src/views/demo/page/account/setting/BaseSetting.vue
浏览文件 @
6392b7f0
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</CollapseContainer>
</CollapseContainer>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Button
,
Upload
}
from
'
ant-design-vue
'
;
import
{
Button
,
Upload
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
{
defineComponent
,
onMounted
}
from
'
vue
'
;
import
{
defineComponent
,
onMounted
}
from
'
vue
'
;
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form/index
'
;
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form/index
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
import
{
CollapseContainer
}
from
'
/@/components/Container/index
'
;
...
@@ -31,7 +31,15 @@
...
@@ -31,7 +31,15 @@
import
{
baseSetschemas
}
from
'
./data
'
;
import
{
baseSetschemas
}
from
'
./data
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicForm
,
CollapseContainer
,
Button
,
Upload
,
Icon
},
components
:
{
BasicForm
,
CollapseContainer
,
Button
,
Upload
,
Icon
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
setup
()
{
setup
()
{
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
...
...
src/views/demo/page/desc/basic/index.vue
浏览文件 @
6392b7f0
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
import
{
Description
}
from
'
/@/components/Description/index
'
;
import
{
Description
}
from
'
/@/components/Description/index
'
;
import
{
BasicTable
,
useTable
}
from
'
/@/components/Table
'
;
import
{
BasicTable
,
useTable
}
from
'
/@/components/Table
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Divider
}
from
'
ant-design-vue
'
;
import
{
import
{
refundSchema
,
refundSchema
,
...
@@ -41,7 +42,7 @@
...
@@ -41,7 +42,7 @@
refundTimeTableData
,
refundTimeTableData
,
}
from
'
./data
'
;
}
from
'
./data
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Description
,
BasicTable
,
PageWrapper
},
components
:
{
Description
,
BasicTable
,
PageWrapper
,
[
Divider
.
name
]:
Divider
},
setup
()
{
setup
()
{
const
[
registerRefundTable
]
=
useTable
({
const
[
registerRefundTable
]
=
useTable
({
title
:
'
退货商品
'
,
title
:
'
退货商品
'
,
...
...
src/views/demo/page/desc/high/index.vue
浏览文件 @
6392b7f0
...
@@ -90,10 +90,24 @@
...
@@ -90,10 +90,24 @@
import
{
Description
}
from
'
/@/components/Description/index
'
;
import
{
Description
}
from
'
/@/components/Description/index
'
;
import
{
BasicTable
,
useTable
}
from
'
/@/components/Table
'
;
import
{
BasicTable
,
useTable
}
from
'
/@/components/Table
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Divider
,
Card
,
Empty
,
Descriptions
,
Steps
,
Tabs
}
from
'
ant-design-vue
'
;
import
{
refundTimeTableSchema
,
refundTimeTableData
}
from
'
./data
'
;
import
{
refundTimeTableSchema
,
refundTimeTableData
}
from
'
./data
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Description
,
BasicTable
,
PageWrapper
},
components
:
{
Description
,
BasicTable
,
PageWrapper
,
[
Divider
.
name
]:
Divider
,
[
Card
.
name
]:
Card
,
AEmpty
:
Empty
,
[
Descriptions
.
name
]:
Descriptions
,
[
Descriptions
.
Item
.
name
]:
Descriptions
.
Item
,
[
Steps
.
name
]:
Steps
,
[
Steps
.
Step
.
name
]:
Steps
.
Step
,
[
Tabs
.
name
]:
Tabs
,
[
Tabs
.
TabPane
.
name
]:
Tabs
.
TabPane
,
},
setup
()
{
setup
()
{
const
[
registerTimeTable
]
=
useTable
({
const
[
registerTimeTable
]
=
useTable
({
title
:
'
退货进度
'
,
title
:
'
退货进度
'
,
...
...
src/views/demo/page/form/high/index.vue
浏览文件 @
6392b7f0
...
@@ -27,9 +27,10 @@
...
@@ -27,9 +27,10 @@
import
PersonTable
from
'
./PersonTable.vue
'
;
import
PersonTable
from
'
./PersonTable.vue
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
schemas
,
taskSchemas
}
from
'
./data
'
;
import
{
schemas
,
taskSchemas
}
from
'
./data
'
;
import
{
Card
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicForm
,
PersonTable
,
PageWrapper
},
components
:
{
BasicForm
,
PersonTable
,
PageWrapper
,
[
Card
.
name
]:
Card
},
setup
()
{
setup
()
{
const
tableRef
=
ref
<
{
getDataSource
:
()
=>
any
}
|
null
>
(
null
);
const
tableRef
=
ref
<
{
getDataSource
:
()
=>
any
}
|
null
>
(
null
);
...
...
src/views/demo/page/form/step/Step1.vue
浏览文件 @
6392b7f0
...
@@ -31,8 +31,16 @@
...
@@ -31,8 +31,16 @@
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form
'
;
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form
'
;
import
{
step1Schemas
}
from
'
./data
'
;
import
{
step1Schemas
}
from
'
./data
'
;
import
{
Select
,
Input
,
Divider
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicForm
},
components
:
{
BasicForm
,
[
Select
.
name
]:
Select
,
ASelectOption
:
Select
.
Option
,
[
Input
.
name
]:
Input
,
[
Input
.
Group
.
name
]:
Input
.
Group
,
[
Divider
.
name
]:
Divider
,
},
emits
:
[
'
next
'
],
emits
:
[
'
next
'
],
setup
(
_
,
{
emit
})
{
setup
(
_
,
{
emit
})
{
const
[
register
,
{
validate
}]
=
useForm
({
const
[
register
,
{
validate
}]
=
useForm
({
...
...
src/views/demo/page/form/step/Step2.vue
浏览文件 @
6392b7f0
...
@@ -15,9 +15,16 @@
...
@@ -15,9 +15,16 @@
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form
'
;
import
{
BasicForm
,
useForm
}
from
'
/@/components/Form
'
;
import
{
step2Schemas
}
from
'
./data
'
;
import
{
step2Schemas
}
from
'
./data
'
;
import
{
Alert
,
Divider
,
Descriptions
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
BasicForm
},
components
:
{
BasicForm
,
[
Alert
.
name
]:
Alert
,
[
Divider
.
name
]:
Divider
,
[
Descriptions
.
name
]:
Descriptions
,
[
Descriptions
.
Item
.
name
]:
Descriptions
.
Item
,
},
emits
:
[
'
next
'
,
'
prev
'
],
emits
:
[
'
next
'
,
'
prev
'
],
setup
(
_
,
{
emit
})
{
setup
(
_
,
{
emit
})
{
const
[
register
,
{
validate
,
setProps
}]
=
useForm
({
const
[
register
,
{
validate
,
setProps
}]
=
useForm
({
...
...
src/views/demo/page/form/step/Step3.vue
浏览文件 @
6392b7f0
...
@@ -18,9 +18,13 @@
...
@@ -18,9 +18,13 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
Result
,
Descriptions
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{},
components
:
{
[
Result
.
name
]:
Result
,
[
Descriptions
.
name
]:
Descriptions
,
[
Descriptions
.
Item
.
name
]:
Descriptions
.
Item
,
},
emits
:
[
'
redo
'
],
emits
:
[
'
redo
'
],
setup
(
_
,
{
emit
})
{
setup
(
_
,
{
emit
})
{
return
{
return
{
...
...
src/views/demo/page/form/step/index.vue
浏览文件 @
6392b7f0
...
@@ -30,9 +30,17 @@
...
@@ -30,9 +30,17 @@
import
Step2
from
'
./Step2.vue
'
;
import
Step2
from
'
./Step2.vue
'
;
import
Step3
from
'
./Step3.vue
'
;
import
Step3
from
'
./Step3.vue
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Steps
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Step1
,
Step2
,
Step3
,
PageWrapper
},
components
:
{
Step1
,
Step2
,
Step3
,
PageWrapper
,
[
Steps
.
name
]:
Steps
,
[
Steps
.
Step
.
name
]:
Steps
.
Step
,
},
setup
()
{
setup
()
{
const
current
=
ref
(
0
);
const
current
=
ref
(
0
);
...
...
src/views/demo/page/list/basic/index.vue
浏览文件 @
6392b7f0
...
@@ -49,14 +49,24 @@
...
@@ -49,14 +49,24 @@
</PageWrapper>
</PageWrapper>
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Progress
}
from
'
ant-design-vue
'
;
import
{
Progress
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
{
defineComponent
}
from
'
vue
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
{
cardList
}
from
'
./data
'
;
import
{
cardList
}
from
'
./data
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
List
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Icon
,
Progress
,
PageWrapper
},
components
:
{
Icon
,
Progress
,
PageWrapper
,
[
List
.
name
]:
List
,
[
List
.
Item
.
name
]:
List
.
Item
,
AListItemMeta
:
List
.
Item
.
Meta
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
setup
()
{
setup
()
{
return
{
return
{
prefixCls
:
'
list-basic
'
,
prefixCls
:
'
list-basic
'
,
...
...
src/views/demo/page/list/card/index.vue
浏览文件 @
6392b7f0
...
@@ -37,9 +37,18 @@
...
@@ -37,9 +37,18 @@
import
Icon
from
'
/@/components/Icon/index
'
;
import
Icon
from
'
/@/components/Icon/index
'
;
import
{
cardList
}
from
'
./data
'
;
import
{
cardList
}
from
'
./data
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
Card
,
Row
,
Col
,
List
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Icon
,
PageWrapper
},
components
:
{
Icon
,
PageWrapper
,
[
Card
.
name
]:
Card
,
[
List
.
name
]:
List
,
[
List
.
Item
.
name
]:
List
.
Item
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
setup
()
{
setup
()
{
return
{
return
{
prefixCls
:
'
list-card
'
,
prefixCls
:
'
list-card
'
,
...
...
src/views/demo/page/list/search/index.vue
浏览文件 @
6392b7f0
...
@@ -53,9 +53,18 @@
...
@@ -53,9 +53,18 @@
import
{
BasicForm
}
from
'
/@/components/Form/index
'
;
import
{
BasicForm
}
from
'
/@/components/Form/index
'
;
import
{
actions
,
searchList
,
schemas
}
from
'
./data
'
;
import
{
actions
,
searchList
,
schemas
}
from
'
./data
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
PageWrapper
}
from
'
/@/components/Page
'
;
import
{
List
}
from
'
ant-design-vue
'
;
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
Icon
,
Tag
,
BasicForm
,
PageWrapper
},
components
:
{
Icon
,
Tag
,
BasicForm
,
PageWrapper
,
[
List
.
name
]:
List
,
[
List
.
Item
.
name
]:
List
.
Item
,
AListItemMeta
:
List
.
Item
.
Meta
,
},
setup
()
{
setup
()
{
return
{
return
{
prefixCls
:
'
list-search
'
,
prefixCls
:
'
list-search
'
,
...
...
src/views/sys/login/Login.vue
浏览文件 @
6392b7f0
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<h1>
{{
title
}}
</h1>
<h1>
{{
title
}}
</h1>
</header>
</header>
<a-form
class=
"
mx-auto mt-10
"
:model=
"formData"
:rules=
"formRules"
ref=
"formRef"
>
<a-form
class=
"
login-form__main
"
:model=
"formData"
:rules=
"formRules"
ref=
"formRef"
>
<a-form-item
name=
"account"
>
<a-form-item
name=
"account"
>
<a-input
size=
"large"
v-model:value=
"formData.account"
placeholder=
"username: vben"
/>
<a-input
size=
"large"
v-model:value=
"formData.account"
placeholder=
"username: vben"
/>
</a-form-item>
</a-form-item>
...
@@ -23,9 +23,6 @@
...
@@ -23,9 +23,6 @@
/>
/>
</a-form-item>
</a-form-item>
<!--
<a-form-item
name=
"verify"
v-if=
"openLoginVerify"
>
<BasicDragVerify
v-model:value=
"formData.verify"
ref=
"verifyRef"
/>
</a-form-item>
-->
<a-row>
<a-row>
<a-col
:span=
"12"
>
<a-col
:span=
"12"
>
<a-form-item>
<a-form-item>
...
@@ -61,15 +58,13 @@
...
@@ -61,15 +58,13 @@
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
defineComponent
,
reactive
,
ref
,
unref
,
toRaw
}
from
'
vue
'
;
import
{
defineComponent
,
reactive
,
ref
,
unref
,
toRaw
}
from
'
vue
'
;
import
{
Checkbox
}
from
'
ant-design-vue
'
;
import
{
Checkbox
,
Form
,
Input
,
Row
,
Col
}
from
'
ant-design-vue
'
;
import
{
Button
}
from
'
/@/components/Button
'
;
import
{
Button
}
from
'
/@/components/Button
'
;
import
{
AppLocalePicker
}
from
'
/@/components/Application
'
;
import
{
AppLocalePicker
}
from
'
/@/components/Application
'
;
// import { BasicDragVerify, DragVerifyActionType } from '/@/components/Verify/index';
import
{
userStore
}
from
'
/@/store/modules/user
'
;
import
{
userStore
}
from
'
/@/store/modules/user
'
;
// import { appStore } from '/@/store/modules/app';
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
useGlobSetting
,
useProjectSetting
}
from
'
/@/hooks/setting
'
;
import
{
useGlobSetting
,
useProjectSetting
}
from
'
/@/hooks/setting
'
;
import
logo
from
'
/@/assets/images/logo.png
'
;
import
logo
from
'
/@/assets/images/logo.png
'
;
...
@@ -77,27 +72,28 @@
...
@@ -77,27 +72,28 @@
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
// BasicDragVerify,
[
Checkbox
.
name
]:
Checkbox
,
[
Form
.
name
]:
Form
,
[
Form
.
Item
.
name
]:
Form
.
Item
,
[
Input
.
name
]:
Input
,
[
Input
.
Password
.
name
]:
Input
.
Password
,
AButton
:
Button
,
AButton
:
Button
,
ACheckbox
:
Checkbox
,
AppLocalePicker
,
AppLocalePicker
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
,
},
},
setup
()
{
setup
()
{
const
formRef
=
ref
<
any
>
(
null
);
const
formRef
=
ref
<
any
>
(
null
);
const
autoLoginRef
=
ref
(
false
);
const
autoLoginRef
=
ref
(
false
);
// const verifyRef = ref
<
RefInstanceType
<
DragVerifyActionType
>>
(
null
);
const
globSetting
=
useGlobSetting
();
const
globSetting
=
useGlobSetting
();
const
{
locale
}
=
useProjectSetting
();
const
{
locale
}
=
useProjectSetting
();
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
// const openLoginVerifyRef = computed(() => appStore.getProjectConfig.openLoginVerify);
const
formData
=
reactive
({
const
formData
=
reactive
({
account
:
'
vben
'
,
account
:
'
vben
'
,
password
:
'
123456
'
,
password
:
'
123456
'
,
// verify: undefined,
});
});
const
formState
=
reactive
({
const
formState
=
reactive
({
...
@@ -109,16 +105,8 @@
...
@@ -109,16 +105,8 @@
password
:
[
password
:
[
{
required
:
true
,
message
:
t
(
'
sys.login.passwordPlaceholder
'
),
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
t
(
'
sys.login.passwordPlaceholder
'
),
trigger
:
'
blur
'
},
],
],
// verify: unref(openLoginVerifyRef) ? [{ required: true, message: '请通过验证码校验' }] : [],
});
});
// function resetVerify() {
// const verify = unref(verifyRef);
// if (!verify) return;
// formData.verify && verify.$.resume();
// formData.verify = undefined;
// }
async
function
handleLogin
()
{
async
function
handleLogin
()
{
const
form
=
unref
(
formRef
);
const
form
=
unref
(
formRef
);
if
(
!
form
)
return
;
if
(
!
form
)
return
;
...
@@ -140,19 +128,16 @@
...
@@ -140,19 +128,16 @@
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
}
finally
{
}
finally
{
// resetVerify();
formState
.
loading
=
false
;
formState
.
loading
=
false
;
}
}
}
}
return
{
return
{
formRef
,
formRef
,
// verifyRef,
formData
,
formData
,
formState
,
formState
,
formRules
,
formRules
,
login
:
handleLogin
,
login
:
handleLogin
,
autoLogin
:
autoLoginRef
,
autoLogin
:
autoLoginRef
,
// openLoginVerify: openLoginVerifyRef,
title
:
globSetting
&&
globSetting
.
title
,
title
:
globSetting
&&
globSetting
.
title
,
logo
,
logo
,
t
,
t
,
...
@@ -196,6 +181,10 @@
...
@@ -196,6 +181,10 @@
background-clip: padding-box;
background-clip: padding-box;
.respond-to(xlarge, { margin: 0 120px 0 50px});
.respond-to(xlarge, { margin: 0 120px 0 50px});
&__main {
margin: 30px auto 0 auto !important;
}
&-wrap {
&-wrap {
position: absolute;
position: absolute;
top: 0;
top: 0;
...
...
vite.config.ts
浏览文件 @
6392b7f0
...
@@ -88,10 +88,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
...
@@ -88,10 +88,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
optimizeDeps
:
{
optimizeDeps
:
{
include
:
[
include
:
[
'
moment
'
,
'
@ant-design/icons-vue
'
,
'
@ant-design/icons-vue
'
,
'
echarts/map/js/china
'
,
'
echarts/map/js/china
'
,
'
ant-design-vue/es/locale/zh_CN
'
,
'
ant-design-vue/es/locale/zh_CN
'
,
'
moment/
dist/
locale/zh-cn
'
,
'
moment/locale/zh-cn
'
,
'
ant-design-vue/es/locale/en_US
'
,
'
ant-design-vue/es/locale/en_US
'
,
],
],
},
},
...
...
yarn.lock
浏览文件 @
6392b7f0
...
@@ -5691,7 +5691,7 @@ modify-values@^1.0.0:
...
@@ -5691,7 +5691,7 @@ modify-values@^1.0.0:
resolved "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
resolved "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==
integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==
moment@^2.27.0
, moment@^2.29.1
:
moment@^2.27.0:
version "2.29.1"
version "2.29.1"
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
...
@@ -8086,10 +8086,10 @@ vite-plugin-pwa@^0.3.8:
...
@@ -8086,10 +8086,10 @@ vite-plugin-pwa@^0.3.8:
pretty-bytes "^5.5.0"
pretty-bytes "^5.5.0"
workbox-build "^6.0.2"
workbox-build "^6.0.2"
vite-plugin-style-import@^0.
2.1
:
vite-plugin-style-import@^0.
4.0
:
version "0.
2.1
"
version "0.
4.0
"
resolved "https://registry.npmjs.org/vite-plugin-style-import/-/vite-plugin-style-import-0.
2.1.tgz#9ad5890697efe360853e6f2e0d7dc2c92227d2d6
"
resolved "https://registry.npmjs.org/vite-plugin-style-import/-/vite-plugin-style-import-0.
4.0.tgz#050664a6d3ce78bb1a32f7ac8e971ee49ab889f4
"
integrity sha512-
mbRBOz4FMZseLQ5N+QUpFoG6tkIfdRfjIRykgfYn3s4SQCivdvkDWeqPsEQY8K8Q5valwCpqP9UAnNxc0dJbQ
Q==
integrity sha512-
OXQ0J9Mtndag0dmSKGKpu3T2NbVvKm6vbIa1M6RprVVThRAwBgX+LSwhK7GRQiSDGH5aI6yZuVQRloVFx+pK+
Q==
dependencies:
dependencies:
"@babel/core" "^7.12.10"
"@babel/core" "^7.12.10"
"@babel/helper-module-imports" "^7.12.5"
"@babel/helper-module-imports" "^7.12.5"
...
@@ -8097,10 +8097,10 @@ vite-plugin-style-import@^0.2.1:
...
@@ -8097,10 +8097,10 @@ vite-plugin-style-import@^0.2.1:
"@rollup/pluginutils" "^4.1.0"
"@rollup/pluginutils" "^4.1.0"
change-case "^4.1.2"
change-case "^4.1.2"
vite@^2.0.0-beta.3
0
:
vite@^2.0.0-beta.3
1
:
version "2.0.0-beta.3
0
"
version "2.0.0-beta.3
1
"
resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.3
0.tgz#d0c1056d1fb05c489614360f92363eebec41a6b4
"
resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.3
1.tgz#0ce5f6c496c29f72062f9f0ae70dd6dfb18b0916
"
integrity sha512-
wOeO64J3k4jGjCOkH/6RUcIyT/HOTaDZSiXE75aWYqV9hI7Q6uEeSXbAFtb9bG82RGLEWdsqtCvx5t7gaeqtsw
==
integrity sha512-
tHBgSsSp0+dbz8tas6zOj2KbJSKOme62jXN13rk8BZdJEum5FDnwon9+7oas4db3NnVBLnciWa1r8QUNoOZjrA
==
dependencies:
dependencies:
esbuild "^0.8.26"
esbuild "^0.8.26"
postcss "^8.2.1"
postcss "^8.2.1"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录