Skip to content

Commit 7218f1c

Browse files
committed
fix:修复模板字符串问题
1 parent fa48195 commit 7218f1c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const createStr = (codeBlock: Record<string | number, CodeBlockItemType>) => {
5656
const { code, value, language, name } = item;
5757
baseCodeStr += `${code};\n`;
5858
baseCodeObjStr += `${name}:BaseCode${key},\n`;
59-
codeBlockValue += `${name}:\`${value}\`,\n`;
59+
codeBlockValue += `${name}:${JSON.stringify(value)},\n`;
6060
languageStr += `${name}:\`${language}\`,\n`;
6161
});
6262
let indexStr = `${baseCodeStr} const languages={${languageStr}};\n const codeBlock={${codeBlockValue}};\n const components={${baseCodeObjStr}}`;

website/src/pages/example/App.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Demo extends React.Component {
6060
</Alert>
6161
<ButtonGroup>
6262
<Button onClick={this.onClick.bind(this, "visible1")}>
63-
单个按钮确认对话框
63+
{`单个按钮确认对话框`}
6464
</Button>
6565
<Button onClick={this.onClick.bind(this, "visible2")}>
6666
确认对话框

0 commit comments

Comments
 (0)