vg-print-vue2 1.0.604 → 1.0.605
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 +10 -2
- package/dist/Content/assets/hi.png +0 -0
- package/dist/css/print-lock.css +307 -0
- package/dist/favicon.ico +0 -0
- package/dist/style.css +5813 -0
- package/dist/vg-print-vue2.es.js +74268 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -267,6 +267,7 @@ hiprint.register({
|
|
|
267
267
|
|
|
268
268
|
| 配置 | 控制内容 |
|
|
269
269
|
| --- | --- |
|
|
270
|
+
| `showTemplateLibrary` | 模板中心 |
|
|
270
271
|
| `showNewTemplate` | 新建 |
|
|
271
272
|
| `showPreview` | 预览 |
|
|
272
273
|
| `showPrintView` | 浏览器打印 |
|
|
@@ -705,6 +706,12 @@ import 'vg-print-vue2/style.css'
|
|
|
705
706
|
|
|
706
707
|
环境要求:Vue 2.7、Node >= 16.14。无需单独安装 `vue-plugin-hiprint`,本库已内置并导出 `hiprint` 能力。
|
|
707
708
|
|
|
709
|
+
## 模板中心与外部模板接入
|
|
710
|
+
|
|
711
|
+
左侧模板库已迁到头部“模板中心”,左侧保留白色组件面板。业务、客户端、内置模板分别展示,支持缩略图、行业/类型筛选、搜索、分页和移动端布局。业务模板点击“使用”后调用外部详情方法;“上传当前模板到客户端”只发送已成功加载的当前画布,不批量上传摘要列表。
|
|
712
|
+
|
|
713
|
+
Vue 2 的完整接入案例、按需加载、刷新、ID 回填、客户端联动及 designerUtils 方法见 [模板中心接入文档](docs/template-center.md)。
|
|
714
|
+
|
|
708
715
|
## API(FullDesigner)
|
|
709
716
|
|
|
710
717
|
### 属性(Props,含描述)
|
|
@@ -735,7 +742,7 @@ import 'vg-print-vue2/style.css'
|
|
|
735
742
|
- `showNewTemplate: boolean` 是否显示默认“新建”按钮,默认 `true`;自定义 `headerRight` 时默认按钮组整体被替换
|
|
736
743
|
- `showToolbar: boolean` 是否显示二级工具栏 Toolbar,默认 `true`
|
|
737
744
|
- `showFooter: boolean` 是否显示底部 Footer,默认 `true`
|
|
738
|
-
- `showTemplateLibrary: boolean`
|
|
745
|
+
- `showTemplateLibrary: boolean` 是否显示头部模板中心按钮,默认 `true`;动态关闭时关闭模板中心弹窗,不影响模板加载和保存功能
|
|
739
746
|
- `show-option` 同时支持上方 Header 配置表中的所有按钮显示项:`showPreview`、`showPrintView`、`showPdf`、`showImage`、`showClientGenerate`、`showSave`、`showSaveMenu`、`showEditTemplate`、`showEditData`、`showExportTemplate`、`showImportTemplate`、`showFeedback`;均默认 `true`,支持动态修改
|
|
740
747
|
- `footer-text: string` 底部默认文案(仅在未提供 `#footer` 插槽时展示)
|
|
741
748
|
|
|
@@ -842,10 +849,11 @@ export default {
|
|
|
842
849
|
},
|
|
843
850
|
/* 设计器渲染完成后执行自定义逻辑
|
|
844
851
|
designer, // hiprint.PrintTemplate 实例
|
|
852
|
+
designerUtils, // 当前设计器的公共工具对象,详见模板中心接入文档
|
|
845
853
|
template, // 当前模板 JSON
|
|
846
854
|
source // initial / incoming / library / json
|
|
847
855
|
*/
|
|
848
|
-
onDesigned({ designer, template, source }) {
|
|
856
|
+
onDesigned({ designer, designerUtils, template, source }) {
|
|
849
857
|
// 设计器已完成首次页面渲染,可在这里执行后续操作
|
|
850
858
|
}
|
|
851
859
|
}
|
|
Binary file
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
|
|
2
|
+
@media print {
|
|
3
|
+
/* Cancel the designer viewport rule when this file is loaded by the
|
|
4
|
+
browser-print iframe. */
|
|
5
|
+
html,
|
|
6
|
+
body {
|
|
7
|
+
height: auto !important;
|
|
8
|
+
min-height: 0 !important;
|
|
9
|
+
overflow: visible !important;
|
|
10
|
+
}
|
|
11
|
+
body {
|
|
12
|
+
margin: 0px;
|
|
13
|
+
padding: 0px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@page {
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.hiprint-printPaper * {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
-moz-box-sizing: border-box; /* Firefox */
|
|
24
|
+
-webkit-box-sizing: border-box; /* Safari */
|
|
25
|
+
image-rendering: -webkit-optimize-contrast; /* 让图片/标尺稍微清楚一点 */
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hiprint-printPaper *:focus {
|
|
29
|
+
outline: -webkit-focus-ring-color auto 0px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
.hiprint-page-break-avoid {
|
|
34
|
+
page-break-after: avoid;
|
|
35
|
+
}
|
|
36
|
+
.hiprint-printPaper {
|
|
37
|
+
position: relative;
|
|
38
|
+
padding: 0 0 0 0;
|
|
39
|
+
page-break-after: always;
|
|
40
|
+
break-after: page;
|
|
41
|
+
break-inside: avoid;
|
|
42
|
+
-webkit-user-select: none; /* Chrome/Safari/Opera */
|
|
43
|
+
-moz-user-select: none; /* Firefox */
|
|
44
|
+
user-select: none;
|
|
45
|
+
overflow-x: hidden;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
}
|
|
48
|
+
.hiprint-printPaper .hiprint-printPaper-content {
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
.hiprint-printPaper.design {
|
|
52
|
+
overflow: visible;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
.hiprint-printTemplate .hiprint-printPanel {
|
|
58
|
+
page-break-after: always;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.hiprint-printPaper, hiprint-printPanel {
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
border: 0px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.hiprint-printPanel .hiprint-printPaper:last-child {
|
|
67
|
+
page-break-after: avoid;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hiprint-printTemplate .hiprint-printPanel:last-child {
|
|
71
|
+
page-break-after: avoid;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hiprint-printPaper .hideheaderLinetarget {
|
|
75
|
+
border-top: 0px dashed rgb(201, 190, 190) !important;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.hiprint-printPaper .hidefooterLinetarget {
|
|
79
|
+
border-top: 0px dashed rgb(201, 190, 190) !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.hiprint-printPaper.design {
|
|
83
|
+
border: 1px dashed rgba(170,170,170,0.7);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.design .hiprint-printElement-table-content, .design .hiprint-printElement-longText-content {
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.design .resize-panel {
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
border: 1px dotted;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.hiprint-printElement-text {
|
|
97
|
+
background-color: transparent;
|
|
98
|
+
background-repeat: repeat;
|
|
99
|
+
padding: 0 0 0 0;
|
|
100
|
+
border: 0.75pt none rgb(0,0,0);
|
|
101
|
+
direction: ltr;
|
|
102
|
+
font-family: 'SimSun';
|
|
103
|
+
font-size: 9pt;
|
|
104
|
+
font-style: normal;
|
|
105
|
+
font-weight: normal;
|
|
106
|
+
padding-bottom: 0pt;
|
|
107
|
+
padding-left: 0pt;
|
|
108
|
+
padding-right: 0pt;
|
|
109
|
+
padding-top: 0pt;
|
|
110
|
+
text-align: left;
|
|
111
|
+
text-decoration: none;
|
|
112
|
+
line-height: 9.75pt;
|
|
113
|
+
box-sizing: border-box;
|
|
114
|
+
word-wrap: break-word;
|
|
115
|
+
word-break: break-all;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.design .hiprint-printElement-text-content {
|
|
119
|
+
border: 1px dashed rgb(206, 188, 188);
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.hiprint-printElement-longText {
|
|
124
|
+
background-color: transparent;
|
|
125
|
+
background-repeat: repeat;
|
|
126
|
+
border: 0.75pt none rgb(0,0,0);
|
|
127
|
+
direction: ltr;
|
|
128
|
+
font-family: 'SimSun';
|
|
129
|
+
font-size: 9pt;
|
|
130
|
+
font-style: normal;
|
|
131
|
+
font-weight: normal;
|
|
132
|
+
padding-bottom: 0pt;
|
|
133
|
+
padding-left: 0pt;
|
|
134
|
+
padding-right: 0pt;
|
|
135
|
+
padding-top: 0pt;
|
|
136
|
+
text-align: left;
|
|
137
|
+
text-decoration: none;
|
|
138
|
+
line-height: 9.75pt;
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
word-wrap: break-word;
|
|
141
|
+
word-break: break-all;
|
|
142
|
+
/*white-space: pre-wrap*/
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
.hiprint-printElement-table {
|
|
148
|
+
background-color: transparent;
|
|
149
|
+
background-repeat: repeat;
|
|
150
|
+
color: rgb(0,0,0);
|
|
151
|
+
border-color: rgb(0,0,0);
|
|
152
|
+
border-style: none;
|
|
153
|
+
direction: ltr;
|
|
154
|
+
font-family: 'SimSun';
|
|
155
|
+
font-size: 9pt;
|
|
156
|
+
font-style: normal;
|
|
157
|
+
font-weight: normal;
|
|
158
|
+
padding-bottom: 0pt;
|
|
159
|
+
padding-left: 0pt;
|
|
160
|
+
padding-right: 0pt;
|
|
161
|
+
padding-top: 0pt;
|
|
162
|
+
text-align: left;
|
|
163
|
+
text-decoration: none;
|
|
164
|
+
padding: 0 0 0 0;
|
|
165
|
+
box-sizing: border-box;
|
|
166
|
+
line-height: 9.75pt;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.hiprint-printElement-table thead {
|
|
170
|
+
background: #e8e8e8;
|
|
171
|
+
font-weight: 700;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.hiprint-printElement-tableTarget, .hiprint-printElement-tableTarget tr, .hiprint-printElement-tableTarget td {
|
|
175
|
+
border-color: rgb(0,0,0);
|
|
176
|
+
/*border-style: none;*/
|
|
177
|
+
/*border: 1px solid rgb(0,0,0);*/
|
|
178
|
+
font-weight: normal;
|
|
179
|
+
direction: ltr;
|
|
180
|
+
padding-bottom: 0pt;
|
|
181
|
+
padding-left: 4pt;
|
|
182
|
+
padding-right: 4pt;
|
|
183
|
+
padding-top: 0pt;
|
|
184
|
+
text-decoration: none;
|
|
185
|
+
vertical-align: middle;
|
|
186
|
+
box-sizing: border-box;
|
|
187
|
+
word-wrap: break-word;
|
|
188
|
+
word-break: break-all;
|
|
189
|
+
/*line-height: 9.75pt;
|
|
190
|
+
font-size: 9pt;*/
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/*.hiprint-printElement-tableTarget tr,*/
|
|
194
|
+
.hiprint-printElement-tableTarget td {
|
|
195
|
+
height: 18pt;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* 边框样式(用于打印时保持边框) */
|
|
199
|
+
table.hiprint-printElement-tableTarget { width: 100%; }
|
|
200
|
+
.hiprint-printElement-tableTarget-border-all { border: 1px solid; }
|
|
201
|
+
.hiprint-printElement-tableTarget-border-none { border: 0px solid; }
|
|
202
|
+
.hiprint-printElement-tableTarget-border-lr { border-left: 1px solid; border-right: 1px solid; }
|
|
203
|
+
.hiprint-printElement-tableTarget-border-left { border-left: 1px solid; }
|
|
204
|
+
.hiprint-printElement-tableTarget-border-right { border-right: 1px solid; }
|
|
205
|
+
.hiprint-printElement-tableTarget-border-tb { border-top: 1px solid; border-bottom: 1px solid; }
|
|
206
|
+
.hiprint-printElement-tableTarget-border-top { border-top: 1px solid; }
|
|
207
|
+
.hiprint-printElement-tableTarget-border-bottom { border-bottom: 1px solid; }
|
|
208
|
+
.hiprint-printElement-tableTarget-border-td-none td { border: 0px solid; }
|
|
209
|
+
.hiprint-printElement-tableTarget-border-td-all td:not(:nth-last-child(-n+2)) { border-right: 1px solid; }
|
|
210
|
+
.hiprint-printElement-tableTarget-border-td-all td { border-left: 1px solid; }
|
|
211
|
+
.hiprint-printElement-tableTarget-border-td-all td:last-child:first-child { border-left: none; }
|
|
212
|
+
|
|
213
|
+
.hiprint-printPaper .hiprint-paperNumber {
|
|
214
|
+
font-size: 9pt;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.design .hiprint-printElement-table-handle {
|
|
218
|
+
position: absolute;
|
|
219
|
+
height: 12pt;
|
|
220
|
+
width: 12pt;
|
|
221
|
+
background: red;
|
|
222
|
+
z-index:1;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.hiprint-printPaper .hiprint-paperNumber-disabled {
|
|
226
|
+
float: right !important;
|
|
227
|
+
right: 0 !important;
|
|
228
|
+
color: gainsboro !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.hiprint-printElement-vline, .hiprint-printElement-hline {
|
|
232
|
+
border: 0px none rgb(0,0,0);
|
|
233
|
+
|
|
234
|
+
}
|
|
235
|
+
.hiprint-printElement-vline {
|
|
236
|
+
border-left: 0.75pt solid #000;
|
|
237
|
+
border-right: 0px none rgb(0,0,0) !important;
|
|
238
|
+
border-bottom: 0px none rgb(0,0,0) !important;
|
|
239
|
+
border-top: 0px none rgb(0,0,0) !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.hiprint-printElement-hline {
|
|
243
|
+
border-top: 0.75pt solid #000;
|
|
244
|
+
border-right: 0px none rgb(0,0,0) !important;
|
|
245
|
+
border-bottom: 0px none rgb(0,0,0) !important;
|
|
246
|
+
border-left: 0px none rgb(0,0,0) !important;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.hiprint-printElement-oval, .hiprint-printElement-rect {
|
|
250
|
+
border: 0.75pt solid #000;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.hiprint-text-content-middle {
|
|
254
|
+
display:table;
|
|
255
|
+
}
|
|
256
|
+
.hiprint-text-content-middle>div {
|
|
257
|
+
display: table-cell;
|
|
258
|
+
vertical-align:middle
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.hiprint-text-content-bottom {
|
|
262
|
+
display: table;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.hiprint-text-content-bottom > div {
|
|
266
|
+
display: table-cell;
|
|
267
|
+
vertical-align: bottom
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/*hi-grid-row */
|
|
271
|
+
.hi-grid-row {
|
|
272
|
+
position: relative;
|
|
273
|
+
height: auto;
|
|
274
|
+
margin-right: 0;
|
|
275
|
+
margin-left: 0;
|
|
276
|
+
zoom: 1;
|
|
277
|
+
display: block;
|
|
278
|
+
box-sizing: border-box;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.hi-grid-row::after, .hi-grid-row::before {
|
|
282
|
+
display: table;
|
|
283
|
+
content: '';
|
|
284
|
+
box-sizing: border-box;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.hi-grid-col {
|
|
288
|
+
display: block;
|
|
289
|
+
box-sizing: border-box;
|
|
290
|
+
position: relative;
|
|
291
|
+
float: left;
|
|
292
|
+
flex: 0 0 auto;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.table-grid-row {
|
|
296
|
+
margin-left: -0pt;
|
|
297
|
+
margin-right: -0pt;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.tableGridColumnsGutterRow {
|
|
301
|
+
padding-left: 0pt;
|
|
302
|
+
padding-right: 0pt;
|
|
303
|
+
}
|
|
304
|
+
.hiprint-gridColumnsFooter {
|
|
305
|
+
text-align: left;
|
|
306
|
+
clear: both;
|
|
307
|
+
}
|
package/dist/favicon.ico
ADDED
|
Binary file
|