摘要: word-break: keep-all; /* 防止英文单词断开 */ overflow-wrap: break-word; /* 允许在单词内部换行,仅在必要时 */ white-space: normal; /* 允许普通换行 */ 阅读全文
posted @ 2024-05-13 14:15 chicidol 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 方案1:用$off清除监听 方案2:如果是父子组件就用$emit,不要用EventBus 阅读全文
posted @ 2024-05-10 16:43 chicidol 阅读(15) 评论(0) 推荐(0) 编辑
摘要: //歌词组件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) 编辑
摘要: 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) 编辑
摘要: 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) 编辑
摘要: 实现效果:从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) 编辑
摘要: 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) 编辑
摘要: + 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) 编辑