JS常用操作 1、格式化日期时间function getCurrentDate(format = 2) { var now = new Date(); var year = now.getFullYear(); //得到年份 var month = now.getMonth();//得到月份 var date = now.getDate();//得到日期 javascript 2021年11月08日 0 点赞 0 评论 2532 浏览
vue同时仅允许一个视频播放 vue使用vue-video-player播放视频相关问题1、绑定点击播放事件<video @play="playVideo('v1')"></video>2、播放一个视频,自动暂停播放其他视频let videos = document.getElementsB vue 2022年05月19日 0 点赞 0 评论 2577 浏览
uniCloud使用云函数 uniCloud使用uni-app 是是一个使用 Vue.js 开发所有前端应用的框架,开发者编写一套代码,可发布到iOS、Android、Web(响应式)、以及各种小程序(微信/支付宝/百度/头条/QQ/钉钉/淘宝)、快应用等多个平台。1、创建uni-app项目在 HBuilder 选择文件,新建(如果提示需要安装插件,按照提示安装即可,稍后会要求登陆,如果没有 HBuilder 账户, uniapp 2022年09月02日 1 点赞 0 评论 2589 浏览
vue/js/jq验证邮箱、手机号 1、vue/js验证邮箱function (content){ return /^\w+@[0-9a-z]+\.[a-z]+$/.test(content)}2、vue/js/jq验证邮箱function (content){ return /^[0-9]{11}$/ . test(content)} 前端 2022年04月09日 0 点赞 0 评论 2630 浏览
vue封装公共全局函数 1、common.js定义两个公共函数```jsfunction toast(title = '', icon = 'none') { uni.showToast({ title: title, icon: icon });}function myRequest(url = "", data = {}, method = 'POST'){ return new Promise vue 2021年09月24日 0 点赞 0 评论 2671 浏览
layui常用弹窗 layui常用弹窗 layer.alert('内容'); layer.alert('内容', { icon: 1, skin: 'layer-ext-moon' //该皮肤由layer.seaning.com javascript 2022年01月14日 1 点赞 0 评论 2699 浏览
elementui中upload组件(el-upload)获取上传视频时长等信息 elementui upload组件获取上传视频时长等信息1、上传文件前绑定事件<el-upload class="avatar-uploader" action="https://up-z2.qiniup.com" :show-file vue 2022年05月16日 0 点赞 0 评论 2744 浏览
layui:layer右下角弹窗提醒 1、自定义弹窗样式利用定位使弹窗位于右下角.layui-layer-demo{ position: fixed; top: 72% !important; left: 80% !important;}2、弹出层content: ‘url’ 有滚动条content: [‘url’, ‘no’] 无滚动条layer.open({ javascript 2022年01月14日 2 点赞 0 评论 2935 浏览
vue限制input输入框只能输入汉字、字母、数字 1、只允许输入字母this.content = this.content.replace(/[\u4e00-\u9fa5/\s+/]|[`~!@#$%^&*() \\+ =<>?"{}|, \\/ ;' \\ [ \] ·~!@#¥%……&*()—— \\+ ={}|《》?:“”【】、;‘’,。、_.- vue 2022年04月09日 0 点赞 0 评论 2976 浏览
HighLightJS使用:markdown编辑器代码高亮 官网https://highlightjs.org/引入使用 <link href="/diy_static/css/highlightcss/default-dark.min.css" rel="stylesheet"> <script src="/ javascript 2022年01月14日 1 点赞 0 评论 3076 浏览