• "浮动弹层"组件:<float-layout> —— 快应用组件库H-UI


    Screenshot_20200417_161527_com.huawei.fastapp

    <import name="float-layout" src="../Common/ui/h-ui/feedback/c_float_layout"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <float-layout id="floatlayout"></float-layout>
            <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: {
            },
            handleClick1() {
                this.$child('floatlayout').showFloatLayout({
                    title: 'H-UI',
                    memo: 'h-ui是一套为快应用开发者量身打制的UI组件库,以传统html5标签为基础,遵循主流前端框架样式命名习惯,对快应用原生组件二次封装而成,以实现快应用“全组件式开发”为目标,让快应用开发就像搭积木!'
                });
            }
        }
    </script>
    

    Screenshot_20200417_161542_com.huawei.fastapp

    <import name="float-layout" src="../Common/ui/h-ui/feedback/c_float_layout"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <float-layout id="floatlayout"></float-layout>
            <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: {
            },
            handleClick2() {
                this.$child('floatlayout').showFloatLayout({
                    title: 'H-UI',
                    height: 'normal',
                    memo: 'h-ui是一套为快应用开发者量身打制的UI组件库,以传统html5标签为基础,遵循主流前端框架样式命名习惯,对快应用原生组件二次封装而成,以实现快应用“全组件式开发”为目标,让快应用开发就像搭积木!h-ui是一套为快应用开发者量身打制的UI组件库,以传统html5标签为基础,遵循主流前端框架样式命名习惯,对快应用原生组件二次封装而成,以实现快应用“全组件式开发”为目标,让快应用开发就像搭积木!'
                });
            }
        }
    </script>
    

    Screenshot_20200417_161756_com.huawei.fastapp

    <import name="float-layout" src="../Common/ui/h-ui/feedback/c_float_layout"></import>
    <import name="h-button" src="../Common/ui/h-ui/basic/c_button"></import>
    <template>
        <div class="container">
            <float-layout id="floatlayout"></float-layout>
            <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: {
            },
            handleClick3() {
                this.$child('floatlayout').showFloatLayout({
                    title: '汉堡秒杀',
                    height: 'high',
                    extra: '¥0.01',
                    image: 'https://h-ui.obs.cn-south-1.myhuaweicloud.com/image/hanbao.jpg',
                    memo: '好吃的汉堡,快应用开发者专供!'
                });
            }
        }
    </script>
    

    扫码体验

  • 相关阅读:
    绘制SVG内容到Canvas的HTML5应用
    HT for Web 3D游戏设计设计--汉诺塔(Towers of Hanoi)
    HT for Web自定义3D模型的WebGL应用
    纯Shading Language绘制飞机火焰效果
    纯Shading Language绘制HTML5时钟
    HTML5版的String Avoider小游戏
    基于HT的CSG功能构建HTML5的3D书架
    HTML5 Web 客户端五种离线存储方式汇总
    基于HTML5的Drag and Drop生成图片Base64信息
    HT for Web可视化QuadTree四叉树碰撞检测
  • 原文地址:https://www.cnblogs.com/cloud-dev/p/fu-dong-dan-cengzu-jianltfloatlayoutgt--kuai-ying-.html
Copyright © 2020-2023  润新知