Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Element
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林焕东
Element
Commits
33e7e343
Commit
33e7e343
authored
Nov 13, 2016
by
furybean
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add /play to debug component.
parent
58dc7e14
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
3 deletions
+45
-3
examples/app.vue
examples/app.vue
+2
-2
examples/play/component.vue
examples/play/component.vue
+19
-0
examples/play/index.vue
examples/play/index.vue
+17
-0
examples/route.config.js
examples/route.config.js
+7
-1
No files found.
examples/app.vue
View file @
33e7e343
...
@@ -105,11 +105,11 @@
...
@@ -105,11 +105,11 @@
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<main-header></main-header>
<main-header
v-if=
"lang !== 'play'"
></main-header>
<div
class=
"main-cnt"
>
<div
class=
"main-cnt"
>
<router-view></router-view>
<router-view></router-view>
</div>
</div>
<main-footer></main-footer>
<main-footer
v-if=
"lang !== 'play'"
></main-footer>
</div>
</div>
</
template
>
</
template
>
...
...
examples/play/component.vue
0 → 100644
View file @
33e7e343
<
template
>
<div>
<el-button>
Test
</el-button>
</div>
</
template
>
<
style
scoped
>
</
style
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
methods
:
{
},
data
()
{
return
{};
}
};
</
script
>
examples/play/index.vue
0 → 100644
View file @
33e7e343
<
style
scoped
>
</
style
>
<
template
>
<div
style=
"margin: 20px;"
>
<!-- Write your component in component.vue -->
<play-component></play-component>
</div>
</
template
>
<
script
>
import
PlayComponent
from
'
./component.vue
'
;
export
default
{
components
:
{
PlayComponent
}
};
</
script
>
examples/route.config.js
View file @
33e7e343
...
@@ -49,7 +49,7 @@ const registerRoute = (navConfig) => {
...
@@ -49,7 +49,7 @@ const registerRoute = (navConfig) => {
let
route
=
registerRoute
(
navConfig
);
let
route
=
registerRoute
(
navConfig
);
function
generateMiscRoutes
(
lang
)
{
const
generateMiscRoutes
=
function
(
lang
)
{
let
guideRoute
=
{
let
guideRoute
=
{
path
:
`/
${
lang
}
/guide`
,
// 指南
path
:
`/
${
lang
}
/guide`
,
// 指南
redirect
:
`/
${
lang
}
/guide/design`
,
redirect
:
`/
${
lang
}
/guide/design`
,
...
@@ -85,6 +85,12 @@ langs.forEach(lang => {
...
@@ -85,6 +85,12 @@ langs.forEach(lang => {
route
=
route
.
concat
(
generateMiscRoutes
(
lang
.
lang
));
route
=
route
.
concat
(
generateMiscRoutes
(
lang
.
lang
));
});
});
route
.
push
({
path
:
'
/play
'
,
name
:
'
play
'
,
component
:
require
(
'
./play/index.vue
'
)
});
let
userLanguage
=
localStorage
.
getItem
(
'
ELEMENT_LANGUAGE
'
)
||
window
.
navigator
.
language
;
let
userLanguage
=
localStorage
.
getItem
(
'
ELEMENT_LANGUAGE
'
)
||
window
.
navigator
.
language
;
let
defaultPath
=
'
/en-US
'
;
let
defaultPath
=
'
/en-US
'
;
if
(
userLanguage
.
indexOf
(
'
zh-
'
)
!==
-
1
)
{
if
(
userLanguage
.
indexOf
(
'
zh-
'
)
!==
-
1
)
{
...
...
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