1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- export const propsScheme = {
- modelValue: {
- type: [String, Object],
- intro: '展示的代码'
- },
- readonly: {
- type: [Boolean, String],
- intro: 'nocursor: readonly状态并且不展示光标',
- options: [false, true, 'nocursor'],
- default: false,
- validate: true
- },
- type: {
- type: String,
- default: 'json'
- },
- mode: {
- type: String
- },
- height: {
- type: String,
- intro: '代码编辑器高度',
- default: 'auto'
- },
- theme: {
- type: String,
- intro: '主题,需要额外引入',
- default: 'dracula'
- },
- lineNumbers: {
- type: Boolean,
- default: true
- },
- indentUnit: {
- type: Number,
- default: 4
- }
- }
- export const eventsScheme = {
- 'update:modelValue': {
- cbVar: 'value'
- }
- }
- export const componentScheme = {
- propsScheme,
- eventsScheme
- }
|