2020年8月3日
摘要: uni-app 支持在 template 模板中嵌套 <template/> 和 <block/>,用来进行 列表渲染 和 条件渲染。 <template/> 和 <block/> 并不是一个组件,它们仅仅是一个包装元素,不会在页面中做任何渲染,只接受控制属性。 用在block中可以渲染一个包含多节 阅读全文
posted @ 2020-08-03 16:25 京鸿一瞥 阅读(1023) 评论(0) 推荐(0) 编辑
摘要: 在components文件创建自己的组件 search.vue page页面导入 import search from '../../components/search.vue' 注册以及命名(一下两种命名方式都可以使用my-search的标签) components:{ // 'my-search 阅读全文
posted @ 2020-08-03 15:05 京鸿一瞥 阅读(1722) 评论(0) 推荐(0) 编辑
  2020年8月2日
摘要: 在page.json页面加入 "tabBar":{ "color":"#999999", "selectedColor":"#333333", "backgroundColor":"#FFFFFF", "borderStyle":"black", "list":[{ "pagePath":"page 阅读全文
posted @ 2020-08-02 23:46 京鸿一瞥 阅读(225) 评论(0) 推荐(0) 编辑
  2020年7月30日
摘要: uni-app已经内置了vuex,所以只要正确引入就好了。 1、根目录创建store文件存放vuex 2、创建index.js 导入vue和vuex import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = n 阅读全文
posted @ 2020-07-30 17:05 京鸿一瞥 阅读(1711) 评论(0) 推荐(0) 编辑
摘要: 一、数据存储在本地缓存 index页面 uni.setStorage({ key:'swiper_info', data:this.info, success:()=>{ console.log('存入成功') } }) test页面 uni.getStorage({ key:'swiper_inf 阅读全文
posted @ 2020-07-30 16:31 京鸿一瞥 阅读(8220) 评论(0) 推荐(0) 编辑
摘要: 惊鸿一面 uni.getStorage(OBJECT) 从本地缓存中异步获取指定 key 对应的内容。 OBJECT 参数说明 参数名类型必填说明 key String 是 本地缓存中的指定的 key success Function 是 接口调用的回调函数,res = {data: key对应的内 阅读全文
posted @ 2020-07-30 14:29 京鸿一瞥 阅读(2965) 评论(0) 推荐(0) 编辑
摘要: uni.request(OBJECT) 发起网络请求。 OBJECT 参数说明 参数名类型必填默认值说明平台差异说明 url String 是 开发者服务器接口地址 data Object/String/ArrayBuffer 否 请求的参数 App(自定义组件编译模式)不支持ArrayBuffer 阅读全文
posted @ 2020-07-30 11:57 京鸿一瞥 阅读(11075) 评论(0) 推荐(0) 编辑
  2020年7月29日
摘要: 导入,注册组件import uniSwiperDot from "@/components/uni-swiper-dot/uni-swiper-dot.vue" export default { components: {uniSwiperDot} } 使用组件<uni-swiper-dot :in 阅读全文
posted @ 2020-07-29 14:40 京鸿一瞥 阅读(1849) 评论(0) 推荐(0) 编辑
  2020年7月28日
摘要: 1.navigator 组件 <navigator url="../test/test" hover-class="navigator-hover"> <button type="default">跳转到新页面</button> </navigator> 组件式传参 <navigator url=" 阅读全文
posted @ 2020-07-28 11:42 京鸿一瞥 阅读(37014) 评论(0) 推荐(1) 编辑
  2020年7月18日
摘要: *{margin: 0;padding: 0;} @media screen and (min-width: 320px){ html{ font-size: 50px; } } @media screen and (min-width: 640px){ html{ font-size: 100px 阅读全文
posted @ 2020-07-18 14:18 京鸿一瞥 阅读(134) 评论(0) 推荐(0) 编辑