fightingm / vue-awesome-form Goto Github PK
View Code? Open in Web Editor NEWa vue form component just like json-editor
a vue form component just like json-editor
TypeError
Cannot convert undefined or null to object
dist/main.js 1:16274
I find schema format differs from projects to projects. Instead of writing schema myself, I want to fetch schema from api, and might later modified a bit. Modern API framework, like django rest framework, generates schema automatically. Here is what it looks like
https://restframework.herokuapp.com/schema/
https://restframework.herokuapp.com/schema/?format=corejson
I want to fetch the second link above, and use the schema in vue-awesome-form. Is it a good idea? Would you consider to support such format in the near future?
I have a senario where I have to use multiple instances of the schema-form on same page with same schema. But even after using different :key
both are using the same value. I have 2 seperate value variables still somehow I'm facing this issue.
As in if I update the value of a field name
in form1
the value of name
in form2
is also updated.
Use TheNumberInput type in schema but it return a string when submit.
I found a piece of code that commented out in mixins/base.js:
// if(this.theFormat && this.theFormat === 'number') {
// value = Number(value);
// }
remove comments then the bug is fixed
Why commented out the piece of code?
I think the schema format is amazing since it preserves the nested hierarchy properly. However, this hierarchy is lost once I get the data back as just key-value pairs. Is there a way to get all the values in the same structure as the schema?
For example:
"location": {
"type": "TheTree",
"title": "地址信息",
"propertyOrder": 3,
"properties": {
"province": {
"type": "TheInput",
"title": "省份",
"rules": {
"required": true,
"message": "The 省份 cannot be empty"
}
},
"city": {
"type": "TheInput",
"title": "市",
"rules": {
"required": true,
"message": "The 市 cannot be empty"
}
}
}
}
"location": {
"title": "地址信息",
"value": {
"province": {
"title": "省份",
"value": "北京省"
},
"city": {
"title": "市",
"value": "北京市"
}
}
}
This will help us in preserving the hierarchy of the data.
P.S.: Thank you for creating this project. It's one of a kind and pretty useful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.