tdesign-mobile-vue
Version:
tdesign-mobile-vue
1,299 lines • 379 kB
JSON
{
"$schema": "http://json.schemastore.org/web-types",
"framework": "vue",
"name": "tdesign-mobile-vue",
"js-types-syntax": "typescript",
"description-markup": "markdown",
"contributions": {
"html": {
"vue-components": [
{
"name": "t-action-sheet",
"source": {
"symbol": "ActionSheet"
},
"description": "ActionSheet\n\n动作面板",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet",
"props": [
{
"name": "align",
"description": "水平对齐方式",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "'center' | 'left'",
"default": "center",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "center"
},
{
"name": "left"
}
]
},
{
"name": "cancel-text",
"description": "设置取消按钮的文本",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "string"
},
{
"name": "count",
"description": "设置每页展示菜单的数量,仅当 type=grid 时有效",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "number",
"default": "8"
},
{
"name": "description",
"description": "动作面板描述文字",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "string"
},
{
"name": "items",
"description": "菜单项",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "Array<string | ActionSheetItem>"
},
{
"name": "popup-props",
"description": "透传 Popup 组件全部属性",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "PopupProps",
"default": "{}"
},
{
"name": "show-cancel",
"description": "是否显示取消按钮",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "boolean",
"default": "true"
},
{
"name": "show-overlay",
"description": "是否显示遮罩层",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "boolean",
"default": "true"
},
{
"name": "theme",
"description": "展示类型,列表和表格形式展示",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "'list' | 'grid'",
"default": "list",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "list"
},
{
"name": "grid"
}
]
},
{
"name": "visible",
"description": "显示与隐藏",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-props",
"type": "boolean",
"default": "false"
}
],
"js": {
"events": [
{
"name": "cancel",
"description": "点击取消按钮时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events"
},
{
"name": "close",
"description": "关闭时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events"
},
{
"name": "selected",
"description": "选择菜单项时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/action-sheet?tab=api#actionsheet-events"
}
]
},
"slots": []
},
{
"name": "t-avatar",
"source": {
"symbol": "Avatar"
},
"description": "Avatar\n\n头像",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar",
"props": [
{
"name": "alt",
"description": "show it when url is not valid\n\n头像替换文本,仅当图片加载失败时有效",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "string"
},
{
"name": "badge-props",
"description": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "BadgeProps"
},
{
"name": "hide-on-load-failed",
"description": "hide image when loading image failed\n\n加载失败时隐藏图片",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "boolean",
"default": "false"
},
{
"name": "icon",
"description": "use icon to fill\n\n图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "TNode"
},
{
"name": "image",
"description": "images url\n\n图片地址",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "string"
},
{
"name": "image-props",
"description": "透传至 Image 组件",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "ImageProps"
},
{
"name": "shape",
"description": "shape\n\n形状。优先级高于 AvatarGroup.shape 。Avatar 单独存在时,默认值为 circle。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.shape 决定",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "ShapeEnum",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "circle"
},
{
"name": "round"
}
]
},
{
"name": "size",
"description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等。优先级高于 AvatarGroup.size 。Avatar 单独存在时,默认值为 medium。如果父组件 AvatarGroup 存在,默认值便由 AvatarGroup.size 决定",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props",
"type": "string"
}
],
"js": {
"events": [
{
"name": "error",
"description": "trigger on image load failed\n\n图片加载失败时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-events"
}
]
},
"slots": [
{
"name": "icon",
"description": "use icon to fill\n\n图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatar-props"
}
]
},
{
"name": "t-avatar-group",
"source": {
"symbol": "AvatarGroup"
},
"description": "AvatarGroup\n\n头像组",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar",
"props": [
{
"name": "cascading",
"description": "multiple images cascading\n\n图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props",
"type": "CascadingValue",
"default": "'right-up'",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "left-up"
},
{
"name": "right-up"
}
]
},
{
"name": "collapse-avatar",
"description": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props",
"type": "string | TNode"
},
{
"name": "max",
"description": "能够同时显示的最多头像数量",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props",
"type": "number"
},
{
"name": "shape",
"description": "shape\n\n形状。优先级低于 Avatar.shape",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props",
"type": "ShapeEnum",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "circle"
},
{
"name": "round"
}
]
},
{
"name": "size",
"description": "size\n\n尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props",
"type": "string"
}
],
"js": {
"events": [
{
"name": "collapsed-item-click",
"description": "点击头像折叠元素触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-events"
}
]
},
"slots": [
{
"name": "collapseAvatar",
"description": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props"
},
{
"name": "collapse-avatar",
"description": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/avatar?tab=api#avatargroup-props"
}
]
},
{
"name": "t-back-top",
"source": {
"symbol": "BackTop"
},
"description": "BackTop\n\n回到顶部",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top",
"props": [
{
"name": "container",
"description": "滚动的容器",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "() => HTMLElement"
},
{
"name": "fixed",
"description": "是否绝对定位固定到屏幕右下方",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "boolean",
"default": "true"
},
{
"name": "icon",
"description": "图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "boolean | TNode",
"default": "true"
},
{
"name": "target",
"description": "定位滚动到指定对象",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "() => HTMLElement"
},
{
"name": "text",
"description": "文案",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "string",
"default": "''"
},
{
"name": "theme",
"description": "预设的样式类型",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "'round' | 'half-round' | 'round-dark' | 'half-round-dark'",
"default": "round",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "round"
},
{
"name": "half-round"
},
{
"name": "round-dark"
},
{
"name": "half-round-dark"
}
]
},
{
"name": "visibility-height",
"description": "滚动高度达到此参数值才出现",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props",
"type": "number",
"default": "200"
}
],
"js": {
"events": [
{
"name": "to-top",
"description": "点击触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-events"
}
]
},
"slots": [
{
"name": "icon",
"description": "图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/back-top?tab=api#backtop-props"
}
]
},
{
"name": "t-badge",
"source": {
"symbol": "Badge"
},
"description": "Badge\n\n徽标数",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge",
"props": [
{
"name": "color",
"description": "颜色",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "string"
},
{
"name": "content",
"description": "徽标内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "string | TNode"
},
{
"name": "count",
"description": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "string | number | TNode",
"default": "0"
},
{
"name": "dot",
"description": "是否为红点",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "boolean",
"default": "false"
},
{
"name": "max-count",
"description": "封顶的数字值",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "number",
"default": "99"
},
{
"name": "offset",
"description": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "Array<string | number>"
},
{
"name": "shape",
"description": "形状",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "'circle' | 'square' | 'bubble' | 'ribbon'",
"default": "circle",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "circle"
},
{
"name": "square"
},
{
"name": "bubble"
},
{
"name": "ribbon"
}
]
},
{
"name": "show-zero",
"description": "当数值为 0 时,是否展示徽标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "boolean",
"default": "false"
},
{
"name": "size",
"description": "尺寸",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props",
"type": "'medium' | 'large'",
"default": "medium",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "medium"
},
{
"name": "large"
}
]
}
],
"slots": [
{
"name": "content",
"description": "徽标内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props"
},
{
"name": "count",
"description": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/badge?tab=api#badge-props"
}
]
},
{
"name": "t-table",
"source": {
"symbol": "BaseTable"
},
"description": "BaseTable\n\n基础表格",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table",
"props": [
{
"name": "bordered",
"description": "show table bordered\n\n是否显示表格边框",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "boolean",
"default": "false"
},
{
"name": "cell-empty-content",
"description": "单元格数据为空时呈现的内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string | TNode<BaseTableCellParams<T>>"
},
{
"name": "columns",
"description": "table column configs\n\n列配置,泛型 T 指表格数据类型",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "Array<BaseTableCol<T>>",
"default": "[]"
},
{
"name": "data",
"description": "table data\n\n数据源,泛型 T 指表格数据类型",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "Array<T>",
"default": "[]"
},
{
"name": "empty",
"description": "empty text or empty element\n\n空表格呈现样式,支持全局配置 `GlobalConfigProvider`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string | TNode",
"default": "''"
},
{
"name": "fixed-rows",
"description": "【开发中】固定行(冻结行),示例:[M, N],表示冻结表头 M 行和表尾 N 行。M 和 N 值为 0 时,表示不冻结行",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "Array<number>"
},
{
"name": "height",
"description": "table height\n\n表格高度,超出后会出现滚动条。示例:100, '30%', '300'。值为数字类型,会自动加上单位 px。如果不是绝对固定表格高度,建议使用 `maxHeight`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string | number"
},
{
"name": "loading",
"description": "loading state table\n\n加载中状态。值为 `true` 会显示默认加载中样式,可以通过 Function 和 插槽 自定义加载状态呈现内容和样式。值为 `false` 则会取消加载状态",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "boolean | TNode",
"default": "undefined"
},
{
"name": "loading-props",
"description": "透传加载组件全部属性",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "Partial<LoadingProps>"
},
{
"name": "max-height",
"description": "table max height\n\n表格最大高度,超出后会出现滚动条。示例:100, '30%', '300'。值为数字类型,会自动加上单位 px",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string | number"
},
{
"name": "row-key",
"description": "unique key for each row data\n\n唯一标识一行数据的字段名,来源于 `data` 中的字段。如果是字段嵌套多层,可以设置形如 `item.a.id` 的方法",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string",
"default": "'id'"
},
{
"name": "show-header",
"description": "show table header\n\n是否显示表头",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "boolean",
"default": "true"
},
{
"name": "stripe",
"description": "show stripe style\n\n是否显示斑马纹",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "boolean",
"default": "false"
},
{
"name": "table-content-width",
"description": "表格内容的总宽度,注意不是表格可见宽度。主要应用于 `table-layout: auto` 模式下的固定列显示。`tableContentWidth` 内容宽度的值必须大于表格可见宽度",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "string"
},
{
"name": "table-layout",
"description": "table-layout css properties, [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout). set value to be `fixed` on `resizable=true` please\n\n表格布局方式",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "'auto' | 'fixed'",
"default": "fixed",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "auto"
},
{
"name": "fixed"
}
]
},
{
"name": "vertical-align",
"description": "vertical align\n\n行内容上下方向对齐",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props",
"type": "'top' | 'middle' | 'bottom'",
"default": "middle",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "top"
},
{
"name": "middle"
},
{
"name": "bottom"
}
]
}
],
"js": {
"events": [
{
"name": "cell-click",
"description": "trigger on cell clicked\n\n单元格点击时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-events"
},
{
"name": "row-click",
"description": "trigger on row click\n\n行点击时触发,泛型 T 指表格数据类型",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-events"
},
{
"name": "scroll",
"description": "trigger on table content scroll\n\n表格内容滚动时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-events"
}
]
},
"slots": [
{
"name": "cellEmptyContent",
"description": "单元格数据为空时呈现的内容类型和参数:string | TNode<BaseTableCellParams<T>>",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props"
},
{
"name": "cell-empty-content",
"description": "单元格数据为空时呈现的内容类型和参数:string | TNode<BaseTableCellParams<T>>",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props"
},
{
"name": "empty",
"description": "empty text or empty element\n\n空表格呈现样式,支持全局配置 `GlobalConfigProvider`",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props"
},
{
"name": "loading",
"description": "loading state table\n\n加载中状态。值为 `true` 会显示默认加载中样式,可以通过 Function 和 插槽 自定义加载状态呈现内容和样式。值为 `false` 则会取消加载状态",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/table?tab=api#basetable-props"
}
]
},
{
"name": "t-button",
"source": {
"symbol": "Button"
},
"description": "Button\n\n按钮",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button",
"props": [
{
"name": "block",
"description": "make button to be a block-level element\n\n是否为块级元素",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "boolean",
"default": "false"
},
{
"name": "content",
"description": "button's children elements\n\n按钮内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "string | TNode"
},
{
"name": "disabled",
"description": "disable the button, make it can not be clicked\n\n禁用状态。优先级:Button.disabled > Form.disabled",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "boolean",
"default": "undefined"
},
{
"name": "ghost",
"description": "make background-color to be transparent\n\n是否为幽灵按钮(镂空按钮)",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "boolean",
"default": "false"
},
{
"name": "icon",
"description": "use it to set left icon in button\n\n按钮内部图标,可完全自定义",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "TNode"
},
{
"name": "loading",
"description": "set button to be loading state\n\n是否显示为加载状态",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "boolean",
"default": "false"
},
{
"name": "loading-props",
"description": "透传 Loading 组件全部属性",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "LoadingProps"
},
{
"name": "shape",
"description": "button shape\n\n按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "'rectangle' | 'square' | 'round' | 'circle'",
"default": "rectangle",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "rectangle"
},
{
"name": "square"
},
{
"name": "round"
},
{
"name": "circle"
}
]
},
{
"name": "size",
"description": "a button has four size\n\n组件尺寸",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "'extra-small' | 'small' | 'medium' | 'large'",
"default": "medium",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "extra-small"
},
{
"name": "small"
},
{
"name": "medium"
},
{
"name": "large"
}
]
},
{
"name": "suffix",
"description": "右侧内容,可用于定义右侧图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "TNode"
},
{
"name": "theme",
"description": "button theme\n\n组件风格,依次为品牌色、危险色",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "'default' | 'primary' | 'danger' | 'light'",
"default": "default",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "default"
},
{
"name": "primary"
},
{
"name": "danger"
},
{
"name": "light"
}
]
},
{
"name": "type",
"description": "type of button element in html\n\n按钮类型",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "'submit' | 'reset' | 'button'",
"default": "button",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "submit"
},
{
"name": "reset"
},
{
"name": "button"
}
]
},
{
"name": "variant",
"description": "variant of button\n\n按钮形式,基础、线框、虚线、文字",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props",
"type": "'base' | 'outline' | 'dashed' | 'text'",
"default": "base",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "base"
},
{
"name": "outline"
},
{
"name": "dashed"
},
{
"name": "text"
}
]
}
],
"js": {
"events": [
{
"name": "click",
"description": "trigger on click\n\n点击时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-events"
}
]
},
"slots": [
{
"name": "content",
"description": "button's children elements\n\n按钮内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props"
},
{
"name": "icon",
"description": "use it to set left icon in button\n\n按钮内部图标,可完全自定义",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props"
},
{
"name": "suffix",
"description": "右侧内容,可用于定义右侧图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/button?tab=api#button-props"
}
]
},
{
"name": "t-calendar",
"source": {
"symbol": "Calendar"
},
"description": "Calendar\n\n日历",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar",
"props": [
{
"name": "confirm-btn",
"description": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "string | ButtonProps | TNode | null",
"default": "''"
},
{
"name": "first-day-of-week",
"description": "第一天从星期几开始,默认 0 = 周日",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "number",
"default": "0"
},
{
"name": "format",
"description": "用于格式化日期的函数",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "CalendarFormatType "
},
{
"name": "max-date",
"description": "最大可选的日期,不传则默认半年后",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": " number | Date"
},
{
"name": "min-date",
"description": "最小可选的日期,不传则默认今天",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": " number | Date"
},
{
"name": "switch-mode",
"description": "切换模式。 `none` 表示水平方向平铺展示所有月份; `month` 表示支持按月切换, `year-month` 表示既按年切换,也支持按月切换",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "'none' | 'month' | 'year-month'",
"default": "none",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "none"
},
{
"name": "month"
},
{
"name": "year-month"
}
]
},
{
"name": "title",
"description": "标题,不传默认为“请选择日期”",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "string | TNode"
},
{
"name": "type",
"description": "日历的选择类型,single = 单选;multiple = 多选; range = 区间选择",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "'single' | 'multiple' | 'range'",
"default": "'single'",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "single"
},
{
"name": "multiple"
},
{
"name": "range"
}
]
},
{
"name": "use-popup",
"description": "是否使用弹出层包裹日历",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "boolean",
"default": "true"
},
{
"name": "value",
"description": "当前选择的日期,不传则默认今天,当 type = multiple 或 range 时传入数组",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "number | Date | TCalendarValue[]"
},
{
"name": "visible",
"description": "是否显示日历;`usePopup` 为 true 时有效",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props",
"type": "boolean",
"default": "false"
}
],
"js": {
"events": [
{
"name": "change",
"description": "不显示 confirm-btn 时,完成选择时触发(暂不支持 type = multiple)",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
},
{
"name": "close",
"description": "关闭按钮时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
},
{
"name": "confirm",
"description": "点击确认按钮时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
},
{
"name": "panel-change",
"description": "切换月或年时触发(switch-mode 不为 none 时有效)",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
},
{
"name": "scroll",
"description": "triggered when scrolling\n\n滚动时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
},
{
"name": "select",
"description": "点击日期时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-events"
}
]
},
"slots": [
{
"name": "confirmBtn",
"description": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性类型和参数:string | ButtonProps | TNode | null【import { ButtonProps } from '@Button'】",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props"
},
{
"name": "confirm-btn",
"description": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性类型和参数:string | ButtonProps | TNode | null【import { ButtonProps } from '@Button'】",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props"
},
{
"name": "title",
"description": "标题,不传默认为“请选择日期”",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/calendar?tab=api#calendar-props"
}
]
},
{
"name": "t-cascader",
"source": {
"symbol": "Cascader"
},
"description": "Cascader\n\n级联选择",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader",
"props": [
{
"name": "check-strictly",
"description": "父子节点选中状态不再关联,可各自选中或取消",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "boolean",
"default": "false"
},
{
"name": "close-btn",
"description": "关闭按钮",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "boolean | TNode",
"default": "true"
},
{
"name": "header",
"description": "头部",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "TNode"
},
{
"name": "keys",
"description": "用来定义 value / label / children / disabled 在 `options` 中对应的字段别名",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "CascaderKeysType"
},
{
"name": "middle-content",
"description": "中间内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "TNode"
},
{
"name": "options",
"description": "可选项数据源",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "Array<CascaderOption>",
"default": "[]"
},
{
"name": "placeholder",
"description": "未选中时的提示文案",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "string | TNode",
"default": "'选择选项'"
},
{
"name": "sub-titles",
"description": "每级展示的次标题",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "Array<string>",
"default": "[]"
},
{
"name": "theme",
"description": "展示风格",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "'step' | 'tab'",
"default": "step",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "step"
},
{
"name": "tab"
}
]
},
{
"name": "title",
"description": "标题",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "string | TNode"
},
{
"name": "value",
"description": "选项值",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "string | number"
},
{
"name": "visible",
"description": "是否展示",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props",
"type": "boolean",
"default": "false"
}
],
"js": {
"events": [
{
"name": "change",
"description": "值发生变更时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-events"
},
{
"name": "close",
"description": "关闭时触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-events"
},
{
"name": "pick",
"description": "选择后触发",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-events"
}
]
},
"slots": [
{
"name": "closeBtn",
"description": "关闭按钮",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "close-btn",
"description": "关闭按钮",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "header",
"description": "头部",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "middleContent",
"description": "中间内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "middle-content",
"description": "中间内容",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "placeholder",
"description": "未选中时的提示文案",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
},
{
"name": "title",
"description": "标题",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cascader?tab=api#cascader-props"
}
]
},
{
"name": "t-cell",
"source": {
"symbol": "Cell"
},
"description": "Cell\n\n单元格",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell",
"props": [
{
"name": "align",
"description": "右侧内容的对齐方式,默认居中对齐",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "'top' | 'middle' | 'bottom'",
"default": "middle",
"attribute-value": {
"type": "enum"
},
"values": [
{
"name": "top"
},
{
"name": "middle"
},
{
"name": "bottom"
}
]
},
{
"name": "arrow",
"description": "是否显示右侧箭头",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "boolean",
"default": "false"
},
{
"name": "bordered",
"description": "是否显示下边框",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "boolean",
"default": "true"
},
{
"name": "description",
"description": "下方内容描述",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "string | TNode"
},
{
"name": "hover",
"description": "是否开启点击反馈",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "boolean"
},
{
"name": "image",
"description": "主图",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "string | TNode"
},
{
"name": "left-icon",
"description": "左侧图标,出现在单元格标题的左侧",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "TNode"
},
{
"name": "note",
"description": "和标题同行的说明文字",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "string | TNode"
},
{
"name": "required",
"description": "是否显示表单必填星号",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "boolean",
"default": "false"
},
{
"name": "right-icon",
"description": "最右侧图标",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "TNode"
},
{
"name": "title",
"description": "标题",
"doc-url": "https://tdesign.tencent.com/mobile-vue/components/cell?tab=api#cell-props",
"type": "string | TNode"
}
],
"js": {
"events": [
{
"nam