lane-test-2
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

JSON-Schema-Enhanced-Editor-Vue

npm package

json-schema-enhanced-editor-vue is a lightweight json editor based on vue & codemirror, providing smart prompts and verification based on json-schema.

Usage

<template>
  <Editor
    v-model="value"
    :schema="schema"
    :height="height"
    :change="onChange"
  />
</template>
<script setup lang="ts">
import { JSONSchema7 } from "json-schema";
import { Editor } from "json-schema-enhanced-editor-vue";

const value: Ref<string> = ref(JSON.stringify({ ...mock.package }, null, 4));
const schema: Ref<JSONSchema7 | null> = ref(null);
const height: Ref<string> = ref("300px");

const onChange = (value: string) => {
  console.log('value: ', value);
}
</script>

Package Sidebar

Install

npm i lane-test-2

Weekly Downloads

3

Version

0.1.0

License

none

Unpacked Size

14.3 kB

Total Files

22

Last publish

Collaborators

  • rookie-luochao