zoukankan      html  css  js  c++  java
  • element-ui Drawer抽屉组件封装


    <template> <div class="com"> <el-drawer title="我是标题" :visible.sync="drawer_" :direction="direction"> <span>我来啦! {{task.name}}</span> </el-drawer> </div> </template> <script> export default { props:{ task:{ type:Object, default:()=>{} }, drawer:{ type:Boolean, default:false }, direction:{ type:String, default:'rtl' } }, data(){ return { } }, computed: { drawer_:{ get(){ return this.drawer }, set(v){ this.$emit("changeDrawer",v) } } }, } </script> <style scoped> </style>

    调用:

     <task-form @changeDrawer="changeDrawer" :task="taskFormData" :drawer="drawer" :direction="direction"></task-form>
            data() {
                return {
                    taskData: [],// 任务数据
                    drawer: false,
                    direction: 'rtl',
                    taskFormData:{}
                }
            },
     
        
            methods: {
                changeDrawer(v){
                    this.drawer = v;
                },
        }


  • 相关阅读:
    hdu 3951 Coin Game
    hdu 1273 漫步森林
    hdu 2082 找单词
    kmp算法(模板)
    CodeForces 742B Arpa’s obvious problem and Mehrdad’s terrible solution
    大二上每日总结
    大二上每日总结
    大二上每日总结
    大二上学期周总结
    大二上每日总结
  • 原文地址:https://www.cnblogs.com/jlyuan/p/11973872.html
Copyright © 2011-2022 走看看