- 博客(29)
- 收藏
- 关注
原创 yarn : 无法加载文件 C:\Users\AppData\Roaming\npm\yarn.ps1,因为在此系统上禁止运行脚本。
一、在使用yarn时,出现下面错误二、出现此错误的原因是本地计算机上运行你编写的未签名脚本和来自其他用户的签名脚本,可以使用set-ExecutionPolicy RemoteSigned命令将计算机上的执行策略更改为RemoteSigned(以管理员身份运行PowerShell) 三、输入命令get-ExecutionPolicy查看修改后的执行策略是否为RemoteSigned四、解决问题我们可以使用yarn了...
2022-07-13 10:04:44
10421
原创 vue获取指定时间的后的时间
一、引入dayjs安装 | Day.js中文网我是在使用页面引入import dayjs from 'dayjs'二、计算时间例:获取当前时间七天后的时间this.date = dayjs().add(1, 'week').format('YYYY-MM-DD HH:mm:ss')dayjs():获取当前时间add():进行计算可以填年、月、周、日....可以看官网format():格式化时间,可根据自己需求自定义...
2022-05-18 10:41:59
968
原创 vue中使用day.js处理时间
一、安装npm install dayjs --save二、main.js引用import dayjs from 'dayjs'Vue.prototype.dayjs = dayjs// 可以全局使用dayjs三、使用this.dayjs().format('YYYY-MM-DD HH:mm:ss')// 获取当前时间官方文档地址:安装 | Day.js中文网...
2022-03-07 15:40:22
765
原创 vue中使用的element-ui的动态select,不能选择重复数据
<template> <template v-slot:form="{ item }"> <el-row v-for="(dishesIngredient, index) in parArr" :key="index"> <el-form-item :label="'原料'+(index+1)" :prop="'data.ingredients.'+index+'.ingredientId'" :rules="{requ.
2022-03-04 21:34:35
1922
2
原创 uniapp小程序提示更新最新版本
在App.vue中<script> export default { onLaunch: function() { uni.removeStorageSync('userInfo'); const updateManager = uni.getUpdateManager(); //本API返回全局唯一的版本更新管理器对象: updateManager,用于管理小程序更新。 updateManager.onCheckForUpdate((res) => { //
2022-03-03 09:31:05
1741
原创 升级Vue中element-ui的版本
一、卸载旧版本npm uninstall element-ui二、安装新版本npm i element-ui -S安装指定版本:npm install element-ui @2.0.11 -S
2022-02-23 11:12:49
1000
原创 element-ui中select的change方法如何传多个参数
在element-ui的select选中下拉,除了想把当前选中的值,change方法还想传入其他参数时,发现传值接收不到方法一:@change="(name)=>{ handleChange(name,id)}"name:当前选中的值id:需要传入其他的参数方法二:@change="handleChange($event,id)}"$event:当前选中的值id:需要传入其他的参数...
2022-02-22 14:23:54
6546
原创 TypeError: Cannot read properties of undefined (reading ‘validate‘)
this.$refs['ruleIngredientsForm'].validate((valid) => { if (valid) { alert('submit!') return true } else { console.log('error submit!!') return false...
2022-02-21 16:15:32
8405
2
原创 vuex的actions传多个参数
一、在js中getList({ commit, state }, { updated, id }) { const requireGet = state.ingredientCategoryList === undefined ^ updated return new Promise((resolve, reject) => { if (requireGet === 1) { getList({ filter: {
2022-02-08 15:09:41
1596
原创 vue中使用高德地图POI
一、使用AMap-Vue地址:坐标拾取工具 | AMap-Vue安装yarn add @amap/amap-vue # 或 npm install --save @amap/amap-vue二、引入在main.jsimport AmapVue from '@amap/amap-vue'AmapVue.config.version = '2.0' // 默认2.0,这里可以不修改AmapVue.config.key = '申请的key值'Vue.use(AmapVue)三、
2022-01-06 16:53:27
1149
原创 uniapp点击按钮防抖
一、在common文件夹中创建文件 // 防止处理多次点击 function noMultipleClicks(methods, info) { // methods是需要点击后需要执行的函数, info是点击需要传的参数 let that = this; if (that.noClick) { // 第一次点击 that.noClick= false; if(info && info !=
2021-12-08 17:57:43
1267
原创 element ui的from表单根据条件判断,表单校验是必填还是非必填
element ui的from表单根据条件判断,表单校验是必填还是非必填
2021-11-17 12:20:31
3618
原创 uniapp支付宝小程扫描二维码获取参数
onLaunch(options) { if (options.query && options.query.qrCode) { this.qrCodeUrl = options.query.qrCode; console.log('qrCodeUrl',this.qrCodeUrl) }}在app.vue页面的onLaunch里面获取如果想在开发者工具调试 编译 -> 添加编译模式(刚刚是在全局配置,所以在全局参数里...
2021-11-09 17:04:24
2218
1
原创 日期时间格式化
/**** @param {Date} datetime 日期时间,空则使用当前时间* @returns 当前日期和时间最大值*/export function getDateTimeMax(datetime) { if (!datetime) datetime = new Date() return parseTime(datetime, '{y}-{m}-{d}') + 'T23:59:59'}/**** @param {Date} da...
2021-11-02 19:46:08
138
原创 element ui 使用table最后一行会覆盖半个表格
.el-table >.el-table__fixed-right { height: 100% !important;}在css样式中添加高度覆盖掉就可以~
2021-11-02 19:45:41
420
原创 vue中使用moment.js格式化时间
1、安装npm install moment2、在main.js引用import moment from 'moment' // 引入插件Vue.prototype.$moment = moment // 给Vue函数添加一个原型属性$moment 指向moment3、把从后台获取到的时间放在里面 例:item.createTime {{ $moment(item.createTime).format('yyyy-MM-DD hh:mm:ss') }}就可以把数据格式化...
2021-09-13 16:32:47
189
原创 小程序接收二维码传过来的参数
onLoad(options) { var qrCodeUrl = decodeURIComponent(options.q); console.log('qrCodeUrl', qrCodeUrl)}新手小白一枚,希望大家多多支持~
2021-08-24 10:57:04
425
原创 微信小程序计时器
wxml: <text class='marright'>{{hours}}:{{minute}}:{{second}}</text>js: page({ data: { hours: '0' + 0, // 时 minute: '0' + 0, // 分 second: '0' + 0 // 秒 }, onLoad: function (options) {
2021-08-06 11:43:34
457
原创 gitee新建上传分支
git initgit add .git commit -m "first commit"git remote add origin 地址git push -u orgin master在本地新建一个分支: git branch develop切换到你的新分支: git checkout develop将新分支发布在github上: git push origin develop在本地删除一个分支: git branch -d develop在github远程端删除一个分支: g
2021-08-02 15:47:50
817
原创 uniapp的微信小程序微信授权登录
一、授权用户公开信息 // 授权公开信息 authorization() { uni.getUserProfile({ desc: '授权', success: (res) => { console.log('getUserProfile',res) this.information = true } }); },展示效果:二、获取手机号授权 // 绑定
2021-07-27 16:36:24
1026
原创 I18n在VUE中使用方法
语言包:export default { route: { dashboard: 'Dashboard', system: 'System' }, member:{ name: 'Member', member:{ column:{ id: { name: 'Id', placeh
2021-06-16 18:29:05
388
原创 VUE中switch使用
let title = '' switch (this.activityCode) { //想要判断的变量 case 'ManuallyPassed': //状态一 title = this.$t('member.credit.activity.review.approve') //状态一返回的结果 break case 'EditCredit': //状态二 title = this.$t('me...
2021-06-16 18:18:49
4212
原创 微信小程序获取当前城市
一、在app.json里面需要配置permission 属性例:"permission": { "scope.userLocation": { "desc": "你的位置信息将用于小程序位置接口的效果展示" }}如果不写则会有以下提示二、获取微信官方开发文档获取经纬度官方文档链接:https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getLocation.htmlw
2021-04-29 11:16:08
266
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人