feat: 图表组件图片换成懒加载

This commit is contained in:
MTrun
2022-03-01 16:39:04 +08:00
parent 013edc4f11
commit a63efa5d26
9 changed files with 34 additions and 18 deletions
+6
View File
@@ -1,4 +1,6 @@
import { App } from 'vue';
import VueLazyLoad from 'vue3-lazyload'
import { requireErrorImg } from '@/utils'
// import { x } from '@/directives';
@@ -7,5 +9,9 @@ import { App } from 'vue';
* @param app
*/
export function setupDirectives(app: App) {
// 图片懒加载
app.use(VueLazyLoad, {
error: requireErrorImg(),
})
// app.directive('x', x);
}