Ver código fonte

chore: modify table,calendar,locale story due to dynamic data

shijia.me 1 ano atrás
pai
commit
68e70c3fbc

+ 1 - 1
packages/semi-ui/locale/_story/locale.stories.jsx

@@ -373,7 +373,7 @@ class I18nDemo extends React.Component {
                     <h5>List - Empty</h5>
                     <List header={<div>List</div>} dataSource={[]}/>
                     <h5>Calendar</h5>
-                    <Calendar mode='month' />
+                    <Calendar mode='month' displayValue={new Date('2024-02-01')} />
                     <h5>Typography - Copyable</h5>
                     <Typography.Paragraph copyable>Click to copy text.</Typography.Paragraph>
                     <h5>Typography - Collapsible</h5>

+ 1 - 1
packages/semi-ui/table/_story/v2/ColumnResize/index.tsx

@@ -91,7 +91,7 @@ function App() {
                 name: isSemiDesign ? `Semi Design 设计稿${i}.fig` : `Semi D2C 设计稿${i}.fig`,
                 owner: isSemiDesign ? '姜鹏志' : '郝宣',
                 size: randomNumber,
-                updateTime: new Date().valueOf() + randomNumber * DAY,
+                updateTime: new Date('2024-03-21').valueOf() + randomNumber * DAY,
                 avatarBg: isSemiDesign ? 'grey' : 'red',
             });
         }

+ 5 - 1
packages/semi-ui/table/_story/v2/FixedPagination/index.tsx

@@ -94,4 +94,8 @@ export default function App() {
     return (<div>
         <Table columns={columns} dataSource={dataSource} pagination={pagination} />
     </div>);
-}
+}
+
+App.parameters = {
+    chromatic: { disableSnapshot: true },
+};

+ 1 - 1
packages/semi-ui/table/_story/v2/ShowHeader/index.tsx

@@ -74,7 +74,7 @@ export default function App() {
                 name: isSemiDesign ? `Semi Design 设计稿${i}.fig` : `Semi Pro 设计稿${i}.fig`,
                 owner: isSemiDesign ? '姜鹏志' : '郝宣',
                 size: randomNumber,
-                updateTime: new Date().valueOf() + randomNumber * DAY,
+                updateTime: new Date('2024-03-21').valueOf() + randomNumber * DAY,
                 avatarBg: isSemiDesign ? 'grey' : 'red'
             });
         }