上一页 1 2 3 4 5 6 7 ··· 14 下一页
摘要: <template v-for="(index, name) in $slots" :slot="name"> <slot :name="name" /> </template> 阅读全文
posted @ 2023-06-01 10:56 吃饭七分饱 阅读(31) 评论(0) 推荐(0) 编辑
摘要: this.$refs.materialTxt.addEventListener('paste', function(e) { console.log('监听到了') e.stopPropagation() e.preventDefault() let text = ''; const event = 阅读全文
posted @ 2023-05-16 11:49 吃饭七分饱 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 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:59 吃饭七分饱 阅读(113) 评论(0) 推荐(0) 编辑
摘要: // vue.config.js修改const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, filenameHashing: f 阅读全文
posted @ 2023-05-08 18:07 吃饭七分饱 阅读(40) 评论(0) 推荐(0) 编辑
摘要: // 参照Elmenent ui statistic组件 function dispose(value = '', precision = null, groupSeparator = '', rate = 1000 ) { if (!isNumber(value)) return false; l 阅读全文
posted @ 2023-04-20 11:31 吃饭七分饱 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 重新封装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 吃饭七分饱 阅读(385) 评论(0) 推荐(0) 编辑
摘要: // 开启硬件加速.img { transform: translate3d(0, 0, 0)} 阅读全文
posted @ 2023-03-29 16:04 吃饭七分饱 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 使用v-preventReClick自定义指令export default { preventReClick: { inserted(el, binding) { el.addEventListener('click', () => { if (!el.disabled) { el.disabled 阅读全文
posted @ 2023-03-28 11:06 吃饭七分饱 阅读(282) 评论(0) 推荐(0) 编辑
摘要: // 通过监听点击事件去判断是否触发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:01 吃饭七分饱 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 阻止冒泡就行 <van-field @touchmove.stop=""/> 阅读全文
posted @ 2023-03-09 22:20 吃饭七分饱 阅读(18) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 14 下一页