import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types' const StreamListMeta: IPublicTypeComponentMetadata = { componentName: 'StreamList', group: '低代码组件', title: '流式分页容器', docUrl: '', screenshot: '', devMode: 'proCode', category: '布局容器类', npm: { package: '@dckj-npm/dc-material', version: '0.1.126', exportName: 'StreamList', main: 'src/index.tsx', destructuring: true, subName: '', }, configure: { props: [ { name: '数据源绑定', setter: { componentName: 'SetterFormVariable', props: { // 默认的数据源类型 defaultDataSourceType: 'dynamicForm', showAttributesPanel: false, attributes: [ { label: '是否是最后一页', value: 'isLastPage', defaultValue: `this.state['$componentId_isLastPage']`, }, { label: '当前页数', value: 'nowPage', defaultValue: `this.state['$componentId_nowPage']`, }, ], }, }, }, { title: { label: { type: 'i18n', 'en-US': 'children', 'zh-CN': '子组件内容', }, tip: 'children | 子组件内容', }, condition: () => false, name: 'children', description: '子组件内容', setter: { componentName: 'SlotSetter', props: { mode: 'node', }, isRequired: false, initialValue: { type: 'JSSlot', value: [], }, }, }, { title: { label: { type: 'i18n', 'en-US': 'isLastPage', 'zh-CN': '是否是最后一页', }, tip: 'isLastPage | 是否是最后一页', }, condition: () => false, name: 'isLastPage', description: '是否是最后一页', setter: { componentName: 'BoolSetter', isRequired: false, initialValue: false, }, }, { title: { label: { type: 'i18n', 'en-US': 'nowPage', 'zh-CN': '当前页数', }, tip: 'nowPage | 当前页数', }, condition: () => false, name: 'height', description: '当前页数', setter: { componentName: 'NumberSetter', isRequired: false, initialValue: 1, }, }, { title: { label: { type: 'i18n', 'en-US': 'onNextPage', 'zh-CN': '请求下一页数据的函数', }, tip: 'onNextPage | 请求下一页数据的函数', }, name: 'onNextPage', description: '请求下一页数据的函数', setter: { componentName: 'FunctionSetter', isRequired: true, }, }, { title: { label: { type: 'i18n', 'en-US': 'onRefreshPage', 'zh-CN': '请求刷新数据的函数', }, tip: 'onRefreshPage | 请求刷新数据的函数', }, name: 'onRefreshPage', description: '请求刷新数据的函数', setter: { componentName: 'FunctionSetter', isRequired: true, }, }, { title: { label: { type: 'i18n', 'en-US': 'refreshingText', 'zh-CN': '刷新中的文字提示', }, tip: 'refreshingText | 刷新中的文字提示', }, name: 'refreshingText', description: '刷新中的文字提示', setter: { componentName: 'StringSetter', isRequired: false, initialValue: '刷新中...', }, }, { title: { label: { type: 'i18n', 'en-US': 'loadingText', 'zh-CN': '加载中的文字提示', }, tip: 'loadingText | 加载中的文字提示', }, name: 'loadingText', description: '加载中的文字提示', setter: { componentName: 'StringSetter', isRequired: false, initialValue: '加载中...', }, }, { title: { label: { type: 'i18n', 'en-US': 'loadMoreText', 'zh-CN': '加载更多的文字提示', }, tip: 'loadMoreText | 加载更多的文字提示', }, name: 'loadMoreText', description: '加载更多的文字提示', setter: { componentName: 'StringSetter', isRequired: false, initialValue: '加载更多...', }, }, ], supports: { style: true, }, component: { isContainer: true, }, }, } const snippets: IPublicTypeSnippet[] = [ { title: '流式分页容器', screenshot: '', schema: { componentName: 'StreamList', props: {}, }, }, ] export default { ...StreamListMeta, snippets, }