|
@@ -8,21 +8,28 @@
|
|
|
@ok="handleSubmit"
|
|
|
>
|
|
|
<div class="entry-x">
|
|
|
- <BasicForm @register="registerForm" />
|
|
|
+ <BasicForm @register="registerForm">
|
|
|
+ <!-- <template #location="{ field, model }">
|
|
|
+ <div>
|
|
|
+ <Card> </Card>
|
|
|
+ </div>
|
|
|
+ </template> -->
|
|
|
+ </BasicForm>
|
|
|
</div>
|
|
|
</BasicDrawer>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, ref, computed, unref } from 'vue';
|
|
|
import { BasicForm, useForm, FormSchema } from '/@/components/Form/index';
|
|
|
-
|
|
|
+ // import { Card } from 'ant-design-vue';
|
|
|
import { BasicDrawer, useDrawerInner } from '/@/components/Drawer';
|
|
|
|
|
|
// import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
|
|
|
import { brandTypeListApi, uploadLiveApi, getAllSceneApi } from '/@/api/scene/live';
|
|
|
-
|
|
|
+ import { data as CascaderData } from '/@/utils/cascaderData';
|
|
|
+ // Card
|
|
|
export default defineComponent({
|
|
|
name: 'MenuDrawer',
|
|
|
components: { BasicDrawer, BasicForm },
|
|
@@ -88,6 +95,29 @@
|
|
|
api: getAllSceneApi,
|
|
|
},
|
|
|
},
|
|
|
+ // :fieldNames="{ label: 'name', value: 'code', children: 'children' }"
|
|
|
+ {
|
|
|
+ field: 'location',
|
|
|
+ label: '直播间位置',
|
|
|
+ component: 'ApiCascader',
|
|
|
+ labelWidth: 100,
|
|
|
+ componentProps: {
|
|
|
+ api: () => {
|
|
|
+ return CascaderData;
|
|
|
+ },
|
|
|
+ apiParamKey: 'children',
|
|
|
+ dataField: 'children',
|
|
|
+ labelField: 'name',
|
|
|
+ valueField: 'code',
|
|
|
+ },
|
|
|
+ isLeaf: (record) => {
|
|
|
+ return !(record.levelType < 3);
|
|
|
+ },
|
|
|
+ // slot: 'location',
|
|
|
+ colProps: {
|
|
|
+ span: 20,
|
|
|
+ },
|
|
|
+ },
|
|
|
];
|
|
|
// updateSchema, validate
|
|
|
const [registerForm, { resetFields, setFieldsValue }] = useForm({
|