|
@@ -12,7 +12,6 @@ const update = (data: any) => {
|
|
|
|
|
|
|
|
const proFormRef = ref<any>()
|
|
const proFormRef = ref<any>()
|
|
|
const handleSave = () => {
|
|
const handleSave = () => {
|
|
|
- console.log(formData)
|
|
|
|
|
proFormRef.value.submit()
|
|
proFormRef.value.submit()
|
|
|
}
|
|
}
|
|
|
const formConfig = reactive<BasicForm>({
|
|
const formConfig = reactive<BasicForm>({
|
|
@@ -24,6 +23,38 @@ const formConfig = reactive<BasicForm>({
|
|
|
type: 'input',
|
|
type: 'input',
|
|
|
rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
rules: [{ required: true, message: '请输入用户名', trigger: 'blur' }]
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '卡片',
|
|
|
|
|
+ value: '',
|
|
|
|
|
+ name: 'form-card_SJdlee00',
|
|
|
|
|
+ type: 'form-card',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ label: '登录名',
|
|
|
|
|
+ name: 'loginName',
|
|
|
|
|
+ value: 'a',
|
|
|
|
|
+ rules: [{ required: true, message: '请输入登录名', trigger: 'blur' }],
|
|
|
|
|
+ slots: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'prepend',
|
|
|
|
|
+ alias: 'cprepend'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ rules: [],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ header: '卡片标题'
|
|
|
|
|
+ },
|
|
|
|
|
+ span: 24,
|
|
|
|
|
+ slots: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'header',
|
|
|
|
|
+ alias: 'cardHeader'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
type: 'form-tabs',
|
|
type: 'form-tabs',
|
|
|
label: '',
|
|
label: '',
|
|
@@ -66,6 +97,12 @@ const formConfig = reactive<BasicForm>({
|
|
|
'inactive-value': '0'
|
|
'inactive-value': '0'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ ],
|
|
|
|
|
+ slots: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'label',
|
|
|
|
|
+ alias: 'clabel'
|
|
|
|
|
+ }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -150,9 +187,151 @@ const formConfig = reactive<BasicForm>({
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ ],
|
|
|
|
|
+ slots: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'label',
|
|
|
|
|
+ alias: 'dlabel'
|
|
|
|
|
+ }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'form-layout',
|
|
|
|
|
+ label: '',
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ value: 'label1',
|
|
|
|
|
+ span: 24,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'col',
|
|
|
|
|
+ label: 'tab1',
|
|
|
|
|
+ name: 'label1',
|
|
|
|
|
+ value: '',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ label: '登录名',
|
|
|
|
|
+ name: 'loginName',
|
|
|
|
|
+ value: 'a',
|
|
|
|
|
+ rules: [{ required: true, message: '请输入登录名', trigger: 'blur' }],
|
|
|
|
|
+ slots: [
|
|
|
|
|
+ {
|
|
|
|
|
+ name: 'prepend',
|
|
|
|
|
+ alias: 'lprepend'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ label: '密码',
|
|
|
|
|
+ name: 'password',
|
|
|
|
|
+ value: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '启用',
|
|
|
|
|
+ value: '1',
|
|
|
|
|
+ name: 'loginFlag',
|
|
|
|
|
+ type: 'switch',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ 'active-value': '1',
|
|
|
|
|
+ 'inactive-value': '0'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ span: 8
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'col',
|
|
|
|
|
+ label: 'tab2',
|
|
|
|
|
+ name: 'label2',
|
|
|
|
|
+ value: '',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'input',
|
|
|
|
|
+ label: '手机号',
|
|
|
|
|
+ name: 'phone',
|
|
|
|
|
+ value: ''
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: '字段名',
|
|
|
|
|
+ value: '',
|
|
|
|
|
+ name: 'field3',
|
|
|
|
|
+ type: 'cascader',
|
|
|
|
|
+ props: {
|
|
|
|
|
+ options: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'guide',
|
|
|
|
|
+ label: 'Guide',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'disciplines',
|
|
|
|
|
+ label: 'Disciplines',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'consistency',
|
|
|
|
|
+ label: 'Consistency'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'feedback',
|
|
|
|
|
+ label: 'Feedback'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'efficiency',
|
|
|
|
|
+ label: 'Efficiency'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'controllability',
|
|
|
|
|
+ label: 'Controllability'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'navigation',
|
|
|
|
|
+ label: 'Navigation',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'side nav',
|
|
|
|
|
+ label: 'Side Navigation'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'top nav',
|
|
|
|
|
+ label: 'Top Navigation'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'resource',
|
|
|
|
|
+ label: 'Resource',
|
|
|
|
|
+ children: [
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'axure',
|
|
|
|
|
+ label: 'Axure Components'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'sketch',
|
|
|
|
|
+ label: 'Sketch Templates'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ value: 'docs',
|
|
|
|
|
+ label: 'Design Documentation'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ props: {
|
|
|
|
|
+ span: 8
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
})
|
|
})
|
|
@@ -162,6 +341,21 @@ const formConfig = reactive<BasicForm>({
|
|
|
<div class="h-full bg-white p-16px overflow-auto">
|
|
<div class="h-full bg-white p-16px overflow-auto">
|
|
|
<pro-form :formConfig="formConfig" :formData="formData" :create="create" :update="update" ref="proFormRef">
|
|
<pro-form :formConfig="formConfig" :formData="formData" :create="create" :update="update" ref="proFormRef">
|
|
|
<template #prepend>test</template>
|
|
<template #prepend>test</template>
|
|
|
|
|
+ <template #cprepend>testc</template>
|
|
|
|
|
+ <template #lprepend>testl</template>
|
|
|
|
|
+ <template #cardHeader>test</template>
|
|
|
|
|
+ <template #clabel>
|
|
|
|
|
+ <span class="custom-tabs-label">
|
|
|
|
|
+ <el-icon><calendar /></el-icon>
|
|
|
|
|
+ <span>Route</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #dlabel>
|
|
|
|
|
+ <span class="custom-tabs-label">
|
|
|
|
|
+ <el-icon><calendar /></el-icon>
|
|
|
|
|
+ <span>Route2</span>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </template>
|
|
|
</pro-form>
|
|
</pro-form>
|
|
|
<div class="text-center">
|
|
<div class="text-center">
|
|
|
<el-button type="primary" @click="handleSave">保存</el-button>
|
|
<el-button type="primary" @click="handleSave">保存</el-button>
|