摘要: <svg> <defs> <linearGradient id="grad" x1="10%" x2="100%"> <stop offset="0%" style="stop-color:#6E15FF; stop-opacity:0.6" /> <stop offset="100%" style 阅读全文
posted @ 2024-06-18 15:14 ℡北瞳少年、 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 这里使用了一个没有用的裁剪插件,需要先下载它 npm i vue-cropper@0.6.4 --save 然后在main.js引入: import VueCropper from 'vue-cropper' Vue.use(VueCropper) 1、html部分: <template> <el- 阅读全文
posted @ 2024-04-02 17:13 ℡北瞳少年、 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 一、普通的值类型的数据校验①设置 el-form-item 的 prop 值 与 formdata 中定义的 key 保持一致`②如果 rules 需要通过 el-form 统一设置,rules 的 key 定义也与 prop 保持一致(如果不一致,需要在 el-form-item 中 手动指定)③ 阅读全文
posted @ 2024-03-29 17:50 ℡北瞳少年、 阅读(1222) 评论(0) 推荐(0) 编辑
摘要: 1、将验证加到字段上,上面的prop标签就是用来验证的名称 2、定义rules公共文件 /** * Form表单验证 * author: jiangfan * @type {RegExp} */ // 电话 let phoneReg = /^(13[0-9]|14[5|7]|15[0|1|2|3|4 阅读全文
posted @ 2024-03-21 17:53 ℡北瞳少年、 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1、TestScroll.wxml <view class="content-box"> <!-- 左侧分类 --> <scroll-view scroll-y scroll-with-animation class="left" style="width:245rpx;height:100%;ba 阅读全文
posted @ 2023-10-11 18:03 ℡北瞳少年、 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 先看看效果: 第一步:使用canvas标签,给canvas添加一个id <canvas id="canvasVCode" width="40" height="22" class="captcha" @click="changeVCode"></canvas> 第二步:在页面加载完毕后调用 点击验证 阅读全文
posted @ 2023-05-23 09:57 ℡北瞳少年、 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 先看效果: wxml: <canvas class="v-code" bindtap="changeImg" style="width:100px; height:40px;" canvas-id="canvas"></canvas> js: const MCAP = require('../../ 阅读全文
posted @ 2023-01-05 09:29 ℡北瞳少年、 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 微信小程序实现方案: 我们可以利用微信小程序的内置组件轻松实现!1.将整个屏幕用movable-area组件覆盖,2.在movable-area内部添加一个movable-view实现自由滑动。3.重点:CSS属性 pointer-events 。代码奉上:wxml: <movable-area c 阅读全文
posted @ 2023-01-03 14:27 ℡北瞳少年、 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 比如小程序的获取openid, 首先getOpenID需要借助Promise实现,然后才可以使用async 和 await来同步(Vue同样如此) Page({ /** * 生命周期函数--监听页面加载 */ async onLoad(options) { const openid = await 阅读全文
posted @ 2022-11-28 15:54 ℡北瞳少年、 阅读(18) 评论(0) 推荐(0) 编辑
摘要: <template> <el-table :height="tableHeight" :data="tableData"> <el-table-column header-align="center" label="序号" align="center" width="50px"> <template 阅读全文
posted @ 2022-11-08 11:56 ℡北瞳少年、 阅读(235) 评论(0) 推荐(0) 编辑