|
|
@@ -62,16 +62,76 @@ const formConfig = reactive<BasicForm>({
|
|
|
{
|
|
|
label: '字段名',
|
|
|
value: '',
|
|
|
- name: 'name',
|
|
|
- type: 'input',
|
|
|
+ name: 'field',
|
|
|
+ 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'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
slots: [
|
|
|
{
|
|
|
- name: 'prepend',
|
|
|
- alias: 'prepend'
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'append',
|
|
|
- alias: 'append'
|
|
|
+ name: 'default',
|
|
|
+ alias: 'cDefault'
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
@@ -101,6 +161,10 @@ const handleSave = () => {
|
|
|
<template #prepend1> test1 </template>
|
|
|
<template #append> testt </template>
|
|
|
<template #append1> test1 </template>
|
|
|
+ <template #cDefault="{ node, data }">
|
|
|
+ <span>{{ data.label }}</span>
|
|
|
+ <span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
|
|
+ </template>
|
|
|
</pro-form>
|
|
|
<div class="text-center">
|
|
|
<el-button type="primary" @click="handleSave">保存</el-button>
|