'Programming/vue.js'에 해당되는 글 9건

  1. 2024.05.09 vue created mounted, method computed
  2. 2024.04.22 vue.js node.js 메모리 누수?
  3. 2024.04.19 vue webpack
  4. 2024.04.19 vue import "@"
  5. 2024.04.19 vue webpack ckeditor
  6. 2024.04.18 vue3 ckeditor5 document editor 추가하기
  7. 2024.03.28 vue 입력창 포커스 설정
  8. 2024.03.26 vue proxy
  9. 2024.02.19 vue.js i18n
Programming/vue.js2024. 5. 9. 10:21

created가 이름부터 당연하지만(?) mounted 보다 우선적으로 작동하고

mounted는 ui에 연결되는 변수에 대해서 초기화 하는 쪽

 

[링크 : https://ko.vuejs.org/guide/essentials/lifecycle]

    [링크 : https://webruden.tistory.com/926]

[링크 : https://aomee0880.tistory.com/185]

 

computed는 저장된 결과를 반환

method는 렌더링 시 마다 함수 실행

이라는데 무슨 뜻인지.. 종속된 값이 먼지 부터 찾아 봐야 할 듯.

[링크 : https://sunny921.github.io/posts/vuejs-computed-method/]

 

computed는 값이 변하는 이벤트가 발생하지 않으면 처리 조차 하지 않고 기존 값을 리턴(캐싱) 한다.

computed는 예제의 message의 값이 변했을 경우만 다시 렌더링 한다.

[링크 : https://kbcoding.tistory.com/47]

 

'Programming > vue.js' 카테고리의 다른 글

vue.js node.js 메모리 누수?  (0) 2024.04.22
vue webpack  (0) 2024.04.19
vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
Posted by 구차니
Programming/vue.js2024. 4. 22. 17:35

vue에서 npm run server 하는데, 아래처럼 메시지가 나오고 멈춰있어서

[70%] sealing finish module graph ESLintWebpackPlugin_1

 

top 으로 보는데 node 가 32G의 메모리는 가상으로 잡고 있는걸 보고 기겁..

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                  
  61734 root      20   0   31.8g   1.0g  41728 R 100.0   6.7   3:02.32 node           

 

아무튼 가상메모리 관련해서 문제가 있는거 아닌가 해서 우회법을 찾는데 영.. 되질 않네

[링크 : https://divlook.tistory.com/10]

[링크 : https://evan-moon.github.io/2019/08/08/fix-webpack-dev-memory-leak/]

 

NODE_OPTIONS=--max-old-space-size=4096

Note
: If you have specified export NODE_OPTIONS=<value> in your package.json, it'll override what you set in the NODE_OPTIONS environment variable in the config.yml (either at the container, job, or step respective level)

[링크 : https://support.circleci.com/hc/en-us/articles/360009208393-How-Can-I-Increase-the-Max-Memory-for-Node]

'Programming > vue.js' 카테고리의 다른 글

vue created mounted, method computed  (0) 2024.05.09
vue webpack  (0) 2024.04.19
vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
Posted by 구차니
Programming/vue.js2024. 4. 19. 19:06

도대체 이 망할(?) webpack은 처음부터 되어있던거 아닌가?

ckeditor 넣어서 하려니 멀 어떻게 해야 할지 감이 안돈다.

 

[링크 : https://cli.vuejs.org/guide/webpack.html]

[링크 : https://reintech.io/blog/integrating-vue-js-with-webpack]

 

'Programming > vue.js' 카테고리의 다른 글

vue created mounted, method computed  (0) 2024.05.09
vue.js node.js 메모리 누수?  (0) 2024.04.22
vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
Posted by 구차니
Programming/vue.js2024. 4. 19. 18:07

node.js 에서 alias로 정의되는 소스 디렉토리의 경로

[링크 : https://mikkeller.tistory.com/26]

[링크 : https://stackoverflow.com/questions/42749973/what-does-the-mean-inside-an-import-path]

 

'Programming > vue.js' 카테고리의 다른 글

vue.js node.js 메모리 누수?  (0) 2024.04.22
vue webpack  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
vue 입력창 포커스 설정  (0) 2024.03.28
Posted by 구차니
Programming/vue.js2024. 4. 19. 15:36

기능 하나 추가하려니 -build- 라는걸 쓰니까, 이미 빌드된거라 다른걸 추가하면 충돌나면서

ckeditor-duplicated-modules 이런 에러가 발생한다.

 

해결하려면 online builder로 zip 파일을 받거나

vite나 webpack을 이용하여 원하는 플러그인을 추가한 다음 빌드해서 써야 하는 것으로 보인다.

[링크 : https://github.com/ckeditor/ckeditor5-vue/issues/215]

[링크 : https://ckeditor.com/docs/ckeditor5/latest/installation/integrations/vuejs-v3.html#webpack]

[링크 : https://ckeditor.com/docs/ckeditor5/latest/installation/advanced/alternative-setups/integrating-from-source-webpack.html]

 

[링크 : https://2jun0.tistory.com/27]

'Programming > vue.js' 카테고리의 다른 글

vue webpack  (0) 2024.04.19
vue import "@"  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
vue 입력창 포커스 설정  (0) 2024.03.28
vue proxy  (0) 2024.03.26
Posted by 구차니
Programming/vue.js2024. 4. 18. 16:20

classic editor는 이미지 크기를 조절할 수 없어서 설정 가능한 에디터를 찾아봤더니 document editor라는 녀석이 필요하다고 한다.

그런데 얘는 희한하게(?) 툴바가 안나오는데, 별도의 위치에서 붙여줘야 하는 녀석인 듯.

<template>
    <div class="document-editor__toolbar"></div>
    <div class="document-editor__editable-container">
        <ckeditor :editor="editor" :config="editorConfig"  @ready="onReady"></ckeditor>
    </div>
</template>

// ...

methods: {
      onReady(editor) {
          const toolbarContainer = document.querySelector(  '.document-editor__toolbar' );
          toolbarContainer.appendChild( editor.ui.view.toolbar.element );
      }
}

[링크 : https://github.com/ckeditor/ckeditor5-vue/issues/120]

 

읽기 전용 모드로 바꾸려고 하니

readonly와 disabled가 있는데 

<template>
    <vx-card :title="editorName" v-if="loaded">
        <ckeditor :editor="editor" v-model="editorData" :config="editorConfig" :readonly="editorDisabled" :disabled="editorDisabled" ></ckeditor>
    </vx-card>
</template>

[링크 : https://stackoverflow.com/questions/63344958/inline-editor-disable-editor-and-display-html-render-content-vue]

 

readonly는 readonly property라 상태보는 용도로만 사용해야 하고

[링크 : https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly]

 

setReadOnly() 함수를 이용해 상태를 변경해야 한다.

[링크 : https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setReadOnly]

 

상태에 따라 toolbar의 표시를 on/off 해주는 방법도 좋을 듯.

ClassicEditor
    .create( document.querySelector( '#editor' ), {
        // The editor's configuration.
        // ...
    } )
    .then( editor => {
        const toolbarElement = editor.ui.view.toolbar.element;

        editor.on( 'change:isReadOnly', ( evt, propertyName, isReadOnly ) => {
            if ( isReadOnly ) {
                toolbarElement.style.display = 'none';
            } else {
                toolbarElement.style.display = 'flex';
            }
        } );
    } )
    .catch( error => {
        console.log( error );
    } );

[링크 : https://ckeditor.com/docs/ckeditor5/latest/features/read-only.html]

'Programming > vue.js' 카테고리의 다른 글

vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue 입력창 포커스 설정  (0) 2024.03.28
vue proxy  (0) 2024.03.26
vue.js i18n  (0) 2024.02.19
Posted by 구차니
Programming/vue.js2024. 3. 28. 15:37

autofocus 만 입력해주면 알아서 autofocus=true로 설정된다.

[링크 : https://v15.vuetifyjs.com/ko/components/text-fields/]

'Programming > vue.js' 카테고리의 다른 글

vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
vue proxy  (0) 2024.03.26
vue.js i18n  (0) 2024.02.19
Posted by 구차니
Programming/vue.js2024. 3. 26. 22:46

vue가 node.js를 이용하여 was로 작동하지만

엄밀하게는 프론트엔드만을 구현하는거라

실제 서버에서 작동하려면 REST 연동이 필요한데

localhost 에서 서버 돌리고 다른 url로 접근하려고 하면 CORS가 뜰 수 밖에 없다.

그래서 이럴때 proxy 설정을 이용하여

node.js WAS로 접근하면 해당 URL로 redirect 하듯이 해주는 기능인데

 

axios를 사용할 경우 baseurl을 쓰면 전환이 안되니 주의가 필요

[링크 : https://eunjinii.tistory.com/47]

[링크 : https://withwltn.tistory.com/22]

'Programming > vue.js' 카테고리의 다른 글

vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
vue 입력창 포커스 설정  (0) 2024.03.28
vue.js i18n  (0) 2024.02.19
Posted by 구차니
Programming/vue.js2024. 2. 19. 15:18

vue.js 에서도 다국어 지원이 가능하다.

json으로 문자열 테이블을 만들어야 하는게 조금 귀찮아 보이는데

과거 poedit 처럼 단수/복수에 대한 문장을 하나의 메시지에 넣어서 쓸 수 있어 좀 더 편해 보인다.

 

csv -> json 변환툴을 찾거나 만들면 서로 좀 편하게 작업이 가능할 듯.

 

[링크 : https://jollyworker.co.kr/vue-js를-활용한-다국어-지원-구현하기/]

[링크 : https://lily-choi.tistory.com/5]

'Programming > vue.js' 카테고리의 다른 글

vue import "@"  (0) 2024.04.19
vue webpack ckeditor  (0) 2024.04.19
vue3 ckeditor5 document editor 추가하기  (0) 2024.04.18
vue 입력창 포커스 설정  (0) 2024.03.28
vue proxy  (0) 2024.03.26
Posted by 구차니