uniapp
Wg1xg
永远自由 清澈明朗
展开
-
城市选择索引
<u-index-list :index-list="indexList" :scroll-top="scrollTop"> <view v-for="(item, index) in indexList" :key="index"> <u-index-anchor :index="item" /> <view v-for="(c,i) in filterCity(item)" :key="i" class="list-.原创 2021-09-08 11:44:08 · 148 阅读 · 0 评论 -
uniapp 自定义背景导航栏
/*子组件 ↓*///组件 <u-navbar back-icon-name="" immersive :border-bottom="false" :is-fixed="true" :background="{ background: changeNavBackground ? `url(${navBgImage}) no-repeat top / 100% auto` : 'none' }" :back-text-s原创 2021-09-08 11:40:52 · 334 阅读 · 0 评论 -
配置 uni-app eslint
编辑器:vs code脚手架:uni-appeslint标准:Standard下载安装uni-app项目vs code安装插件ESLint下载安装eslint-config-standard github地址:eslint语法检查standard在当前项目中执行npx eslint --init(npx是npm包中带有的一个命令),如上图选择安装成功完毕后,项目工程目录下会自动生成.eslintrc.js文件。此时你的语法检查已经生效(未生效请重启vs code)。其他配置uni-app原创 2021-09-03 16:46:09 · 2134 阅读 · 0 评论 -
TypeError Cannot convert undefined or null to object at r.keys
后端返回数据包含属性值为 null 的字段,(前或者后端)将返回字段处理处理一下。具体原因还不明白原创 2021-09-03 16:33:36 · 1149 阅读 · 0 评论 -
uniapp 时间显示问题
uniapp时间显示NAN原因:ios系统不支持2018-03-09这样格式的时间导致出现的这个问题,IOS只识别2018/03/09这样的格式。uView组件 CountDown倒计时组件安卓机显示正常 , ios显示 00:00问题,后端返回的数据是2021-07-23 00:00:00格式需要转换成 2021/07/23 00:00:00格式,然后用时间戳计算// 待支付订单 倒计时 AutoCancelOrder() { const that = this that.orde原创 2021-09-03 16:31:09 · 1517 阅读 · 0 评论 -
uniapp 应用生命周期加载未完成页面生命周期就开始
uniapp 应用生命周期加载未完成页面生命周期就开始解决方案1、main.js添加如下代码Vue.prototype.$onLaunched = new Promise(resolve => { Vue.prototype.$isResolve = resolve})2.在 App.vue 的 onLaunch 中增加代码 this.$isResolve(),这个方法必须在你的业务如ajax执行完毕后再执行 async onLaunch(options) { if (!u原创 2021-09-03 16:15:13 · 638 阅读 · 0 评论