Skip to content

Commit

Permalink
fix: 给search、pagination等默认值,避免空指针异常
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Jan 6, 2023
1 parent f7ba68b commit b35067a
Showing 1 changed file with 67 additions and 12 deletions.
79 changes: 67 additions & 12 deletions packages/fast-crud/src/components/fs-crud.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<component
:is="container?.is || 'fs-layout-default'"
ref="containerRef"
v-bind="container"
class="fs-crud-container"
v-bind="container"
:class="computedClass"
>
<slot></slot>
Expand Down Expand Up @@ -324,7 +324,12 @@ export default defineComponent({
/**
* 表格配置,见FsTable
*/
table: {},
table: {
type: Object,
default() {
return {};
}
},
/**
* 表格数据
*/
Expand All @@ -334,39 +339,84 @@ export default defineComponent({
/**
* 操作列配置,见FsRowHandle
*/
rowHandle: {},
rowHandle: {
type: Object,
default() {
return {};
}
},
/**
* 查询框配置,见FsSearch
*/
search: {},
search: {
type: Object,
default() {
return {};
}
},
/**
* 工具条配置,见FsToolbar
*/
toolbar: {},
toolbar: {
type: Object,
default() {
return {};
}
},
/**
* 动作条配置,见FsActionbar
*/
actionbar: {},
actionbar: {
type: Object,
default() {
return {};
}
},
/**
* 添加表单对话框配置,见FsFormWrapper
*/
addForm: {},
addForm: {
type: Object,
default() {
return {};
}
},
/**
* 编辑表单对话框配置,见FsFormWrapper
*/
editForm: {},
editForm: {
type: Object,
default() {
return {};
}
},
/**
* 查看表单对话框配置,见FsFormWrapper
*/
viewForm: {},
viewForm: {
type: Object,
default() {
return {};
}
},
/**
* 翻页配置,支持el-pagination|a-pagination配置
*/
pagination: {},
pagination: {
type: Object,
default() {
return {};
}
},
/**
* 容器配置,见FsContainer
*/
container: {},
container: {
type: Object,
default() {
return {};
}
},

/**
* crud包裹容器的class
Expand All @@ -375,7 +425,12 @@ export default defineComponent({
/**
* 不要传到fs-table去
*/
form: {}
form: {
type: Object,
default() {
return {};
}
}
},
emits: [
"search-submit",
Expand Down

0 comments on commit b35067a

Please sign in to comment.