摘要:
<template v-for="(index, name) in $slots" :slot="name"> <slot :name="name" /> </template> 阅读全文
摘要:
this.$refs.materialTxt.addEventListener('paste', function(e) { console.log('监听到了') e.stopPropagation() e.preventDefault() let text = ''; const event = 阅读全文
摘要:
export default { href: { bind(el, binding, vnode) { el.style.cursor = 'pointer' if (!(binding.value || '').trim()) return const url = binding.value el 阅读全文
摘要:
// vue.config.js修改const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, filenameHashing: f 阅读全文
摘要:
// 参照Elmenent ui statistic组件 function dispose(value = '', precision = null, groupSeparator = '', rate = 1000 ) { if (!isNumber(value)) return false; l 阅读全文
摘要:
重新封装tooltip组件,增加移入渲染,移除销毁功能,避免渲染过多tooltip<template> <el-tooltip v-if="show" v-bind="$attrs"> <slot></slot> </el-tooltip> <div @mouseenter="show = true 阅读全文
摘要:
// 开启硬件加速.img { transform: translate3d(0, 0, 0)} 阅读全文
摘要:
使用v-preventReClick自定义指令export default { preventReClick: { inserted(el, binding) { el.addEventListener('click', () => { if (!el.disabled) { el.disabled 阅读全文
摘要:
// 通过监听点击事件去判断是否触发change事件,如果没有则说明数据没变化<van-rate v-model="modelValue" :disabled="!conf.isEditText" disabled-color="rgba(0,86,255,0.5)" :allow-half="co 阅读全文
摘要:
阻止冒泡就行 <van-field @touchmove.stop=""/> 阅读全文