feat: 代码规范修改

pull/309/head
wangxueliang 2018-11-14 20:43:20 +08:00
parent cfc7e15fdf
commit d2c037a7a3
6 changed files with 26 additions and 27 deletions

View File

@ -12,4 +12,4 @@ export default {
next_5: '5 עמודים הבאים', next_5: '5 עמודים הבאים',
prev_3: '3 עמודים קודמים', prev_3: '3 עמודים קודמים',
next_3: '3 עמודים הבאים', next_3: '3 עמודים הבאים',
}; }

View File

@ -12,4 +12,4 @@ export default {
next_5: 'နောက် ၅ခုမြောက်', next_5: 'နောက် ၅ခုမြောက်',
prev_3: 'ယခင် ၃ခုမြောက်', prev_3: 'ယခင် ၃ခုမြောက်',
next_3: 'နောက် ၃ခုမြောက်', next_3: 'နောက် ၃ခုမြောက်',
}; }

View File

@ -12,4 +12,4 @@ export default {
next_5: 'Дараагийн 5 хуудас', next_5: 'Дараагийн 5 хуудас',
prev_3: 'Дараагийн 3 хуудас', prev_3: 'Дараагийн 3 хуудас',
next_3: 'Дараагийн 3 хуудас', next_3: 'Дараагийн 3 хуудас',
}; }

View File

