Skip to content

Commit 6dc4c42

Browse files
author
ex_likx5
committed
add z-index
1 parent 24e61b3 commit 6dc4c42

File tree

10 files changed

+34
-28
lines changed

10 files changed

+34
-28
lines changed

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -322,23 +322,24 @@ Finally, use `reslove()` to return your URL
322322

323323
## v-print API
324324

325-
| Parame | Explain | Type | OptionalValue | DefaultValue |
326-
| ------------------------- | ------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ------------ |
327-
| id | Range print ID, required value | String |||
328-
| standard | Document type (Print local range only) | String | html5/loose/strict | html5 |
329-
| extraHead | `<head></head>`Add DOM nodes in the node, and separate multiple nodes with `,` (Print local range only) | String |||
330-
| extraCss | `<link>` New CSS style sheet , and separate multiple nodes with `,`(Print local range only) | String || - |
331-
| popTitle | `<title></title>` Content of label (Print local range only) | String || - |
332-
| openCallback | Call the successful callback function of the printing tool | Function | Returns the instance of `Vue` called at that time | - |
333-
| closeCallback | Close the callback function of printing tool success | Function | Returns the instance of `Vue` called at that time | - |
334-
| beforeOpenCallback | Callback function before calling printing tool | Function | Returns the instance of `Vue` called at that time | - |
335-
| url | Print the specified URL. (It is not allowed to set the ID at the same time) | string | - | - |
336-
| asyncUrl | Return URL through 'resolve()' and Vue | Function | - | - |
337-
| preview | Preview tool | Boolean | - | false |
338-
| previewTitle | Preview tool Title | String | - | '打印预览' |
339-
| previewPrintBtnLabel | The name of the preview tool button | String | - | '打印' |
340-
| previewBeforeOpenCallback | Callback function before starting preview tool | Function | Returns the instance of `Vue` | - |
341-
| previewOpenCallback | Callback function after fully opening preview tool | Function | Returns the instance of `Vue` | - |
325+
| Parame | Explain | Type | OptionalValue | DefaultValue |
326+
| ------------------------- | ------------------------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------- | ------------ |
327+
| id | Range print ID, required value | String |||
328+
| standard | Document type (Print local range only) | String | html5/loose/strict | html5 |
329+
| extraHead | `<head></head>`Add DOM nodes in the node, and separate multiple nodes with `,` (Print local range only) | String |||
330+
| extraCss | `<link>` New CSS style sheet , and separate multiple nodes with `,`(Print local range only) | String || - |
331+
| popTitle | `<title></title>` Content of label (Print local range only) | String || - |
332+
| openCallback | Call the successful callback function of the printing tool | Function | Returns the instance of `Vue` called at that time | - |
333+
| closeCallback | Close the callback function of printing tool success | Function | Returns the instance of `Vue` called at that time | - |
334+
| beforeOpenCallback | Callback function before calling printing tool | Function | Returns the instance of `Vue` called at that time | - |
335+
| url | Print the specified URL. (It is not allowed to set the ID at the same time) | string | - | - |
336+
| asyncUrl | Return URL through 'resolve()' and Vue | Function | - | - |
337+
| preview | Preview tool | Boolean | - | false |
338+
| previewTitle | Preview tool Title | String | - | '打印预览' |
339+
| previewPrintBtnLabel | The name of the preview tool button | String | - | '打印' |
340+
| zIndex | CSS of preview tool: z-index | String,Number | - | 20002 |
341+
| previewBeforeOpenCallback | Callback function before starting preview tool | Function | Returns the instance of `Vue` | - |
342+
| previewOpenCallback | Callback function after fully opening preview tool | Function | Returns the instance of `Vue` | - |
342343

343344

344345

lib/print.common.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/print.common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/print.umd.js

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/print.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/print.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/print.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-print-nb",
3-
"version": "1.7.1",
3+
"version": "1.7.2",
44
"description": "Vue plug-in, print! Good!",
55
"main": "lib/print.umd.min.js",
66
"author": "Power-kxLee",

print/packages/print.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: lee
33
* @Date: 2021-05-10 11:45:50
44
* @LastEditors: lee
5-
* @LastEditTime: 2021-05-14 10:13:41
5+
* @LastEditTime: 2021-05-14 10:29:32
66
* @Description: file content
77
*/
88
import Print from './printarea.js';
@@ -46,6 +46,7 @@ export default {
4646
previewTitle: binding.value.previewTitle || '打印预览', // 打印预览的标题
4747
previewPrintBtnLabel: binding.value.previewPrintBtnLabel || '打印', // 打印预览的标题
4848
popTitle: binding.value.popTitle, // title的标题
49+
zIndex: binding.value.zIndex || 20002, // 预览窗口的z-index
4950
preview: binding.value.preview || false, // 是否启动预览模式
5051
asyncUrl: binding.value.asyncUrl,
5152
previewBeforeOpenCallback () { // 预览窗口打开之前的callback

print/packages/printarea.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export default class {
296296
}
297297
let previewContent = document.createElement('div');
298298
previewContent.setAttribute('id', "vue-pirnt-nb-previewBox")
299-
previewContent.setAttribute('style', 'position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none')
299+
previewContent.setAttribute(`style', 'position: fixed;top: 0px;left: 0px;width: 100%;height: 100%;background: white;display:none;z-index: ${this.settings.zIndex};`)
300300
// 打印预览弹窗的header
301301
let previewHeader = document.createElement('div');
302302
previewHeader.setAttribute('class', "previewHeader")

0 commit comments

Comments
 (0)