Comments (6)
overlay 没有 trigger 属性,不知是不是用串了。
from overlay.
做一个类似dialog的弹框 点击触发元素的时候 只有第一个会显示 后面的调试的时候发现显示了 但是不知道为什么又关闭
from overlay.
把你的代码放出来看看吧。
from overlay.
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.
这个扩展 Overlay 的例子确实需要多次实例化. 不过我觉得你需要的应该是 Popup, 你看下 http://aralejs.org/popup/examples/triggers.html ? 支持多个 trigger 的
from overlay.
是这样的 多谢了~ 没有看全面, 囧
from overlay.
Related Issues (20)
- 建议把mask模块从overlay里分离出来 HOT 4
- mask模块建议提供工厂方法,能自由构建实例 HOT 4
- 单独使用mask时在ie6下不会创建iframe HOT 2
- _blurHide 特性和显示浮层的冲突
- 修复 https://github.com/aralejs/tip/issues/12 的后遗症 HOT 4
- 弹层弹出来后怎么回调呀 HOT 2
- spm3 安裝overlay後的問題 HOT 10
- 窗口变化后重新定位 HOT 1
- 建议修改监听window的resize事件的重定位的处理逻辑 HOT 3
- "点击空白处,隐藏"有bug,如果点击页面中的iframe就会没触发 HOT 2
- 能动态改变内容吗 复用 HOT 7
- 使用focus触发时遇到的问题 HOT 3
- spm doc后在127.0.0.1查看examples页面报错 $ is not defined
- 演示网站似乎挂掉了
- mask的一些建议 HOT 3
- mask set bug
- destory 没有处理两个静态实例集合 HOT 1
- selfXY参数具体数值的含义是什么? HOT 1
- [ver. 1.1.0] _onRenderWidth 和 _onRenderHeight 令容器默认尺寸失效 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from overlay.