浏览代码

docs: update darkmode demo comment

pointhalo 3 年之前
父节点
当前提交
ab23788fe5
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      content/start/dark-mode/index.md

+ 2 - 2
content/start/dark-mode/index.md

@@ -32,7 +32,7 @@ function Demo() {
         const body = document.body;
         if (body.hasAttribute('theme-mode')) {
             body.removeAttribute('theme-mode');
-            // 通知官网更新当前模式,下同
+            // 以下这行代码,window.setMode仅用于当你通过本Demo切换时,通知Semi官网Header记录更新当前模式(只用于演示)。在您的代码里无需存在。
             window.setMode('light');
         } else {
             body.setAttribute('theme-mode', 'dark');
@@ -322,4 +322,4 @@ import { IconSemiLogo, IconBell, IconHelpCircle, IconBytedanceLogo, IconHome, Ic
     );
 };
 
-```
+```