zydx-plus 1.35.620 → 1.35.622

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.35.620",
3
+ "version": "1.35.622",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -1538,11 +1538,12 @@ export default {
1538
1538
  return n[v]
1539
1539
  },
1540
1540
  readPdf: debounce(function () {
1541
+ if(Object.keys(pdfs).length === 0) return
1541
1542
  setTimeout(() => {
1542
1543
  let that = this
1543
1544
  that.mouse()
1544
1545
  that.$nextTick(() => {
1545
- pdfs[that.id].getPage(that.pageIndex).then(function (page) {
1546
+ pdfs[that.id]?.getPage(that.pageIndex).then(function (page) {
1546
1547
  that.doc = page
1547
1548
  that.viewWidth = page.view[2] - page.view[0]
1548
1549
  that.viewHeight = page.view[3] - page.view[1]
@@ -8,7 +8,7 @@ render(divNode, document.body)
8
8
  const container = divNode.el
9
9
 
10
10
  // 导出函数可通过调用 Confirm() 函数动态创建 XtxConfirm 组件
11
- const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,cancelText,closeShow, promptContent, middle, cancelShow, inputArr, countdown }) => {
11
+ const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,cancelText,closeShow, promptContent, middle, cancelShow, inputArr, countdown, components }) => {
12
12
  // 返回 Promise 对象
13
13
  return new Promise((resolve, reject) => {
14
14
  // 2. 点击确认按钮,触发resolve同时销毁组件
@@ -52,7 +52,7 @@ const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,c
52
52
  render(null, container)
53
53
  }
54
54
  // 1. 创建 XtxConfirm 组件
55
- const VNode = createVNode(XtxConfirm, { className, type, url ,title, submitText, cancelText, closeShow,promptContent,radioArr,checkboxArr, middle, cancelShow, inputArr,countdown, submit, cancel, close })
55
+ const VNode = createVNode(XtxConfirm, { className, type, url ,title, submitText, cancelText, closeShow,promptContent,radioArr,checkboxArr, middle, cancelShow, inputArr,countdown,components, submit, cancel, close })
56
56
  render(VNode, container)
57
57
  })
58
58
  }
@@ -10,6 +10,9 @@
10
10
  </div>
11
11
  <div class="tip-boxContent" ref="tip-boxContent" :style="overflowShow?'overflow-y: scroll':''">
12
12
  <div class="tap-p" ref="tapP">
13
+ <div v-if="type === 'slot'">
14
+ <component :is="components"></component>
15
+ </div>
13
16
  <div class="tip-title2" ref="tipTitle" v-if="type === 'text'"
14
17
  :style="{'text-align': (middles)? 'center': 'left', 'text-indent': indent? '2em': '0' }">
15
18
  {{ promptContent }} {{ countdown === 0 ? '' : `(${timeo}s)` }}
@@ -234,6 +237,10 @@ export default {
234
237
  type: Function,
235
238
  default: () => {
236
239
  }
240
+ },
241
+ components: { // 模版组件
242
+ type: Object,
243
+ default: () => {}
237
244
  }
238
245
  },
239
246
  mounted() {
package/src/index.js CHANGED
@@ -87,7 +87,7 @@ function install(app) {
87
87
  }
88
88
 
89
89
  export default {
90
- version: '1.35.620',
90
+ version: '1.35.622',
91
91
  install,
92
92
  Calendar,
93
93
  Message,