Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianzhuanghu
ant-design-pro-vue
Commits
90675607
Commit
90675607
authored
Nov 24, 2018
by
sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: display problem in mobile mode
parent
2ddf9e9d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
48 deletions
+62
-48
App.vue
src/App.vue
+44
-43
GlobalLayout.vue
src/components/page/GlobalLayout.vue
+14
-1
router.config.js
src/config/router.config.js
+1
-1
TableInnerEditList.vue
src/views/list/TableInnerEditList.vue
+0
-0
UserList.vue
src/views/list/UserList.vue
+2
-2
Login.vue
src/views/user/Login.vue
+1
-1
No files found.
src/App.vue
View file @
90675607
<
template
>
<a-locale-provider
:locale=
"locale"
>
<div
id=
"app"
>
<router-view/>
</div>
</a-locale-provider>
</
template
>
<
script
>
import
zhCN
from
'ant-design-vue/lib/locale-provider/zh_CN'
import
enquireScreen
from
'@/utils/device'
export
default
{
data
()
{
return
{
locale
:
zhCN
,
}
},
created
()
{
let
that
=
this
enquireScreen
(
deviceType
=>
{
// tablet
if
(
deviceType
===
0
)
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'tablet'
)
that
.
$store
.
commit
(
'CLOSE_SIDEBAR'
,
false
)
}
// mobile
else
if
(
deviceType
===
1
)
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'mobile'
)
that
.
$store
.
commit
(
'CLOSE_SIDEBAR'
,
false
)
}
else
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'desktop'
)
that
.
$store
.
commit
(
'SET_SIDEBAR_TYPE'
,
true
)
}
})
}
}
</
script
>
<
style
>
#app
{
height
:
100%
;
}
<
template
>
<a-locale-provider
:locale=
"locale"
>
<div
id=
"app"
>
<router-view/>
</div>
</a-locale-provider>
</
template
>
<
script
>
import
zhCN
from
'ant-design-vue/lib/locale-provider/zh_CN'
import
enquireScreen
from
'@/utils/device'
export
default
{
data
()
{
return
{
locale
:
zhCN
,
}
},
created
()
{
let
that
=
this
enquireScreen
(
deviceType
=>
{
// tablet
if
(
deviceType
===
0
)
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'tablet'
)
that
.
$store
.
dispatch
(
'setSidebar'
,
false
)
}
// mobile
else
if
(
deviceType
===
1
)
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'mobile'
)
that
.
$store
.
dispatch
(
'setSidebar'
,
false
)
}
else
{
that
.
$store
.
commit
(
'TOGGLE_DEVICE'
,
'desktop'
)
that
.
$store
.
dispatch
(
'setSidebar'
,
true
)
}
})
}
}
</
script
>
<
style
>
#app
{
height
:
100%
;
}
</
style
>
\ No newline at end of file
src/components/page/GlobalLayout.vue
View file @
90675607
...
...
@@ -102,6 +102,12 @@
device
:
state
=>
state
.
app
.
device
,
})
},
watch
:
{
sidebarOpened
(
val
)
{
console
.
log
(
'watch'
,
val
)
this
.
collapsed
=
!
val
},
},
created
()
{
this
.
menus
=
this
.
mainMenu
.
find
((
item
)
=>
item
.
path
===
'/'
).
children
},
...
...
@@ -144,10 +150,17 @@
}
}
/**
* ant-table-wrapper
* 覆盖的表格手机模式样式,如果想修改在手机上表格最低宽度,可以在这里改动
*/
.ant-table-wrapper
{
.ant-table-
body
{
.ant-table-
content
{
overflow-y
:
auto
;
}
.ant-table-body
{
min-width
:
800px
;
}
}
.sidemenu
{
.ant-header-fixedHeader
{
...
...
src/config/router.config.js
View file @
90675607
...
...
@@ -13,7 +13,7 @@ export const asyncRouterMap = [
{
path
:
'/dashboard'
,
name
:
'dashboard'
,
redirect
:
'/dashboard/
analysis
'
,
redirect
:
'/dashboard/
workplace
'
,
component
:
RouteView
,
meta
:
{
title
:
'仪表盘'
,
icon
:
'dashboard'
,
permission
:
[
'dashboard'
]
},
children
:
[
...
...
src/views/list/TableInnerEditList.vue
View file @
90675607
This diff is collapsed.
Click to expand it.
src/views/list/UserList.vue
View file @
90675607
...
...
@@ -40,10 +40,10 @@
:gutter=
"24"
:style=
"
{ marginBottom: '12px' }">
<a-col
:span=
"12"
v-for=
"(role, index) in record.permissions"
:key=
"index"
:style=
"
{ marginBottom: '12px' }">
<a-col
:
span=
"
4"
>
<a-col
:
lg=
"4"
:md=
"2
4"
>
<span>
{{
role
.
permissionName
}}
:
</span>
</a-col>
<a-col
:
span=
"20
"
v-if=
"role.actionEntitySet.length > 0"
>
<a-col
:
lg=
"20"
:md=
"24
"
v-if=
"role.actionEntitySet.length > 0"
>
<a-tag
color=
"cyan"
v-for=
"(action, k) in role.actionEntitySet"
:key=
"k"
>
{{
action
.
describe
}}
</a-tag>
</a-col>
<a-col
:span=
"20"
v-else
>
-
</a-col>
...
...
src/views/user/Login.vue
View file @
90675607
...
...
@@ -110,7 +110,7 @@
loginBtn
:
false
,
// login type: 0 email, 1 username, 2 telephone
loginType
:
0
,
requiredTwoStepCaptcha
:
tru
e
,
requiredTwoStepCaptcha
:
fals
e
,
stepCaptchaVisible
:
false
,
form
:
null
,
state
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment