- 博客(36)
- 收藏
- 关注
原创 uniapp写H5在微信浏览器中隐藏导航栏(会出现返回白屏的问题,只能用在不用返回的页面)
3、在onShow中判断是否在微信浏览器中,在就执行app.vue中隐藏方法。2、在需要的页面中写方法,判断是否在微信浏览器中。1、在app.vue页面添加隐藏导航栏的方法。
2022-12-15 14:31:23
2788
原创 uniapp写h5,在手机上运行提示连接服务器超时,但是在电脑上运行就是正常的
大家看一下自己的页面或者封装的js文件中有没有正则表达式,如果有把文件注释掉在试一下,看看可不可以。
2022-11-24 14:35:33
1630
原创 uniapp写微信小程序静态资源过多无法打包
静态资源过多的话,在微信开发这工具中真机运行会提示包太大了,无法打包,解决办法就是进行分包加载。在pages.json中添加。
2022-11-03 17:01:18
1376
原创 uniapp写微信小程序怎么运行到微信开发工具上
2、这样unpackage中就多一个文件mp-weixin。1、选择运行>运行到小程序模拟器>运行到微信开发者工具。3、把这个文件导入到微信小程序中就行啦。
2022-11-03 16:54:57
1165
原创 vue+elementui,输入框输入特殊字符提示
在return的必填中加入{ validator: validateInput, trigger: ['blur', 'change'] },在data中写入,在return下边。在methods中写入方法。
2022-09-21 16:58:56
1461
原创 vue3封装wangeditor富文本组件
先引入wangeditor子组件父组件参考文章:vue3中二次封装wangEditor富文本编辑器_zhfy啊的博客-优快云博客_vue3 富文本编辑器
2022-06-15 18:05:00
894
原创 tinymce富文本编译器的使用
中文文档(里边有官网和中文包)TinyMCE中文文档中文手册1、通过npm安装也可以从官网下载注意:vue2不能使用4版本以上的富文本在node_modules文件下找到tinymce文档,复制tinymce放入项目的根目录下public的文件夹中,从中文文档中下载中文包,把中文包放到tinymce中2、再组件中引入...
2022-06-09 16:15:46
808
原创 js中对数组的操作
1、数组中有另一个数组,访问里边数组的数据let age = [1,2,3,[1,2,3]] age[3][1] //第一个[]是里边的数组的下标,第二个[]是数组中的数据 //22、字符串变成数组splictlet name = 'the,first,item,in,the,array' name.splict(",") //通过逗号分隔字符串,变成一个新的数组3、把数组变成字符串jion()let age = [1,2,3,'3',1,'2'] age.jion(",")//通过逗号
2022-04-20 11:31:47
486
原创 微信小程序使用mock.js
1、在utils中创建api.js和mock.js2、在mock.js中复制mock.js中的代码,下边是地址https://github.com/nuysoft/Mock/blob/refactoring/dist/mock.js3、在api.js中写入以下代码let API_HOST = "http://xxx.com/xxx";let DEBUG = true;//切换数据入口var Mock = require('mock.js')// data是接口function.
2022-04-07 18:09:47
2850
原创 uniapp view中的文字不主动换行的问题
<view class="product" style="display:flex;padding-right: 30rpx;"> <text >商品:</text> <text class="gray9" style="width:80%;display:inline-block;white-space: pre-wrap; word-wrap: break-word;height: auto.
2022-03-16 11:54:12
1652
原创 数组去重的多个方法
1、利用ES6 Set去重(ES6中最常用)function unique (arr) { return Array.from(new Set(arr))}var arr = [1,1,'true','true',true,true,15,15,false,false, undefined,undefined, null,null, NaN, NaN,'NaN', 0, 0, 'a', 'a',{},{}];console.log(unique(arr))//[1, "true", tr.
2021-12-21 14:23:41
86
原创 循环出来的手机号脱敏
<div>{{item.mobile.replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")}}</div>
2021-11-26 09:58:20
221
原创 后台返回的手机号中间显示***
循环后台返回的数据,把手机号进行脱敏this.mobile = item.mobile.replace(item.mobile.substring(3, 7),'***')this.mobile是我在data中定义的,然后通过{{}}进行绑定getAction(url).then((res) => { console.log("列表排名",res) if (res.success) { if (res.result.length &g
2021-11-16 16:20:13
399
原创 时间进行对比
通过时间戳进行对比Date.parse(new Date(record.endtime)) <= Date.parse(new Date())record.endtime 是需要对比的时间,new Date()是当前的时间
2021-11-10 13:20:04
362
原创 获取当前的时间
getitem(){ let date = new Date(); let year = date.getFullYear(); // 年 let month = date.getMonth() + 1; // 月 let day = date.getDate(); // 日 let hour = date.getHours(); // 时 hour = hour < 10 ? "0" + hour : hour; // 如果只.
2021-11-04 22:41:03
88
原创 Warning: `getFieldDecorator` will override `value`, so please don‘t set `value an
在的组件中value和v-decorator不能在一起使用
2021-11-04 22:39:00
1466
原创 antd点击获取点击的时间
<!--日历--> <div :style="{ width: '300px', border: '1px solid #d9d9d9', borderRadius: '4px' }"> <a-calendar :fullscreen="false" @select="onPanelChange" format="YYYY-MM-DD" /> </div>//日历 onPanelChange(value..
2021-11-04 17:31:41
318
原创 正则表达式
正则表达式最开始的写法var reg = new RegExp("a") //查找是否有avar 变量 = /正则表达式/匹配模式var arg = /a|b|c/i //查询是否有a或b或c ,其中i是不区分大小写,g是全局搜索简便写法var arr = /[abc]/ 也是查询是否有a或者bvar arr = /[a -z ] 查询a-z全部的res = /a[bde]c/ 查询 abc 或者adc 或者aec ,a和c必须在开头和结尾,中间是b或者d或者e.
2021-11-03 09:11:56
67
原创 uni-app在导航栏添加图标,并且可以点击
在pages.json文件中,你想要的添加的页面的路由中添加{ "path": "pages/class/index", "style": { "navigationBarTitleText": "超级课表",//添加app-plus "app-plus": { "titleNView": { "buttons": [ { "text":"\ue7c0", "fontSrc": "../../static
2021-10-30 23:01:01
1377
原创 vue v-on修饰符的用法和作用,请耐心看完
<div @click = 'list'> <div @click = 'list2'></div></div> //js代码method:{ list(){ console.log('list') }, list2(){ console.log('list') },}//这个时候控制台会输出两个list<div @click = 'list'> .
2021-10-20 22:52:58
134
原创 vue手机号中间显示****(脱敏)
在table表头{ title: '手机号', align: 'center', dataIndex: 'mobile', customRender: function (t) { t = t.replace(t.substr(3, 4), '****') return t }, },
2021-10-19 16:40:14
1400
1
原创 vue字数过多时显示...
这时候需要插槽<!-- 描述超过200px显示...--> <div slot="remark" slot-scope="text,record" class="ellipsis-name">{{text}}</div>表头内容columns:[ { title: '描述', align: 'center', dataIndex: 'remark',
2021-10-18 15:46:17
504
原创 table表格超过10个字显示...(vue)
在colome中想要省略的字段中添加{ title: '描述', align: 'center', width: '20%', dataIndex: 'remark', customRender: function (text) { return text.length>10 ? text.replace(text.substring(10,text.length), '.....') : text },},...
2021-10-15 17:29:21
546
原创 uniapp 列表默认选中第一个,点击任意一个选中
<view //如果currentIndex等于数组的下标,就显示active这个样式,要不就显示active2:class="currentIndex== index?'active':'active2'" v-for="(item,index) in tfdList" :key="index"@click="chooseItem(index)" > <view>序号</view> <view>用户名</view> .
2021-09-30 16:32:00
3589
原创 vue点击按钮,任意div全屏展示
借鉴了好多个文章 ,得出的结果需要安装一下全屏依赖npm install --save screenfull代码<div>//要全屏的元素 <div id="a" style="width:40px;height:100px;color:red"></div>//点击按钮,上边的div全屏 <button id="b" @click="mounted"></button></div>&l.
2021-09-24 11:10:44
442
原创 div不换行,div横轴滑动,
一定要有三个div<div class="mix"><div class="coun"> <div class="max"> 方块1</div><div class="max"> 方块2</div><div class="max"> 方块3</div></d...
2021-09-22 19:47:54
328
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人