Skip to content

Commit 6b2a074

Browse files
committed
refactor: 移动样式兼容 wasm 模式
1 parent b6b7001 commit 6b2a074

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (pdfjsLib != null) {
99
}
1010

1111
export async function init(id, invoke, options) {
12-
await addLink('./_content/BootstrapBlazor.PdfReader/css/pdf_viewer.css');
12+
await addLink('./_content/BootstrapBlazor.PdfReader/css/pdf_reader.css');
1313

1414
const el = document.getElementById(id);
1515
if (el === null) {

src/components/BootstrapBlazor.PdfReader/PdfReader.razor.css renamed to src/components/BootstrapBlazor.PdfReader/wwwroot/css/pdf_reader.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import url('pdf_viewer.css');
2+
13
.bb-pdf-reader {
24
--bb-pdf-view-height: 600px;
35
--bb-pdf-toolbar-height: 60px;
@@ -163,20 +165,20 @@
163165
flex-basis: 300px;
164166
}
165167

166-
::deep .bb-view-thumbnail-item {
168+
.bb-view-thumbnail-item {
167169
display: block;
168170
text-align: center;
169171
}
170172

171-
::deep .bb-view-thumbnail-item:not(:last-child) {
173+
.bb-view-thumbnail-item:not(:last-child) {
172174
margin-block-end: 1rem;
173175
}
174176

175-
::deep .bb-view-thumbnail-item.active img {
177+
.bb-view-thumbnail-item.active img {
176178
border: 2px solid #0d6efd;
177179
}
178180

179-
::deep .bb-view-thumbnail-item img {
181+
.bb-view-thumbnail-item img {
180182
width: 128px;
181183
padding: 1px;
182184
cursor: pointer;
@@ -185,13 +187,13 @@
185187
margin: 0 auto;
186188
}
187189

188-
::deep .bb-view-thumbnail-item .bb-view-thumbnail-group {
190+
.bb-view-thumbnail-item .bb-view-thumbnail-group {
189191
display: flex;
190192
flex-direction: column;
191193
justify-content: center;
192194
}
193195

194-
::deep .bb-view-thumbnail-item .bb-view-thumbnail-group label {
196+
.bb-view-thumbnail-item .bb-view-thumbnail-group label {
195197
color: #fff;
196198
}
197199

0 commit comments

Comments
 (0)