diff --git a/docs/site/desktop.js b/docs/site/desktop.js
index 89bc0216c..5e8a53b9c 100644
--- a/docs/site/desktop.js
+++ b/docs/site/desktop.js
@@ -1 +1,3 @@
-import './mourn';
+import mourn from './mourn';
+
+mourn();
diff --git a/docs/site/mobile.js b/docs/site/mobile.js
index 63c6222b4..e61ffd3c6 100644
--- a/docs/site/mobile.js
+++ b/docs/site/mobile.js
@@ -1,4 +1,4 @@
-import './mourn';
+import mourn from './mourn';
import Vue from 'vue';
import Locale from '../../src/locale';
import Lazyload from '../../src/lazyload';
@@ -6,6 +6,8 @@ import { get } from '../../src/utils';
import { camelize } from '../../src/utils/format/string';
import enUS from '../../src/locale/lang/en-US';
+mourn();
+
Vue.use(Lazyload, {
lazyComponent: true,
});
diff --git a/docs/site/mourn.js b/docs/site/mourn.js
index 38bb426ec..b171eed55 100644
--- a/docs/site/mourn.js
+++ b/docs/site/mourn.js
@@ -1,12 +1,18 @@
-const now = new Date();
+export default function () {
+ const now = new Date();
-if (now.getFullYear() === 2020 && now.getMonth() === 3 && now.getDate() === 4) {
- const filter = `
+ if (
+ now.getFullYear() === 2020 &&
+ now.getMonth() === 3 &&
+ now.getDate() === 4
+ ) {
+ const filter = `
html{
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
}
`;
- document.head.insertAdjacentHTML('beforeend', ``);
+ document.head.insertAdjacentHTML('beforeend', ``);
+ }
}