fix(JSON-Schema): 修复前端组件加载数据时数字类型没有转化string
修复前端组件加载数据时数字类型没有转化string
This commit is contained in:
parent
bd7ab558a9
commit
ccfe17f077
|
@ -40,6 +40,9 @@
|
|||
created() {
|
||||
if (this.schema.mock && Object.prototype.toString.call(this.schema.mock).match(/\[object (\w+)\]/)[1].toLowerCase() === 'object') {
|
||||
this.mock = this.schema.mock;
|
||||
if(typeof(this.mock.mock) === 'number'){
|
||||
this.mock.mock = this.mock.mock+"";
|
||||
}
|
||||
} else {
|
||||
this.schema.mock = this.mock;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue