当前位置:网站首页>最近小程序开发记录
最近小程序开发记录
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>
边栏推荐
- Recognition of C language array
- Set WordPress pseudo static connection (no pagoda)
- npm install 编译时报“Cannot read properties of null (reading ‘pickAlgorithm‘)“
- JS es5 peut également créer des constantes?
- Today's question -2022/7/4 modify string reference type variables in lambda body
- 百度飞将BMN时序动作定位框架 | 数据准备与训练指南 (上)
- The use of video in the wiper component causes full screen dislocation
- AcWing 345. 牛站 题解(floyd的性质、倍增)
- Scenario practice: quickly build wordpress blog system based on function calculation
- Domestic images of various languages, software and systems. It is enough to collect this warehouse: Thanks mirror
猜你喜欢

FLIR blackfly s industrial camera: configure multiple cameras for synchronous shooting

Box stretch and pull (left-right mode)

Flir Blackfly S 工业相机:通过外部触发实现多摄像头同步拍摄

Livox激光雷达硬件时间同步---PPS方法

ROS学习(22)TF变换

ROS学习(十九)机器人SLAM功能包——cartographer

新工作感悟~辞旧迎新~

Analyze "C language" [advanced] paid knowledge [End]

一片叶子两三万?植物消费爆火背后的“阳谋”

ROS学习(21)机器人SLAM功能包——orbslam的安装与测试
随机推荐
AcWing 1140. Shortest network (minimum spanning tree)
Baidu flying general BMN timing action positioning framework | data preparation and training guide (Part 2)
Public key \ private SSH avoid password login
Recognition of C language array
Integrated navigation: product description and interface description of zhonghaida inav2
The difference between Tansig and logsig. Why does BP like to use Tansig
Flir Blackfly S 工业相机:配置多个摄像头进行同步拍摄
dvajs的基础介绍及使用
百度飞将BMN时序动作定位框架 | 数据准备与训练指南 (上)
刨析《C语言》【进阶】付费知识【一】
字符串的相关编程题
Analyze "C language" [advanced] paid knowledge [i]
AcWing 1140. 最短网络 (最小生成树)
Treadpoolconfig thread pool configuration in real projects
Make DIY welding smoke extractor with lighting
一文带你走进【内存泄漏】
Appium自动化测试基础 — uiautomatorviewer定位工具
开发中对集合里面的数据根据属性进行合并数量时犯的错误
爬虫实战(六):爬笔趣阁小说
AcWing 904. Wormhole solution (SPFA for negative rings)