feat: 数据回显
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
* @Author: zhaojinfeng 121016171@qq.com
|
* @Author: zhaojinfeng 121016171@qq.com
|
||||||
* @Date: 2023-08-14 11:07:15
|
* @Date: 2023-08-14 11:07:15
|
||||||
* @LastEditors: zhaojinfeng 121016171@qq.com
|
* @LastEditors: zhaojinfeng 121016171@qq.com
|
||||||
* @LastEditTime: 2023-08-14 19:35:09
|
* @LastEditTime: 2023-08-16 11:13:14
|
||||||
* @FilePath: \vue3\stories\SelectTransferModal.stories.ts
|
* @FilePath: \vue3\stories\SelectTransferModal.stories.ts
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -62,7 +62,6 @@ const meta = {
|
|||||||
:default-params="args.defaultParams"
|
:default-params="args.defaultParams"
|
||||||
:hide-pagination="args.hidePagination"
|
:hide-pagination="args.hidePagination"
|
||||||
:request="args.request"
|
:request="args.request"
|
||||||
:layout="args.layout"
|
|
||||||
:page-sizes="args.pageSizes"
|
:page-sizes="args.pageSizes"
|
||||||
:pager-count="args.pagerCount"
|
:pager-count="args.pagerCount"
|
||||||
:props="args.props"
|
:props="args.props"
|
||||||
@ -79,3 +78,30 @@ type Story = StoryObj<typeof meta>
|
|||||||
export const Base: Story = {
|
export const Base: Story = {
|
||||||
name: '基本使用',
|
name: '基本使用',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const Data: Story = {
|
||||||
|
name: '数据回显',
|
||||||
|
args: {
|
||||||
|
value: [{
|
||||||
|
id: 1,
|
||||||
|
name: 'name1',
|
||||||
|
value: 'value1',
|
||||||
|
}, {
|
||||||
|
id: 12,
|
||||||
|
name: 'name1',
|
||||||
|
value: 'value1',
|
||||||
|
}],
|
||||||
|
show: false,
|
||||||
|
defaultParams: {},
|
||||||
|
formItems: [{ label: 'label1', prop: 'prop1' }, { label: 'label2', prop: 'prop2', selectOptions: [{ label: '1', value: '1' }, { label: '2', value: '2' }] }],
|
||||||
|
request,
|
||||||
|
pageSizes: [20, 50, 100, 200],
|
||||||
|
pagerCount: document.body.clientWidth < 992 ? 5 : 7,
|
||||||
|
props: { key: 'id', label: 'name', disabled: 'disabled' },
|
||||||
|
hidePagination: false,
|
||||||
|
title: '选择',
|
||||||
|
width: '70%',
|
||||||
|
zIndex: 2023,
|
||||||
|
},
|
||||||
|
render: meta.render,
|
||||||
|
}
|
||||||
|
2
types/auto-imports.d.ts
vendored
2
types/auto-imports.d.ts
vendored
@ -307,6 +307,7 @@ declare module 'vue' {
|
|||||||
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
||||||
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
|
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
@ -595,6 +596,7 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
readonly $shallowRef: UnwrapRef<typeof import('vue/macros')['$shallowRef']>
|
||||||
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
readonly $toRef: UnwrapRef<typeof import('vue/macros')['$toRef']>
|
||||||
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
|
||||||
|
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
|
||||||
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
readonly asyncComputed: UnwrapRef<typeof import('@vueuse/core')['asyncComputed']>
|
||||||
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
readonly autoResetRef: UnwrapRef<typeof import('@vueuse/core')['autoResetRef']>
|
||||||
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
readonly computed: UnwrapRef<typeof import('vue')['computed']>
|
||||||
|
Reference in New Issue
Block a user