阶段组件
<template>
<s-stage :list="list" @add="addStage"></s-stage>
</template>
<script>
export default {
data(){
return {
list: [{ name: 'step 1' }, { name: 'step 2' }],
}
},
methods: {
addStage(index) {
this.list.splice(index, 0, { name: 'new step' });
}
}
}
</script>
Prop/Attr | Type | Options | Default | Description |
---|---|---|---|---|
list | Array | [] |
需要传入的值 |
插入文本或 HTML。
新增时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |
删除时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |
点击阶段时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |