Тема: Using ES6 modules
Показать сообщение отдельно
  #1 (permalink)  
Старый 16.06.2019, 00:14
Аспирант
Отправить личное сообщение для Ким чен ин Посмотреть профиль Найти все сообщения от Ким чен ин
 
Регистрация: 30.05.2018
Сообщений: 40

Using ES6 modules
Подскажите, не пойму,
как понимать вот эту инструкцию?

import Vue from 'vue';
import CKEditor from '@ckeditor/ckeditor5-vue';

Vue.use( CKEditor );

Instead of calling Vue.use(), you can always use the component locally.
<template>
    <div id="app">
        <ckeditor :editor="editor" ... ></ckeditor>
    </div>
</template>

<script>
    export default {
        name: 'app',
        components: {
            // Use the <ckeditor> component in this view.
            ckeditor: CKEditor.component
        },
        data() {
            return {
                editor: ClassicEditor,

                // ...
            };
        }
    }
</script>

https://ckeditor.com/docs/ckeditor5/...ponent-locally

никак не могу добится что бы работало локально
делаю импорт
import CKEditor from '@ckeditor/ckeditor5-vue';
дальше согласно доке объявляю компонент
components: {
            // Use the <ckeditor> component in this view.
            ckeditor: CKEditor.component
        },

естественно он не находит модуль ....
Ответить с цитированием