zoukankan      html  css  js  c++  java
  • "颜色选择器"组件:<color-picker> —— 快应用组件库H-UI

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                 <color-picker id="colorpicker1" params="{{params}}"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker2" params="{{params}}" form-horizontal="true"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker3" params="{{params}}" form-horizontal="true" no-border="true"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker4" params="{{params}}" title="none"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker5" params="{{params}}" title="衣服颜色"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker6" params="{{params}}" value="#0000ff"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
                <color-picker id="colorpicker7" params="{{params}}" disabled="true"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
               <color-picker id="colorpicker8" params="{{params}}" not-blank="false"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
               <color-picker id="colorpicker9" params="{{params}}" valid="has-error" form-error="该颜色已存在!"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
               <color-picker id="colorpicker10" params="{{params}}" valid="none" not-blank="false"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    
    <script>
        export default {
            private: {
                params: {}
            }
        }
    </script>
    

    <import name="form" src="../Common/ui/h-ui/form/c_form"></import>
    <import name="color-picker" src="../Common/ui/h-ui/form/c_color_picker"></import>
    <template>
        <div class="container">
            <form>
               <color-picker id="colorpicker11" params="{{params}}"></color-picker>
            </form>
        </div>
    </template>
    
    <style lang="less">
        @import '../Common/styles/container.less';
    </style>
    
    <script>
        import prompt from '@system.prompt'
    
        export default {
            private: {
                params: {}
            },
            onInit() {
                this.$on('colorpicker11_dispatchEvt',this.dispatchEvt)
            },
            dispatchEvt(evt) {
                // 弹窗显示详细说明
                prompt.showToast({
                    message: evt.detail.value,
                    duration: 1,
                    gravity: 'top'
                })
            }
        }
    </script>
    

    扫码体验

  • 相关阅读:
    multilabel-multiclass classifier
    关于zabbix _get返回Could not attach to pid的问题
    python导出环境依赖到req,txt文件中
    inode满的解决方法
    搞定面试官:咱们从头到尾再说一次 Java 垃圾回收
    SpringBoot项目,如何优雅的把接口参数中的空白值替换为null值?
    万万没想到,JVM内存区域的面试题也可以问的这么难?
    万万没想到,面试中,连 ClassLoader类加载器 也能问出这么多问题…..
    npm私服verdaccio报sha错误的解决方案
    配置SQL Server 2016无域AlwaysOn(转)
  • 原文地址:https://www.cnblogs.com/cloud-dev/p/yan-se-xuan-ze-qizu-jianltcolorpickergt--kuai-ying.html
Copyright © 2011-2022 走看看