好久没有写关于微信小程序的文章了,今天简单的发表一篇,内容比较简单,包括:ActionSheet上拉菜单、AlertAction提示框、SuccessAction完成框、LoadingAction加载框,不做详细说明,自己研究,不喜勿喷~~

效果图:(下载记得帮我点star,谢谢~~,源码:https://github.com/hbblzjy/WX-Demo5

     

  

相关代码:

<!--pages/index/Component/ActionSheet/ActionSheet.wxml-->
<view class="viewTitle">
    <text class="view-Name">ActionSheet上拉菜单</text>
    <view class="lineView"></view>
</view>
<view class="page">
    <view class="section section_gap">
      <button type="default" bindtap="actionSheetTap">弹出action sheet</button>
      <action-sheet hidden="{{actionSheetHidden}}" bindchange="actionSheetChange">
        <block wx:for="{{actionSheetItems}}">
          <action-sheet-item class="item" bindtap="bind{{item}}">{{item}}</action-sheet-item>
        </block>
        <action-sheet-cancel class="cancel">取消</action-sheet-cancel>
      </action-sheet>
    </view>
</view>

<!--pages/index/Component/AlertAction/AlertAction.wxml-->
<view class="viewTitle">
    <text class="view-Name">AlertAction提示框</text>
    <view class="lineView"></view>
</view>
<view class="page">
  <view class="page__bd">
    <modal title="温馨提示" confirm-text="确定" cancel-text="取消" hidden="{{modalHidden}}" mask bindconfirm="modalChange" bindcancel="modalChange">
      插入你提醒的信息内容
    </modal>

    <modal class="modal" hidden="{{modalHidden2}}" no-cancel bindconfirm="modalChange2" bindcancel="modalChange2">
      <view> 没有标题没有取消的对话框 </view>
      <view> 可以自定义提示框 </view>
    </modal>

    <view class="viewName">
      <button type="default" bindtap="modalTap">点击弹出提示框</button>
      </view>
    <view class="viewName">
      <button type="default" bindtap="modalTap2">点击弹出提示框</button>
    </view>
  </view>
</view>

<!--pages/index/Component/LoadingAction/LoadingAction.wxml-->
<view class="viewTitle">
    <text class="view-Name">LoadingAction加载框</text>
    <view class="lineView"></view>
</view>
<view class="page">
      <view class="viewName">
        <loading hidden="{{hidden}}" bindchange="loadingChange">
          加载中...
        </loading>
        <button type="default" bindtap="loadingTap">点击弹出loading</button>
      </view>
</view>

<!--pages/index/Component/SuccessAction/SuccessAction.wxml-->
<view class="viewTitle">
    <text class="view-Name">SuccessAction完成框</text>
    <view class="lineView"></view>
</view>
<view class="page">
      <view class="viewName">
        <toast hidden="{{toast1Hidden}}" bindchange="toast1Change">
          默认
        </toast>
        <button type="default" bindtap="toast1Tap">点击弹出默认完成</button>
      </view>
      <view class="viewName">
        <toast hidden="{{toast2Hidden}}" duration="3000" bindchange="toast2Change">
          自定义消失时间
        </toast>
        <button type="default" bindtap="toast2Tap">点击弹出自定义消失时间的完成</button>
      </view>
</view>

微信小程序基础之交互操作控件的更多相关文章

  1. 微信小程序基础之input输入框控件

    今天主要详写一下微信小程序中的Input输入框控件,输入框在程序中是最常见的,登录,注册,获取搜索框中的内容等等都需要,同时,还需要设置不同样式的输入框,今天的代码中都要相应的使用. input输入框 ...

  2. 微信小程序实现显示和隐藏控件-头像-取值-bindblur事件

    微信小程序实现显示和隐藏控件 .wxml: <view class=" {{showOrHidden?'show':'hidden'}}"></view> ...

  3. 微信小程序:JS 交互逻辑

    微信小程序:JS 交互逻辑 一.JS 交互逻辑 一个服务仅仅只有界面展示是不够的,还需要和用户做交互:响应用户的点击.获取用户的位置等等.在小程序里边,我们就通过编写 JS 脚本文件来处理用户的操作. ...

  4. 微信小程序基础

    前言 什么是微信小程序,它是一种轻量级的APP,它与常规App来说,无需下载安装即可使用,它嵌于微信App中,要使用微信小程序你只需要搜索一下微信小程序的名称就好,如近期的"Google的画 ...

  5. 鸿蒙的远程交互组件应用及微信小程序的远程交互组件应用

    注:鸿蒙的远程交互组件应用相对复杂 ,访问网络时,首先要配置网络权限,华为官方文档有问题,在此引用我老师配置的模板,见附件 过程:1.导入鸿蒙的网络请求模块fetch 2.发起对服务器的请求(在这过程 ...

  6. 微信小程序基础之试图控件View、ScrollView、Swiper

    今天写一篇关于微信小程序视图控件的文章,主要是介绍界面的搭建和部分操作js交互功能的介绍,转载请注明出处,谢谢~ 首先显示首页结构.创建三个navigator,用来跳转页面: <!--index ...

  7. 微信小程序基础知识

    一.基本目录结构 app.js 定义app入口 app.json 定义页面配置 index.js 页面中的事件和监听 index.wxml 定义布局文件 1.app.json配置基本信息 { “pag ...

  8. 微信小程序基础入门

    准备 Demo 项目地址 https://github.com/zce/weapp-demo Clone or Download(需准备GIT环境) $ cd path/to/project/root ...

  9. 微信小程序基础之创建使用教程

    本文档将带你一步步创建完成一个微信小程序,并可以在手机上体验该小程序的实际效果.这个小程序的首页将会显示欢迎语以及当前用户的微信头像,点击头像,可以在新开的页面中查看当前小程序的启动日志. 1. 获取 ...

随机推荐

  1. jQuery.noConflict() 函数详解

    jQuery.noConflict()函数用于让出jQuery库对变量$(和变量jQuery)的控制权. 一般情况下,在jQuery库中,变量$是变量jQuery的别名,它们之间是等价的,例如jQue ...

  2. 去除Eclipse中js报错的问题

    第一步:    去除eclipse的JS验证:        将windows->preference->Java Script->Validator->Errors/Warn ...

  3. [LeetCode] Monotone Increasing Digits 单调递增数字

    Given a non-negative integer N, find the largest number that is less than or equal to N with monoton ...

  4. Mlecms 反射型xss && 后台任意文件下载

    应该算0day吧,自己分析出来的,有点鸡肋,不过小cms分析确实比较简单. xss地址:search.php?word=a><img+src=1+onerror=alert`1`>a ...

  5. My Answer in Regex Golf

    Warm Up Answer: foo Point(3) Anchors Answer: k$ Point(2) It never ends $ not allowed Answer: fu\b Po ...

  6. [USACO13OPEN]重力异常

    题目描述 船长正在拯救她的船员,Beefalo 博士. 和所有伟大的冒险故事一样,这个故事也是发生在一个2D平面上的.囧 这个平面是M*N的格子组成的网格,代表着船长的世界的一个侧视图. 有些格子是空 ...

  7. ●SPOJ LCS2Longest Common Substring II

    题链: http://www.spoj.com/problems/LCS2/题解: 后缀自动机. 对第一个串建立后缀自动机, 然后把后面的每个串分别与该串的自动机去匹配,求出相应的数组val*[s]: ...

  8. [BZOJ]4805: 欧拉函数求和

    解题思路类似莫比乌斯函数之和 题目大意:求[1,n]内的欧拉函数$\varphi$之和.($n<=2*10^{9}$) 思路:令$ M(n)=\sum_{i=1}^{n}\varphi (i)  ...

  9. 【Codeforces Round #435 (Div. 2) A B C D】

    CF比赛题目地址:http://codeforces.com/contest/862 A. Mahmoud and Ehab and the MEX ·英文题,述大意:      输入n,x(n,x& ...

  10. .net带参数SQL语句的完整定义

    首先是在DAL数据访问层中的代码://数据更新的方法public static int shuxing_update(s_passnature model) { string sql = " ...