好久没有写关于微信小程序的文章了,今天简单的发表一篇,内容比较简单,包括: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. 浅谈linux静态库、动态库。

    动态库又叫动态共享文件(.so,Dynamic Shared Objects)和静态库(.a)都是将一些待重用的公共代码打包成一种特殊的重定位目标文件. 在使用时,连接器会将静态库中所有的代码,编译到 ...

  2. JavaScript 图

    TypeScript方式实现源码 // 图的遍历算法 // 算 法 数据结构 描 述 // 深度优先搜索 栈 通过将顶点存入栈中,顶点是沿着路径被探索的,存在新的相 // 邻顶点就去访问 // 广度优 ...

  3. [LeetCode] Top K Frequent Words 前K个高频词

    Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted b ...

  4. [LeetCode] Repeated String Match 重复字符串匹配

    Given two strings A and B, find the minimum number of times A has to be repeated such that B is a su ...

  5. 原生Js操作DOM

    查找DOM .querySelectorAll(),它接受包含一个CSS选择器的字符串参数,返回一个表示文档中匹配选择器的所有元素的NodeList元素. .querySelector(),返回第一个 ...

  6. java多线程的字符流与字节流

    字节流: package com.wz.thread.stream;import java.io.PipedOutputStream;/** * 字节输入流 * @author Administrat ...

  7. HTML5 AJAX跨域请求

    HTML5新的标准中,增加了" Cross-Origin Resource Sharing"特性,这个特性的出现使得跨域通信只需通过配置http协议头来即可解决. Cross-Or ...

  8. [BZOJ 4403]序列统计

    Description 给定三个正整数N.L和R,统计长度在1到N之间,元素大小都在L到R之间的单调不降序列的数量.输出答案对10^6+3取模的结果. Input 输入第一行包含一个整数T,表示数据组 ...

  9. HDU2303(数论)大整数求余+素数筛选

    Sample Input 143 10 143 20 667 20 667 30 2573 30 2573 40 0 0   Sample Output GOOD BAD 11 GOOD BAD 23 ...

  10. poj 2417 && poj3243(Baby-Step Giant-Step)

    Discrete Logging Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 4624   Accepted: 2113 ...