diff --git a/packages/select-table-modal/index.vue b/packages/select-table-modal/index.vue
index 6d59ae7..8d93563 100644
--- a/packages/select-table-modal/index.vue
+++ b/packages/select-table-modal/index.vue
@@ -1,8 +1,189 @@
+
-
- SelectTableModal
-
+
+
+ 点击选择
+
+
+
+
+
+
+
+
+ {{ option.label }}
+
+
+
+
+
+
+ 查询
+
+
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
+
diff --git a/stories/SelectTableModal.stories.ts b/stories/SelectTableModal.stories.ts
index 45230ac..3498a0d 100644
--- a/stories/SelectTableModal.stories.ts
+++ b/stories/SelectTableModal.stories.ts
@@ -1,10 +1,62 @@
+/*
+ * @Author: zhaojinfeng 121016171@qq.com
+ * @Date: 2023-07-18 12:30:07
+ * @LastEditors: zhaojinfeng 121016171@qq.com
+ * @LastEditTime: 2023-07-21 21:40:46
+ * @FilePath: \vue3\stories\SelectTableModal.stories.ts
+ * @Description:
+ *
+ */
import type { Meta, StoryObj } from '@storybook/vue3'
import ThSelectTableModal from '../packages/select-table-modal/index.vue'
+// 模拟1秒钟的接口请求
+function request() {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve({
+ code: 200,
+ rows: [{ prop1: 'prop1', prop2: 'prop2', prop3: 'prop3' }],
+ total: 10,
+ message: 'ok',
+ })
+ }, 1000)
+ })
+}
+
const meta = {
title: '表单组件/SelectTableModal',
- component: ThSelectTableModal,
- tags: ['autodocs'],
+ tags: ['表单组件', 'autodocs'],
+ args: {
+ value: '',
+ rowKey: 'prop1',
+ show: false,
+ columns: [{ label: 'label1', prop: 'prop1' }, { label: 'label2', prop: 'prop2' }, { label: 'label3', prop: 'prop3' }],
+ formItems: [{ label: 'label1', prop: 'prop1' }, { label: 'label2', prop: 'prop2', selectOptions: [{ label: '1', value: '1' }, { label: '2', value: '2' }] }],
+ defaultParams: {},
+ request,
+ layout: 'total, sizes, prev, pager, next, jumper',
+ pageSizes: [10, 20, 30, 50],
+ pagerCount: document.body.clientWidth < 992 ? 5 : 7,
+ hidePagination: false,
+ },
+ render: args => ({
+ components: { ThSelectTableModal },
+ setup() {
+ return { args }
+ },
+ template: ``,
+ }),
} satisfies Meta
export default meta
diff --git a/types/components.d.ts b/types/components.d.ts
index ebdcbc9..df6d55f 100644
--- a/types/components.d.ts
+++ b/types/components.d.ts
@@ -8,12 +8,25 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
DownloadLink: typeof import('./../packages/download-link/index.vue')['default']
+ ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElButton: typeof import('element-plus/es')['ElButton']
+ ElCol: typeof import('element-plus/es')['ElCol']
+ ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+ ElDialog: typeof import('element-plus/es')['ElDialog']
+ ElForm: typeof import('element-plus/es')['ElForm']
+ ElFormItem: typeof import('element-plus/es')['ElFormItem']
+ ElIcon: typeof import('element-plus/es')['ElIcon']
ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink']
+ ElOption: typeof import('element-plus/es')['ElOption']
+ ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
+ ElRow: typeof import('element-plus/es')['ElRow']
+ ElSelect: typeof import('element-plus/es')['ElSelect']
+ ElSpace: typeof import('element-plus/es')['ElSpace']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
+ ElUpload: typeof import('element-plus/es')['ElUpload']
Header: typeof import('./../packages/header/index.vue')['default']
PreviewOffice: typeof import('./../packages/preview-office/index.vue')['default']
PreviewOfficeView: typeof import('./../packages/preview-office-view/index.vue')['default']
@@ -21,6 +34,8 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
SelectTableModal: typeof import('./../packages/select-table-modal/index.vue')['default']
UploadAvatar: typeof import('./../packages/upload-avatar/index.vue')['default']
+ Uploadmultiplefile: typeof import('./../packages/uploadmultiplefile/index.vue')['default']
+ UploadMultipleFile: typeof import('./../packages/upload-multiple-file/index.vue')['default']
UploadSingleFile: typeof import('./../packages/upload-single-file/index.vue')['default']
UploadTable: typeof import('./../packages/upload-table/index.vue')['default']
}
diff --git a/types/page.d.ts b/types/page.d.ts
new file mode 100644
index 0000000..5e6f47d
--- /dev/null
+++ b/types/page.d.ts
@@ -0,0 +1,9 @@
+/** 通用分页模型 */
+declare interface Page {
+ code: number
+ /** 分页数据 */
+ rows: T
+ /** 总页数 */
+ total: number
+ message: string
+}
\ No newline at end of file