mirror of
https://github.com/Ssl1S/json-schema-editor-vue.git
synced 2025-12-30 01:37:55 +08:00
1.添加国际化支持;2.自定义属性开关
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
</div>
|
||||
<div class="container">
|
||||
<pre>{{tree}}</pre>
|
||||
<json-schema-editor class="schema" :value="tree"/>
|
||||
<json-schema-editor class="schema" :value="tree" disabledType lang="zh_CN" custom/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -17,10 +17,33 @@ export default {
|
||||
return {
|
||||
tree:
|
||||
{
|
||||
root: {
|
||||
type: "object"
|
||||
}
|
||||
"root": {
|
||||
"type": "object",
|
||||
"title": "条件",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"title": "名称",
|
||||
"maxLength": 10,
|
||||
"minLength": 2
|
||||
},
|
||||
"appId": {
|
||||
"type": "integer",
|
||||
"title": "应用ID"
|
||||
},
|
||||
"credate": {
|
||||
"type": "string",
|
||||
"title": "创建日期",
|
||||
"format": "date"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"appId",
|
||||
"credate"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44,10 +67,10 @@ export default {
|
||||
width:80vw;
|
||||
min-width:800px;
|
||||
justify-content:center;
|
||||
height: calc(100vh - 100px);
|
||||
height: calc(100vh - 150px);
|
||||
margin:auto;
|
||||
}
|
||||
pre {
|
||||
.container>pre {
|
||||
font-family: monospace;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
BIN
examples/assets/custom.png
Normal file
BIN
examples/assets/custom.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 250 KiB |
@@ -1,17 +1,11 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import JsonSchemaEditor from '../packages/index'
|
||||
// import { Row, Col, Input, Icon,Checkbox,Button,Select } from 'ant-design-vue'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
import { Modal} from 'ant-design-vue'
|
||||
Vue.use(Modal)
|
||||
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