
vue
LMYH1123
这个作者很懒,什么都没留下…
展开
-
draggable里包裹的卡片,卡片里有个input,点击input聚焦无效。
draggable里包裹的卡片,卡片里有个input,点击input聚焦无效。原创 2023-06-29 09:47:36 · 818 阅读 · 0 评论 -
关于vuex、params、query传参,页面刷新丢失参数问题?
在开发中,使用vuex、params、query获取参数,页面刷新时,再去获取参数时undefined。原创 2022-10-28 16:00:56 · 606 阅读 · 0 评论 -
vue.config.js 文件配置
代码】webpack配置(vue.config.js)原创 2022-07-17 16:31:48 · 1234 阅读 · 0 评论 -
vue脚手架配置代理
vue脚手架配置代理原创 2022-06-14 22:37:28 · 106 阅读 · 0 评论 -
路由器的两种工作模式(hash/history)
1、对于一个url来说,什么是hash值?2、hash值不会包含在HTTP请求中 3、hash模式:4、history模式:原创 2022-06-13 16:35:19 · 196 阅读 · 0 评论 -
vue插槽 slot
slot插槽:让父组件可以向子组件指定位置插入html结构,也是一种组件通信的方式,适用于父组件-->子组件。原创 2022-06-08 22:39:04 · 70 阅读 · 0 评论 -
消息订阅与发布pubsub
消息订阅与发布pubsub原创 2022-06-05 12:30:54 · 87 阅读 · 0 评论 -
全局事件总线
原创 2022-05-27 18:00:50 · 101 阅读 · 0 评论 -
rowSpan(table)
rowSpan(key) { let arr = this.data .reduce((result, item) => { if (result.indexOf(item[key]) < 0) { result.push(item[key]) } return result }, []) .reduce((result, keys) => {.原创 2022-05-23 11:56:47 · 234 阅读 · 0 评论 -
多维数组转一维数组(扁平化)
getscoreInfo(scopeId) { this.spinningLoading = true scoreInfo({ scopeId: '1497142253250936832' }) .then((res) => { this.spinningLoading = false if (res.success) { const { baseInfo, object, scoreProces.原创 2022-05-23 11:55:24 · 140 阅读 · 0 评论 -
mixin(混入)
功能:可以把多个组件公用的配置配置提取成一个混入对象。使用方法:第一步定义混入,例:{ data(){...}, methods:{...} ...}第二步使用混入,例:(1)全局混入:Vue.mixin(xxx)(2)局部混入:minxins:['xxx',]......原创 2022-06-05 12:11:44 · 97 阅读 · 0 评论 -
html页面中meta的相关配置
1. IE浏览器兼容配置针对ie浏览器的一个特殊配置,含义是让ie浏览器以最高的渲染级别渲染页面。<meta http-equiv="X-UA-Compatible" content='IE=edge'>2.开启移动端的理想视口<meta name="viewport" content="width=device-width,initial-scale=1.0">...原创 2022-05-13 17:49:59 · 441 阅读 · 0 评论 -
vue与VueComponent的关系
原创 2022-05-13 11:51:13 · 190 阅读 · 0 评论 -
Vue2.x的生命周期
vm的一生(vm生命周期): 将要创建 → beforeCreate() 创建完毕 → created() 将要挂载 → beforeMount () ※ 挂载完毕→ mounted() 将要更新 → beforeUpdate() 更新完毕 → updated() ※将要销毁 → beforeDestroy() 销毁完毕 → destroy()......原创 2022-05-03 12:15:15 · 327 阅读 · 0 评论 -
vue的数据代理
一、this由vue管理的函数,一定不要写箭头函数,一旦写了箭头函数,this就不再是vue实例了。二、数据代理(object.defineProperty)Object.defineProperty(obj, prop, descriptor) getter和setter let obj1 = {x:100}; let obj2 = {y:200}; Object.defineProperty(obj2, 'x', { // 当读取o原创 2022-02-01 20:32:22 · 716 阅读 · 0 评论 -
日期moment与yy-mm-dd之间的转换:moment(‘00:00:00‘,‘HH:mm:ss‘)
template:<a-form-item label="有效日期" has-feedback="" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-range-picker v-decorator="['dates', { rules: [{ required: true, message: '请输入日期!' }] }]" :sh...原创 2021-09-17 17:00:11 · 1901 阅读 · 2 评论 -
Invalid attempt to iterate non-iterable instance. In order to be iterable
enterpriseName(text) { const values = this.enterpriseList.filter((item) => item.id == text) if (values.length > 0) { return values[0].name } },原创 2021-07-30 15:17:50 · 7436 阅读 · 0 评论 -
Vue路由this.$route.push跳转到新的页面没有刷新
将 create() 放到 activated() 中。activated() { this.form.setFieldsValue({ name: '', }) this.loadData = {} this.getTree() this.loadDatas() this.addPage() },原创 2021-07-30 11:26:59 · 233 阅读 · 0 评论 -
从数组中删除指定元素
for (var key of this.enabledCustomerIds) { if (key === row.customerId) { this.enabledCustomerIds.splice(this.enabledCustomerIds.indexOf(key), 1) }}原创 2021-07-16 19:08:09 · 239 阅读 · 0 评论 -
过滤 filter
const ids = this.data.filter(item => { return item.isEnable }).map(item => { return item.customerId })settingOk() { const ids = this.data.filter(item => { return item.isEnable }).map(item => { return item...原创 2021-07-16 18:55:25 · 131 阅读 · 0 评论