Skip to main content

11-14

1 汉印打印机

[1][CPCL 标签打印机中文编程手册](http://pic.cqsjtjy.com/file/20210728/bf97051a-f7ce-48f9-8944-92ac48ec97ad.pdf)

2 vue3+ts+arco design的excel导入导出封装

warehouse-erp项目

[1][记录vue3+ts+arco design的excel导入导出封装](https://juejin.cn/post/7080778846143774734)

3 vue3的reactive和ref

核心区别:reactive初始化值为对象,ref为任意类型

[1][Ref vs Reactive](https://vuejsdevelopers.com/2022/06/01/ref-vs-reactive/)

4 Walletconnect坑-注意事项

TODO

5 dayjs获取当日0点

开始和结束

dayjs() // 2022-11-22 08:33:38
dayjs().startOf('date') // 2022-11-22 00:00:00
dayjs().endOf('date') // 2022-11-22 23:59:59

dayjs().valueOf() // 获取当前毫秒级别时间戳
dayjs().unix() // 获取当前秒级别时间戳

差值

const now = dayjs()
const patchTime = now.diff(now.startOf('date'), 'ms'); // 毫秒差值
endTimestamp = dayjs().add(patchTime, 'ms').valueOf(); // 加上差值

[1][Day.js实战](https://juejin.cn/post/6987400859877376008)

6 WXS 语法参考

vant-ui的wxs写的很好

[1][WXS 语法参考](https://developers.weixin.qq.com/miniprogram/dev/reference/wxs/)

7 小程序滚动穿透问题

关键:catchtouchmove="ture"

<view class="modal-view" hidden="{{!showModal}}" bindtap="toggleModal" catchtouchmove="ture">
<view class="modal">
<view class="modal-item" catchtap="makePhoneCall">{{site.phone}}</view>
<view class="modal-item" catchtap="toggleModal">取消</view>
</view>
</view>

[1][小程序 自定义弹窗后禁止屏幕滚动(滚动穿透)](https://blog.csdn.net/lamenw/article/details/80621549)

8 小程序连接打印机 示例代码

TODO

9 小程序模拟器中 scroll-view 无法下拉

注意基础库版本,2.25.3可以下拉

10 同时使用transition+keep-alive时二级路由之间跳转会导致页面组件重复渲染

[1][同时使用transition+keep-alive时二级路由之间跳转会导致页面组件重复渲染](https://forum.vuejs.org/t/transition-keep-alive/124792)