@ -65,9 +65,9 @@ export default {
} else if (icon && !isString(icon)) { } else if (icon && !isString(icon)) {
iconNode = <span class={`${prefixCls}-icon`}>{icon}</span> iconNode = <span class={`${prefixCls}-icon`}>{icon}</span>
} else if (icons && icons.finish && status === 'finish') { } else if (icons && icons.finish && status === 'finish') {
iconNode = <span class={`${prefixCls}-icon`}>{icons.finish}</span>; iconNode = <span class={`${prefixCls}-icon`}>{icons.finish}</span>
} else if (icons && icons.error && status === 'error') { } else if (icons && icons.error && status === 'error') {
iconNode = <span class={`${prefixCls}-icon`}>{icons.error}</span>; iconNode = <span class={`${prefixCls}-icon`}>{icons.error}</span>
} else if (icon || status === 'finish' || status === 'error') { } else if (icon || status === 'finish' || status === 'error') {
iconNode = <span class={iconClassName} /> iconNode = <span class={iconClassName} />
} else { } else {

View File

@ -116,7 +116,7 @@ export default {
{ {
filteredChildren.map((child, index) => { filteredChildren.map((child, index) => {
const childProps = getPropsData(child) const childProps = getPropsData(child)
const stepNumber = initial + index; const stepNumber = initial + index
const stepProps = { const stepProps = {
props: { props: {
stepNumber: `${stepNumber + 1}`, stepNumber: `${stepNumber + 1}`,

View File

@ -2,10 +2,9 @@ import Steps, { Step } from '../index'
import '../assets/index.less' import '../assets/index.less'
import '../assets/iconfont.less' import '../assets/iconfont.less'
export default { export default {
methods: { methods: {
getFinishIcon() { getFinishIcon () {
const path = 'M923 283.6c-13.4-31.1-32.6-58.9-56.9-82.8-24.3-23.8-52.' + const path = 'M923 283.6c-13.4-31.1-32.6-58.9-56.9-82.8-24.3-23.8-52.' +
'5-42.4-84-55.5-32.5-13.5-66.9-20.3-102.4-20.3-49.3 0-97.4 13.5-139' + '5-42.4-84-55.5-32.5-13.5-66.9-20.3-102.4-20.3-49.3 0-97.4 13.5-139' +
'.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5' + '.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5' +
@ -15,20 +14,20 @@ export default {
'.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.' + '.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.' +
'7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 10' + '7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 10' +
'1.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 ' + '1.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 ' +
'20.3-103.3 0.1-35.3-7-69.6-20.9-101.9z'; '20.3-103.3 0.1-35.3-7-69.6-20.9-101.9z'
return ( return (
<svg <svg
width="1em" width='1em'
height="1em" height='1em'
fill="currentColor" fill='currentColor'
viewBox="0 0 1024 1024" viewBox='0 0 1024 1024'
style="verticalAlign: -.125em" style='verticalAlign: -.125em'
> >
<path d={path} /> <path d={path} />
</svg> </svg>
); )
}, },
getErrorIcon() { getErrorIcon () {
const path1 = 'M512 0C229.2 0 0 229.2 0 512s229.2 512 512 512 512-229' + const path1 = 'M512 0C229.2 0 0 229.2 0 512s229.2 512 512 512 512-229' +
'.2 512-512S794.8 0 512 0zm311.1 823.1c-40.4 40.4-87.5 72.2-139.9 9' + '.2 512-512S794.8 0 512 0zm311.1 823.1c-40.4 40.4-87.5 72.2-139.9 9' +
'4.3C629 940.4 571.4 952 512 952s-117-11.6-171.2-34.5c-52.4-22.2-99' + '4.3C629 940.4 571.4 952 512 952s-117-11.6-171.2-34.5c-52.4-22.2-99' +
@ -37,24 +36,24 @@ export default {
'0.4 87.5-72.2 139.9-94.3C395 83.6 452.6 72 512 72s117 11.6 171.2 3' + '0.4 87.5-72.2 139.9-94.3C395 83.6 452.6 72 512 72s117 11.6 171.2 3' +
'4.5c52.4 22.2 99.4 53.9 139.9 94.3 40.4 40.4 72.2 87.5 94.3 139.9C' + '4.5c52.4 22.2 99.4 53.9 139.9 94.3 40.4 40.4 72.2 87.5 94.3 139.9C' +
'940.4 395 952 452.6 952 512s-11.6 117-34.5 171.2c-22.2 52.4-53.9 9' + '940.4 395 952 452.6 952 512s-11.6 117-34.5 171.2c-22.2 52.4-53.9 9' +
'9.5-94.4 139.9z'; '9.5-94.4 139.9z'
const path2 = 'M640.3 765.5c-19.9 0-36-16.1-36-36 0-50.9-41.4-92.3-92' + const path2 = 'M640.3 765.5c-19.9 0-36-16.1-36-36 0-50.9-41.4-92.3-92' +
'.3-92.3s-92.3 41.4-92.3 92.3c0 19.9-16.1 36-36 36s-36-16.1-36-36c0' + '.3-92.3s-92.3 41.4-92.3 92.3c0 19.9-16.1 36-36 36s-36-16.1-36-36c0' +
'-90.6 73.7-164.3 164.3-164.3s164.3 73.7 164.3 164.3c0 19.9-16.1 36' + '-90.6 73.7-164.3 164.3-164.3s164.3 73.7 164.3 164.3c0 19.9-16.1 36' +
'-36 36zM194.2 382.4a60 60 0 1 0 120 0 60 60 0 1 0-120 0zM709.5 382' + '-36 36zM194.2 382.4a60 60 0 1 0 120 0 60 60 0 1 0-120 0zM709.5 382' +
'.4a60 60 0 1 0 120 0 60 60 0 1 0-120 0z'; '.4a60 60 0 1 0 120 0 60 60 0 1 0-120 0z'
return ( return (
<svg <svg
width="1em" width='1em'
height="1em" height='1em'
fill="currentColor" fill='currentColor'
viewBox="0 0 1024 1024" viewBox='0 0 1024 1024'
style="verticalAlign: -.125em" style='verticalAlign: -.125em'
> >
<path d={path1} /> <path d={path1} />
<path d={path2} /> <path d={path2} />
</svg> </svg>
); )
}, },
}, },
render () { render () {
@ -70,9 +69,9 @@ export default {
} }
return ( return (
<Steps {...settings}> <Steps {...settings}>
<Step title="Finished" description="This is a description" /> <Step title='Finished' description='This is a description' />
<Step title="In Process" description="This is a description" /> <Step title='In Process' description='This is a description' />
<Step title="Waiting" description="This is a description" /> <Step title='Waiting' description='This is a description' />
</Steps> </Steps>
) )
}, },