vendor: amis 6.13.0 base (fork root)

This commit is contained in:
2026-06-16 22:14:57 +08:00
commit 8c8e4247a9
3840 changed files with 2467374 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
export default {
type: 'page',
title: '动态选项卡',
subTitle: '根据变量动态生成',
data: {
arr: [
{
label: '收入',
value: 123
},
{
label: '支出',
value: 233
}
]
},
body: [
{
type: 'tabs',
source: '${arr}',
mode: 'card',
tabs: [
{
title: '${label}-A',
body: '选项卡内容 ${value}'
},
{
title: '${label}-B',
body: '选项卡内容 ${value}'
}
]
}
]
};

View File

@@ -0,0 +1,48 @@
export default {
type: 'page',
title: '表单中选项卡分组',
subTitle: '',
body: [
'<p>多个 controls 可以通过 tabs 来分组展示,表单将作为一个整体提交。</p>',
{
type: 'form',
title: '',
tabs: [
{
title: '选项卡1',
hash: 'tab1',
body: [
{
type: 'input-text',
label: '文本1',
name: 'a'
}
]
},
{
title: '选项卡2',
hash: 'tab2',
body: [
{
type: 'input-text',
label: '文本2',
name: 'b'
}
]
},
{
title: '选项卡3',
hash: 'tab3',
body: [
{
type: 'input-text',
label: '文本3',
name: 'c'
}
]
}
]
}
]
};

View File

@@ -0,0 +1,341 @@
export default {
type: 'page',
title: '选项卡示例',
subTitle: '所有选项卡都在当前页面中,包括默认、line、card以及radio模式',
body: [
{
type: 'tabs',
tabs: [
{
title: '选项卡1',
hash: 'tab1',
body: '选项卡内容1'
},
{
title: '选项卡2',
hash: 'tab2',
body: {
type: 'form',
panelClassName: 'panel-primary',
body: [
{
type: 'input-text',
name: 'a',
label: '文本'
}
]
}
},
{
title: '选项卡3',
body: {
type: 'crud',
api: '/api/sample',
filter: {
title: '条件搜索',
submitText: '',
body: [
{
type: 'input-text',
name: 'keywords',
placeholder: '通过关键字搜索',
clearable: true,
addOn: {
label: '搜索',
type: 'submit'
}
},
{
type: 'plain',
text: '这里的表单项可以配置多个'
}
]
},
columns: [
{
name: 'id',
label: 'ID',
width: 20
},
{
name: 'engine',
label: 'Rendering engine'
},
{
name: 'browser',
label: 'Browser'
},
{
name: 'platform',
label: 'Platform(s)'
},
{
name: 'version',
label: 'Engine version'
},
{
name: 'grade',
label: 'CSS grade'
},
{
type: 'operation',
label: '操作',
width: 100,
buttons: []
}
]
}
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'line',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: '选项卡内容2'
},
{
title: '选项卡3',
body: '选项卡内容3'
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'card',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: '选项卡内容2'
},
{
title: '选项卡3',
body: '选项卡内容3'
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'chrome',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: '选项卡内容2'
},
{
title: '选项卡3',
body: '选项卡内容3'
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'radio',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: '选项卡内容2'
},
{
title: '选项卡3',
body: '选项卡内容3'
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'tiled',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: '选项卡内容2'
},
{
title: '选项卡3',
body: '选项卡内容3'
},
{
title: '选项卡4',
body: '选项卡内容4',
icon: 'fa fa-flag',
iconPosition: 'right'
}
]
},
{
type: 'divider'
},
{
type: 'tabs',
mode: 'vertical',
tabs: [
{
title: '选项卡1',
body: '选项卡内容1'
},
{
title: '选项卡2',
body: [
{
type: 'service',
api: '/api/mock2/crud/table?perPage=5',
body: [
{
type: 'table',
title: '表格1',
source: '$rows',
columns: [
{
name: 'id',
label: 'ID'
},
{
name: 'engine',
label: 'Rendering engine',
width: 300
},
...Array.from({length: 20}, _ => ({
name: 'browser',
label: 'Browser'
})),
{
name: 'platform',
label: 'Platform(s)'
},
{
name: 'version',
label: 'Engine version'
},
{
name: 'grade',
label: 'CSS grade'
},
{
type: 'operation',
label: '操作',
buttons: [
{
label: '详情',
type: 'button',
level: 'link',
actionType: 'dialog',
dialog: {
title: '查看详情',
body: {
type: 'form',
body: [
{
type: 'input-text',
name: 'engine',
label: 'Engine'
},
{
type: 'input-text',
name: 'browser',
label: 'Browser'
},
{
type: 'input-text',
name: 'platform',
label: 'platform'
},
{
type: 'input-text',
name: 'version',
label: 'version'
},
{
type: 'control',
label: 'grade',
body: {
type: 'tag',
label: '${grade}',
displayMode: 'normal',
color: 'active'
}
}
]
}
}
},
{
label: '删除',
type: 'button',
level: 'link',
className: 'text-danger',
disabledOn: "this.grade === 'A'"
}
]
}
]
}
]
},
{
type: 'form',
debug: true,
body: [{type: 'input-text', name: 'text', label: 'text'}]
}
]
},
{
title: '选项卡3',
body: '选项卡内容3'
},
{
title: '选项卡4',
body: '选项卡内容4'
},
{
title: '选项卡5',
body: '选项卡内容5'
}
]
}
]
};

