askbot-dragon 1.3.11 → 1.3.12

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": "askbot-dragon",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="answer-voice">
2
+ <div :style="{ width: boxWidth + 'px' }" class="answer-voice">
3
3
  <audio :id="'audioTagCom_' + msg.id" :src="msg.content.url"></audio>
4
4
  <div class="audiocon">
5
5
  <!-- 按钮 -->
@@ -41,6 +41,7 @@ export default {
41
41
  allTime: 0,
42
42
  otherTime: 0,
43
43
  durationNum: 0,
44
+ boxWidth: 200
44
45
  }
45
46
  },
46
47
  watch: {
@@ -59,11 +60,21 @@ export default {
59
60
  this.durationNum = this.activeAudio.duration;
60
61
  console.log(this.activeAudio.duration);
61
62
  this.allTime = this.transTime(this.activeAudio.duration);
63
+ if (this.activeAudio.duration >= 60) {
64
+ this.boxWidth = 240;
65
+ } else {
66
+ this.boxWidth = 160 + this.activeAudio.duration;
67
+ }
62
68
  this._$(`#audioTagCom_${this.msg.id}`).on("loadedmetadata", (e) => {
63
69
  console.log(e.currentTarget);
64
70
  this.time = "00:00";
65
71
  console.log(e.currentTarget.duration);
66
72
  this.allTime = this.transTime(e.currentTarget.duration);
73
+ if (this.activeAudio.duration >= 60) {
74
+ this.boxWidth = 240;
75
+ } else {
76
+ this.boxWidth = 160 + this.activeAudio.duration;
77
+ }
67
78
  this.durationNum = e.currentTarget.duration;
68
79
  this.otherTime = this.transTime(this.activeAudio.duration);
69
80
  // this.activeAudio.play();
@@ -158,7 +169,9 @@ export default {
158
169
  </script>
159
170
  <style scoped lang="less">
160
171
  .answer-voice {
172
+ width: 100%;
161
173
  padding: 4px 0;
174
+ // min-width: 240px;
162
175
 
163
176
  .audiocon {
164
177
  display: flex;
@@ -226,7 +239,7 @@ export default {
226
239
  position: absolute;
227
240
  height: 4px;
228
241
  top: 50%;
229
- left: 0px;
242
+ left: 5px;
230
243
  transform: translateY(-50%);
231
244
  background-color: #366AFF;
232
245
 
@@ -234,7 +247,7 @@ export default {
234
247
  content: "";
235
248
  position: absolute;
236
249
  top: -4px;
237
- right: -3px;
250
+ right: -6px;
238
251
  width: 5px;
239
252
  height: 5px;
240
253
  border-radius: 50%;