todolist-ui
v1.0.1
Published
A simple to-do list component
Downloads
3
Readme
描述
一款简洁好用的待办事项组件
安装
cnpm i todolist-ui -S
使用
在src下的main.js文件中:
import Todolist from 'todolist-ui';
Vue.use(Todolist);
import 'todolist-ui/todolist-ui.css';
在需要使用的组件中:
<template>
<Todolist @send-msg="handleSend"
@delete-msg="handleDelete">待办事项</Todolist>
</template>
<script>
export default {
methods: {
//todolist相关处理函数
handleSend(msg) {
console.log(msg);
},
handleDelete(msg) {
console.log(msg);
}
}
}
</script>