You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< script >
import { isZhCN } from '../util'
export default {
props : {
num : Number ,
} ,
data ( ) {
return {
}
} ,
methods : {
handleClick ( ) {
const { name } = this . $route . params
const newName = isZhCN ( name ) ? name . replace ( '-cn' , '' ) : ` ${ name } -cn `
this . $router . push ( {
path : ` /ant-design/components/ ${ newName } / ` ,
} )
} ,
} ,
render ( ) {
const { name } = this . $route . params
const isCN = isZhCN ( name )
return (
< header id = 'header' >
< a -row >
< a -col xxl = { 4 } xl = { 5 } lg = { 5 } md = { 6 } sm = { 24 } xs = { 24 } >
< router -link to = { { path : '/ant-design' } } id = 'logo' >
< img alt = 'logo' src = 'https://raw.githubusercontent.com/vueComponent/ant-design/master/logo.png' / >
< span > VUE - ANTD < / span >
< / r o u t e r - l i n k >
< / a - c o l >
< a -col xxl = { 20 } xl = { 19 } lg = { 19 } md = { 18 } sm = { 0 } xs = { 0 } >
< div id = 'search-box' >
进度 : { this . num } / 52
< / div >
< a -button ghost size = 'small' onClick = { this . handleClick } class = 'header-lang-button' key = 'lang-button' >
{ isCN ? 'English' : '中文' }
< / a - b u t t o n >
< a -menu selectedKeys = { [ 'components' ] } mode = 'horizontal' class = 'menu-site' id = 'nav' >
< a -menu -item key = 'components' >
{ isCN ? '组件' : 'Components' }
< / a - m e n u - i t e m >
< a -menu -item key = 'github' >
< a href = 'https://github.com/vueComponent/ant-design' > GitHub < / a >
< / a - m e n u - i t e m >
< / a - m e n u >
< / a - c o l >
< / a - r o w >
< / header >
)
} ,
}
< / script >