摘要: <template> <view class="content"> <map :latitude="latitude" :longitude="longitude" style="width: 100%; height: 40vh" scale="15" :show-location="true" 阅读全文
posted @ 2020-07-24 20:43 福超 阅读(1501) 评论(0) 推荐(0) 编辑
摘要: //点击事件 //上传图片 getImg() { if (this.fileList.length >= 9) { uni.showToast({ title: '上传数量上限', icon: 'none', duration: 1000 }) return } let that = this; u 阅读全文
posted @ 2020-07-23 20:32 福超 阅读(595) 评论(0) 推荐(0) 编辑
摘要: <template> <view class="wrapper" :style="'top:'+statusBarHeight+'px'"> <view class="header" style=""> <!-- <view class="back_div"></view> --> <input c 阅读全文
posted @ 2020-05-04 17:48 福超 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 组件链接: https://ext.dcloud.net.cn/plugin?id=258 使用(有坑,要注意) <template> <view class="content"> <view class="bg"> <view class="continueDay">连续签到:{{getData. 阅读全文
posted @ 2020-04-28 11:57 福超 阅读(234) 评论(0) 推荐(0) 编辑
摘要: limitFormatTime(date) { var that=this; // 日期格式为 [2019-05-09 20:10:10] date = date.replace(/\-/g,'/'); var timestamp = (new Date(date)).valueOf(); var 阅读全文
posted @ 2020-04-11 20:04 福超 阅读(857) 评论(0) 推荐(1) 编辑
摘要: 方法一(在单页面中使用) //与data() 同级 filters:{ //设置一个函数来进行过滤 formaDate:function(dateStr,pattern = ''){ let str=parseInt(dateStr.toString().padEnd(13,'0')); let d 阅读全文
posted @ 2020-04-06 11:15 福超 阅读(496) 评论(0) 推荐(0) 编辑
摘要: djs(){ this.allMiao=3600*this.shi+this.fen*60+this.miao; var tt=setInterval(()=>{ this.allMiao--; this.shi=parseInt(this.allMiao/3600); this.fen=parse 阅读全文
posted @ 2020-03-20 19:48 福超 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 下载安装配置 npm install vuex --save 创建一个store文件夹 ,在里面创建store.js文件 //store.js里面 import Vue from "vue"import Vuex from "vuex"Vue.use(Vuex) const store=new Vu 阅读全文
posted @ 2019-11-11 17:15 福超 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 第一步 main.js 把bus加到vue的原型上 Vue.prototype.bus = new Vue() 第二部 在组件Aa 发送数据 destroyed(){ this.bus.$emit('send',this.a) } 第三步 在组件Bb接收数据并且销毁数据 created(){ thi 阅读全文
posted @ 2019-11-11 16:46 福超 阅读(2403) 评论(0) 推荐(0) 编辑
摘要: 父组件parent.vue 子组件 son.vue 没有点击子组件的按钮,子组件的值不会传到父组件 点击按钮之后,子组件的值传到了父组件 父组件 parent.vue 的代码 <template> <div> <h1>我是父组件</h1> {{fczdz}} <son @fcz="fczff" cl 阅读全文
posted @ 2019-11-07 19:03 福超 阅读(250) 评论(0) 推荐(0) 编辑