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

co-dialog

v3.0.4

Published

这是一个简洁,智能,个性化的JAVASCRIPT弹出框

Downloads

49

Readme

下载

npm install co-dialog

或者下载 CDN: jsdelivr.com/package/npm/co-dialog

使用

你可以使用src加载文件:

<link rel="stylesheet" href="co-dialog.css">
<script src="co-dialog.js"></script>

或者使用import导入模块:

import Coog from "co-dialog"

or

const Coog = require("co-dialog")

如果使用import引入库需要单独引入style样式:

import Coog from "co-dialog"

import 'co-dialog/dist/co-dialog.min.css'

如果想用CSS3动画, 需要下载 animate.css 库, 在项目中引入库文件:

<link rel="stylesheet" href="animate.min.css">

或者引入一个CDN版本:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">

详细动画请参考文档 Animate.css

例子

这是一个显示基本内容的弹出框

const baseBox = Coog.app(".base").use("这是一个基础的弹出框").show()

任何地方都能调用base类弹出框

baseBox.show()

这是一个带标题的success弹出框

Coog.app(".with-title").use(
 "标题",
 "这是一个带标题的弹出框",
 'success'
)
.show()

第三方插件

CSS3动画

如果要使用CSS3动画功能, 暂时只支持animate.css动画库, 实现动画的方式非常简单, 只要导入animate.css动画库, className类名就能被customAnimation识别出来.

Coog
    .app('.the-third-animate')
    .use({
        title: 'use animate.css',
        message: 'Your have seen the animation theme',
        animation: false,
        customAnimation: 'bounceInLeft', // 使用 animate.css 动画
    })
    .show()

点这里看更多例子和文档 :gun:

其他版本

浏览器兼容

Edge | Chrome | Firefox | Safari | Opera | Android Browser ------|--------|---------|--------|-------|------------------ :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |

版本改变

查看历史版本

license

MIT