mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: optimize bundle
This commit is contained in:
1 parent
9c02ed4dd8
commit
5ae8258b8a
28 files changed
+57
-179
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AutoloadPage } from 'vj/misc/Page';
|
||||
import { NamedPage } from 'vj/misc/Page';
|
||||
import i18n from 'vj/utils/i18n';
|
||||
import request from 'vj/utils/request';
|
||||
import tpl from 'vj/utils/tpl';
|
||||
|
||||
const hitokotoPage = new AutoloadPage('hitokotoPage', () => {
|
||||
export default new NamedPage('homepage', () => {
|
||||
function getHitokoto($containers) {
|
||||
$containers.get().forEach((container) => {
|
||||
request.get('https://v1.hitokoto.cn?c=a&c=b&c=c&c=d&c=e&c=f')
|
||||
@@ -20,10 +20,4 @@ const hitokotoPage = new AutoloadPage('hitokotoPage', () => {
|
||||
});
|
||||
}
|
||||
if ($('[name="hitokoto"]')) getHitokoto($('[name="hitokoto"]'));
|
||||
$(document).on('vjContentNew', (e) => {
|
||||
const elem = $(e.target).find('[name="hitokoto"]');
|
||||
if (elem.get) getHitokoto(elem);
|
||||
});
|
||||
});
|
||||
|
||||
export default hitokotoPage;
|
||||
Reference in new issue
Block a user