Skip to content

Conversation

yfq-maoming
Copy link

No description provided.

@tencentblueking-adm
Copy link

tencentblueking-adm commented Oct 13, 2025

CLA assistant check
All committers have signed the CLA.

{
name: 'active',
description: '选中的 tab',
type: 'number|string',
Copy link
Collaborator

Choose a reason for hiding this comment

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

枚举使用 options

description: ' 添加选项卡事件',
params: [
{
e: 'MouseEvent',
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里不对,应该是 name,type,link 可以参考packages/affix/demo/index.ts

// 组件描述
const description = '选项卡切换组件。';

export default {
Copy link
Collaborator

Choose a reason for hiding this comment

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

导出的文件需要添加类型,参考 packages/affix/demo/index.ts

'tab-change': (_name: string) => true,
'update:active': (_name: string) => true,
remove: (_index: number, _panel: unknown) => true,
'remove-panel': (_index: number, _panel: unknown) => true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里不能用 unknown,需要标明类型

{
name: 'list',
description: '下拉菜单所需的数据列表',
type: 'Array',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Array, 使用 ts 的写法

{
name: 'list',
description: '时间轴数据源(必传)',
type: 'Array',
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里的type需要配置成 ITimeLIneItem[],还有link
然后配置 types 里面配置 ITimeLIneItem 具体的类型


"@babel/compat-data@^7.22.20", "@babel/compat-data@^7.27.2", "@babel/compat-data@^7.27.7":
version "7.28.0"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.0.tgz#9fc6fd58c2a6a15243cd13983224968392070790"
Copy link
Collaborator

Choose a reason for hiding this comment

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

lock 文件不上传

@yfq-maoming yfq-maoming force-pushed the feature_wiki branch 4 times, most recently from 5f36085 to aeae3c4 Compare October 17, 2025 08:35
description: '选项卡位置',
type: 'string',
options: ['top', 'left', 'right'],
default: '--',
Copy link
Collaborator

Choose a reason for hiding this comment

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

default 不对

},
{
name: 'panel',
type: 'TabPanelProps',
Copy link
Collaborator

Choose a reason for hiding this comment

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

ITabPanelProps

{
name: 'nodeType',
description: '时间轴节点渲染类型,缺省值为 template 默认使用 v-html ,填写 vnode 则支持 JSX 渲染',
type: 'template | vnode',
Copy link
Collaborator

Choose a reason for hiding this comment

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

template 是什么类型

{
name: 'color',
description: '节点颜色',
type: 'blue | red | green | yellow | gray',
Copy link
Collaborator

Choose a reason for hiding this comment

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

使用options


const types = [
{
name: 'ITabPanelProps',
Copy link
Collaborator

Choose a reason for hiding this comment

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

使用 children,然后写到 tab-panel 的 props 里面哦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants