From 071fef31acab9d5f03486f32ad480474d9bc4065 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 30 Dec 2020 03:26:43 +0000 Subject: [PATCH] chore(release): 1.9.2 [skip ci] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## [1.9.2](https://github.com/CaoMeiYouRen/shirakami-haruka-button/compare/v1.9.1...v1.9.2) (2020-12-30) ### 🐛 Bug 修复 * 优化 友情链接国际化;修改部分错误 ([81ef84a](https://github.com/CaoMeiYouRen/shirakami-haruka-button/commit/81ef84a)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- src/components/HarukaButton.vue | 12 ++++++------ src/components/index.ts | 2 +- src/layout/HomeLayout.vue | 2 +- src/main.ts | 2 +- src/utils/rssParser.ts | 4 ++-- src/views/About.vue | 2 +- src/views/Home.vue | 4 ++-- 9 files changed, 22 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1adf8e..5975403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # shirakami-haruka-button(豹按钮(:3っ)∋) +## [1.9.2](https://github.com/CaoMeiYouRen/shirakami-haruka-button/compare/v1.9.1...v1.9.2) (2020-12-30) + + +### 🐛 Bug 修复 + +* 优化 友情链接国际化;修改部分错误 ([81ef84a](https://github.com/CaoMeiYouRen/shirakami-haruka-button/commit/81ef84a)) + ## [1.9.1](https://github.com/CaoMeiYouRen/shirakami-haruka-button/compare/v1.9.0...v1.9.1) (2020-12-12) diff --git a/package.json b/package.json index 4a86d43..47d695d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shirakami-haruka-button", - "version": "1.9.1", + "version": "1.9.2", "private": true, "author": "CaoMeiYouRen", "license": "MIT", diff --git a/src/components/HarukaButton.vue b/src/components/HarukaButton.vue index 08befe4..af8ed6f 100644 --- a/src/components/HarukaButton.vue +++ b/src/components/HarukaButton.vue @@ -157,7 +157,7 @@ export default defineComponent({ disabled.value = false }, 10 * 1000) // 如果超过 10 秒还未加载成功则允许重新点击 audio.load() - audio.oncanplay = e => { + audio.oncanplay = (e) => { playList.value.add(audio) audio.play().then(() => { @@ -167,7 +167,7 @@ export default defineComponent({ maskList.value.push(Date.now()) }) } - audio.onended = e => { + audio.onended = (e) => { playList.value.delete(audio) maskList.value.shift() if (typeof cb === 'function') { @@ -177,7 +177,7 @@ export default defineComponent({ play() } } - audio.onerror = e => { + audio.onerror = (e) => { console.error(e) // TODO: 音频资源加载优化,若 CDN 加载失败则从本地加载 // audio.src = localVoicesPath @@ -186,16 +186,16 @@ export default defineComponent({ const { maxLength, rawTitle, title } = useButtonTile(messages) - watch(isPlay, val => { + watch(isPlay, (val) => { if (val) { play(() => { ctx.emit('input', false) }) } }) - watch(stopAll, val => { + watch(stopAll, (val) => { if (val) { - playList.value.forEach(e => { + playList.value.forEach((e) => { e.pause() playList.value.delete(e) }) diff --git a/src/components/index.ts b/src/components/index.ts index 32a18bd..d795de5 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -2,7 +2,7 @@ import Vue from 'vue' import _ from 'lodash' const requireComponent = require.context('@/components', true, /\.vue$/) // 批量注册组件 -requireComponent.keys().forEach(fileName => { +requireComponent.keys().forEach((fileName) => { const componentConfig = requireComponent(fileName) const componentName = _.upperFirst(// 调整风格为首字母大写驼峰 _.camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, '')), diff --git a/src/layout/HomeLayout.vue b/src/layout/HomeLayout.vue index a27935a..3eab9c5 100644 --- a/src/layout/HomeLayout.vue +++ b/src/layout/HomeLayout.vue @@ -130,7 +130,7 @@ function switchLang(locale: string){ i18n.locale = locale } -const langList: {lang: string, label: string}[] = Object.keys(messages).map(e => ({ +const langList: {lang: string, label: string}[] = Object.keys(messages).map((e) => ({ lang: e, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore diff --git a/src/main.ts b/src/main.ts index b6d2d7d..4230b8e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -17,5 +17,5 @@ new Vue({ store, i18n, vuetify, - render: h => h(App), + render: (h) => h(App), }).$mount('#app') \ No newline at end of file diff --git a/src/utils/rssParser.ts b/src/utils/rssParser.ts index dd69dfa..3ea282f 100644 --- a/src/utils/rssParser.ts +++ b/src/utils/rssParser.ts @@ -19,7 +19,7 @@ export async function rssParserURL(url: string, query: any = {}) { if (rss.image) { rss.image.title = rss.image.title?.trim() } - rss.items = rss.items?.map(e => { + rss.items = rss.items?.map((e) => { e.title = e.title?.trim() e.content = e.content?.trim() e.contentSnippet = e.contentSnippet?.trim() @@ -45,7 +45,7 @@ export async function rssParserString(xml: string) { if (rss.image) { rss.image.title = rss.image.title?.trim() } - rss.items = rss.items?.map(e => { + rss.items = rss.items?.map((e) => { e.title = e.title?.trim() e.content = e.content?.trim() e.guid = e.guid?.trim() diff --git a/src/views/About.vue b/src/views/About.vue index 2f743e7..365c822 100644 --- a/src/views/About.vue +++ b/src/views/About.vue @@ -74,7 +74,7 @@ function verFormat(ver: string) { } return list.join('.') } -Object.keys(dep).forEach(e => { +Object.keys(dep).forEach((e) => { const d = dep[e] if (!d.includes('git+')) { dep[e] = verFormat(d) diff --git a/src/views/Home.vue b/src/views/Home.vue index c1fd7b4..272b351 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -209,7 +209,7 @@ function useBiliDynamic(uid: number) { const rss = await rssParserString(val) // console.log(rss) if (rss.items){ - dynamic.value = rss.items.slice(0, 3).map(e => { + dynamic.value = rss.items.slice(0, 3).map((e) => { e.contentSnippet = e.contentSnippet?.replace(/(\n[\s|\t]*\r*\n)/g, '\n') // 去除多余换行符 e.isoDate = timeFormat(e.isoDate, 'YYYY-MM-DD HH:mm:ss') return e @@ -233,7 +233,7 @@ export default defineComponent({ name: 'Home', props: {}, setup(props, ctx){ - const _voices = ref(voices.map(e => { + const _voices = ref(voices.map((e) => { e.isPlay = false return e }))