当前位置: 首页 > news >正文

招聘网站有哪些平台爱用建站

招聘网站有哪些平台,爱用建站,无锡哪家做网站好,营销网站建设教程由于微信小程序的wx.showModal不支持富文本内容&#xff0c;无法实现更灵活的展示效果&#xff0c;故需要进行二次封装 实现思路&#xff1a;使用van-dialog以及微信小程序的rich-text实现 代码如下&#xff1a; // index.wxml <van-dialoguse-slottitle"提示"s…

由于微信小程序的wx.showModal不支持富文本内容,无法实现更灵活的展示效果,故需要进行二次封装

实现思路:使用van-dialog以及微信小程序的rich-text实现

代码如下:

// index.wxml
<van-dialoguse-slottitle="提示"show="{{ showDialog }}"show-confirm-buttonconfirm-button-color="#3d80f7"bind:confirm="onConfirmDialog"
><view class="d_content"><rich-text nodes="{{dialogText}}"></rich-text></view>
</van-dialog>
// index.js
Page({
data: {showDialog: false,dialogText: "",confirmCallback: null,},onCloseDialog() {this.setData({ showDialog: false }, () => {wx.showTabBar({animation: true,});setTimeout(() => {this.setData({dialogText: "",confirmCallback: null,});}, 300);});},onShowDialog(type, msg, rMsg, fn) {switch (type) {case "model":this.setData({showDialog: true,dialogText: `<p  style="text-align: justify;"><span style="color: rgba(0, 0, 0, 0.5);">${msg}</span></p>`,confirmCallback: fn ? fn : null,},() => {wx.hideTabBar({animation: true,});});break;case "reject":let mArray = msg.split(rMsg);let text = `<p style="text-align: left;text-align: justify;"><span style="color: rgb(140, 140, 140);">${mArray[0]}</span><span style="color: #ff5858;">${rMsg}</span><span style="color: rgb(140, 140, 140);">${mArray[1]}</span></p>`;this.setData({showDialog: true,dialogText: text,confirmCallback: fn ? fn : null,},() => {wx.hideTabBar({animation: true,});});break;case "custom":this.setData({showDialog: true,dialogText: msg,confirmCallback: fn ? fn : null,},() => {wx.hideTabBar({animation: true,});});break;default:this.setData({showDialog: true,dialogText: msg,confirmCallback: fn ? fn : null,},() => {wx.hideTabBar({animation: true,});});break;}},onConfirmDialog() {wx.showTabBar({animation: true,});this.onCloseDialog();if (typeof this.data.confirmCallback === "function") {this.data.confirmCallback();}},
})
// index.json
{"usingComponents": {"van-dialog": "@vant/weapp/dialog/index"}
}
// index.wxss
.d_content {box-sizing: border-box;padding: 36rpx 46rpx;
}

使用方法

this.onShowDialog("model",`您已向:${subItem.name}申请权限,请等待管理员审核。`);
this.onShowDialog("reject",`您的申请被拒绝,原因为:${subItem.reason},请根据拒绝原因检查您的提交信息,点击确认继续。`,subItem.reason,() => {// ...});

本文仅提供一种思路,可能不是最优写法,欢迎大家讨论留言

http://www.yidumall.com/news/82234.html

相关文章:

  • 申请免费网站域名查询收录
  • 免费建论坛网站提供搜索引擎优化公司
  • 上虞建设局网站流量精灵app
  • seo外贸网站建设百家号关键词排名优化
  • 东莞网站建设业务的公司优化公司哪家好
  • 公司做网站需要今日重点新闻
  • 胶州家园网站建设新乡网络推广外包
  • 188旅游网站管理系统最厉害的搜索引擎
  • 北辰做网站的公司百度官网首页官网
  • 五八同城网站开发了多久营销型网站建设解决方案
  • 做网站的详细步骤百度招商客服电话
  • wordpress 网页特效百度seo网站优化服务
  • 如何给自己做网站互联网推广项目
  • 自助做网站傻瓜式自助建站工具3000行业关键词
  • 乌鲁木齐网站建设西安网站设计公司
  • 专业医疗网站建设网络营销常用的工具
  • 企业介绍 wordpress搜索引擎优化课程
  • 有网站前台如何做后台市场营销产品推广策划方案
  • 贵阳58同城做网站营销网站建设选择原则
  • 黄石网站建设中国外贸订单网
  • 做fitting的网站营销网站建设选择
  • 西安网站建设服务免费淘宝关键词工具
  • 做移动网站优化优怎么上百度搜索
  • 做外贸业务去哪些网站网站建设制作公司
  • 武汉网络公司武汉做网站公司网络广告营销的典型案例
  • 网站建设 大公司软文营销的作用有哪些
  • 北京给网站做系统的公司名称网络推广网站推广方法
  • 企业网站建设的作用网站排名优化公司哪家好
  • 网站必须要实名认证么营销网站系统
  • 南宁网站制作开发公司网站如何做seo排名