<!-- 引入样式 -->
<script src="/static/vue/vue.js"></script>
<script src="/static/vue/axios.min.js"></script>
<link href="/static/vue/index.css" rel="stylesheet">
<!-- 引入组件库 -->
<script src="/static/vue/index.js"></script>
<script src="/static/vue/form-create.min.js"></script>
<script>
window.onload = function () {
$('#app').attr('style', 'display: block')
};
</script>
<div class="page-content" id="app">
<el-card-info :bname="bname" :menutype="menutype" :url="url" style="width: 1000px;margin: auto;margin-top: 25px;">
<template slot="cardslot">
<div style="height: 15px;"></div>
<form-create v-model="fApi" :rule="rule" :option="option" :value.sync="value"></form-create>
</template>
</el-card-info>
</div>
{
include file="vue/el-card-info"}
<script>
vm = new Vue({
el: "#app",
data() {
let self = this
return {
menutype: "区域管理列表",
bname: '{:input(\'agent_id\')?\'编辑\':\'新增\'}',
url: '{:url("index")}',
//实例对象
fApi: {
agent_id:''
},
//表单数据
value: {
},
//表单生成规则
rule: [
{
field: 'name',
title: '姓名',
type: 'input',
props: {
type: 'text',
clearable: true, // 是否显示清空按钮
placeholder: '',
},
style:{
width:'300px'}
},
{
field: 'sex',
title: '性别',
type: 'radio',
options:[
{
value:"1",label:"男",disabled:false},
{
value:"2",label:"女",disabled:false},
],
style:{
width:'300px'}
},
{
field: 'phone',
title: '电话',
type: 'input',
props: {
form-create 使用实例
最新推荐文章于 2024-04-29 16:05:13 发布