CALENDAR class DATE Class Converting to each other

2023-01-23   ES  

1.npm install vue-codemirror –save

vue version^2.6.11


declare module 'vue-codemirror';

3. You can introduce it directly in your own page

import { codemirror } from 'vue-codemirror';
import 'codemirror/lib/codemirror.css';

  components: {

4. Page use;codemirror api

// index.vue

<codemirror ref="myCmGenerate" v-model="code.inputContent" :options="codeOptions" @changes="changeInputCode"></codemirror>

// index.ts

codeOptions = {
    tabSize: 4,
    mode: {
      name: 'javascript',
      json: true,
    theme: 'foo bar',
    lineNumbers: true,
    lineWrapping: true,
    extraKeys: { 'Ctrl': 'autocomplete' },
    lineWiseCopeCut: true,
    showCursorWhenSelecting: true,
    matchBrackets: true,
    line: true,
    readOnly: true,
    disableInput: true


Related Posts

About Python BeautifulSoup to crawl web information Chinese garbled solution

AWS-EC2 use the command line to find the area and available area

[Unity & Character Mobile] Code control gravity

UNITY implementation model cutting -EZysLice plug -in

CALENDAR class DATE Class Converting to each other

Random Posts

Vue developed a little skill ♂ 巧 Silencer

Weibo realizes third -party login QQ

Use Spage for text similarity processing

Protoc command parameter

MyBatis-Source Code Analysis 5 Create SQLSession Dialogue