会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
闰土的土
博客园
首页
新随笔
联系
订阅
管理
2024年1月15日
npm 安装cnpm 设置淘宝镜像报错 4048
摘要: npm ERR! code EPERMnpm ERR! syscall renamenpm ERR! path D:\program files\nodejs\node_global\node_modules\cnpm\node_modules\npm\node_modules.node-gyp.D
阅读全文
posted @ 2024-01-15 14:29 闰土的土
阅读(1150)
评论(0)
推荐(1)
2022年9月22日
js 满1000 进位
摘要: /** * 10000 => "10,000" * @param {number} num */export function toThousandFilter(num) { return (+num || 0).toString().replace(/^-?\d+/g, m => m.replac
阅读全文
posted @ 2022-09-22 09:08 闰土的土
阅读(19)
评论(0)
推荐(0)
2022年9月15日
Vue 设置 postcss-px2rem
摘要: "vue": "2.6.12",@vue/cli 4.5.13npm install postcss-px2rem module.exports = { css: { loaderOptions: { css: {}, postcss: { plugins: [ require('postcss-p
阅读全文
posted @ 2022-09-15 14:46 闰土的土
阅读(380)
评论(0)
推荐(0)
2022年9月13日
vue生产环境关闭打印日志
摘要: 在main.js中添加 if (['production', 'staging'].includes(process.env.NODE_ENV)) { window.console.log = () => {} }
阅读全文
posted @ 2022-09-13 17:07 闰土的土
阅读(546)
评论(0)
推荐(0)
2022年6月16日
vue 页面缓存 keep-alive
摘要: <section class='app-main'> <transition mode='out-in' name='fade-transform'> //错误示范,会有问题 <!-- <keep-alive :include='$store.state.KeepAliveIncludeArr'>-
阅读全文
posted @ 2022-06-16 14:29 闰土的土
阅读(129)
评论(0)
推荐(0)
2022年5月2日
el-select 回显以后 点击没反应
摘要: 问题:表单编辑以后回显select 下拉框 ,点击option没反应。原因:如果option是循环赋值来的,数据层次太多,render函数没有自动更新,需手动强制刷新。解决方法:加 @change="$forceUpdate()" 方法就ok ,如下: <el-select @change="$fo
阅读全文
posted @ 2022-05-02 17:03 闰土的土
阅读(1026)
评论(0)
推荐(0)
2022年4月2日
vue scoped父组件影响子组件样式
摘要: vue里面给style标签添加scoped属性之后,css只会作用于当前组件中的元素。 但是这次项目里面出现了父组件的样式影响了子组件的样式。父组件<style scoped> .test{color: #f00;} </style>子组件<template> <div class="test">
阅读全文
posted @ 2022-04-02 10:39 闰土的土
阅读(2782)
评论(0)
推荐(0)
2022年1月27日
el-cascader 懒加载 回显数据
摘要: <template> <div class='dashboard-container'> <el-cascader ref='cascader' v-model='cascaderValue' v-loading='loading' :disabled='disabled' :props='prop
阅读全文
posted @ 2022-01-27 09:50 闰土的土
阅读(3485)
评论(0)
推荐(0)
2022年1月25日
el-table 嵌套form表单自定义校验
摘要: <el-form ref='tableForm' :model='ruleForm' :rules='rules' class='demo-ruleForm'> <el-table :data='ruleForm.list' class='eltableSty' style='width: 100%
阅读全文
posted @ 2022-01-25 14:24 闰土的土
阅读(2032)
评论(0)
推荐(0)
2022年1月12日
JS 数字小数正则
摘要: //正负带小数 pattern: /^[+\-]?(?!0\d)\d+(\.\d+)?$/, //正整数 pattern: /^([1-9]\d*|0)?$/, //正数带小数 /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/ const re = /^[+]{0,1}(
阅读全文
posted @ 2022-01-12 10:41 闰土的土
阅读(855)
评论(0)
推荐(0)
下一页
公告