更新记录
0.0.61(2021-04-15)
新增card组件
0.0.6(2021-04-08)
新增几个常用格式转换管道方法
0.0.51(2021-04-03)
修改海报生成界面,使之与屏幕尺寸匹配
查看更多平台兼容性
Vue2 | Vue3 |
---|---|
√ | × |
App | 快应用 | 微信小程序 | 支付宝小程序 | 百度小程序 | 字节小程序 | QQ小程序 |
---|---|---|---|---|---|---|
HBuilderX 3.1.7 | × | × | × | × | × | × |
钉钉小程序 | 快手小程序 | 飞书小程序 | 京东小程序 |
---|---|---|---|
× | × | × | × |
H5-Safari | Android Browser | 微信浏览器(Android) | QQ浏览器(Android) | Chrome | IE | Edge | Firefox | PC-Safari |
---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | × | × | × |
下载解压导入Hbuilderx
然后运行
然后不明白的自己去看代码
然后还是不明白+449107144@qq.com来我给解答
关于插件plugin.router.js
这个插件一共有以下几个方法
{
push 正常导航到下一个页面
replace 关闭当前页面进入下一个页面
closeAndTo 关闭所有页面进入下一个页面
switchTab 导航到tabs上的页面
back 返回上一个或者几个页面
preload 预加载页面
}
你可以这么调用它,至于为啥要封装,是因为习惯了Vue的那种导航方式简洁方便。
你可以这么来使用他
this.$routers.push(url,query);
this.$routers.replace(url,query);
this.$routers.closeAndTo(url,query);
this.$routers.switchTab(url,query);
this.$routers.back(delta);
this.$routers.preload(url,query);
关于plguin.tools.js
$formatTime -> 格式话日期(封装好以后才发现这玩意uview里面有了)
$createGuid -> guid 和uview里面不同
$chooseImages -> 选择图片 是一个异步方法
$previewImages -> 预览图片 也是一个异步方法
直接使用
console.log(this.$formatTime(date))
关于http.api.js
定义api接口
const init = (params = {}) => vm.$u.get('/api/common/init',params);
使用
this.$api.init().then(res => {
console.log(res);
})
http.interceptor.js
这个是uview里面的ajax请求框架的封装,主要是拦截器好评~~~
消息推送
消息推送这个功能还有一些需要去做的 你可能需要去看看 Dcloud push
使用:
import MessagePush from '@/common/message.push.js';
// #ifdef APP-PLUS
this.push = new MessagePush();
const client = this.push.getClientInfo();
console.log(client)
this.push.createMessage('测试消息推送','测试消息推送','/static/Nr304OPr3m.png');
this.push.clickMessage(res => {
console.log(res);
uni.showModal({
content:JSON.stringify(res)
})
});
// #endif
// #ifdef H5
this.show = true;
// #endif
新增了扫码功能
this.$scanQrCode()
.then(res => {
})
.catch(err => {
});
新增了开屏红包组件
<redPacket :visible="visible" @close="close" money="30"></redPacket>
data:()=>({
visible:false
})
methods:{
openRedPacket() {
this.visible = true;
},
close() {
this.visible = false;
},
}
新增了icons组件
在components目录下面
新增几个常用格式转换管道方法
FilterNullToEmpty - null转空字符串
FilterAmountFormat - 金额格式化显示
FilterDateTimeFormat - 日期格式化显示
FilterMoneyFormat - 数字格式化显示
FilterTextMaxLength - 字符串过长截断
FilterWanFormat - 数字格式化显示,单位为万
FilterIdCard - 身份证隐藏
使用
<view>
<text>申请日期:{{
propsInfo.createTime
| FilterDateTimeFormat("YYYY年MM月DD日 HH时mm分")
}}</text>
</view>