justcaliturner / simple-code-editor

Simple code editor for Vue.js
https://simple-code-editor.vicuxd.com
150 stars 27 forks source link

:line-nums | Invalid array length #51

Open l99shka opened 6 months ago

l99shka commented 6 months ago
                <CodeEditor
                    class="border"
                    v-model="code"
                    :languages="[['php', 'PHP']]"
                    theme="a11y-light"
                    font-size="14px"
                    width="100%"
                    height="140px"
                    border-radius="0"
                    :line-nums="true"
                />

if I use the editor inside the collapse, then after opening I will have an error: Снимок экрана от 2024-03-27 15-29-00

How to fix it?

yingming7 commented 2 months ago

I have the same problem,, I changed the v-show to v-if, and it was solved, maybe it was the loading order problem?