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:
@@ -56,7 +56,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import TYPE from './type/type'
|
import TYPE from './type/type'
|
||||||
import { Row,Col,Button,Input, Icon,Checkbox,Select,Tooltip } from 'ant-design-vue'
|
import { Row,Col,Button,Input, Icon,Checkbox,Select,Tooltip } from 'ant-design-vue'
|
||||||
import { clearAttr } from './util'
|
// import { clearAttr } from './util'
|
||||||
export default {
|
export default {
|
||||||
name:'JsonSchemaEditor',
|
name:'JsonSchemaEditor',
|
||||||
components: {
|
components: {
|
||||||
@@ -121,11 +121,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInputName(){
|
onInputName(e){
|
||||||
clearAttr(this.value)
|
const val = e.target.value
|
||||||
},
|
console.info('input_name',this.pickKey, val,this.parent)
|
||||||
onInputTitle(event){
|
// this.$set(this.parent.properties,val,this.pickValue)
|
||||||
this.title = event.target.value
|
// this.$delete(this.parent.properties,this.pickKey)
|
||||||
|
const p = {};
|
||||||
|
for(let key in this.parent.properties){
|
||||||
|
if(key != this.pickKey){
|
||||||
|
p[key] = this.parent.properties[key]
|
||||||
|
}else{
|
||||||
|
p[val] = this.parent.properties[key]
|
||||||
|
delete this.parent.properties[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.info(JSON.stringify(p))
|
||||||
|
this.$set(this.parent,'properties',p)
|
||||||
},
|
},
|
||||||
onChangeType() {
|
onChangeType() {
|
||||||
this.$delete(this.pickValue,'properties')
|
this.$delete(this.pickValue,'properties')
|
||||||
|
|||||||
Reference in New Issue
Block a user