UIkit的confirm,好看点

一,官方推荐的样码。

 <button type="button" class="uk-button" onclick="UIkit.modal.prompt(‘Name:‘, ‘‘, function(val){ UIkit.modal.alert(‘Hello ‘+(val || ‘Mr noname‘)+‘!‘); });">Prompt</button>

<pre><code>UIkit.modal.prompt("Name:", value, function(newvalue){
    // 点击OK提交后执行
});</code></pre>

二,我实现的样码

var statu = UIkit.modal.confirm("将发布单" + deploy_version + "从" + org_type + "部署到" + env_type + "环境。是否确认?" ,function() {
            promiseJenkins = $.ajax({
                url:‘/valid/env_valid/‘,
                type: ‘post‘,
                data:{
                    deploy_version: deploy_version,
                    env_type: env_type,
                    org_type: org_type,
                },
                dataType: ‘json‘,
                beforeSend: function(){
                    $(_self).attr(‘disabled‘,"true");
                    $(_self).append(" <i class=‘uk-icon-cog uk-icon-spin‘></i>");

                },
                error: function(){
                    alert(‘500 Error.‘);
                },
                success: function(json){
                    $(_self).children(‘i‘).remove();
                    $(_self).append(" <i class=‘uk-icon-check‘></i>")
                    window.location.reload();
                    console.log(json);
                    UIkit.notify(json.return,  {timeout: 0});
                }
            });
        });

三,LOOK:

时间: 2025-01-22 13:15:39

UIkit的confirm,好看点的相关文章

为Vue2集成UIkit

引言:Vue只是为我们提供了一个很优秀的前端组件式开发框架,但单纯依靠Vue是做不出一个漂亮的网页应用的,甚至连"不难看"这个标准都达不到.这个时候借助界面框架UIkit能够很好地解决这一问题. 在实际开发中,还有很多常用组件,例如,分页.按钮.输入框.导航栏.日期/时间选择器.图片输入,等等.很明显的是这些组件的通用性已不单单存在于一个项目内,而是所有的项目都需要!这是个比拼开发速度的年代,我们已经没有时间重复发明轮子了,最正确的选择是使用界面框架,例如Bootstrap.UIkit

UIWebView 自定义网页中的alert和confirm提示框风格

.h #import <UIKit/UIKit.h> @interface UIWebView (JavaScriptAlert) -(void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame; -(BOOL)webView:(UIWebView *)sender runJavaScriptConfirmPa

UIKit Dynamics入门

看E问文章时,发现了Dynamics,uikit动力,找了不错的入门文章. From:http://blog.csdn.net/baecheung/article/details/11911061 本文涉及到的WWDC2013 Session有 Session 206 Getting Started with UIKit Dynamics Session 221 Advanced Techniques with UIKit Dynamics 什么是UIKit动力学(UIKit Dynamics)

UIKit框架之UIButton详解

UIKit框架是iPhone应用程序开发中最基本的框架,也是用得最多.最重要的框架,今天要和大家分享的就是UIKit中的UIButton相关知识,一起来看看吧. 1.实例化: 1.1.init方式: 1 UIButton *button = [[UIButton alloc] initWithFrame:rect]; 1.2.类方法方式: 1 UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 其中按钮类型枚

HTML DOM confirm()方法使用

confirm()方法用于显示一个带有特点消息的确定和取消的对话框,当用户点击确定时confirm()方法返回true,当用户点击取消时confirm()方法返回false. 1. 触发事件时使用 <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <script type="text/javascrip

如何编辑好看的微信文章微助点微信编辑

微助点微信编辑器,是一款"素材最多,最好用"的微信图文编辑工具,丰富素材样式任您挑选,调整颜色.排版更简单,为您提供好看.易读的文章是我们动力!下面给您具体介绍微助点微信编辑器. 1.编辑器网站框架 怎么样?看起来简单大气吧,微助点编辑器操作起来也和他的界面一样简单方便,还有更多的文本.标题.分割线.内容等素材可以供大家选择使用.再来看看其他素材的截图 更多的素材可访问微助点官方网站微助点官方网址

设计:好看的数字字体

1.方正小标宋简体 下载 持续更新.... 设计:好看的数字字体,布布扣,bubuko.com

【技能】使用纯CSS+html写出方向箭头,简单大方,好看

使用纯CSS+html写出方向箭头,贴出来就可以用,100%原创 <html> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css"> .pointsRule{ display: inline-blo

alert() confirm() prompt() 的区别?

alert()是警告消息框,属于BOM中的成员函数,就是window.alert( ); window.alert函数弹出的对话框是模式对话框,用户必须关闭消息框才能继续进行操作;由于js没有输入输出,所以浏览器的window对象提供了两个函数alert和prompt对应output和input; prompt()是提示消息框,用户可以根据提示输入字符串:比如var name = prompt('请输入姓名'),就是新声明一个变量name,用于接收用户输入的值: confirm()是确认消息框,