perf: 优化录音效果

This commit is contained in:
kuaifan 2022-06-10 10:30:40 +08:00
parent dbb1033911
commit eaabc5852c
4 changed files with 8 additions and 8 deletions

View File

@ -297,11 +297,11 @@ export default {
boxClass() { boxClass() {
const array = []; const array = [];
if (this.recordState === 'ing') { if (['ready', 'ing'].includes(this.recordState)) {
if (this.recordDuration === 0) { if (this.recordState === 'ing' && this.recordDuration > 0) {
array.push('record-ing');
} else {
array.push('record-progress'); array.push('record-progress');
} else {
array.push('record-ready');
} }
} }
if (this.showMore) { if (this.showMore) {

View File

@ -413,7 +413,7 @@ export default {
wrapperClass() { wrapperClass() {
if (['ready', 'ing'].includes(this.recordState)) { if (['ready', 'ing'].includes(this.recordState)) {
return ['record-ing'] return ['record-ready']
} }
return null return null
}, },

View File

@ -5,13 +5,13 @@
display: inline-block; display: inline-block;
width: 100%; width: 100%;
&.record-ing { &.record-ready {
.chat-input-wrapper { .chat-input-wrapper {
.chat-toolbar { .chat-toolbar {
> li { > li {
&.chat-send { &.chat-send {
&:before { &:before {
transition: all 1s ease; transition: all 0.6s ease;
transform: translate(-50%, -50%) scale(2); transform: translate(-50%, -50%) scale(2);
} }
} }

View File

@ -9,7 +9,7 @@
background-color: #ffffff; background-color: #ffffff;
z-index: 1; z-index: 1;
&.record-ing { &.record-ready {
overflow: hidden; overflow: hidden;
} }