摘要:比较简单直接上码框匹配组件中的提示如果用的话这就是提示框成功提示取消提示禁止提示文本提示已完成成功之后的返回想当于下面的已完成已完成取消操作取消操作禁止操作禁止操作文本内容文本内容注意点在中要引入通过来引入函数地址
比较简单 直接上码 Toast框
js提示框
const App = getApp()
Page({
data: {},
onLoad() {
this.$wuxToast = App.wux(this).$wuxToast
},
showToast() {
const _this =this;
_this.$wuxToast.show({
type: "success",
timer: 1500,
color: "#fff",
text: "已完成",
// 成功之后的返回,想当于下面的success
success: () => console.log("已完成")
// success: function(){
// console.log("已完成")
// }
})
},
showToastCancel() {
const _this =this;
_this.$wuxToast.show({
type: "cancel",
timer: 1500,
color: "#fff",
text: "取消操作",
success: () => console.log("取消操作")
})
},
showToastErr() {
const _this =this;
_this.$wuxToast.show({
type: "forbidden",
timer: 1500,
color: "#fff",
text: "禁止操作",
success: () => console.log("禁止操作")
})
},
showToastText() {
const _this =this;
_this.$wuxToast.show({
type: "text",
timer: 1500,
color: "#fff",
text: "文本内容",
success: () => console.log("文本内容")
})
},
})
注意点
在app.js中要引入wxui
import wux from "components/wux"
App({
onLaunch() {
console.log("onLaunch")
},
onShow() {
console.log("onShow")
},
onHide() {
console.log("onHide")
},
// 通过scope来引入wux函数
wux: (scope) => new wux(scope)
})
][2]
demo地址https://github.com/tengwei30/xiaochengxu-modal.git
文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。
转载请注明本文地址:https://www.ucloud.cn/yun/81195.html
摘要:比较简单直接上码框匹配组件中的提示如果用的话这就是提示框成功提示取消提示禁止提示文本提示已完成成功之后的返回想当于下面的已完成已完成取消操作取消操作禁止操作禁止操作文本内容文本内容注意点在中要引入通过来引入函数地址 比较简单 直接上码 Toast框 提示框 成功提示 取消提示 禁止提示...
摘要:得益于运行阶段处理逻辑的设计,支持将使用的应用转换成微信小程序。我们也在考察这一新的跨端方案和微信小程序融合转化的可行性。 作者:京东ARES多端技术团队 前言 Alita是一套由京东ARES多端技术团队打造的React Native代码转换引擎工具。它对React语法有全新的处理方式,支持在运行时处理React语法,实现了React Native和微信小程序之间的主要组件对齐,可以用...
阅读 3527·2023-04-25 20:43
阅读 2004·2021-09-30 09:54
阅读 1910·2021-09-24 09:47
阅读 3171·2021-09-06 15:02
阅读 3812·2021-02-22 17:09
阅读 1516·2019-08-30 15:53
阅读 1701·2019-08-29 17:04
阅读 2238·2019-08-28 18:22