co-dialog theme 访问git:co-dialog 版本v2.0.0

主题2

coog.app('.theme2').use({
title: 'JUST CHECKING.',
message: 'Delete your account?' + "<p style='font-size:12px;'>This action is final and you will be unable to recover any data</p>",
isDrag: true,
layout: 'center',
titleColor: '#865FDF',
closeColor: '#865FDF',
showCancleButton: true,
confirmButtonText: 'YES',
cancleButtonText: 'NO',
footerText: "",
confirmButtonBackground: '#865FDF',
cancleButtonBackground: '#865FDF',
confirmButtonColor: '#fff',
onHeaderBefore: function (node) {
this.style.backgroundColor = "#fff"
this.style.borderBottom = "1px solid #ddd"
},
onFooterBefore: function (node) {
this.style.backgroundColor = "#865FDF"
this.style.marginBottom = '0'
this.style.padding = '10px 0'
},
confirmCallback: function () {
coog.app(".test3").use({
titleColor: '#45B680',
title: 'Return Results',
message: 'Success Delete',
confirmButtonText: 'YES',
confirmCallback: function () {
coog.app('.test').show()
}
})
.show()
}
})
.show()

主题3

coog
.app('.theme3')
.use({
title: 'This is a title',
message: 'We’re also releasing our first step towards showcasing what’s possible when using GitHub Desktop. In 1.4, we’ve added our release notes to the app to highlight what’s changed since the last release, and to recognize—and thank—our amazing contributors',
isClose: true,
isDrag: true,
layout: 'center',
animation: false,
customAnimation: 'slideInDown',
titleColor: '#333',
closeColor: '#333',
confirmButtonText: "Read More",
confirmButtonColor: '#333',
animation: false,
customAnimation: 'swing',
onDialogBefore: function () {
this.style.background = "#F1F1F1";
this.style.border = "3px solid #333";
},
onHeaderBefore: function () {
this.style.background = "#F1F1F1";
this.style.borderBottom = "2px solid #333";
this.style.margin = "0 30px";
this.style.paddingLeft = "0";
this.style.paddingRight = "0";
},
onBodyBefore: function () {
this.style.fontSize = "14px";
this.style.textAlign = "left";
},
onFooterBefore: function () {
this.style.float = 'left'
this.style.marginLeft = '30px'
},
methods: function () {
this.footer.$refs.button.children[0].style.background = "transparent";
this.footer.$refs.button.children[0].style.border = "2px solid #333"
}
})
.show();

主题4

coog
.app('.theme4')
.use({
title: 'Dialog Only Page',
message: "I can only be served as a dialog, and I don't need a data-rel='dialog' attribute on a link",
isClose: true,
isDrag: true,
layout: 'center',
animation: false,
customAnimation: 'bounceInLeft',
showConfirmButton: false,
onHeaderBefore: function (){
this.style.background = "#2A2A2A"
},
onBodyBefore: function (){
this.style.fontSize = "14px"
},
})
.show();

以下访问官网https://koringz.github.io/co-dialog/index

浏览器默认的alert弹出框

alert("默认alert功能")

这是一个基础的弹出框

coog.app(".base").use("这是一个基础的弹出框").show()

co-dialog弹出框

coog.app(".alert").use(
"标题",
"这是一个CoDialog组件",
"OK"
).show()

你可以拖动我一下

coog.app(".try-drag").use({
title: "拖动-isDrag",
message: "请尝试拖动窗口",
isDrag: true,
}).show()

这是一个layout布局,靠右下角显示的弹出框

coog.app(".layout-right-bottom").use({
title: "布局-layout",
message: "这是一个layout布局,靠右下角显示的弹出框",
layout: "right bottom",
}).show()

超时自动关闭

coog.app(".timeout").use({
title: "超时-timeout",
message: "超时自动关闭",
timeout: 2000,
}).show()

显示取消按钮和功能

coog.app(".show-cancle").use({
title: "取消-show-cancle",
message: "显示取消按钮和功能",
showCancleButton: true,
isGesture: true,
isDrag: true,
}).show()

弹出框内容自定义

coog.app(".custom").use({
isGesture: true,
isDrag: true,
onHeaderBefore: function () {
this.innerHTML = "<span ref='top'>顶部</span>"
},
onBodyBefore: function () {
this.innerHTML = "<span ref='middle'>中间</span>"
},
onFooterBefore: function () {
this.innerHTML = "<span ref='bottom'>底部</span>"
},
methods: function () {
this.header.$refs.top.style.color = "#4E5198"
this.body.$refs.middle.style.color = "#4E5198"
this.footer.$refs.bottom.style.color = "#4E5198"
}
}).show()

自定义动画


coog.app(".customAnimation").use({
title: "自定义动画-customAnimation",
message: "基于animated.css类实现自定义动画",
isClose: true,
layout: "center",
isDrag: true,
animation: false,
customAnimation: "slideInDown",
}).show()

确认回调函数


coog.app(".confirmCallback").use({
title: "确认回调-confirmCallback",
message: "你想清除确认回调函数吗?",
showCancleButton: true,
confirmCallback: function () {
coog.app(".confirm-clear-callback").use("你已确定清除").show()
},
}).show()

没有图片 线上地址 https://koringz.github.io/co-dialog/index

紫色主题


