0.1.1 • Published 6 years ago
vue-victop-components v0.1.1
vue-victop-components
victopComponent vue project
Build Setup
# install dependencies
npm install vue-victop-components --save
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# main.js
import VictopComponents from 'vue-victop-components'
Vue.use(VictopComponents)
Components
Work-flow
# html
<work-flow
@clickCard="onClickCard"
@changeChecked="onChangeChecked"
@selectAllCard="selectAllCard"
:itemSource="[{nodename:'提单节点',title:'这是一个标题'},2,3,4,5,6,7,7]"
:titleKey="'title'"
:showCardCheckbox="true"
:activedCardIndex="4"
>
<template v-slot:cardBody="{context}">{{context.cardIndex}}</template>
</work-flow>
# js
methods: {
//单击卡片
onClickCard(data, index, isSelected) {
console.log("单击卡片", data, index, isSelected);
},
//单击卡片复选框
onChangeChecked(data, index, isSelected) {
console.log("单击卡片复选框", data, index, isSelected);
},
//选中所有卡片
selectAllCard(data, index, isSelected) {
console.log("选中所有卡片", data, index, isSelected);
}
}
For detailed explanation on how things work, consult the docs for vue-loader.