askbot-dragon 1.3.1 → 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.01",
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
  <!-- 按钮 -->
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  </div>
19
19
  <div class="time">
20
- <span>{{otherTime }}</span>
20
+ <span>{{ otherTime }}</span>
21
21
  </div>
22
22
  <!-- <div class="time">
23
23
  <span>{{ allTime }}</span>
@@ -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,10 @@ 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;
175
+
162
176
  .audiocon {
163
177
  display: flex;
164
178
  align-items: center;
@@ -169,11 +183,12 @@ export default {
169
183
 
170
184
  .leftBtn {
171
185
  width: 30px;
172
- margin-right: 10px;
186
+
173
187
  span {
174
188
  i {
175
- font-size: 30px;
189
+ font-size: 28px;
176
190
  color: #ADC0F6;
191
+ line-height: 32px;
177
192
  }
178
193
  }
179
194
  }
@@ -188,7 +203,7 @@ export default {
188
203
  margin-left: 16px;
189
204
 
190
205
  .bar {
191
- width: calc(100% - 60px);
206
+ width: calc(100% - 20px);
192
207
  position: relative;
193
208
  height: 30px;
194
209
  display: flex;
@@ -199,7 +214,7 @@ export default {
199
214
  top: 0;
200
215
  left: 0px;
201
216
  z-index: 10;
202
- width: 96%;
217
+ width: 98%;
203
218
  height: 30px;
204
219
  cursor: pointer;
205
220
 
@@ -224,7 +239,7 @@ export default {
224
239
  position: absolute;
225
240
  height: 4px;
226
241
  top: 50%;
227
- left: 0px;
242
+ left: 5px;
228
243
  transform: translateY(-50%);
229
244
  background-color: #366AFF;
230
245
 
@@ -232,7 +247,7 @@ export default {
232
247
  content: "";
233
248
  position: absolute;
234
249
  top: -4px;
235
- right: -3px;
250
+ right: -6px;
236
251
  width: 5px;
237
252
  height: 5px;
238
253
  border-radius: 50%;