mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Split cropperjs to reduce bundle size
This commit is contained in:
parent
07fe2f1401
commit
be58534603
2 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
import { apiUrl, locale } from '../../config';
|
import { apiUrl, locale } from '../../config';
|
||||||
import CropWindow from '../views/components/crop-window.vue';
|
|
||||||
import ProgressDialog from '../views/components/progress-dialog.vue';
|
import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
|
|
||||||
export default ($root: any) => {
|
export default ($root: any) => {
|
||||||
|
|
||||||
const cropImage = file => new Promise((resolve, reject) => {
|
const cropImage = file => new Promise(async (resolve, reject) => {
|
||||||
|
const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
|
||||||
const w = $root.new(CropWindow, {
|
const w = $root.new(CropWindow, {
|
||||||
image: file,
|
image: file,
|
||||||
title: locale['desktop']['avatar-crop-title'],
|
title: locale['desktop']['avatar-crop-title'],
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { apiUrl, locale } from '../../config';
|
import { apiUrl, locale } from '../../config';
|
||||||
import CropWindow from '../views/components/crop-window.vue';
|
|
||||||
import ProgressDialog from '../views/components/progress-dialog.vue';
|
import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
|
|
||||||
export default ($root: any) => {
|
export default ($root: any) => {
|
||||||
|
|
||||||
const cropImage = file => new Promise((resolve, reject) => {
|
const cropImage = file => new Promise(async (resolve, reject) => {
|
||||||
|
const CropWindow = await import('../views/components/crop-window.vue').then(x => x.default);
|
||||||
const w = $root.new(CropWindow, {
|
const w = $root.new(CropWindow, {
|
||||||
image: file,
|
image: file,
|
||||||
title: locale['desktop']['banner-crop-title'],
|
title: locale['desktop']['banner-crop-title'],
|
||||||
|
|
Loading…
Reference in a new issue