mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-12-03 07:44:30 +08:00
fix: 优化弹幕
This commit is contained in:
1 parent
ed3ef3c16a
commit
17d46fa158
2 files changed
+13
-14
No files matched your search
@@ -2,7 +2,13 @@ import BoxAnimate from '@/components/boxAnimate.vue';
|
||||
import { EmitableEvent, EventEmitter } from '@/core/common/eventEmitter';
|
||||
import { logger } from '@/core/common/logger';
|
||||
import { ResponseBase } from '@/core/interface';
|
||||
import { deleteWith, ensureArray, parseCss, tip } from '@/plugin/utils';
|
||||
import {
|
||||
deleteWith,
|
||||
ensureArray,
|
||||
getIconHeight,
|
||||
parseCss,
|
||||
tip
|
||||
} from '@/plugin/utils';
|
||||
import axios, { AxiosResponse, toFormData } from 'axios';
|
||||
import { Component, VNode, h, shallowReactive } from 'vue';
|
||||
/* @__PURE__ */ import { id, password } from '../../../../user';
|
||||
@@ -484,22 +490,14 @@ export class Danmaku extends EventEmitter<DanmakuEvent> {
|
||||
|
||||
// 图标类型
|
||||
Danmaku.registerSpecContent('i', content => {
|
||||
const iconInfo = core.getBlockInfo(content as AllIds);
|
||||
if (!iconInfo) {
|
||||
return h(BoxAnimate as Component, {
|
||||
id: 'greenSlime',
|
||||
noborder: true,
|
||||
width: 32,
|
||||
height: 32
|
||||
});
|
||||
}
|
||||
const height = getIconHeight(content as AllIds);
|
||||
|
||||
return h(BoxAnimate as Component, {
|
||||
id: content,
|
||||
noborder: true,
|
||||
noAnimate: true,
|
||||
width: 32,
|
||||
height: iconInfo.height
|
||||
height
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user