Giter Club home page Giter Club logo

Comments (6)

afc163 avatar afc163 commented on June 29, 2024

overlay 没有 trigger 属性,不知是不是用串了。

from overlay.

b1ngx avatar b1ngx commented on June 29, 2024

做一个类似dialog的弹框 点击触发元素的时候 只有第一个会显示 后面的调试的时候发现显示了 但是不知道为什么又关闭

from overlay.

afc163 avatar afc163 commented on June 29, 2024

把你的代码放出来看看吧。

from overlay.

b1ngx avatar b1ngx commented on June 29, 2024

http://aralejs.org/overlay/examples/ 文档三这个例子 ,每个选择器要单独实例化么

var Layer = Overlay.extend({
        attrs : {
            trigger: null,
            template:'<div class="uiLayer">我在这呢</div>'
        },
        setup: function() {
            var that = this;
            Layer.superclass.setup.call(this);

            $(this.get('trigger')).click(function() {
                that.show();
            });
            // 需要调用这句话来实现功能
            this._blurHide(this.get('trigger'));
        },
        show:function(){
            Layer.superclass.show.call(this);
            this._setPosition();
            return this;
        }
    });

调用的时候:

new Layer({
        trigger: '.layer-trigger',
        align: {
            baseElement: '.layer-trigger',
            baseXY: ['100%', 0]
        }
    });

from overlay.

lizzie avatar lizzie commented on June 29, 2024

这个扩展 Overlay 的例子确实需要多次实例化. 不过我觉得你需要的应该是 Popup, 你看下 http://aralejs.org/popup/examples/triggers.html ? 支持多个 trigger 的

from overlay.

b1ngx avatar b1ngx commented on June 29, 2024

是这样的 多谢了~ 没有看全面, 囧

from overlay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.