[TOC]
# 渲染html
[支付寶小程序](https://docs.alipay.com/mini/component/rich-text) 如果需要支持 HTML String,則需要自己將 HTML String 轉化為 nodes 數組,可使用[mini-html-parser](https://github.com/ant-mini-program/mini-html-parser)轉換。
小程序中渲染html, 解決方案有:
1. 使用[wxParse](https://github.com/icindy/wxParse)把html轉化成小程序標簽
2. [towxml](https://github.com/sbfkcel/towxml)
3. 使用[web-view](https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html)組件
4. 使用[rich-text](https://github.com/tans/we-rich)組件
5. [we-rich](https://github.com/tans/we-rich) HTML轉微信富文本節點, we just need rich, no text.
6. [html2wxml](https://github.com/qwqoffice/html2wxml) 微信小程序富文本組件
7. [Rich text component for WePY applications](https://npm.runkit.com/wepy-html/src/wepy-html.wpy?t=1548726388344)
[微信小程序rich-text富文本圖片自適應處理](https://my.oschina.net/tianma3798/blog/1796942)
yuche:
h5 直接用 `dangerouslySetInnerHTML`
# 自定義底部tabbar
組件方式,不閃爍:
https://github.com/tanggaowei/weapp-tabbar
https://www.cnblogs.com/cisum/p/10286794.html
閃爍
[小程序自定義tabbar](https://www.cnblogs.com/wozho/p/9805257.html)
# hidden屬性
[微信小程序之hidden屬性](https://www.cnblogs.com/lymvv/p/8421905.html)
從官方文檔可以看出,所有組件都擁有 `hidden` 屬性,該屬性控制組件是否顯示,默認是顯示的。
Taro 中的組件約定:[taro-components/types/common.d.ts](https://github.com/NervJS/taro/blob/b21545f4f39058d7564f6cb83ab417633e6dd193/packages/taro-components/types/common.d.ts)
# 小程序如何引入外部字體(方法詳解)
https://www.jianshu.com/p/3ebecdf3e9b3
# Text => span
h5 是否換行是由 css 控制的,textarea 可以用 `\n` 換行,`Text` 的實現是 `span` 是無法做到換行的。
你可以這樣:
```js
<Text>我是 { process.env.TARO_ENV === 'h5' ? <br /> : '\n' }換行符 </Text>
```
# 關閉小程序
https://blog.csdn.net/Wu_shuxuan/article/details/79089838
https://blog.csdn.net/sunlizhen/article/details/83858913
# 小程序緩存時效性
https://blog.csdn.net/chjj0904/article/details/78665380
# 鍵盤
## 鍵盤遮擋
使用`cursor-spacing="180" `
所以還是直接使用數字 代表著 焦點距離鍵盤的高度 如果使用的是 `fix`定位 只需要知道光標距離底部的高度即可。
## 小鍵盤的拉起高度
在input獲得焦點的監聽事件里,`e.detail.height`這個屬性就是小鍵盤的拉起高度,獲得這個值
# tabBar 高度
自定義tabbar就很好控制了!
# 地圖
[微信小程序獲取準確的騰訊定位地址](https://blog.csdn.net/mint8085282/article/details/88656303)
.