Skip to content

Commit b19d857

Browse files
committed
doc: 增加示例代码资源文件
1 parent 4b083a6 commit b19d857

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/BootstrapBlazor.Server/Components/Samples/Drawers.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void OpenDrawer()
5959

6060
private bool IsBodyScrollOpen { get; set; }
6161

62-
private void OpenBodyScrollDrawer() => IsKeyboardOpen = true;
62+
private void OpenBodyScrollDrawer() => IsBodyScrollOpen = true;
6363

6464
private async Task DrawerServiceShow() => await DrawerService.Show(new DrawerOption()
6565
{

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,8 @@
894894
"DrawerServiceIntro": "Open the drawer pop-up window by calling the <code>DrawerService</code> service",
895895
"IsKeyboardTitle": "ESC",
896896
"IsKeyboardIntro": "By default, the component uses the <kbd>ESC</kbd> key to close the drawer popup. You can enable this function by <code>IsKeyboard=\"true\"</code>",
897+
"BodyScrollTitle": "Body Scroll",
898+
"BodyScrollIntro": "By setting <code>BodyScroll</code>, you can control whether scrolling is allowed when the drawer pop-up window is displayed. <code>Body</code> is false by default, scrolling is not allowed",
897899
"Open": "click me to open",
898900
"Content": "The layout, components, etc. in the drawer are fully customizable",
899901
"Close": "close the drawer",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,8 @@
894894
"DrawerServiceIntro": "通过调用 <code>DrawerService</code> 服务打开抽屉弹窗",
895895
"IsKeyboardTitle": "ESC 按键支持",
896896
"IsKeyboardIntro": "组件默认使用 <kbd>ESC</kbd> 按键关闭抽屉弹窗,可通过 <code>IsKeyboard=\"true\"</code> 开启此功能",
897+
"BodyScrollTitle": "页面滚动",
898+
"BodyScrollIntro": "通过设置 <code>BodyScroll</code> 控制抽屉弹窗显示时是否允许滚动 <code>Body</code> 默认 false 不允许滚动",
897899
"Open": "点我打开",
898900
"Content": "抽屉内布局、组件等完全可以自定义",
899901
"Close": "关闭抽屉",

src/BootstrapBlazor/Components/Drawer/Drawer.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export function execute(id, open) {
122122
if (open) {
123123
el.classList.add('show')
124124

125-
const scroll = el.getAttribute('bb-drawer-scroll') === "true";
125+
const scroll = el.getAttribute('data-bb-scroll') === "true";
126126
if (scroll === false) {
127127
body.classList.add('drawer-overflow-hidden');
128128
}

0 commit comments

Comments
 (0)