![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
uniapp
酷酷的杰尼
吃饭睡觉
展开
-
uniapp使用vue-i18n实现语言国际化
1.需要去vue-i18n官网下载js文件https://unpkg.com/vue-i18n@8.21.0/dist/vue-i18n.js2.将js文件下载后放置在创建的lang文件夹中3.紧接着创建需要翻译的配置文件如zh.js(中文)、en.js(英文)、tcc.js(繁体)且配置需要翻译的字段zh.js(中文)export default { index: { title: '首页', game: '游戏', bas: '背景音乐' }}en.js(英文)e原创 2021-12-25 09:43:45 · 1035 阅读 · 1 评论 -
uniapp 蓝牙通讯保姆级教程(搜索/连接蓝牙、读、写)
小程序点击蓝牙设备进行通讯1.初始化蓝牙设备 | | 提醒用户打开蓝牙设备 player() { var that = this; uni.openBluetoothAdapter({ //调用微信小程序api 打开蓝牙适配器接口 success: function(res) { // console.log(res) uni.showToast({ title: '初始化成功', icon: 'success', duration: 800原创 2021-10-29 16:19:12 · 13103 阅读 · 6 评论 -
uniapp微信小程序自定义顶部导航栏颜色内容
1.在page.json中找到需要自定义的配置的页面添加:“navigationStyle”:“custom” //添加自定义配置{ "path": "pages/shopownerStatistics/statistics", "style": { "navigationBarTitleText": "营收统计", "app-plus": { "titleNView": false }, "navigationStyle":"custom"//添加自定义配置 }},原创 2021-10-25 14:26:22 · 1851 阅读 · 0 评论 -
uniapp 绑定/更改手机号,验证码倒计时,手机格式中间四位变成*
1.判断如果存在手机号则多一个input框为旧手机号栏<view class="fnListRowBetweenCenter"> <view class="fnListRowCenter" style="margin: 20rpx 0;"> <view><text>新手机号码</text></view> </view> <input class="passwordInput" type="text" val.原创 2021-09-11 14:49:33 · 1530 阅读 · 0 评论 -
uniapp小程序更换头像
1.点击头像调起本地相册选择图片或使用相机拍照uni.chooseImage({ // 从本地相册选择图片或使用相机拍照。 count: 1,//默认选择1张图片 sizeType: ['original', 'compressed'],//original 原图,compressed 压缩图,默认二者都有 success: (res)=> { console.log(res.tempFilePaths[0]);//成功则返回图片的本地文件路径列表 tempFilePaths thi原创 2021-09-10 16:05:59 · 3585 阅读 · 2 评论 -
uniapp 自定义无图标tabbar
1.创建components组件,在tabbar页面引入该组件,附代码<template> <view class="tab-bar"> <view v-for="(item,index) in list" :key="index" :class="select === index? 'select' : 'tab-bar-item'" @click="switchTab(item, index)"> <view class="tab_text"&.原创 2021-09-07 10:03:14 · 577 阅读 · 0 评论 -
uniapp多个picker组件复用
<template> <view class="treatment"> <view class="navigation"> <view v-for="(item,index) in navList" :key="index" :class="activeclass === index? 'navigationTextSelect' : 'navigationText'" @click="selectindex(index)">{{item}}&l.原创 2021-09-07 10:19:40 · 834 阅读 · 0 评论