随笔分类 -  vue3.0

摘要:// 1.设置v-throttle自定义指令 Vue.directive('throttle', { bind: (el, binding) => { let throttleTime = binding.value; // 防抖时间 if (!throttleTime) { // 用户若不设置防抖 阅读全文
posted @ 2025-01-14 16:27 磊~~ 阅读(40) 评论(0) 推荐(0)
摘要://添加.replace(/=+$/,'') replace(/[\r\n]/g,"")为了解决由于base64图片补码的问题导致的 this.$nextTick(()=>{ let urlType = '',base64code = '' if(type.toUpperCase() 'PDF'){ 阅读全文
posted @ 2024-04-17 17:37 磊~~ 阅读(521) 评论(0) 推荐(0)
摘要:<el-image style="width: 300px; height: 150px" :src="url" :preview-src-list="srcList"> </el-image> this.url='data:image/png;base64,' + row.PAGE_IMG 其他格 阅读全文
posted @ 2024-04-09 15:09 磊~~ 阅读(992) 评论(0) 推荐(0)
摘要:<template> <div class="box" :style="styleVar"> </div> </template> <script> export default { props: { height: { type: Number, default: 54, }, }, comput 阅读全文
posted @ 2024-03-05 10:40 磊~~ 阅读(89) 评论(0) 推荐(0)
摘要:export default defineConfig(() => { // 这里只加入了element的有其他的也加在这里 const optimizeDepsElementPlusIncludes = ['element-plus/es']; // 预加载element样式 有其他组件也是如此设 阅读全文
posted @ 2023-09-07 17:34 磊~~ 阅读(194) 评论(0) 推荐(0)
摘要:{ "compilerOptions": { // ↓指定ECMAScript目标版本,esnext为最新版本 "target": "esnext", // ↓指定生成哪个模块系统代码,esnext为最新版本 "module": "esnext", // ↓决定如何处理模块。 "moduleReso 阅读全文
posted @ 2023-05-30 14:41 磊~~ 阅读(189) 评论(0) 推荐(0)
摘要:在CSS3中,我们可以使用transform属性的scale()方法来实现元素的缩放效果。缩放,指的是“缩小”和“放大”的意思。 transform: scaleX(x); / 沿x轴方向缩放/ transform: scaleY(y); / 沿y轴方向缩放/ transform: scale(); 阅读全文
posted @ 2022-12-05 09:23 磊~~ 阅读(1012) 评论(0) 推荐(0)
摘要:(28条消息) vue + css-vars-ponyfill 实现动态换肤_MrWangJB的博客-CSDN博客 阅读全文
posted @ 2022-10-18 09:15 磊~~ 阅读(52) 评论(0) 推荐(0)
摘要:{ "compilerOptions": { "target": "ESNext", "useDefineForClassFields": true, "lib": ["DOM", "DOM.Iterable", "ESNext"], "allowJs": false, "skipLibCheck" 阅读全文
posted @ 2022-09-14 17:07 磊~~ 阅读(40) 评论(0) 推荐(0)
摘要:<el-button type="primary" plain round @click="stop">stop</el-button> const stop = watchEffect((onInvalidate) => { console.log(massage.value); onInvali 阅读全文
posted @ 2022-07-20 16:38 磊~~ 阅读(38) 评论(0) 推荐(0)
摘要:// 创建一个隐藏的 a 标签 const a = document.createElement('a'); a.href = url; // 从 URL 中提取文件名 a.download = url.substring(url.lastIndexOf('/') + 1); a.style.dis 阅读全文
posted @ 2022-07-12 10:20 磊~~ 阅读(26) 评论(0) 推荐(0)