0.1.1 • Published 4 years ago
s-stage.vue v0.1.1
SStage 阶段
阶段组件
示例
基本用法
<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>
API
Props/Attrs
Prop/Attr | Type | Options | Default | Description |
---|---|---|---|---|
list | Array | [] | 需要传入的值 |
Slots
(default)
插入文本或 HTML。
Events
@add
新增时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |
@remove
删除时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |
@detail
点击阶段时触发
Param | Type | Description |
---|---|---|
$event.index | string | 参数1 |