[Client] Split some components to reduce bundle size

This commit is contained in:
syuilo
2018-11-12 05:35:09 +09:00
parent fab389e624
commit 33e79e4bb8
19 changed files with 63 additions and 29 deletions

View File

@ -6,7 +6,7 @@
<button class="close" @click="cancel"><fa icon="times"/></button>
<button v-if="multiple" class="ok" @click="ok"><fa icon="check"/></button>
</header>
<mk-drive class="drive" ref="browser"
<x-drive class="drive" ref="browser"
:select-file="true"
:multiple="multiple"
@change-selection="onChangeSelection"
@ -22,6 +22,9 @@ import i18n from '../../../i18n';
export default Vue.extend({
i18n: i18n('mobile/views/components/drive-file-chooser.vue'),
components: {
XDrive: () => import('./drive.vue').then(m => m.default),
},
props: ['multiple'],
data() {
return {

View File

@ -6,7 +6,7 @@
<button class="close" @click="cancel"><fa icon="times"/></button>
<button class="ok" @click="ok"><fa icon="check"/></button>
</header>
<mk-drive ref="browser"
<x-drive ref="browser"
select-folder
/>
</div>
@ -18,6 +18,9 @@ import Vue from 'vue';
import i18n from '../../../i18n';
export default Vue.extend({
i18n: i18n('mobile/views/components/drive-folder-chooser.vue'),
components: {
XDrive: () => import('./drive.vue').then(m => m.default),
},
methods: {
cancel() {
this.$emit('canceled');

View File

@ -5,7 +5,6 @@ import note from './note.vue';
import notes from './notes.vue';
import mediaImage from './media-image.vue';
import mediaVideo from './media-video.vue';
import drive from './drive.vue';
import notePreview from './note-preview.vue';
import subNoteContent from './sub-note-content.vue';
import noteCard from './note-card.vue';
@ -29,7 +28,6 @@ Vue.component('mk-note', note);
Vue.component('mk-notes', notes);
Vue.component('mk-media-image', mediaImage);
Vue.component('mk-media-video', mediaVideo);
Vue.component('mk-drive', drive);
Vue.component('mk-note-preview', notePreview);
Vue.component('mk-sub-note-content', subNoteContent);
Vue.component('mk-note-card', noteCard);