会员
众包
新闻
博问
闪存
云市场
所有博客
当前博客
a56爆大奖在线娱乐的博客
a56爆大奖在线娱乐的园子
账号设置
简洁模式
...
退出登录
注册
登录
chicidol
博客园
首页
新随笔
联系
订阅
管理
2024年5月
url自动换行,但是英文单词不断开
摘要: word-break: keep-all; /* 防止英文单词断开 */ overflow-wrap: break-word; /* 允许在单词内部换行,仅在必要时 */ white-space: normal; /* 允许普通换行 */
阅读全文
posted @ 2024-05-13 14:15 chicidol
阅读(7)
评论(0)
推荐(0)
编辑
EventBus,$emit执行一次,$on却执行多次
摘要: 方案1:用$off清除监听 方案2:如果是父子组件就用$emit,不要用EventBus
阅读全文
posted @ 2024-05-10 16:43 chicidol
阅读(15)
评论(0)
推荐(0)
编辑
2024年3月
歌词跟随播放进度高亮显示,高亮部分一直在页面中间位置,歌词可拖动
摘要: //歌词组件LyricsDisplay.vue <template> <div class="lyric-container" ref="lyricsList" :class="{ noLyric: !lyrics.length }"> <div v-for="(line, index) in ly
阅读全文
posted @ 2024-03-29 14:10 chicidol
阅读(7)
评论(0)
推荐(0)
编辑
等两个异步请求结束之后再请求接口
摘要: import request from '@/utils/request.js' import { headerEncrypt, paramEncrypt } from '@/utils/bridge.js' async function EncryptProcess(obj1, obj2) { l
阅读全文
posted @ 2024-03-23 15:21 chicidol
阅读(17)
评论(0)
推荐(0)
编辑
在子组件监听父组件传的值,会出现监听不到的情况
摘要: 原因:父组件引入子组件,用了v-if控制子组件的显示,导致无法监听 解决:用v-show
阅读全文
posted @ 2024-03-12 15:58 chicidol
阅读(56)
评论(0)
推荐(0)
编辑
2024年1月
自定义指令-倒计时
摘要: 1、directive/time.jsconst vueTime = (Vue) => { Vue.directive('time', { bind(el, binding, vnode) { const endDate = binding.value; // 倒计时结束时间戳,毫秒 let tim
阅读全文
posted @ 2024-01-17 16:23 chicidol
阅读(11)
评论(0)
推荐(0)
编辑
2023年9月
bus兄弟组件传值
摘要: bus兄弟组件传值,注意: 1、监听时机要比发送时机早 2、这两个组件不要按需引入,不然会导致首次收不到传的值 例: 在组件1的mounted里面发送值: this.$bus.$emit('selected', true)在组件2的created里面监听值: this.$bus.$on("selec
阅读全文
posted @ 2023-09-20 19:46 chicidol
阅读(3)
评论(0)
推荐(0)
编辑
2023年8月
vue实现‘换一批’功能
摘要: 实现效果:从9个数里每次取5个数,取完了从头再取, [1,2,3,4,5,6,7,8,9],第一次取[1,2,3,4,5],第二次取[6,7,8,9,1],第三次取[2,3,4,5,6],第四次取[7,8,9,1,2],,,,以此类推 <div class="flex-align" @click="
阅读全文
posted @ 2023-08-22 11:12 chicidol
阅读(77)
评论(0)
推荐(0)
编辑
vue吸取图片主题色---ColorThief
摘要: npm i --save colorthief <template> <div> <img :src="coverLarge" crossorigin="anonymous" alt="" /> </div> </template> <script> import ColorThief from '
阅读全文
posted @ 2023-08-16 18:59 chicidol
阅读(444)
评论(0)
推荐(0)
编辑
2023年7月
jenkins报错:Error: Cannot find module '/root/.jenkins/workspace/test/node_modules/ejs/postinstall.js'
摘要: + npm install > core-js@3.31.1 postinstall /root/.jenkins/workspace/test-allsaintsmusic-html/node_modules/core-js > node -e "try{require('./postinstal
阅读全文
posted @ 2023-07-27 11:03 chicidol
阅读(578)
评论(0)
推荐(0)
编辑
下一页
公告