会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
zeroRic
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
14
下一页
2023年6月1日
vue组件封装使用所有父级的插槽
摘要: <template v-for="(index, name) in $slots" :slot="name"> <slot :name="name" /> </template>
阅读全文
posted @ 2023-06-01 10:55 吃饭七分饱
阅读(93)
评论(0)
推荐(0)
2023年5月16日
vue contenteditable处理火狐浏览器复制带标签问题
摘要: this.$refs.materialTxt.addEventListener('paste', function(e) { console.log('监听到了') e.stopPropagation() e.preventDefault() let text = ''; const event =
阅读全文
posted @ 2023-05-16 11:48 吃饭七分饱
阅读(85)
评论(0)
推荐(0)
2023年5月14日
vue v-href跳转外部链接功能实现
摘要: export default { href: { bind(el, binding, vnode) { el.style.cursor = 'pointer' if (!(binding.value || '').trim()) return const url = binding.value el
阅读全文
posted @ 2023-05-14 12:58 吃饭七分饱
阅读(177)
评论(0)
推荐(0)
2023年5月8日
vue-cli打包出单文件
摘要: // vue.config.js修改const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, filenameHashing: f
阅读全文
posted @ 2023-05-08 18:06 吃饭七分饱
阅读(75)
评论(0)
推荐(0)
2023年4月20日
js千分位带小数显示处理
摘要: // 参照Elmenent ui statistic组件 function dispose(value = '', precision = null, groupSeparator = '', rate = 1000 ) { if (!isNumber(value)) return false; l
阅读全文
posted @ 2023-04-20 11:31 吃饭七分饱
阅读(109)
评论(0)
推荐(0)
2023年4月3日
Element Table使用tooltip卡顿问题
摘要: 重新封装tooltip组件,增加移入渲染,移除销毁功能,避免渲染过多tooltip<template> <el-tooltip v-if="show" v-bind="$attrs"> <slot></slot> </el-tooltip> <div @mouseenter="show = true
阅读全文
posted @ 2023-04-03 09:31 吃饭七分饱
阅读(813)
评论(0)
推荐(0)
2023年3月29日
img使用object-fit:cover属性,导致页面滚动卡顿
摘要: // 开启硬件加速.img { transform: translate3d(0, 0, 0)}
阅读全文
posted @ 2023-03-29 16:03 吃饭七分饱
阅读(137)
评论(0)
推荐(0)
2023年3月28日
Element UI Button按钮防止频繁点击处理
摘要: 使用v-preventReClick自定义指令export default { preventReClick: { inserted(el, binding) { el.addEventListener('click', () => { if (!el.disabled) { el.disabled
阅读全文
posted @ 2023-03-28 11:06 吃饭七分饱
阅读(557)
评论(0)
推荐(0)
2023年3月12日
vue vant rate评分组件无法点击取消归零功能处理
摘要: // 通过监听点击事件去判断是否触发change事件,如果没有则说明数据没变化<van-rate v-model="modelValue" :disabled="!conf.isEditText" disabled-color="rgba(0,86,255,0.5)" :allow-half="co
阅读全文
posted @ 2023-03-12 12:00 吃饭七分饱
阅读(420)
评论(0)
推荐(0)
2023年3月9日
移动端 vue textarea高度超出无法滚动问题
摘要: 阻止冒泡就行 <van-field @touchmove.stop=""/>
阅读全文
posted @ 2023-03-09 22:20 吃饭七分饱
阅读(47)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
14
下一页
公告