mirror of
https://github.com/Ssl1S/json-schema-editor-vue.git
synced 2025-12-30 01:37:55 +08:00
核心功能开发
This commit is contained in:
@@ -1,22 +1,28 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<json-schema-editor/>
|
||||
<json-schema-editor :disabled="true" :value="tree" :root="true" style="width:600px"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
name: 'App',
|
||||
data() {
|
||||
return {
|
||||
tree:{
|
||||
root: {
|
||||
type: "object",
|
||||
title: "title",
|
||||
properties: {
|
||||
field_1: {
|
||||
type: "string"
|
||||
},
|
||||
},
|
||||
required: ["field_1"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
margin-top: 60px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import JsonSchemaEditor from '../packages/json-schema-editor/index'
|
||||
|
||||
// import { Row, Col, Input, Icon,Checkbox,Button,Select } from 'ant-design-vue'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.use(JsonSchemaEditor)
|
||||
// Vue.use(Row)
|
||||
// Vue.use(Col)
|
||||
// Vue.use(Input)
|
||||
// Vue.use(Icon)
|
||||
// Vue.use(Checkbox)
|
||||
// Vue.use(Button)
|
||||
// Vue.use(Select)
|
||||
new Vue({
|
||||
render: h => h(App),
|
||||
}).$mount('#app')
|
||||
|
||||
Reference in New Issue
Block a user