mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
格式化html
This commit is contained in:
1 parent
1d153e9a8d
commit
2cf7905d58
4 files changed
+20
-20
No files matched your search
@@ -6,10 +6,10 @@ export default function aspectRatio(option) {
|
|||||||
return {
|
return {
|
||||||
...option,
|
...option,
|
||||||
html: `
|
html: `
|
||||||
${i18n.get('Aspect ratio')}:
|
${i18n.get('Aspect ratio')}:
|
||||||
<span data-ratio="default" class="art-current">${i18n.get('Default')}</span>
|
<span data-ratio="default" class="art-current">${i18n.get('Default')}</span>
|
||||||
<span data-ratio="4:3">4:3</span>
|
<span data-ratio="4:3">4:3</span>
|
||||||
<span data-ratio="16:9">16:9</span>
|
<span data-ratio="16:9">16:9</span>
|
||||||
`,
|
`,
|
||||||
click: (contextmenu, event) => {
|
click: (contextmenu, event) => {
|
||||||
const { ratio } = event.target.dataset;
|
const { ratio } = event.target.dataset;
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ export default function playbackRate(option) {
|
|||||||
return {
|
return {
|
||||||
...option,
|
...option,
|
||||||
html: `
|
html: `
|
||||||
${i18n.get('Play speed')}:
|
${i18n.get('Play speed')}:
|
||||||
<span data-rate="0.5">0.5</span>
|
<span data-rate="0.5">0.5</span>
|
||||||
<span data-rate="0.75">0.75</span>
|
<span data-rate="0.75">0.75</span>
|
||||||
<span data-rate="1.0" class="art-current">${i18n.get('Normal')}</span>
|
<span data-rate="1.0" class="art-current">${i18n.get('Normal')}</span>
|
||||||
<span data-rate="1.25">1.25</span>
|
<span data-rate="1.25">1.25</span>
|
||||||
<span data-rate="1.5">1.5</span>
|
<span data-rate="1.5">1.5</span>
|
||||||
<span data-rate="2.0">2.0</span>
|
<span data-rate="2.0">2.0</span>
|
||||||
`,
|
`,
|
||||||
click: (contextmenu, event) => {
|
click: (contextmenu, event) => {
|
||||||
const { rate } = event.target.dataset;
|
const { rate } = event.target.dataset;
|
||||||
|
|||||||
@@ -24,13 +24,13 @@ export default function progress(option) {
|
|||||||
return {
|
return {
|
||||||
...option,
|
...option,
|
||||||
html: `
|
html: `
|
||||||
<div class="art-control-progress-inner">
|
<div class="art-control-progress-inner">
|
||||||
<div class="art-progress-loaded"></div>
|
<div class="art-progress-loaded"></div>
|
||||||
<div class="art-progress-played" style="background: ${theme}"></div>
|
<div class="art-progress-played" style="background: ${theme}"></div>
|
||||||
<div class="art-progress-highlight"></div>
|
<div class="art-progress-highlight"></div>
|
||||||
<div class="art-progress-indicator" style="background: ${theme}"></div>
|
<div class="art-progress-indicator" style="background: ${theme}"></div>
|
||||||
<div class="art-progress-tip art-tip"></div>
|
<div class="art-progress-tip art-tip"></div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
mounted: $control => {
|
mounted: $control => {
|
||||||
let isDroging = false;
|
let isDroging = false;
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ export default function time(option) {
|
|||||||
mounted: $control => {
|
mounted: $control => {
|
||||||
function getTime() {
|
function getTime() {
|
||||||
const newTime = `${secondToTime(art.player.currentTime)} / ${secondToTime(art.player.duration)}`;
|
const newTime = `${secondToTime(art.player.currentTime)} / ${secondToTime(art.player.duration)}`;
|
||||||
if (newTime !== $control.innerHTML) {
|
if (newTime !== $control.innerText) {
|
||||||
$control.innerHTML = newTime;
|
$control.innerText = newTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user