zydx-plus 1.30.159 → 1.30.160

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.30.159",
3
+ "version": "1.30.160",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -5,7 +5,7 @@
5
5
  <button class="def-but" v-if="butShow" @click="confirm">完成</button>
6
6
  </div>
7
7
  <div class="read-only" v-if="readOnly">
8
- <div class="read-only-page" :style="{height: !page? 'auto': '1123px','box-shadow': !page? 'none': '0 0 10px rgba(0, 0, 0, 0.1)', 'padding': !page? '10px':'60px'}" v-for="(item,index) in htmlArr" >
8
+ <div class="read-only-page" :style="{width: !page? '100%': '794px',height: !page? 'auto': '1123px','box-shadow': !page? 'none': '0 0 10px rgba(0, 0, 0, 0.1)', 'padding': !page? '10px':'60px'}" v-for="(item,index) in htmlArr" >
9
9
  <div class="read-only-p" v-html="item"></div>
10
10
  <div v-if="page" class="read-only-a">{{ index + 1 }}/{{ htmlArr.length }}</div>
11
11
  </div>
@@ -100,20 +100,6 @@ export default defineComponent({
100
100
  if(e) this.readOnlyPage()
101
101
  },
102
102
  deep: true
103
- },
104
- page: {
105
- handler: function (e, oldVal) {
106
- if(!e) {
107
- setTimeout(() => {
108
- const data = document.querySelectorAll('.w-e-scroll')[0].childNodes[0].childNodes
109
- for (let i = 0; i < data.length; i++) {
110
- this.htmlArr.push(data[i].outerHTML)
111
- }
112
- },10)
113
- }
114
- },
115
- deep: true,
116
- immediate: true
117
103
  }
118
104
  },
119
105
  mounted() {
@@ -126,6 +112,13 @@ export default defineComponent({
126
112
  let max = 1123
127
113
  let pHeight = 0
128
114
  let html = ''
115
+ if(!this.page) {
116
+ for (let i = 0; i < data.length; i++) {
117
+ html += data[i].outerHTML
118
+ }
119
+ this.htmlArr.push(html)
120
+ return
121
+ }
129
122
  for (let i = 0; i < data.length; i++) {
130
123
  let text = data[i].offsetHeight
131
124
  if((pHeight + text) > max) {
@@ -225,7 +218,6 @@ export default defineComponent({
225
218
  text-align: right;
226
219
  }
227
220
  .read-only-page{
228
- width: 794px;
229
221
  margin: 0 auto 20px auto;
230
222
  background-color: #fff;
231
223
  box-sizing: border-box;
package/src/index.js CHANGED
@@ -71,7 +71,7 @@ function install(app) {
71
71
  }
72
72
 
73
73
  export default {
74
- version: '1.30.159',
74
+ version: '1.30.160',
75
75
  install,
76
76
  Calendar,
77
77
  Message,