mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 00:56:16 -08:00
add close back
This commit is contained in:
1 parent
03e3fa496f
commit
8fe0630ab3
4 files changed
+52
-13
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export default function close(option) {
|
||||
return art => ({
|
||||
...option,
|
||||
html: art.i18n.get('Close'),
|
||||
click: contextmenu => {
|
||||
contextmenu.show = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import aspectRatio from './aspectRatio';
|
||||
import info from './info';
|
||||
import version from './version';
|
||||
import light from './light';
|
||||
import close from './close';
|
||||
|
||||
export default class Contextmenu extends Component {
|
||||
constructor(art) {
|
||||
@@ -61,6 +62,14 @@ export default class Contextmenu extends Component {
|
||||
}),
|
||||
);
|
||||
|
||||
this.add(
|
||||
close({
|
||||
disable: false,
|
||||
name: 'close',
|
||||
index: 60,
|
||||
}),
|
||||
);
|
||||
|
||||
option.contextmenu.forEach(item => {
|
||||
this.add(item);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user