zoukankan      html  css  js  c++  java
  • "抽屉"组件:<drawer> —— 快应用组件库H-UI

    Screenshot_20200417_131415_com.huawei.fastapp

    <import name="drawer" src="../Common/ui/h-ui/navigation/c_drawer"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <drawer id="drawer"></drawer>
            <h-button text="基本实例" block="true" type="info" onclick="handleClick1"></h-button>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                data: [
                    {
                        icon: 'female',
                        bgColor: 'bg-success',
                        title: '美妆',
                        uri: '/About'
                    },
                    {
                        icon: 'bag',
                        bgColor: 'bg-danger',
                        title: '包包',
                        uri: '/About'
                    },
                    {
                        icon: 'ring',
                        bgColor: 'bg-indigo',
                        title: '戒指',
                        uri: '/About'
                    },
                    {
                        icon: 'necklace',
                        bgColor: 'bg-pink',
                        title: '项链',
                        uri: '/About'
                    },
                    {
                        icon: 'skirt',
                        bgColor: 'bg-orange',
                        title: '连衣裙',
                        uri: '/About'
                    },
                    {
                        icon: 'shoe',
                        bgColor: 'bg-teal',
                        title: '高跟鞋',
                        uri: '/About'
                    },
                    {
                        icon: 't-shirt',
                        bgColor: 'bg-purple',
                        title: 'T恤',
                        uri: '/About'
                    },
                    {
                        icon: 'pants',
                        bgColor: 'bg-cyan',
                        title: '裤子',
                        uri: '/About'
                    },
                    {
                        icon: 'coat',
                        bgColor: 'bg-warning',
                        title: '外套',
                        uri: '/About'
                    }
                ]
            },
            handleClick1() {
                this.$child('drawer').showdrawer({
                    data: this.data
                });
            }
        }
    </script>
    

    Screenshot_20200417_131426_com.huawei.fastapp

    <import name="drawer" src="../Common/ui/h-ui/navigation/c_drawer"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <drawer id="drawer"></drawer>
            <h-button text="左抽屉演示" block="true" type="info" onclick="handleClick2"></h-button>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                data: [
                    {
                        icon: 'female',
                        bgColor: 'bg-success',
                        title: '美妆',
                        uri: '/About'
                    },
                    {
                        icon: 'bag',
                        bgColor: 'bg-danger',
                        title: '包包',
                        uri: '/About'
                    },
                    {
                        icon: 'ring',
                        bgColor: 'bg-indigo',
                        title: '戒指',
                        uri: '/About'
                    },
                    {
                        icon: 'necklace',
                        bgColor: 'bg-pink',
                        title: '项链',
                        uri: '/About'
                    },
                    {
                        icon: 'skirt',
                        bgColor: 'bg-orange',
                        title: '连衣裙',
                        uri: '/About'
                    },
                    {
                        icon: 'shoe',
                        bgColor: 'bg-teal',
                        title: '高跟鞋',
                        uri: '/About'
                    },
                    {
                        icon: 't-shirt',
                        bgColor: 'bg-purple',
                        title: 'T恤',
                        uri: '/About'
                    },
                    {
                        icon: 'pants',
                        bgColor: 'bg-cyan',
                        title: '裤子',
                        uri: '/About'
                    },
                    {
                        icon: 'coat',
                        bgColor: 'bg-warning',
                        title: '外套',
                        uri: '/About'
                    }
                ]
            },
            handleClick2() {
                this.$child('drawer').showdrawer({
                    data: this.data,
                    mode: 'left'
                });
            }
        }
    </script>
    

    Screenshot_20200417_131434_com.huawei.fastapp

    <import name="drawer" src="../Common/ui/h-ui/navigation/c_drawer"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <drawer id="drawer"></drawer>
            <h-button text="右抽屉演示" block="true" type="info" onclick="handleClick3"></h-button>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                data: [
                    {
                        icon: 'female',
                        bgColor: 'bg-success',
                        title: '美妆',
                        uri: '/About'
                    },
                    {
                        icon: 'bag',
                        bgColor: 'bg-danger',
                        title: '包包',
                        uri: '/About'
                    },
                    {
                        icon: 'ring',
                        bgColor: 'bg-indigo',
                        title: '戒指',
                        uri: '/About'
                    },
                    {
                        icon: 'necklace',
                        bgColor: 'bg-pink',
                        title: '项链',
                        uri: '/About'
                    },
                    {
                        icon: 'skirt',
                        bgColor: 'bg-orange',
                        title: '连衣裙',
                        uri: '/About'
                    },
                    {
                        icon: 'shoe',
                        bgColor: 'bg-teal',
                        title: '高跟鞋',
                        uri: '/About'
                    },
                    {
                        icon: 't-shirt',
                        bgColor: 'bg-purple',
                        title: 'T恤',
                        uri: '/About'
                    },
                    {
                        icon: 'pants',
                        bgColor: 'bg-cyan',
                        title: '裤子',
                        uri: '/About'
                    },
                    {
                        icon: 'coat',
                        bgColor: 'bg-warning',
                        title: '外套',
                        uri: '/About'
                    }
                ]
            },
            handleClick3() {
                this.$child('drawer').showdrawer({
                    data: this.data
                    mode: 'right'
                });
            }
        }
    </script>
    

    扫码体验

  • 相关阅读:
    阿里云重磅发布DMS数据库实验室 免费体验数据库引擎
    阿里云移动端播放器高级功能---直播时移
    图解SQL的inner join、left join、right join、full outer join、union、union all的区别
    索引覆盖分析
    case when 性能优化
    Eclipse断点种类
    Eclipse高效率开发技巧
    VS Code编辑器
    正则表达式
    JDBC编程之预编译SQL与防注入式攻击以及PreparedStatement的使用教程
  • 原文地址:https://www.cnblogs.com/cloud-dev/p/chou-tizu-jianltdrawergt--kuai-ying-yong-zu-jian-k.html
Copyright © 2011-2022 走看看