1.添加国际化支持;2.自定义属性开关

This commit is contained in:
zyqwst
2020-10-12 22:33:58 +08:00
parent a7747bf229
commit 2677bc7c92
30 changed files with 26711 additions and 10716 deletions

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

View File

@@ -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')