diff --git a/site/mobile/mobile.config.js b/site/mobile/mobile.config.js index 4bb613b7..dc38fbe1 100644 --- a/site/mobile/mobile.config.js +++ b/site/mobile/mobile.config.js @@ -105,7 +105,7 @@ export default { { title: 'Sticky 吸顶', name: 'sticky', - component: () => import('tdesign-mobile-react/sticky/_example/index.jsx'), + component: () => import('tdesign-mobile-react/sticky/_example/index.tsx'), }, { title: 'BackTop 返回顶部', diff --git a/src/sticky/_example/base.jsx b/src/sticky/_example/base.tsx similarity index 100% rename from src/sticky/_example/base.jsx rename to src/sticky/_example/base.tsx diff --git a/src/sticky/_example/container.jsx b/src/sticky/_example/container.tsx similarity index 100% rename from src/sticky/_example/container.jsx rename to src/sticky/_example/container.tsx diff --git a/src/sticky/_example/index.jsx b/src/sticky/_example/index.tsx similarity index 100% rename from src/sticky/_example/index.jsx rename to src/sticky/_example/index.tsx diff --git a/src/sticky/_example/offset.jsx b/src/sticky/_example/offset.tsx similarity index 100% rename from src/sticky/_example/offset.jsx rename to src/sticky/_example/offset.tsx diff --git a/test/snap/__snapshots__/csr.test.jsx.snap b/test/snap/__snapshots__/csr.test.jsx.snap index 93fb9a43..8bc70f2b 100644 --- a/test/snap/__snapshots__/csr.test.jsx.snap +++ b/test/snap/__snapshots__/csr.test.jsx.snap @@ -474,6 +474,251 @@ exports[`csr snapshot test > csr test src/grid/_example/badge.tsx 1`] = ` `; +exports[`csr snapshot test > csr test src/sticky/_example/base.tsx 1`] = ` +
+
+
+
+ +
+
+
+
+`; + +exports[`csr snapshot test > csr test src/sticky/_example/container.tsx 1`] = ` +
+
+
+
+ +
+
+
+
+`; + +exports[`csr snapshot test > csr test src/sticky/_example/index.tsx 1`] = ` +
+
+
+

+ Sticky 吸顶 +

+

+ 用于常驻页面顶部的信息,操作展示 +

+
+
+
+
+

+ 基础吸顶 +

+
+
+
+
+
+ +
+
+
+
+
+
+
+

+ 吸顶距离 +

+
+
+
+
+
+ +
+
+
+
+
+
+
+

+ 指定容器 +

+
+
+
+
+
+ +
+
+
+
+
+
+
+
+`; + +exports[`csr snapshot test > csr test src/sticky/_example/offset.tsx 1`] = ` +
+
+
+
+ +
+
+
+
+`; + exports[`ssr snapshot test > ssr test src/divider/_example/base.tsx 1`] = `"
水平分割线
带文字水平分割线
垂直分割线
文字信息文字信息文字信息
"`; exports[`ssr snapshot test > ssr test src/divider/_example/index.tsx 1`] = `"

Divider 分割符

用于分割、组织、细化有一定逻辑的组织元素内容和页面结构。

01 组件类型

水平分割线
带文字水平分割线
垂直分割线
文字信息文字信息文字信息

02 组件状态

虚线样式
"`; @@ -481,3 +726,11 @@ exports[`ssr snapshot test > ssr test src/divider/_example/index.tsx 1`] = `" ssr test src/divider/_example/theme.tsx 1`] = `"
虚线样式
"`; exports[`ssr snapshot test > ssr test src/grid/_example/badge.tsx 1`] = `"
标题文字
8
标题文字
new
标题文字
···
标题文字
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/base.tsx 1`] = `"
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/container.tsx 1`] = `"
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/index.tsx 1`] = `"

Sticky 吸顶

用于常驻页面顶部的信息,操作展示

基础吸顶

吸顶距离

指定容器

"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/offset.tsx 1`] = `"
"`; diff --git a/test/snap/__snapshots__/ssr.test.jsx.snap b/test/snap/__snapshots__/ssr.test.jsx.snap index 92f6ff66..a6f8a627 100644 --- a/test/snap/__snapshots__/ssr.test.jsx.snap +++ b/test/snap/__snapshots__/ssr.test.jsx.snap @@ -7,3 +7,11 @@ exports[`ssr snapshot test > ssr test src/divider/_example/index.tsx 1`] = `" ssr test src/divider/_example/theme.tsx 1`] = `"
虚线样式
"`; exports[`ssr snapshot test > ssr test src/grid/_example/badge.tsx 1`] = `"
标题文字
8
标题文字
new
标题文字
···
标题文字
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/base.tsx 1`] = `"
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/container.tsx 1`] = `"
"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/index.tsx 1`] = `"

Sticky 吸顶

用于常驻页面顶部的信息,操作展示

基础吸顶

吸顶距离

指定容器

"`; + +exports[`ssr snapshot test > ssr test src/sticky/_example/offset.tsx 1`] = `"
"`;