![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
uniapp
了以李_
一块加油
展开
-
uniapp getUserProfile:fail invalid session
uniapp uni.getUserProflie 部分手机调不起来弹窗原创 2022-09-08 16:51:39 · 2165 阅读 · 0 评论 -
uniapp swiper组件添加点击事件
微信小程序下写法<swiper circular duration="1000" interval="5000" autoplay> <swiper-item v-for="(item, index) in bannerlist" :key="index" @click="skip(item.url)"> <image class="loaded" :src="item.thumb"></image> </swiper-item><原创 2021-04-07 13:49:37 · 3975 阅读 · 0 评论 -
uniapp 支付宝小程序swiper组件错位
在微信开发者工具控制台可以看到默认加了position:absolute属性而支付宝小程序运行工具没有加。。。。可以看到第二张图片跑到区域下面去了原因:在支付宝小程序中不会给<swiper-item>标签添加**position:absolute**属性解决办法:.swiper-item {position:absolute}...原创 2021-03-27 14:03:50 · 716 阅读 · 0 评论 -
vendor.js:5663 [Vue warn]: Property or method “toJSON“ is not defined on the instance but referenced
解决办法:methods: { toJSON() {},}原创 2021-03-26 16:37:30 · 454 阅读 · 0 评论 -
uniapp radio组件取消选中
html代码<radio-group> <label v-for="(item, index) in List" :key="index"> <radio :class="active == index ? 'checked' : ''" :checked="active== index" :value="index" @click="radioChange(index)"/> </label></radio-grou原创 2020-12-19 15:27:05 · 6618 阅读 · 3 评论 -
HTML空格
HTML常用4中空格符1.窄空格 2.正常空格,按下键盘空格键的大小 3.半角空格,占据1/2个中文宽度 4.全角空格,占据1个中文宽度 <view>测 试 空 格 大 小</view><view>测 试 空 格&a原创 2020-12-17 11:59:52 · 166 阅读 · 0 评论 -
uniapp 选择框样式 H5
在APP.vue里面添加一下代码/* 中间对号样式 */ radio::before, checkbox::before { margin-top: -6px; right: 4px; font-size: 15px; line-height: 15px; } /* 选择框大小 */ radio .wx-radio-input, checkbox .wx-checkbox-input, radio .uni-radio-input, checkbox原创 2020-12-17 10:18:46 · 1196 阅读 · 0 评论 -
CSS固定元素屏幕正中间
使用绝对定位或固定定位position: absolute;top:50%;left:50%;transform: translate(-50%,-50%);原创 2020-12-14 13:33:41 · 2595 阅读 · 0 评论 -
顶部导航栏固定之后点击事件失效问题
顶部导航栏固定在顶部以后点击返回/搜索/清空事件均无反应解决:在css里面加z-index属性.head { background: linear-gradient(100deg, #FFEB3B, #FFC107); padding: 10px 0; position: fixed; top: 0; width: 100%; z-index: 100; }...原创 2020-10-08 17:09:56 · 524 阅读 · 0 评论 -
uniapp引入iconfont
uniapp在线引入iconfont图标1.登录iconfont账号(本人使用微博账号登录)2.创建项目> 以lianxi项目为例3.选择自己用到的图标加入到项目4.生成CSS代码5.复制代码到浏览器打开,前面加https:6.复制生成的代码到自己项目中并在所有url开头的代码前面加https:(需要自己创建一个css文件)7.最后在项目中使用即可<view class="iconfont icondengji"></view>iconfo原创 2020-07-04 09:58:15 · 594 阅读 · 1 评论 -
input输入框回显接口数据
input输入框动态显示数据用v-model<input type="text" v-model="goods.title" maxlength=8 placeholder="请输入菜品名称" /goods.title为接口中的变量名,此时input框就显示出来接口里面的数据了原创 2020-06-28 16:47:04 · 4875 阅读 · 0 评论 -
uniapp sl-filter条件筛选组件
sl-filter条件筛选一.使用在script中引用组件import slFilter from '@/components/sl-filter/sl-filter.vue';export default { components: { slFilter },HTML中直接使用标签<sl-filter :themeColor="themeColor" :menuList="menuList" @result="result"></sl-filter>原创 2020-06-28 16:02:11 · 7929 阅读 · 2 评论 -
uniapp switch开关选择器
Switch开关选择器需要接口时,给开关赋默认值的方法1. 先获取接口里面的数据//执行加载数据方法onLoad() { this.updata();},// 获取数据updata(){ this.$http.get({ // 接口地址 url:'&do=store_set&act=set_read&storeid=31' }).then(res=>{ console.log('res',res) // res.data为数组,因为里面只有一原创 2020-06-28 15:40:07 · 7313 阅读 · 0 评论