|
|
@@ -1,10 +1,17 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
透前准备
|
|
|
- <XTTab type="illness" :selected="tabSelected" :data="tabData" @item-click="callTab" />
|
|
|
+ <XTTab
|
|
|
+ type="illness"
|
|
|
+ :width="120"
|
|
|
+ :selected="tabSelected"
|
|
|
+ :data="tabData"
|
|
|
+ @item-click="callTab"
|
|
|
+ />
|
|
|
<div class="mt-6" />
|
|
|
<XTTab type="illness11" :selected="tabSelected" :data="tabData1" @item-click="callTab" />
|
|
|
<div class="mt-6" />
|
|
|
+ <BasicForm @register="registerForm" @field-value-change="filedChange" />
|
|
|
<div>
|
|
|
<XTForm :form-data="formData" />
|
|
|
</div>
|
|
|
@@ -23,7 +30,32 @@
|
|
|
import { XTCard } from '/@/components/XTCard/index';
|
|
|
import { XTForm } from '/@/components/XTForm/index';
|
|
|
import { ColorEnum } from '/@/enums/colorEnum';
|
|
|
+ import { BasicForm, useForm } from '/@/components/Form';
|
|
|
+ import { dataFormSchema } from './data';
|
|
|
+
|
|
|
const tabSelected = ref('0');
|
|
|
+ const [registerForm] = useForm({
|
|
|
+ layout: 'vertical',
|
|
|
+ labelWidth: '100%',
|
|
|
+ baseColProps: {
|
|
|
+ span: 8,
|
|
|
+ },
|
|
|
+ baseRowGutter: [16, 8],
|
|
|
+ schemas: dataFormSchema,
|
|
|
+ showActionButtonGroup: false,
|
|
|
+ actionColOptions: {
|
|
|
+ span: 8,
|
|
|
+ },
|
|
|
+ showResetButton: false,
|
|
|
+ submitButtonOptions: {
|
|
|
+ text: '添加',
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ function filedChange(key, value) {
|
|
|
+ console.log('🚀 ~ file: index.vue:47 ~ filedChange ~ value:', value);
|
|
|
+ console.log('🚀 ~ file: index.vue:47 ~ filedChange ~ key:', key);
|
|
|
+ }
|
|
|
const tabData = [
|
|
|
{
|
|
|
key: '0',
|
|
|
@@ -67,25 +99,44 @@
|
|
|
// formdata
|
|
|
const formData = [
|
|
|
{
|
|
|
- name: 'text1',
|
|
|
- componentType: '2',
|
|
|
- placeholder: '请输入',
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'text2',
|
|
|
- componentType: '9',
|
|
|
- placeholder: '请输入',
|
|
|
+ name: 'text',
|
|
|
+ componentType: 'Select',
|
|
|
+ placeholder: '请选择',
|
|
|
+ width: 80,
|
|
|
+ defaultValue: '1',
|
|
|
+ dicts: [
|
|
|
+ { label: '全部', value: '1' },
|
|
|
+ { label: '未称量', value: '2', prefixColor: '#1BC1B3' },
|
|
|
+ { label: '待确认', value: '3', prefixColor: '#854AFF' },
|
|
|
+ { label: '可打印', value: '4', prefixColor: '#1BC1B3' },
|
|
|
+ { label: '完成', value: '5', prefixColor: '#854AFF' },
|
|
|
+ ],
|
|
|
},
|
|
|
{
|
|
|
- name: 'text',
|
|
|
- componentType: '7',
|
|
|
+ name: 'text22',
|
|
|
+ componentType: 'Select',
|
|
|
placeholder: '请选择',
|
|
|
+ width: 120,
|
|
|
+ defaultValue: '1',
|
|
|
dicts: [
|
|
|
- { label: '123', value: '123' },
|
|
|
- { label: '13', value: '13' },
|
|
|
- { label: '12', value: '12' },
|
|
|
+ { label: '第一班', value: '1' },
|
|
|
+ { label: '第二班', value: '2' },
|
|
|
+ { label: '第三班', value: '3' },
|
|
|
],
|
|
|
},
|
|
|
+ {
|
|
|
+ name: 'text1',
|
|
|
+ componentType: 'Input',
|
|
|
+ placeholder: '请输入',
|
|
|
+ width: 200,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: 'text233',
|
|
|
+ componentType: 'DatePicker',
|
|
|
+ placeholder: '请输入',
|
|
|
+ format: 'YYYY-MM-DD',
|
|
|
+ valueFormat: 'YYYY-MM-DD',
|
|
|
+ },
|
|
|
];
|
|
|
// card 标签组
|
|
|
const cardData = [
|
|
|
@@ -219,4 +270,8 @@
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
+<style lang="less" scoped>
|
|
|
+ ::v-deep(.ant-form-item-label > label) {
|
|
|
+ width: 100% !important;
|
|
|
+ }
|
|
|
+</style>
|