coog.app(".theme-purple").use({
title: "紫色主题-purple-theme",
message: "Your have seen the purple theme",
layout: "right top",
isGesture: true,
isDrag: true,
titleColor: "#4E5198",
closeColor: "#4E5198",
showCancleButton: true,
confirmButtonBackground: "#4E5198",
cancleButtonText: "Confirm",
confirmButtonText: "Cancle",
}).show()

co-dialog弹出框组件-版本v2.0.0的更多相关文章

  1. co-dialog弹出框组件-版本v2.0.1

    具体案例查看co-dialog:https://koringz.github.io/co-dialog/index.html 2.0.1版本优化项,代码压缩,修复PC和移动端自适应,修复显示弹出框浏览 ...

  2. vue--vant组件库Dialog弹出框

    安装vant UI框架: cnpm install vant –-save-dev 导入组件-在main.js里: import Vant from 'vant'; import'vant/lib/v ...

  3. 关于隐式创建vue实例实现简化弹出框组件显示步骤

    我们在使用vue写alert组件的时候,经常是定义了一个alert.vue,然后引入alert.vue,然后配置参数等等,非常繁琐,那有没有一种方式可以像window.alert("内容&q ...

  4. Flex AIR自定义Mobile的弹出框组件

    做Flex Mobile开发的人应该知道,Flex为手机应用并没有提供弹出框组件,需要自定义. 通过查找文档.资料,我做出一个效果还算不错的弹出框组件,可以适用于手机设备上,不多讲,直接贴源码,相信对 ...

  5. 基于Vue.js PC桌面端弹出框组件|vue自定义弹层组件|vue模态框

    vue.js构建的轻量级PC网页端交互式弹层组件VLayer. 前段时间有分享过一个vue移动端弹窗组件,今天给大家分享一个最近开发的vue pc端弹出层组件. VLayer 一款集Alert.Dia ...

  6. 使用easeui dialog弹出框中使用CKeditor多次加载后无法编辑问题

    问题呈现:弹出框页面 <tr class="addtr"> <th>内容</th> <td> <!-- <textare ...

  7. ReactNative: 使用弹出框组件ActionSheetIOS组件

    一.简介 在上一篇文章中,详细介绍了对话框组件,除此之外,React-Native系统还给开发者提供了一个弹框框组件ActionSheetIOS组件,它的弹出方式与对框框不同,它是从底部弹出,与iOS ...

  8. vue在element-ui的dialog弹出框中加入百度地图

    参考:https://blog.csdn.net/u012724595/article/details/82703579 <!-- gps弹窗 --> <el-dialog v-di ...

  9. JQuery EasyUI dialog弹出框的 close 和 destroy

    开发项目中(使用JQuery EasyUI),根据业务需要重叠弹出多个提示框的情况,会出现如下情况:页面出现两个div模块调用同一个弹出页面,页面的数据接受框元素不能实时存储数据解决方案: 使用$(t ...

随机推荐

  1. ApiDoc 一键生成注释

    本文来自网易云社区. 作者:盛国存 背景 我们日常在使用ApiDoc维护管理api文档,提高了api文档的整体维护性.但在老旧接口中,补充接口注解无疑是一次繁重的体力劳动.仔细查看,大多数接口的格式 ...

  2. [CentOS7] SELinux

    声明:本文主要总结自:鸟哥的Linux私房菜-第十六章.程序管理與 SELinux 初探,如有侵权,请通知博主 SELinux = Security Enhanced Linux 传统的文件权限与账号 ...

  3. Baidu - Echarts 地图实例测试,并绘制平滑圆弧路径

    百度Echarts实例地址: http://echarts.baidu.com/examples.html 同事想做一个地图,地图上的几个点通过动态的线连接起来.但是在实例里没找到类似的. 然后仔细分 ...

  4. [Xcode 实际操作]三、视图控制器-(5)使用UINavigationController视图入栈和出栈

    目录:[Swift]Xcode实际操作 本文将演示使用导航控制器的几个跳转方式 选择编辑第二个视图控制器文件 import UIKit //定义一个全局变量,用来记录当前显示区域的视图的编号 clas ...

  5. 系统:Centos 7.2 内核3.10.0-327.el7.x86_64 # 内核需要高于2.6.32

    系统:Centos 7.2 内核3.10.0-327.el7.x86_64 # 内核需要高于2.6.32 Drbd : 192.168.8.111:node1/dev/drdb0 /mydeta 19 ...

  6. 《SQL 进阶教程》 自连接分组排序:练习题1-2-2

    分组排序 SELECT d1.district, d1. NAME, (SELECT COUNT(d2.price) FROM district_products d2 WHERE d2.price ...

  7. mysql CPU占用高

    https://blog.csdn.net/u011239989/article/details/72863333 QPS高,sql简单的场景下, 需要 1. 提高数据库的服务器性能CPU 内存等 2 ...

  8. 四,JVM 自带工具之jvisualvm

    http://www.ibm.com/developerworks/cn/java/j-lo-visualvm/index.html?ca=drs- https://visualvm.java.net ...

  9. Spring AOP——Spring 中面向切面编程

    前面两篇文章记录了 Spring IOC 的相关知识,本文记录 Spring 中的另一特性 AOP 相关知识. 部分参考资料: <Spring实战(第4版)> <轻量级 JavaEE ...

  10. 网络爬虫之记一次js逆向解密经历

    1 引言 数月前写过某网站(请原谅我的掩耳盗铃)的爬虫,这两天需要重新采集一次,用的是scrapy-redis框架,本以为二次爬取可以轻松完成的,可没想到爬虫启动没几秒,出现了大堆的重试提示,心里顿时 ...