zydx-plus 1.32.268 → 1.32.270

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.32.268",
3
+ "version": "1.32.270",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -647,7 +647,7 @@ let buttonNames = {
647
647
  lowLevel: {
648
648
  default: "setTask",
649
649
  setTask: '布置任务',
650
- groupStudy: '小组学习',
650
+ // groupStudy: '小组学习',
651
651
  duplicate: '违纪查重',
652
652
  teacherReview: '教师评价',
653
653
  studentReview: '同学互评',
@@ -215,6 +215,7 @@ li{list-style-type:none;}
215
215
  text-align: center;
216
216
  height: 34px;
217
217
  box-sizing: border-box;
218
+ line-height: 34px;
218
219
  }
219
220
 
220
221
  .calendar-day-6-7{
@@ -148,7 +148,7 @@ export default {
148
148
  */
149
149
  showLunar: {
150
150
  type: Boolean,
151
- default: true
151
+ default: false
152
152
  },
153
153
  /**
154
154
  * @description 设置标记范围
@@ -208,15 +208,15 @@ export default {
208
208
  firstRangeSelected: false, // 范围开始时间是否已经选择
209
209
  rangeStart_: undefined, //标记范围开始,yyyyMM-dd
210
210
  rangeEnd_: undefined, //标记范围结束,yyyyMM-dd
211
- transform_x:0,
212
- transform_time:0,
213
- cleDate: '00:00',
214
- cleFocusShow: false,
215
- transHour: 0,
216
- transMinute: 0,
217
- hour: '00',
218
- minute: '00',
219
- dayChange: undefined,
211
+ transform_x:0, // 顶部日期选择器的偏移量
212
+ transform_time:0, // 顶部时间选择器的偏移量
213
+ cleDate: '00:00', //时间选择器的时间
214
+ cleFocusShow: false, // 是否显示时间选择器
215
+ transHour: 0, // 小时选择器的偏移量
216
+ transMinute: 0, // 分钟选择器的偏移量
217
+ hour: '00', // 选择的小时
218
+ minute: '00', // 选择的分钟
219
+ dayChange: undefined, // 选择的日期
220
220
  };
221
221
  },
222
222
  methods: {
@@ -657,4 +657,8 @@ export default {
657
657
  width: 100%;
658
658
  height: 100%;
659
659
  }
660
+ :deep(.custom-select){
661
+ width: 94px;
662
+ margin-left: -40px;
663
+ }
660
664
  </style>
@@ -18,6 +18,9 @@
18
18
  </div>
19
19
  </div>
20
20
  </div>
21
+ <div class="tool-list" @click.stop="mouse">
22
+ <img src="./img/shubiao.png" alt=""/>
23
+ </div>
21
24
  <div class="tool-list" @click.stop="brush">
22
25
  <img src="./img/huabi.png" alt=""/>
23
26
  </div>
@@ -31,9 +34,9 @@
31
34
  <span>字号</span>
32
35
  <em style="font-size: 13px;" v-for="(item,index) in textData" @click.stop="sizeTap(item)">{{ item }}</em>
33
36
  </div>
34
- <div class="set-list">
37
+ <div class="set-list" @click.stop="textInputTap">
35
38
  <span>内容</span>
36
- <input type="text" v-model="text" @click.stop="false"/>
39
+ <input ref="textInput" type="text" v-model="text"/>
37
40
  </div>
38
41
  <div class="set-list set-right">
39
42
  <button class="but" @click="textBox">确认</button>
@@ -123,8 +126,10 @@ export default {
123
126
  this.init()
124
127
  }, 0)
125
128
  window.addEventListener('keydown', this.handleKeyEvent)
126
- this.offLeft = this.$refs.sketchpad.offsetLeft
127
- this.offTop = this.$refs.sketchpad.offsetTop
129
+ const ids = this.$refs.sketchpad.getBoundingClientRect()
130
+ const bodyWidth = (document.documentElement.clientWidth - this.$refs.sketchpad.offsetLeft - ids.width) / 2
131
+ this.offLeft = this.$refs.sketchpad.offsetLeft + bodyWidth
132
+ this.offTop = ids.top
128
133
  // 监听滚动
129
134
  this.throttleHandleScroll()
130
135
  window.addEventListener('scroll', this.throttleHandleScroll);
@@ -141,6 +146,13 @@ export default {
141
146
  window.removeEventListener('keydown', this.handleKeyEvent)
142
147
  },
143
148
  methods: {
149
+ mouse() {
150
+ this.state = null
151
+ this.canvas.isDrawingMode = false
152
+ },
153
+ textInputTap() {
154
+ this.$refs.textInput.focus()
155
+ },
144
156
  throttleHandleScroll() {
145
157
  this.scrollTop = document.documentElement.scrollTop || document.body.scrollTop
146
158
  },
@@ -221,7 +233,7 @@ export default {
221
233
 
222
234
  this.canvas.on('mouse:up', (o) => {
223
235
  this.isDown = false
224
- this.line.setCoords()
236
+ this.line?.setCoords()
225
237
  })
226
238
  },
227
239
  // 矩形
@@ -269,7 +281,7 @@ export default {
269
281
  })
270
282
  this.canvas.on('mouse:up', (o) => {
271
283
  this.isDown = false
272
- this.rect.setCoords()
284
+ this.rect?.setCoords()
273
285
  })
274
286
  },
275
287
  // 圆形
@@ -325,7 +337,7 @@ export default {
325
337
  })
326
338
  this.canvas.on('mouse:up', () => {
327
339
  this.isDown = false
328
- this.circle.setCoords()
340
+ this.circle?.setCoords()
329
341
  })
330
342
  },
331
343
  // 箭头
@@ -377,7 +389,6 @@ export default {
377
389
  this.canvas.add(this.textbox)
378
390
  },
379
391
  save() {
380
- console.log(this.canvas.toJSON())
381
392
  this.$emit('save', this.canvas.toJSON())
382
393
  },
383
394
  clear() {
@@ -114,6 +114,7 @@ export default {
114
114
  line-height: 26px;
115
115
  color: #333;
116
116
  font-size: 14px;
117
+ user-select: none;
117
118
  }
118
119
 
119
120
  .tabs-li:hover {
@@ -200,6 +200,7 @@ export default {
200
200
  box-shadow: 0 0 5px rgba(0, 0, 0, .12);
201
201
  overflow: hidden;
202
202
  user-select: none;
203
+ z-index: 20;
203
204
  }
204
205
 
205
206
  .time-but {
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.268',
82
+ version: '1.32.270',
83
83
  install,
84
84
  Calendar,
85
85
  Message,