View File

@@ -0,0 +1,35 @@
export default {
type: 'page',
title: '选项卡1页面',
body: [
'<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。这样可以让 url 更加友好,而不是只能用 hash。</p>',
{
type: 'nav',
links: [
{
label: '选项卡1',
icon: 'fa fa-cloud',
to: './tab1'
},
{
label: '选项卡2',
to: './tab2'
},
{
label: '选项卡3',
icon: 'fa fa-youtube',
to: './tab3'
}
]
},
{
type: 'wrapper',
className: 'wrapper bg-white b-l b-b b-r',
body: '选项卡1的内容'
}
]
};

View File

@@ -0,0 +1,35 @@
export default {
type: 'page',
title: '选项卡2页面',
body: [
'<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。</p>',
{
type: 'nav',
links: [
{
label: '选项卡1',
icon: 'fa fa-cloud',
to: './tab1'
},
{
label: '选项卡2',
to: './tab2'
},
{
label: '选项卡3',
icon: 'fa fa-youtube',
to: './tab3'
}
]
},
{
type: 'wrapper',
className: 'wrapper bg-white b-l b-b b-r',
body: '选项卡2的内容'
}
]
};

View File

@@ -0,0 +1,83 @@
export default {
type: 'page',
title: '选项卡3页面',
body: [
'<p>也可以多个页面,利用导航<code>nav</code>渲染期模拟 tabs 的效果。</p>',
{
type: 'nav',
links: [
{
label: '选项卡1',
icon: 'fa fa-cloud',
to: './tab1'
},
{
label: '选项卡2',
to: './tab2'
},
{
label: '选项卡3',
icon: 'fa fa-youtube',
to: './tab3'
}
]
},
{
type: 'wrapper',
className: 'wrapper bg-white b-l b-b b-r',
body: {
type: 'chart',
config: {
title: {
text: '极坐标双数值轴'
},
legend: {
data: ['line']
},
polar: {
center: ['50%', '54%']
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
angleAxis: {
type: 'value',
startAngle: 0
},
radiusAxis: {
min: 0
},
series: [
{
coordinateSystem: 'polar',
name: 'line',
type: 'line',
showSymbol: false,
data: [
[0, 0],
[0.03487823687206265, 1],
[0.06958655048003272, 2],
[0.10395584540887964, 3],
[0.13781867790849958, 4],
[0.17101007166283433, 5],
[0.2033683215379001, 6],
[0.2347357813929454, 7],
[0.26495963211660245, 8],
[0.2938926261462365, 9],
[0.3213938048432697, 10]
]
}
],
animationDuration: 2000
}
}
}
]
};