DeviceProfileStep4.vue
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<template>
<div>
<span>请选择告警通知联系人:</span>
<Tag v-for="(item, index) in 15" closable :key="index"> 冯涛+{{ item }}</Tag>
<BasicForm :showSubmitButton="false" @register="register" />
</div>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { Tag } from 'ant-design-vue';
import { BasicForm, useForm } from '/@/components/Form/index';
import { alertContactsSchemas } from '../cpns/config';
export default defineComponent({
components: {
Tag,
BasicForm,
},
emits: ['prev'],
setup(_, { emit }) {
const getValueData: any = ref({});
const [register, { setProps, validate }] = useForm({
schemas: alertContactsSchemas,
actionColOptions: {
span: 24,
},
resetButtonOptions: {
text: '上一步',
},
resetFunc: customResetFunc,
});
async function customResetFunc() {
emit('prev');
}
async function getAllFields(getV) {
const values = await validate();
getValueData.value = values;
getV = getValueData.value;
return getV;
}
return {
customResetFunc,
getAllFields,
register,
setProps,
};
},
});
</script>