Cell singleVue demo works fine 1`] = `
class="t-cell__title"
>
单行标题
-
-
+
+
diff --git a/src/cell/__test__/index.test.jsx b/src/cell/__test__/index.test.jsx
index 42f659dbd..ba0275d39 100644
--- a/src/cell/__test__/index.test.jsx
+++ b/src/cell/__test__/index.test.jsx
@@ -2,8 +2,8 @@ import { h } from 'vue';
import { mount } from '@vue/test-utils';
import { describe, it, expect } from 'vitest';
import { ChevronRightIcon, AppIcon } from 'tdesign-icons-vue-next';
-import Cell from '../cell.vue';
-import CellGroup from '../cell-group.vue';
+import Cell from '../cell';
+import CellGroup from '../cell-group';
import Avatar from '../../avatar/avatar.vue';
const appIcon = () => h(AppIcon);
diff --git a/src/cell/cell-group.tsx b/src/cell/cell-group.tsx
new file mode 100644
index 000000000..675f61e2c
--- /dev/null
+++ b/src/cell/cell-group.tsx
@@ -0,0 +1,34 @@
+import { computed, defineComponent } from 'vue';
+import CellGroupProps from './cell-group-props';
+import config from '../config';
+import { usePrefixClass } from '../hooks/useClass';
+import { useContent, useTNodeJSX } from '../hooks/tnode';
+
+const { prefix } = config;
+const name = `${prefix}-cell-group`;
+
+export default defineComponent({
+ name,
+ props: CellGroupProps,
+ emits: ['click'],
+ setup(props) {
+ const renderTNodeJSX = useTNodeJSX();
+ const cellGroupClass = usePrefixClass('cell-group');
+
+ const contentClasses = computed(() => [
+ cellGroupClass.value,
+ `${cellGroupClass.value}--${props.theme}`,
+ { [`${cellGroupClass.value}--bordered`]: props.bordered },
+ ]);
+
+ return () => {
+ const title = renderTNodeJSX('title');
+ return (
+
+ {title ?
{title}
: null}
+
{renderTNodeJSX('default')}
+
+ );
+ };
+ },
+});
diff --git a/src/cell/cell-group.vue b/src/cell/cell-group.vue
deleted file mode 100644
index 13982856b..000000000
--- a/src/cell/cell-group.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/cell/cell.tsx b/src/cell/cell.tsx
new file mode 100644
index 000000000..943cc5d99
--- /dev/null
+++ b/src/cell/cell.tsx
@@ -0,0 +1,99 @@
+import { computed, defineComponent } from 'vue';
+import { ChevronRightIcon } from 'tdesign-icons-vue-next';
+import { Hover } from '../shared';
+import config from '../config';
+import CellProps from './props';
+import { useFormDisabled } from '../form/hooks';
+import { usePrefixClass } from '../hooks/useClass';
+import { useContent, useTNodeJSX } from '../hooks/tnode';
+
+const { prefix } = config;
+const name = `${prefix}-cell`;
+
+export default defineComponent({
+ name,
+ directives: { Hover },
+ props: CellProps,
+ emits: ['click'],
+ setup(props) {
+ const readerTNodeJSX = useTNodeJSX();
+ const readerTNodeContent = useContent();
+ const disabled = useFormDisabled();
+ const cellClass = usePrefixClass('cell');
+
+ const cellClasses = computed(() => [
+ `${cellClass.value}`,
+ `${cellClass.value}--${props.align}`,
+ {
+ [`${cellClass.value}--borderless`]: !props.bordered,
+ },
+ ]);
+
+ const hoverDisabled = computed(() => !props.hover || disabled.value);
+
+ const handleClick = (e: Event) => {
+ if (!disabled.value) {
+ props.onClick?.(e);
+ }
+ };
+
+ const readerImage = () => {
+ if (typeof props.image === 'string') {
+ return
;
+ }
+ const image = readerTNodeJSX('image');
+
+ return image;
+ };
+
+ const readerLeft = () => {
+ const leftIcon = readerTNodeJSX('leftIcon');
+ return (
+
+ {leftIcon &&
{leftIcon}
}
+ {readerImage()}
+
+ );
+ };
+ const readerTitle = () => {
+ const title = readerTNodeJSX('title');
+ if (!title) {
+ return null;
+ }
+ const description = readerTNodeJSX('description');
+ return (
+
+ {title}
+ {props.required &&
*}
+ {description &&
{description}
}
+
+ );
+ };
+ const readerRight = () => {
+ const rightIcon = props.arrow ?
: readerTNodeJSX('rightIcon');
+ if (!rightIcon) {
+ return null;
+ }
+ return (
+
+ );
+ };
+
+ const note = readerTNodeContent('default', 'note');
+
+ return () => (
+
+ {readerLeft()}
+ {readerTitle()}
+ {note &&
{note}
}
+ {readerRight()}
+
+ );
+ },
+});
diff --git a/src/cell/cell.vue b/src/cell/cell.vue
deleted file mode 100644
index 02fff6fd9..000000000
--- a/src/cell/cell.vue
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/cell/index.ts b/src/cell/index.ts
index fdfb20a69..684e53ae7 100644
--- a/src/cell/index.ts
+++ b/src/cell/index.ts
@@ -1,5 +1,5 @@
-import Cell from './cell.vue';
-import _CellGroup from './cell-group.vue';
+import Cell from './cell';
+import _CellGroup from './cell-group';
import { withInstall, WithInstallType } from '../shared';
import { TdCellProps, TdCellGroupProps } from './type';
diff --git a/src/collapse/__test__/__snapshots__/demo.test.jsx.snap b/src/collapse/__test__/__snapshots__/demo.test.jsx.snap
index 5d6d7c44e..e868c9423 100644
--- a/src/collapse/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/collapse/__test__/__snapshots__/demo.test.jsx.snap
@@ -18,13 +18,7 @@ exports[`Collapse > Collapse accordionVue demo works fine 1`] = `
Collapse accordionVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse accordionVue demo works fine 1`] = `
Collapse accordionVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse accordionVue demo works fine 1`] = `
Collapse accordionVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse accordionVue demo works fine 1`] = `
Collapse accordionVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse actionVue demo works fine 1`] = `
Collapse actionVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse baseVue demo works fine 1`] = `
Collapse baseVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -509,13 +467,7 @@ exports[`Collapse > Collapse cardVue demo works fine 1`] = `
Collapse cardVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -586,13 +532,7 @@ exports[`Collapse > Collapse cardVue demo works fine 1`] = `
Collapse cardVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -663,13 +597,7 @@ exports[`Collapse > Collapse cardVue demo works fine 1`] = `
Collapse cardVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -740,13 +662,7 @@ exports[`Collapse > Collapse cardVue demo works fine 1`] = `
Collapse cardVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -861,13 +771,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -964,13 +862,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -1063,13 +949,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
+
+
Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -1584,13 +1428,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -1661,13 +1493,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -1738,13 +1558,7 @@ exports[`Collapse > Collapse mobileVue demo works fine 1`] = `
Collapse mobileVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
@@ -1829,13 +1637,7 @@ exports[`Collapse > Collapse placementVue demo works fine 1`] = `
Collapse placementVue demo works fine 1`] = `
折叠面板标题
-
-
-
-
-
-
+
+
diff --git a/src/date-time-picker/__test__/__snapshots__/demo.test.jsx.snap b/src/date-time-picker/__test__/__snapshots__/demo.test.jsx.snap
index 49cea9b30..c5ab95013 100644
--- a/src/date-time-picker/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/date-time-picker/__test__/__snapshots__/demo.test.jsx.snap
@@ -11,22 +11,22 @@ exports[`DateTimePicker > DateTimePicker baseVue demo works fine 1`] = `
-
+
选择日期(年月日)
-
-
+
+
年 月 日
-
+
DateTimePicker customRangeVue demo works fine 1`] = `
-
+
选择日期
-
-
+
+
年 月 日
-
+
DateTimePicker fullVue demo works fine 1`] = `
-
+
选择日期(年月日时分)
-
-
+
+
2020-08-10 12:50:00
-
+
DateTimePicker mobileVue demo works fine 1`] = `
-
+
选择日期(年月日)
-
-
+
+
年 月 日
-
+
DateTimePicker mobileVue demo works fine 1`] = `
-
+
选择日期(年月)
-
-
+
+
年 月
-
+
DateTimePicker mobileVue demo works fine 1`] = `
-
+
选择日期(时分)
-
-
+
+
时 分
-
+
DateTimePicker mobileVue demo works fine 1`] = `
-
+
选择日期
-
-
+
+
年 月 日
-
+
DateTimePicker timeVue demo works fine 1`] = `
-
+
选择日期(时分)
-
-
+
+
时 分
-
+
DateTimePicker yearMonthVue demo works fine 1`] = `
-
+
选择日期(年月)
-
-
+
+
年 月
-
+
Form mobileVue demo works fine 1`] = `
-
+
禁用态
-
-
+
+
Form mobileVue demo works fine 1`] = `
-
+
diff --git a/src/indexes/__test__/__snapshots__/demo.test.jsx.snap b/src/indexes/__test__/__snapshots__/demo.test.jsx.snap
index b4696bb79..07ffbc8b1 100644
--- a/src/indexes/__test__/__snapshots__/demo.test.jsx.snap
+++ b/src/indexes/__test__/__snapshots__/demo.test.jsx.snap
@@ -99,7 +99,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -111,18 +111,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
阿坝
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
阿拉善
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
阿里
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
安康
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
安庆
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
鞍山
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
安顺
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
安阳
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
澳门
-
-
+
+
-
-
+
+
@@ -302,7 +302,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -314,18 +314,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
北京
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
白银
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
保定
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
宝鸡
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
保山
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
包头
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
巴中
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
北海
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
蚌埠
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
本溪
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
毕节
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
滨州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
百色
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
亳州
-
-
+
+
-
-
+
+
@@ -600,7 +600,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -612,18 +612,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
重庆
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
成都
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
长沙
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
长春
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
沧州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
常德
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
昌都
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
长治
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
常州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
巢湖
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
潮州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
承德
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
郴州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
赤峰
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
池州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
崇左
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
楚雄
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
滁州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
朝阳
-
-
+
+
-
-
+
+
@@ -993,7 +993,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -1005,18 +1005,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
大连
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
东莞
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
大理
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
丹东
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
大庆
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
大同
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
大兴安岭
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
德宏
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
德阳
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
德州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
定西
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
迪庆
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
东营
-
-
+
+
-
-
+
+
@@ -1272,7 +1272,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -1284,18 +1284,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
鄂尔多斯
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
恩施
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
鄂州
-
-
+
+
-
-
+
+
@@ -1361,7 +1361,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -1373,18 +1373,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
福州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
防城港
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
佛山
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
抚顺
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
抚州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
阜新
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
阜阳
-
-
+
+
-
-
+
+
@@ -1526,7 +1526,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -1538,18 +1538,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
广州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
桂林
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
贵阳
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
甘南
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
赣州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
甘孜
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
广安
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
广元
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
贵港
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
果洛
-
-
+
+
-
-
+
+
@@ -1748,7 +1748,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -1760,18 +1760,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
揭阳
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
吉林
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
晋江
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
吉安
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
胶州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
嘉兴
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
济南
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
鸡西
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
荆州
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
江门
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
基隆
-
-
+
+
-
-
+
+
@@ -1989,7 +1989,7 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
@@ -2001,18 +2001,18 @@ exports[`Indexes > Indexes baseVue demo works fine 1`] = `
-
+
昆明
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
开封
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
康定
-
-
+
+
-
-
+
+
Indexes baseVue demo works fine 1`] = `
-
+
喀什
-
-
+
+
-
-
+
+
@@ -2173,7 +2173,7 @@ exports[`Indexes > Indexes customVue demo works fine 1`] = `