@open-file-viewer/core 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/index.cjs +1176 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1176 -62
- package/dist/index.js.map +1 -1
- package/dist/style.css +313 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,15 +228,15 @@ createViewer({
|
|
|
228
228
|
file,
|
|
229
229
|
toolbar: {
|
|
230
230
|
labels: {
|
|
231
|
-
download: "
|
|
232
|
-
fullscreen: "
|
|
233
|
-
search: "
|
|
231
|
+
download: "Download",
|
|
232
|
+
fullscreen: "Fullscreen",
|
|
233
|
+
search: "Search"
|
|
234
234
|
},
|
|
235
235
|
order: ["search", "download", "approve", "fullscreen"],
|
|
236
236
|
actions: [
|
|
237
237
|
{
|
|
238
238
|
id: "approve",
|
|
239
|
-
label: "
|
|
239
|
+
label: "Approve",
|
|
240
240
|
onClick(ctx) {
|
|
241
241
|
openApprovalDialog(ctx.file);
|
|
242
242
|
}
|
|
@@ -251,13 +251,13 @@ Use `toolbar.render(ctx)` when you need to replace the toolbar completely. The c
|
|
|
251
251
|
|
|
252
252
|
## Locale and Fallback Text
|
|
253
253
|
|
|
254
|
-
Fallback text defaults to
|
|
254
|
+
Fallback text defaults to English. Set `locale: "zh-CN"` for Simplified Chinese built-in loading and unsupported-file messages, or override individual strings with `messages`:
|
|
255
255
|
|
|
256
256
|
```ts
|
|
257
257
|
createViewer({
|
|
258
258
|
container: "#viewer",
|
|
259
259
|
file,
|
|
260
|
-
locale: "
|
|
260
|
+
locale: "zh-CN",
|
|
261
261
|
messages: {
|
|
262
262
|
unsupportedTitle: "No inline preview available",
|
|
263
263
|
downloadFile: "Download original file"
|