mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
调整设置样式
This commit is contained in:
1 parent
c323cea07a
commit
c89f99f8a3
7 files changed
+73
-91
No files matched your search
@@ -1,21 +1,9 @@
|
||||
function i18nMix(i18n) {
|
||||
i18n.update({
|
||||
'zh-cn': {
|
||||
'Subtitle offset time': '字幕偏移时间',
|
||||
'No subtitles found': '未发现字幕',
|
||||
},
|
||||
'zh-tw': {
|
||||
'Subtitle offset time': '字幕偏移時間',
|
||||
'No subtitles found': '未發現字幕',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function settingMix(art) {
|
||||
const {
|
||||
i18n,
|
||||
events: { proxy },
|
||||
} = art;
|
||||
|
||||
return {
|
||||
title: 'Subtitle',
|
||||
name: 'subtitle',
|
||||
@@ -24,15 +12,8 @@ function settingMix(art) {
|
||||
<div class="art-setting-header">
|
||||
${i18n.get('Subtitle offset time')}: <span class="art-subtitle-value">0</span>s
|
||||
</div>
|
||||
<div class="art-setting-body">
|
||||
<input
|
||||
style="width: 100%;height: 3px;outline: none;appearance: none;-moz-appearance: none;-webkit-appearance: none;background-color: #fff;"
|
||||
class="art-subtitle-range"
|
||||
type="range"
|
||||
min="-5"
|
||||
max="5"
|
||||
step="0.5"
|
||||
>
|
||||
<div class="art-setting-range">
|
||||
<input class="art-subtitle-range" type="range" min="-5" max="5" step="0.5">
|
||||
</div>
|
||||
`,
|
||||
mounted: $setting => {
|
||||
@@ -62,9 +43,19 @@ function settingMix(art) {
|
||||
export default function subtitle(art) {
|
||||
const { clamp } = art.constructor.utils;
|
||||
const { setting, notice, template, i18n } = art;
|
||||
i18nMix(i18n);
|
||||
setting.add(settingMix);
|
||||
|
||||
i18n.update({
|
||||
'zh-cn': {
|
||||
'Subtitle offset time': '字幕偏移时间',
|
||||
'No subtitles found': '未发现字幕',
|
||||
},
|
||||
'zh-tw': {
|
||||
'Subtitle offset time': '字幕偏移時間',
|
||||
'No subtitles found': '未發現字幕',
|
||||
},
|
||||
});
|
||||
|
||||
setting.add(settingMix);
|
||||
let cuesCache = [];
|
||||
art.on('subtitle:switch', () => {
|
||||
cuesCache = [];
|
||||
|
||||
Reference in new issue
Block a user