feat: zIndex

This commit is contained in:
2023-07-22 16:28:21 +08:00
parent d49a46574f
commit 58548f030b
2 changed files with 7 additions and 3 deletions

View File

@ -2,7 +2,7 @@
* @Author: zhaojinfeng 121016171@qq.com * @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-18 12:30:07 * @Date: 2023-07-18 12:30:07
* @LastEditors: zhaojinfeng 121016171@qq.com * @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-22 15:56:14 * @LastEditTime: 2023-07-22 16:27:38
* @FilePath: \vue3\packages\select-table-modal\index.vue * @FilePath: \vue3\packages\select-table-modal\index.vue
* @Description: 模态框选择表格 * @Description: 模态框选择表格
* *
@ -14,7 +14,7 @@
</slot> </slot>
</span> </span>
<el-config-provider :locale="locale"> <el-config-provider :locale="locale">
<el-dialog v-model="showDialog" :title="title" :width="width" append-to-body @open="getList" @closed="closed"> <el-dialog v-model="showDialog" :title="title" :width="width" append-to-body :z-index="zIndex" @open="getList" @closed="closed">
<el-form ref="queryRef" :modal="queryParams" inline> <el-form ref="queryRef" :modal="queryParams" inline>
<el-form-item v-for="formItem in formItems" :key="formItem.prop" :label="formItem.label" :prop="formItem.prop"> <el-form-item v-for="formItem in formItems" :key="formItem.prop" :label="formItem.label" :prop="formItem.prop">
<el-select v-if="formItem.selectOptions" :placeholder="formItem.placeholder"> <el-select v-if="formItem.selectOptions" :placeholder="formItem.placeholder">
@ -105,6 +105,7 @@ const props = withDefaults(
width?: string | number width?: string | number
/** 是否多选 */ /** 是否多选 */
multiple?: boolean multiple?: boolean
zIndex?: number
multipleFormattter?: (row: Record<string, any>) => any multipleFormattter?: (row: Record<string, any>) => any
}>(), }>(),
{ {
@ -117,6 +118,7 @@ const props = withDefaults(
width: '1000px', width: '1000px',
title: '选择', title: '选择',
emptyText: '暂无数据', emptyText: '暂无数据',
zIndex: 2023,
multipleFormattter(row: Record<string, any>) { multipleFormattter(row: Record<string, any>) {
return { ...row } return { ...row }
}, },

View File

@ -2,7 +2,7 @@
* @Author: zhaojinfeng 121016171@qq.com * @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-18 12:30:07 * @Date: 2023-07-18 12:30:07
* @LastEditors: zhaojinfeng 121016171@qq.com * @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-22 15:49:10 * @LastEditTime: 2023-07-22 16:28:10
* @FilePath: \vue3\stories\SelectTableModal.stories.ts * @FilePath: \vue3\stories\SelectTableModal.stories.ts
* @Description: * @Description:
* *
@ -39,6 +39,7 @@ const meta = {
pagerCount: document.body.clientWidth < 992 ? 5 : 7, pagerCount: document.body.clientWidth < 992 ? 5 : 7,
hidePagination: false, hidePagination: false,
multiple: false, multiple: false,
zIndex: 2023,
}, },
render: args => ({ render: args => ({
components: { ThSelectTableModal }, components: { ThSelectTableModal },
@ -56,6 +57,7 @@ const meta = {
:page-sizes="args.pageSizes" :page-sizes="args.pageSizes"
:pager-count="args.pagerCount" :pager-count="args.pagerCount"
:multiple="args.multiple" :multiple="args.multiple"
:z-index="args.zIndex"
/>`, />`,
}), }),
} satisfies Meta<typeof ThSelectTableModal> } satisfies Meta<typeof ThSelectTableModal>