fix: list demo status defalut object (#559)

This commit is contained in:
liweijie0812 2023-07-11 16:48:35 +08:00 committed by GitHub
parent 151151c354
commit e6192ef37a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,7 @@
class="form-item-content" class="form-item-content"
:options="CONTRACT_STATUS_OPTIONS" :options="CONTRACT_STATUS_OPTIONS"
placeholder="请选择合同状态" placeholder="请选择合同状态"
clearable
/> />
</t-form-item> </t-form-item>
</t-col> </t-col>
@ -43,6 +44,7 @@
class="form-item-content" class="form-item-content"
:options="CONTRACT_TYPE_OPTIONS" :options="CONTRACT_TYPE_OPTIONS"
placeholder="请选择合同类型" placeholder="请选择合同类型"
clearable
/> />
</t-form-item> </t-form-item>
</t-col> </t-col>
@ -120,6 +122,13 @@ import {
} from '@/constants'; } from '@/constants';
import { useSettingStore } from '@/store'; import { useSettingStore } from '@/store';
interface FormData {
name: string;
no: string;
status?: number;
type: string;
}
const store = useSettingStore(); const store = useSettingStore();
const COLUMNS: PrimaryTableCol[] = [ const COLUMNS: PrimaryTableCol[] = [
@ -168,11 +177,10 @@ const COLUMNS: PrimaryTableCol[] = [
const searchForm = { const searchForm = {
name: '', name: '',
no: '', no: '',
status: typeof CONTRACT_STATUS,
type: '', type: '',
}; };
const formData = ref({ ...searchForm }); const formData = ref<FormData>({ ...searchForm });
const rowKey = 'index'; const rowKey = 'index';
const verticalAlign = 'top' as const; const verticalAlign = 'top' as const;
const hover = true; const hover = true;
@ -242,6 +250,7 @@ const onReset = (val: unknown) => {
}; };
const onSubmit = (val: unknown) => { const onSubmit = (val: unknown) => {
console.log(val); console.log(val);
console.log(formData.value);
}; };
const rehandlePageChange = (pageInfo: PageInfo, newDataSource: TableRowData[]) => { const rehandlePageChange = (pageInfo: PageInfo, newDataSource: TableRowData[]) => {
console.log('分页变化', pageInfo, newDataSource); console.log('分页变化', pageInfo, newDataSource);
@ -281,6 +290,7 @@ const headerAffixedTop = computed(
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
.expand { .expand {
.t-button__text { .t-button__text {
display: flex; display: flex;