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;
                },
        }


  • 相关阅读:
    运算符
    变量数据类型及其转换
    JAVA基础知识
    关于Eclipse及JDK安装过程中的一些问题
    python并发编程相关概念总结
    python网络编程01
    python网络编程
    python面向对象编程设计与开发
    python面向对象编程实例
    文件、函数、装饰器、迭代器实例
  • 原文地址:https://www.cnblogs.com/jlyuan/p/11973872.html
Copyright © 2011-2022 走看看