当前位置:网站首页>最近小程序开发记录
最近小程序开发记录
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>
边栏推荐
- Appium基础 — Appium Inspector定位工具(一)
- JS Es5 can also create constants?
- Analyze "C language" [advanced] paid knowledge [i]
- Batch delete data in SQL - set in entity
- CISP-PTE实操练习讲解(二)
- Can't you understand the code of linked list in C language? An article allows you to grasp the secondary pointer and deeply understand the various forms of parameter passing in the function parameter
- Long press the button to execute the function
- 鼠标右键 自定义
- PartyDAO如何在1年内把一篇推文变成了2亿美金的产品DAO
- Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄
猜你喜欢
随机推荐
2022/0524/bookstrap
The difference between Tansig and logsig. Why does BP like to use Tansig
@Before, @after, @around, @afterreturning execution sequence
ROS learning (26) dynamic parameter configuration
HDU 4661 message passing (wood DP & amp; Combinatorics)
Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄
Make DIY welding smoke extractor with lighting
AcWing 361. Sightseeing cow problem solution (SPFA seeking positive ring)
ROS学习(26)动态参数配置
String to date object
Batch delete data in SQL - set in entity
centos8安裝mysql報錯:The GPG keys listed for the “MySQL 8.0 Community Server“ repository are already ins
Input and output of C language pointer to two-dimensional array
ROS学习(21)机器人SLAM功能包——orbslam的安装与测试
454 Baidu Mianjing 1
AcWing 346. Solution to the problem of water splashing festival in the corridor (deduction formula, minimum spanning tree)
mongodb查看表是否导入成功
The foreground downloads network pictures without background processing
The use of video in the wiper component causes full screen dislocation
JS Es5 can also create constants?








