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
5cb512cb
Unverified
Commit
5cb512cb
authored
Jan 10, 2019
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: #51 sidebar collapsed padding
parent
3f480dc3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
50 deletions
+48
-50
App.vue
src/App.vue
+47
-50
GlobalLayout.vue
src/components/page/GlobalLayout.vue
+0
-0
mixin.js
src/utils/mixin.js
+1
-0
No files found.
src/App.vue
View file @
5cb512cb
<
template
>
<
template
>
<a-locale-provider
:locale=
"locale"
>
<a-locale-provider
:locale=
"locale"
>
<div
id=
"app"
>
<div
id=
"app"
>
<router-view/>
<router-view/>
</div>
</div>
</a-locale-provider>
</a-locale-provider>
</
template
>
</
template
>
<
script
>
<
script
>
import
zhCN
from
'ant-design-vue/lib/locale-provider/zh_CN'
import
zhCN
from
'ant-design-vue/lib/locale-provider/zh_CN'
import
{
deviceEnquire
,
DEVICE_TYPE
}
from
'@/utils/device'
import
{
deviceEnquire
,
DEVICE_TYPE
}
from
'@/utils/device'
import
{
version
}
from
'ant-design-vue'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
locale
:
zhCN
locale
:
zhCN
,
}
version
},
}
mounted
()
{
},
const
{
$store
}
=
this
mounted
()
{
deviceEnquire
(
deviceType
=>
{
const
{
$store
}
=
this
console
.
log
(
'use Ant-Design Of Vue:'
,
version
)
switch
(
deviceType
)
{
deviceEnquire
(
deviceType
=>
{
case
DEVICE_TYPE
.
DESKTOP
:
$store
.
commit
(
'TOGGLE_DEVICE'
,
'desktop'
)
switch
(
deviceType
)
{
$store
.
dispatch
(
'setSidebar'
,
true
)
case
DEVICE_TYPE
.
DESKTOP
:
break
$store
.
commit
(
'TOGGLE_DEVICE'
,
'desktop'
)
case
DEVICE_TYPE
.
TABLET
:
$store
.
dispatch
(
'setSidebar'
,
true
)
$store
.
commit
(
'TOGGLE_DEVICE'
,
'tablet'
)
break
$store
.
dispatch
(
'setSidebar'
,
false
)
case
DEVICE_TYPE
.
TABLET
:
break
console
.
log
(
'tablet'
)
case
DEVICE_TYPE
.
MOBILE
:
$store
.
dispatch
(
'ToggleDevice'
,
'tablet'
)
default
:
$store
.
dispatch
(
'setSidebar'
,
false
)
$store
.
commit
(
'TOGGLE_DEVICE'
,
'mobile'
)
break
$store
.
dispatch
(
'setSidebar'
,
true
)
case
DEVICE_TYPE
.
MOBILE
:
break
default
:
}
$store
.
commit
(
'TOGGLE_DEVICE'
,
'mobile'
)
console
.
log
(
'deviceType'
,
deviceType
)
$store
.
dispatch
(
'setSidebar'
,
false
)
})
break
}
}
}
console
.
log
(
'deviceType'
,
deviceType
)
</
script
>
})
<
style
>
}
#app
{
}
height
:
100%
;
</
script
>
}
<
style
>
#app
{
height
:
100%
;
}
</
style
>
</
style
>
\ No newline at end of file
src/components/page/GlobalLayout.vue
View file @
5cb512cb
This diff is collapsed.
Click to expand it.
src/utils/mixin.js
View file @
5cb512cb
...
@@ -14,6 +14,7 @@ const mixin = {
...
@@ -14,6 +14,7 @@ const mixin = {
colorWeak
:
state
=>
state
.
app
.
weak
,
colorWeak
:
state
=>
state
.
app
.
weak
,
fixedHeader
:
state
=>
state
.
app
.
fixedHeader
,
fixedHeader
:
state
=>
state
.
app
.
fixedHeader
,
fixSiderbar
:
state
=>
state
.
app
.
fixSiderbar
,
fixSiderbar
:
state
=>
state
.
app
.
fixSiderbar
,
fixSidebar
:
state
=>
state
.
app
.
fixSiderbar
,
contentWidth
:
state
=>
state
.
app
.
contentWidth
,
contentWidth
:
state
=>
state
.
app
.
contentWidth
,
autoHideHeader
:
state
=>
state
.
app
.
autoHideHeader
,
autoHideHeader
:
state
=>
state
.
app
.
autoHideHeader
,
sidebarOpened
:
state
=>
state
.
app
.
sidebar
sidebarOpened
:
state
=>
state
.
app
.
sidebar
...
...
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