vg-print 1.0.349 → 1.0.350
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 +4 -1
- package/dist/style.css +1 -1
- package/dist/vg-print.es.js +6731 -6717
- package/dist/vg-print.umd.js +171 -171
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -166,6 +166,7 @@ const onSaveDirect = () => designer.value?.save()
|
|
|
166
166
|
- `showPrint2: boolean` 是否显示“直接打印”按钮,默认 `true`
|
|
167
167
|
- `modalShow: boolean` 弹窗显隐(支持 `v-model:modalShow`)
|
|
168
168
|
- `width: string | number` 弹窗宽度(默认 `'80%'`)
|
|
169
|
+
- `defaultLang: string` 组件内 i18n 语言(Standalone 时使用);支持 `cn`、`en`、`de`、`es`、`fr`、`it`、`ja`、`ru`、`cn_tw`;默认 `cn`
|
|
169
170
|
|
|
170
171
|
### 事件(Emits)
|
|
171
172
|
|
|
@@ -184,10 +185,11 @@ const onSaveDirect = () => designer.value?.save()
|
|
|
184
185
|
|
|
185
186
|
```vue
|
|
186
187
|
<template>
|
|
187
|
-
<el-button @click="openPreview">显示预览</el
|
|
188
|
+
<el-button @click="openPreview">显示预览</el按钮>
|
|
188
189
|
<Preview
|
|
189
190
|
ref="previewRef"
|
|
190
191
|
v-model:modalShow="visible"
|
|
192
|
+
default-lang="cn"
|
|
191
193
|
:printerList="printers"
|
|
192
194
|
:selectedPrinter="printer"
|
|
193
195
|
@update:selectedPrinter="printer = $event"
|
|
@@ -242,6 +244,7 @@ const showCustomPreview = () => {
|
|
|
242
244
|
|
|
243
245
|
- 使用组件库时请引入 `vg-print/style.css`,其中包含自定义图标字体与预览/设计样式。
|
|
244
246
|
- `Preview` 内部会根据 `printTemplate` 与 `printData` 自动渲染内容;也支持通过 `show(...)` 主动传入。
|
|
247
|
+
- 若在外部项目未安装插件(未执行 `app.use(vgPrint)`)而单独使用 `Preview`,请通过 `default-lang` 显式设置语言;安装插件时无需设置,语言默认随全局 i18n。
|
|
245
248
|
|
|
246
249
|
|
|
247
250
|
样式引入(确保设计与打印样式生效):
|