当前位置:网站首页>最近小程序开发记录
最近小程序开发记录
2022-07-06 18:27:00 【不要社工我】
都是一些js相关的。
<view wx:for="{ {[11,22,33,44]}}">{ {index}} 循环次数 { {item}}</view>
=====================
<view style="width: 300px; height: 300px; background-color: aquamarine;"
bindtap="onTap" data-title="哈哈哈"
>
{ {name}}
</view>
onTap: function(res){
var get = res.currentTarget.dataset.title
console.log(get)
this.setData({
name:get
})
=====================
view中文字不能换行
style="word-break: break-all;"
=====================
正则表达式
js的正则表达式匹配如下
<ol>
<li ><a href="./qqyinliu.html" >方法技巧 - QQ引流</a></li>
</ol>
匹配不到,搜索得知.不能匹配空格和换行。
用如下方法
var pattern_url = /<ol>[\s\S]*<\/ol>/gm;
解析如下:
[\s\S]*是完全通配的意思,\s是指空白,包括空格、换行、tab缩进等所有的空白,而\S刚好相反,这样一正一反下来,就表示所有的字符。
“[ ]”是范围描述符。[]这个符号,表示在它里面包含的单个字符不限顺序的出现
=====================
按钮的文字不换行
<button
style="
padding-left: 10px;
margin-left: 10px;
width:max-content ;"
open-type="contact"
bindcontact="handleContact">
对项目有疑问?点击反馈
</button>
=====================
rich-text 文字可复制
<rich-text class="text" nodes="{ {all_content}}" user-select="true">
</rich-text>
边栏推荐
- MySQL's most basic select statement
- Integrated navigation: product description and interface description of zhonghaida inav2
- Scenario practice: quickly build wordpress blog system based on function calculation
- 一片葉子兩三萬?植物消費爆火背後的“陽謀”
- ROS学习(22)TF变换
- CISP-PTE实操练习讲解(二)
- Golang foundation - data type
- ROS learning (XX) robot slam function package -- installation and testing of rgbdslam
- Recognition of C language array
- Centros 8 installation MySQL Error: The gpg Keys listed for the "MySQL 8.0 Community Server" repository are already ins
猜你喜欢
Right mouse button customization
Appium foundation - appium inspector positioning tool (I)
ROS learning (21) robot slam function package -- installation and testing of orbslam
LeetCode. Sword finger offer 62 The last remaining number in the circle
ROS learning (XX) robot slam function package -- installation and testing of rgbdslam
JS how to quickly create an array with length n
sql中批量删除数据---实体中的集合
JVM memory model
百度飞将BMN时序动作定位框架 | 数据准备与训练指南 (上)
Appium基础 — Appium Inspector定位工具(一)
随机推荐
一片叶子两三万?植物消费爆火背后的“阳谋”
JS ES5也可以创建常量?
AcWing 1140. 最短网络 (最小生成树)
The cradle of eternity
Right mouse button customization
Command injection of cisp-pte
ROS学习(24)plugin插件
How can I code for 8 hours without getting tired.
Threadlocalutils (tool class IV)
2022/0524/bookstrap
Flir Blackfly S USB3 工业相机:白平衡设置方法
ROS learning (25) rviz plugin
永久的摇篮
组合导航:中海达iNAV2产品描述及接口描述
centos8安装mysql报错:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
Box stretch and pull (left-right mode)
Set WordPress pseudo static connection (no pagoda)
Errors made in the development of merging the quantity of data in the set according to attributes
Mysqlbackup restores specific tables
Blue Bridge Cup 2022 13th provincial competition real topic - block painting