2018-03-09 18:52:31 +08:00
|
|
|
<script>
|
2019-01-12 11:33:27 +08:00
|
|
|
import Steps, { Step } from '../index';
|
|
|
|
import '../assets/index.less';
|
|
|
|
import '../assets/iconfont.less';
|
2018-03-09 18:52:31 +08:00
|
|
|
|
|
|
|
export default {
|
2019-09-28 20:45:07 +08:00
|
|
|
data() {
|
2018-03-09 18:52:31 +08:00
|
|
|
return {
|
2019-09-28 20:45:07 +08:00
|
|
|
steps: [
|
|
|
|
{
|
|
|
|
title: '已完成',
|
|
|
|
description:
|
|
|
|
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '进行中',
|
|
|
|
description:
|
|
|
|
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '待运行',
|
|
|
|
description:
|
|
|
|
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '待运行',
|
|
|
|
description:
|
|
|
|
'这里是多信息的描述啊描述啊描述啊描述啊哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶哦耶',
|
|
|
|
},
|
|
|
|
],
|
2019-01-12 11:33:27 +08:00
|
|
|
};
|
2018-03-09 18:52:31 +08:00
|
|
|
},
|
|
|
|
methods: {
|
2019-09-28 20:45:07 +08:00
|
|
|
addStep() {
|
2018-03-09 18:52:31 +08:00
|
|
|
this.steps.push({
|
|
|
|
title: '待运行',
|
|
|
|
description: '新的节点',
|
2019-01-12 11:33:27 +08:00
|
|
|
});
|
2018-03-09 18:52:31 +08:00
|
|
|
},
|
|
|
|
},
|
2019-09-28 20:45:07 +08:00
|
|
|
render() {
|
2018-03-09 18:52:31 +08:00
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<button onClick={this.addStep}>Add new step</button>
|
2019-09-28 20:45:07 +08:00
|
|
|
<Steps>
|
|
|
|
{this.steps.map((step, i) => (
|
|
|
|
<Step key={i} title={step.title} description={step.description} />
|
|
|
|
))}
|
|
|
|
</Steps>
|
2018-03-09 18:52:31 +08:00
|
|
|
</div>
|
2019-01-12 11:33:27 +08:00
|
|
|
);
|
2018-03-09 18:52:31 +08:00
|
|
|
},
|
2019-01-12 11:33:27 +08:00
|
|
|
};
|
2018-03-09 18:52:31 +08:00
|
|
|
</script>
|