Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions packages/yunti-ui-lowcode-materials/lowcode/breadcrumb/meta.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuntijs/ui 发版后,需要在这个项目里更新下 @yuntijs/ui 的版本


import { COMMON_CONFIGURE_PROPS, getPriority } from '../utils';

const componentName = 'Breadcrumb';
const BreadcrumbMeta: IPublicTypeComponentMetadata = {
componentName,
category: '数据展示',
title: '面包屑',
priority: getPriority(componentName),
devMode: 'proCode',
npm: {
package: '@yuntijs/ui-lowcode-materials',
version: '{{version}}',
exportName: componentName,
destructuring: true,
subName: '',
},
configure: {
props: [
...COMMON_CONFIGURE_PROPS,
{
name: 'items',
title: '列表项',
setter: {
componentName: 'ArraySetter',
props: {
itemSetter: {
componentName: 'ObjectSetter',
props: {
config: {
items: [
{
name: 'title',
title: '标题',
initialValue: 'Home',
propType: {
type: 'oneOfType',
value: ['node', 'string'],
},
setter: ['StringSetter', 'SlotSetter', 'VariableSetter', 'I18nSetter'],
},
{
name: 'href',
title: '跳转',
initialValue: '/',
propType: {
type: 'oneOfType',
value: ['string'],
},
setter: ['StringSetter', 'VariableSetter'],
},
],
},
},
},
},
},
},
{
name: 'separator',
title: {
label: '分隔符',
tip: '要显示的分隔符',
},
initialValue: '/',
propType: {
type: 'oneOfType',
value: ['node', 'string'],
},
setter: ['StringSetter', 'SlotSetter', 'VariableSetter'],
},
{
name: 'rootClassName',
title: { label: '类名' },
setter: ['StringSetter', 'VariableSetter'],
},
],
component: {
isContainer: true,
},
supports: {
style: true,
loop: true,
condition: true,
events: [],
},
advanced: {},
},
};
const snippets: IPublicTypeSnippet[] = [
{
title: '面包屑',
schema: {
componentName: 'Breadcrumb',
props: {
__component_name: 'Breadcrumb',
items: [
{
title: 'Home',
},
{
title: 'Application Center',
},
{
title: 'Application List',
},
{
title: 'An Application',
},
],
},
},
},
];

const meta = {
...BreadcrumbMeta,
snippets,
};

export default meta;
3 changes: 2 additions & 1 deletion packages/yunti-ui-lowcode-materials/lowcode/meta.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pkgJson from '../package.json';
import { MonacoDiffEditorMeta, MonacoEditorMeta } from './MonacoEditor/meta';
import { TreeMeta } from './Tree/meta';
import breadcrumbMeta from './breadcrumb/meta';

const components = [TreeMeta, MonacoEditorMeta, MonacoDiffEditorMeta].map(c => {
const components = [TreeMeta, MonacoEditorMeta, MonacoDiffEditorMeta, breadcrumbMeta].map(c => {
if (c.npm) {
c.npm.version = pkgJson.version;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yunti-ui-lowcode-materials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"@alilc/lowcode-types": "^1.2.1",
"@babel/runtime": "^7.0.0",
"@yuntijs/ui": "1.0.0-beta.3"
"@yuntijs/ui": "1.0.0-beta.4"
},
"peerDependencies": {
"lodash": "^4.17.21",
Expand Down
Loading