随笔分类 - uni-app
摘要:<template> <view class="pc-container"> <topFixBack /> <image :src="imgurl" mode="aspectFill" @tap="saveImage"></image> <canvas canvas-id="mycanvas" st
阅读全文
摘要:代码片段 <template> <view> <!-- 更多api,请前往:https://developers.weixin.qq.com/miniprogram/dev/api/media/editor/EditorContext.html 字体图标,微信小程序官方的确没有给出名称 --> <v
阅读全文
摘要:``` let pages = getCurrentPages(); let curPage = pages[pages.length - 1]; let curParam = curPage.$route.query || curPage.options; // ??什么区别????次序颠倒一下测
阅读全文
摘要:"globalStyle": { "backgroundColor": "#F8F8F8", "disableScroll":true } https://uniapp.dcloud.io/collocation/pages.html#style "disableScroll":true 不管放页面
阅读全文
摘要:<view class="btn throttle" @tap="$u.throttle(submit, 5000)">立即发布</view> 参考:https://www.uviewui.com/js/debounce.html
阅读全文
摘要:<view class="container" :style="{'height':`${pyq_lists.length * 300}` + 'px'}"> <pyqList v-for="(item,index) in pyq_lists" :key='item+index' :itemData
阅读全文
摘要:方法一: pages/pre/pre.vue <template> <view> <view>返回的数据为:</view> <view>id: {{testdata.id}}</view> <view>name: {{testdata.name}}</view> <button type="prim
阅读全文
摘要:u-line 单位使用实例 <u-line color="#E0E0E0" margin="30rpx 30rpx 30rpx 30rpx" length="690rpx"></u-line>
阅读全文
摘要:<view v-bind:class="[tab == 6 ? checkedtabclass : '',commontabclass]" @click="checktab(6)"> <view class="line1">已下架</view> <view class="line2">1033</v
阅读全文
摘要:u--text可以在前后配置图标,非常方便,但边距不好把控,margin使用有点特殊,必须在2个地方配置 1.标签内配置,scss中也得配置,否则无效 <u--text class="title" suffixIcon="arrow-right" iconStyle="font-size:20rpx
阅读全文
摘要:<u-tabs :list="lists" sticky :current="current" @change="changetype" :scrollable="false" lineColor="#3e16bd" :activeStyle="{color: '#3e16bd',fontWeigh
阅读全文
摘要:注意 变动easycom 里内容,需要停止编辑,再次编辑才会生效 page.json "easycom": { "^u-(.*)": "uview-ui/components/u-1.vue" // uview-ui 默认从node_modules下开始查找的。 } 由于uView使用e
阅读全文
摘要:HBuilder 开发工具顶部 “工具” ⇒ "插件安装" ⇒ 前往应用市场安装 ,前端组件库中可以搜到 tips:不要用Hbuilder工具安装 https://ext.dcloud.net.cn/?cat1=2&cat2=21&orderBy=Relevance 不要用Hbuilder工具安装,
阅读全文
摘要:uni.setClipboardData({ data: e, success: () => { this.$toast.showMsg('复制成功') } });
阅读全文
摘要:uni.setNavigationBarTitle({ title:'title....' })
阅读全文
摘要:uni.pageScrollTo({ scrollTop: height, duration: 0 })
阅读全文
摘要:navigationStyle:"custom" "pages": [ { "path": "pages/index/index", "style": { "navigationBarTitleText": "杉莓之恋", "navigationStyle":"custom" } } pages数组
阅读全文
摘要:let BASE_URL = ''; if(process.env.NODE_ENV 'development'){ console.log('开发环境'); BASE_URL = 'http://local.xxx.com/api.php/'; }else{ console.log('生产环境')
阅读全文