Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: list demo status defalut object #559

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/pages/list/components/CommonTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
class="form-item-content"
:options="CONTRACT_STATUS_OPTIONS"
placeholder="请选择合同状态"
clearable
/>
</t-form-item>
</t-col>
Expand All @@ -43,6 +44,7 @@
class="form-item-content"
:options="CONTRACT_TYPE_OPTIONS"
placeholder="请选择合同类型"
clearable
/>
</t-form-item>
</t-col>
Expand Down Expand Up @@ -120,6 +122,13 @@ import {
} from '@/constants';
import { useSettingStore } from '@/store';

interface FormData {
name: string;
no: string;
status?: number;
type: string;
}

const store = useSettingStore();

const COLUMNS: PrimaryTableCol[] = [
Expand Down Expand Up @@ -168,11 +177,10 @@ const COLUMNS: PrimaryTableCol[] = [
const searchForm = {
name: '',
no: '',
status: typeof CONTRACT_STATUS,
type: '',
};

const formData = ref({ ...searchForm });
const formData = ref<FormData>({ ...searchForm });
const rowKey = 'index';
const verticalAlign = 'top' as const;
const hover = true;
Expand Down Expand Up @@ -242,6 +250,7 @@ const onReset = (val: unknown) => {
};
const onSubmit = (val: unknown) => {
console.log(val);
console.log(formData.value);
};
const rehandlePageChange = (pageInfo: PageInfo, newDataSource: TableRowData[]) => {
console.log('分页变化', pageInfo, newDataSource);
Expand Down Expand Up @@ -281,6 +290,7 @@ const headerAffixedTop = computed(
display: flex;
justify-content: flex-end;
align-items: center;

.expand {
.t-button__text {
display: flex;
Expand Down