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
b68f18aa
Commit
b68f18aa
authored
Feb 01, 2018
by
杨奕
Committed by
GitHub
Feb 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pagination: add key in pager (#9604)
parent
41a191b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
3 deletions
+4
-3
build/bin/version.js
build/bin/version.js
+1
-1
examples/components/header.vue
examples/components/header.vue
+1
-1
examples/versions.json
examples/versions.json
+1
-1
packages/pagination/src/pager.vue
packages/pagination/src/pager.vue
+1
-0
No files found.
build/bin/version.js
View file @
b68f18aa
var
fs
=
require
(
'
fs
'
);
var
fs
=
require
(
'
fs
'
);
var
path
=
require
(
'
path
'
);
var
path
=
require
(
'
path
'
);
var
version
=
process
.
env
.
VERSION
||
require
(
'
../../package.json
'
).
version
;
var
version
=
process
.
env
.
VERSION
||
require
(
'
../../package.json
'
).
version
;
var
content
=
{
'
1.4.13
'
:
'
1.4
'
};
var
content
=
{
'
1.4.13
'
:
'
1.4
'
,
'
2.0.11
'
:
'
2.0
'
};
if
(
!
content
[
version
])
content
[
version
]
=
'
2.1
'
;
if
(
!
content
[
version
])
content
[
version
]
=
'
2.1
'
;
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
'
../../examples/versions.json
'
),
JSON
.
stringify
(
content
));
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
'
../../examples/versions.json
'
),
JSON
.
stringify
(
content
));
examples/components/header.vue
View file @
b68f18aa
...
@@ -431,7 +431,7 @@
...
@@ -431,7 +431,7 @@
xhr
.
onreadystatechange
=
_
=>
{
xhr
.
onreadystatechange
=
_
=>
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
const
versions
=
JSON
.
parse
(
xhr
.
responseText
);
const
versions
=
JSON
.
parse
(
xhr
.
responseText
);
this
.
versions
=
Object
.
keys
(
versions
).
slice
(
-
2
).
reduce
((
prev
,
next
)
=>
{
this
.
versions
=
Object
.
keys
(
versions
).
reduce
((
prev
,
next
)
=>
{
prev
[
next
]
=
versions
[
next
];
prev
[
next
]
=
versions
[
next
];
return
prev
;
return
prev
;
},
{});
},
{});
...
...
examples/versions.json
View file @
b68f18aa
{
"1.4.13"
:
"1.4"
,
"2.1.0"
:
"2.1"
}
{
"1.4.13"
:
"1.4"
,
"2.0.11"
:
"2.0"
,
"2.1.0"
:
"2.1"
}
\ No newline at end of file
\ No newline at end of file
packages/pagination/src/pager.vue
View file @
b68f18aa
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
</li>
</li>
<li
<li
v-for=
"pager in pagers"
v-for=
"pager in pagers"
:key=
"pager"
:class=
"
{ active: currentPage === pager }"
:class=
"
{ active: currentPage === pager }"
class="number">
{{
pager
}}
</li>
class="number">
{{
pager
}}
</li>
<li
<li
...
...
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