JSON.stringify(mock,null,4).toString()格式化json格式在页面输出,这个form-create是一个开源框架
/*! form-create v1.3 | github https://github.com/xaboy/form-create | author xaboy */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>form-create-preview示例</title>
<link href="../../../static/iview/styles/iview.css" rel="stylesheet">
<script src="../../../static/vue/vue.min.js"></script>
<script src="../../../static/iview/iview.min.js"></script>
<!--省市区三级联动json数据-->
<script src="./form-create.min.js"></script>
<style>
.container{
width: 1300px;
overflow: hidden;
margin: 0 auto;
}
.jsonBox,.formCreate{
overflow: auto;
width:100%;
resize: none;
margin-top: 20px;
height:600px;
border:1px solid #666;
}
.fl{
float: left;
}
.fr{
float: right;
}
button{
width: 100%;