Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix(日历): 解决一个诡异的bug,日历,拖动发布记录时,拖到比当前时间小的日历正常显示,拖到比当前时间大的日历时间会盖住发布记录。
gaoSirf64b2e5ceaa7
diff --git a/.idea/workspace.xml b/.idea/workspace.xmlindex bdc42167..90e86ebf 100644--- a/.idea/workspace.xml+++ b/.idea/workspace.xml@@ -4,9 +4,12 @@<option name="autoReloadType" value="SELECTIVE" /></component><component name="ChangeListManager">- <list default="true" id="8ce961ad-7c9e-494c-bc53-9ecde4358af8" name="更改" comment="feat(发布弹框): 发布API接入完成">+ <list default="true" id="8ce961ad-7c9e-494c-bc53-9ecde4358af8" name="更改" comment="fix: 修复ts报错问题"><change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/components/PublishDialog/publishDialog.type.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/PublishDialog/publishDialog.type.ts" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsx" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss" afterDir="false" />+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" afterDir="false" /></list><option name="SHOW_DIALOG" value="false" /><option name="HIGHLIGHT_CONFLICTS" value="true" />@@ -38,37 +41,37 @@<option name="hideEmptyMiddlePackages" value="true" /><option name="showLibraryContents" value="true" /></component>- <component name="PropertiesComponent"><![CDATA[{- "keyToString": {- "FileHistory.git4idea.history.GitHistoryProvider_flatOrder0": "0",- "FileHistory.git4idea.history.GitHistoryProvider_flatOrder1": "1",- "FileHistory.git4idea.history.GitHistoryProvider_flatOrder2": "2",- "FileHistory.git4idea.history.GitHistoryProvider_flatOrder3": "3",- "FileHistory.git4idea.history.GitHistoryProvider_flatWidth0": "450",- "FileHistory.git4idea.history.GitHistoryProvider_flatWidth1": "450",- "FileHistory.git4idea.history.GitHistoryProvider_flatWidth2": "450",- "FileHistory.git4idea.history.GitHistoryProvider_flatWidth3": "449",- "FileHistory.git4idea.history.GitHistoryProvider_treeOrder0": "0",- "FileHistory.git4idea.history.GitHistoryProvider_treeOrder1": "1",- "FileHistory.git4idea.history.GitHistoryProvider_treeOrder2": "2",- "FileHistory.git4idea.history.GitHistoryProvider_treeOrder3": "3",- "FileHistory.git4idea.history.GitHistoryProvider_treeWidth0": "450",- "FileHistory.git4idea.history.GitHistoryProvider_treeWidth1": "450",- "FileHistory.git4idea.history.GitHistoryProvider_treeWidth2": "450",- "FileHistory.git4idea.history.GitHistoryProvider_treeWidth3": "449",- "RunOnceActivity.ShowReadmeOnStart": "true",- "git-widget-placeholder": "master",- "ignore.virus.scanning.warn.message": "true",- "node.js.detected.package.eslint": "true",- "node.js.detected.package.tslint": "true",- "node.js.selected.package.eslint": "(autodetect)",- "node.js.selected.package.tslint": "(autodetect)",- "nodejs_package_manager_path": "npm",- "settings.editor.selected.configurable": "preferences.pluginManager",- "ts.external.directory.path": "E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib",- "vue.rearranger.settings.migration": "true"+ <component name="PropertiesComponent">{+ "keyToString": {+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder0": "0",+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder1": "1",+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder2": "2",+ "FileHistory.git4idea.history.GitHistoryProvider_flatOrder3": "3",+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth0": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth1": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth2": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_flatWidth3": "449",+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder0": "0",+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder1": "1",+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder2": "2",+ "FileHistory.git4idea.history.GitHistoryProvider_treeOrder3": "3",+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth0": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth1": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth2": "450",+ "FileHistory.git4idea.history.GitHistoryProvider_treeWidth3": "449",+ "RunOnceActivity.ShowReadmeOnStart": "true",+ "git-widget-placeholder": "master",+ "ignore.virus.scanning.warn.message": "true",+ "node.js.detected.package.eslint": "true",+ "node.js.detected.package.tslint": "true",+ "node.js.selected.package.eslint": "(autodetect)",+ "node.js.selected.package.tslint": "(autodetect)",+ "nodejs_package_manager_path": "npm",+ "settings.editor.selected.configurable": "preferences.pluginManager",+ "ts.external.directory.path": "E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib",+ "vue.rearranger.settings.migration": "true"}-}]]></component>+}</component><component name="ReactDesignerToolWindowState"><option name="myId2Visible"><map>@@ -87,7 +90,10 @@<option name="presentableId" value="Default" /><updated>1751977665735</updated><workItem from="1751977666787" duration="3372000" />- <workItem from="1751981060502" duration="18248000" />+ <workItem from="1751981060502" duration="18325000" />+ <workItem from="1752112076161" duration="3845000" />+ <workItem from="1752118620733" duration="566000" />+ <workItem from="1752130881346" duration="3552000" /></task><task id="LOCAL-00001" summary="feat(CalendarTiming): 优化发布记录列表展示 - 调整日历记录项的样式和布局 - 优化 RecordCore组件,添加平台图标和时间显示 - 修改 CalendarTimingItem 组件,移除不必要的 Fragment -调整 index.tsx 中的日期格式化逻辑"><option name="closed" value="true" />@@ -137,12 +143,31 @@<option name="project" value="LOCAL" /><updated>1752066983987</updated></task>- <option name="localTasksCounter" value="7" />+ <task id="LOCAL-00007" summary="fix: 修复ts报错问题">+ <option name="closed" value="true" />+ <created>1752067126597</created>+ <option name="number" value="00007" />+ <option name="presentableId" value="LOCAL-00007" />+ <option name="project" value="LOCAL" />+ <updated>1752067126597</updated>+ </task>+ <option name="localTasksCounter" value="8" /><servers /></component><component name="TypeScriptGeneratedFilesManager"><option name="version" value="3" /></component>+ <component name="Vcs.Log.Tabs.Properties">+ <option name="TAB_STATES">+ <map>+ <entry key="MAIN">+ <value>+ <State />+ </value>+ </entry>+ </map>+ </option>+ </component><component name="VcsManagerConfiguration"><option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" /><option name="CHECK_NEW_TODO" value="false" />@@ -152,6 +177,7 @@<MESSAGE value="feat: 发布记录展示添加状态展示" /><MESSAGE value="feat(发布弹框): 上传图片和上传视频完成" /><MESSAGE value="feat(发布弹框): 发布API接入完成" />- <option name="LAST_COMMIT_MESSAGE" value="feat(发布弹框): 发布API接入完成" />+ <MESSAGE value="fix: 修复ts报错问题" />+ <option name="LAST_COMMIT_MESSAGE" value="fix: 修复ts报错问题" /></component></project>\ No newline at end of filediff --git a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsxindex 1a4c64b9..2947198c 100644--- a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx+++ b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx@@ -90,7 +90,6 @@ const CalendarTimingItem = memo(/>)}</div>-{loading ? (<><Skeleton.Button active={true} block={true} size="small" />@@ -114,7 +113,6 @@ const CalendarTimingItem = memo(</div></Button>)}-{records &&records.map((v) => {return (diff --git a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsx b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsxindex dcd758db..7cedfbed 100644--- a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsx+++ b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CustomDragLayer.tsx@@ -13,7 +13,7 @@ function snapToGrid(x: number, y: number): [number, number] {const layerStyles: CSSProperties = {position: "fixed",pointerEvents: "none",- zIndex: 100,+ zIndex: 1000,left: 0,top: 0,width: "100%",@@ -63,13 +63,14 @@ export const CustomDragLayer: FC<CustomDragLayerProps> = (props) => {isDragging: monitor.isDragging(),}));- if (!isDragging) {- return null;- }return (<div style={layerStyles}><div- style={getItemStyles(initialOffset, currentOffset, props.snapToGrid)}+ style={{+ ...getItemStyles(initialOffset, currentOffset, props.snapToGrid),+ position: "relative",+ zIndex: 10001111,+ }}><BoxDragPreview publishRecord={props.publishRecord} /></div>diff --git a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scssindex 55c852bb..9a37d5cc 100644--- a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss+++ b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/recordCore.module.scss@@ -2,7 +2,8 @@display: flex !important;justify-content: space-between !important;box-sizing: border-box;- background: transparent !important;+ //background: transparent !important;+ position: fixed;padding: 0 5px !important;:global {diff --git a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scssindex 9a058e00..1a546a4d 100644--- a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss+++ b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss@@ -37,6 +37,7 @@display: flex;flex: 1;.fc-daygrid-day-number {+ z-index: auto;padding: 0;flex: 1;}