zydx-plus 1.33.426 → 1.33.428

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.33.426",
3
+ "version": "1.33.428",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -146,7 +146,7 @@ export default {
146
146
  this.styleProps('text', 'color').defaultValue = v?.color ?? 'black'
147
147
  this.styleProps('text', 'size').defaultValue = v?.size ?? 'm'
148
148
  this.styleProps('text', 'font').defaultValue = v?.font ?? 'draw' //['draw', 'sans', 'serif', 'mono']
149
- this.styleProps('text', 'align').defaultValue = v?.align ?? 'start'
149
+ // this.styleProps('text', 'align').defaultValue = v?.align ?? 'start'
150
150
  editorAPP.setCurrentTool('text')
151
151
  },
152
152
  note(v) {
@@ -13,7 +13,7 @@ export default {
13
13
  data() {
14
14
  return {
15
15
  actives: 0,
16
- heiStart: false,
16
+ heiStart: true,
17
17
  id: null
18
18
  }
19
19
  },
@@ -113,6 +113,12 @@
113
113
  </div>
114
114
  </div>
115
115
  </div>
116
+ <div class="ph-code" v-if="item.type === 'cover'">
117
+ <div class="cover-img" @click="uploadImg(index)">
118
+ <img v-if="item.url" :src="item.url" alt=""/>
119
+ <div v-else>暂无封面</div>
120
+ </div>
121
+ </div>
116
122
  <p v-if="item.text" class="prompt">{{ item.text }}</p>
117
123
  </div>
118
124
  </div>
@@ -237,6 +243,21 @@ export default {
237
243
  clearInterval(timeStop)
238
244
  },
239
245
  methods: {
246
+ uploadImg(index){
247
+ let that = this
248
+ const inputUpload = document.createElement('input')
249
+ inputUpload.type = 'file'
250
+ inputUpload.multiple = false
251
+ inputUpload.accept = 'image/*'
252
+ inputUpload.addEventListener('change', (ev) => {
253
+ const files= Object.keys(ev.target.files).map(i=>ev.target.files[i])
254
+ that.inputArr[index].value = files[0]
255
+ that.inputArr[index].url = URL.createObjectURL(files[0])
256
+ console.log('inputArr',that.inputArr[index])
257
+ that.$forceUpdate()
258
+ })
259
+ inputUpload.click()
260
+ },
240
261
  dropTap(e,v) {
241
262
  e.value = v[e.column]
242
263
  this.dropData = []
@@ -327,6 +348,30 @@ export default {
327
348
  :deep(.text) {
328
349
  padding:0 10px;
329
350
  }
351
+ .cover-img{
352
+ width: 300px;
353
+ height: 260px;
354
+ border-radius: 3px;
355
+ padding: 10px;
356
+ background: rgba(252, 252, 252, 1);
357
+ display: flex;
358
+ justify-content: center;
359
+ align-items: center;
360
+ }
361
+ .cover-img>img{
362
+ width: 170px;
363
+ height: 240px;
364
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
365
+ }
366
+ .cover-img>div{
367
+ color: #666;
368
+ }
369
+ :deep(.tip-boxContent){
370
+ overflow-y: scroll;
371
+ }
372
+ :deep(.tip-boxContent)::-webkit-scrollbar{
373
+ width: 0;
374
+ }
330
375
  </style>
331
376
 
332
377
  <style scoped src="./zydxStyle.css">
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.426',
86
+ version: '1.33.428',
87
87
  install,
88
88
  Calendar,
89
89
  Message,