npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

arale-dialog

v2.1.1

Published

Dialog 是通用对话框容器,提供显隐关闭、遮罩层、内嵌iframe、内容区域自定义以及模态对话框等功能。

Downloads

26

Readme

Dialog


Build Status Coverage Status

基础对话框组件,提供对话框显示隐藏、dom 结构自定义、定位、select 遮挡、确定取消关闭等功能特性。

本模块分为两个子组件:Dialog 和 ConfirmBox,前者提供抽象的基础容器功能,无绑定 UI 样式,后者在前者的基础上提供模态对话框的功能并提供完善的 UI 样式。

Dialog 组件提供了默认样式,请单独引用 dialog.css

Dialog 继承了 overlay,可使用其中包括 widgetbaseclasseventsattributeaspect 的属性和方法。


组件演示

npm run doc

访问 http://localhost:8002/

最佳实践

见 examples

配置说明

trigger element

对话框触发元素,可传递选择器。

content string|element

容器的内容,可以是纯字符串、dom对象、jQuery对象、html标签字符串、以及 URL 地址。当 content 为 URL 地址时,本组件将内嵌目标页面的 Iframe。

hasMask boolean

是否有背景遮罩层。默认为 true

classPrefix string

统一样式前缀,默认为 ui-dialog

closeTpl string

右上角的关闭链接,默认为×

width number|string

对话框宽度,默认 500px。

height number|string

对话框高度。当设置了这个属性时,对话框高度会固定, 下面的 autoFit 强制为 false,initialHeight 失效。

zIndex number

对话框 z-index 层级,默认 999。

effect string

简单的动画效果,none 为无动画,fade 为渐入效果。默认为 none。

autoFit boolean

内嵌 Iframe 页面时是否自适应高度,默认为 true。iframe 类型时有效

initialHeight number|string

内嵌 Iframe 页面时对话框的初始高度(onload 后会发生变化),默认为 300px 。只有当对话框是 iframe 类型时有效

其他配置如定位参数 align 等请参照 overlay

实例方法

主要有 show、hide、render 等方法,请参照 overlay