Element: steps组件动态添加数据,流程显示文字不自增

Created on 18 Jan 2017  ·  3Comments  ·  Source: ElemeFE/element

ElementUI version

[email protected]

OS/Browers version

macOS/Chrome 55.0.2883.95 (64-bit)

Vue version

[email protected]

Steps to reproduce

2017-01-18 9 12 40

<!--模版-->
<template>
    <div>
        <el-button type="primary" @click="add">默认按钮</el-button>
        <el-steps :space="100" :active="active" finish-status="success">
            <el-step v-for="item in steps" :title="item.title"></el-step>
        </el-steps>
    </div>
</template>
<!--脚本-->
<script>
    export default {
        data: function () {
            return {
                steps: [{
                    title: '1111',
                }, {
                    title: '222',
                }, {
                    title: '333',
                }, ]
            }
        },
        methods: {
            add: function () {
                this.steps.push({
                    title: '444'
                })
            }
        }
    }
</script>

What is Expected?

期望动态添加steps节点, 期望流程数是自增的

What is actually happening?

动态往steps里添加节点,流程不断增加0

bug

Most helpful comment

能否让直接使得step的icon支持绑定@click 事件,自己按钮老是不能对齐

All 3 comments

Fixed in #2523

能否让直接使得step的icon支持绑定@click 事件,自己按钮老是不能对齐

想知道给步骤条添加图标时,在i标签内为什么添加事件,在页面点击时不触发任何函数??

Was this page helpful?
0 / 5 - 0 ratings