mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
no message
This commit is contained in:
parent
f28bff569a
commit
96be2a86ca
6
resources/assets/js/directives/touchclick.js
vendored
6
resources/assets/js/directives/touchclick.js
vendored
@ -25,10 +25,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
end: _ => {
|
||||
end: e => {
|
||||
if (touchData.time > 0) {
|
||||
if (!touchData.move && $A.dayjs().valueOf() - touchData.time < 300) {
|
||||
binding.value();
|
||||
binding.value(e, el);
|
||||
}
|
||||
touchData.time = 0;
|
||||
}
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
} else {
|
||||
el.__clickEvent__ = e => {
|
||||
e.preventDefault();
|
||||
binding.value();
|
||||
binding.value(e, el);
|
||||
};
|
||||
el.addEventListener('click', el.__clickEvent__);
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
<div v-if="quoteUpdate" class="quote-label">{{$L('编辑消息')}}</div>
|
||||
<UserAvatar v-else :userid="quoteData.userid" :userResult="onQuoteUserResult" :show-icon="false" :show-name="true"/>
|
||||
<div class="quote-desc no-dark-content">{{$A.getMsgSimpleDesc(quoteData)}}</div>
|
||||
<i class="taskfont" v-touchclick="cancelQuote"></i>
|
||||
<i class="taskfont" v-touchclick="onTouchClick" data-action="cancel-quote"></i>
|
||||
</div>
|
||||
|
||||
<!-- 输入框 -->
|
||||
@ -227,15 +227,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul class="convert-footer" :style="recordConvertFooterStyle">
|
||||
<li @click="recordConvertIng=false">
|
||||
<li v-touchclick="onTouchClick" data-action="record-convert-cancel">
|
||||
<i class="taskfont"></i>
|
||||
<span>{{$L('取消')}}</span>
|
||||
</li>
|
||||
<li @click="convertSend('voice')">
|
||||
<li v-touchclick="onTouchClick" data-action="record-convert-voice">
|
||||
<i class="taskfont voice"></i>
|
||||
<span>{{$L('发送原语音')}}</span>
|
||||
</li>
|
||||
<li @click="convertSend('result')">
|
||||
<li v-touchclick="onTouchClick" data-action="record-convert-result">
|
||||
<i v-if="recordConvertStatus === 0" class="send"><Loading/></i>
|
||||
<i v-else-if="recordConvertStatus === 2" class="taskfont error"></i>
|
||||
<i v-else class="taskfont send"></i>
|
||||
@ -245,7 +245,7 @@
|
||||
</div>
|
||||
</transition>
|
||||
|
||||
|
||||
<!-- 全屏输入 -->
|
||||
<Modal
|
||||
v-model="fullInput"
|
||||
:mask-closable="false"
|
||||
@ -532,6 +532,7 @@ export default {
|
||||
'cacheTranscriptionLanguage',
|
||||
'cacheKeyboard',
|
||||
'keyboardType',
|
||||
'keyboardHeight',
|
||||
'isModKey',
|
||||
]),
|
||||
|
||||
@ -582,8 +583,8 @@ export default {
|
||||
},
|
||||
|
||||
recordConvertFooterStyle() {
|
||||
const {recordConvertFocus, keyboardType} = this;
|
||||
return recordConvertFocus && keyboardType === 'show' ? {
|
||||
const {recordConvertFocus, keyboardType, keyboardHeight} = this;
|
||||
return (recordConvertFocus && keyboardType === 'show' && keyboardHeight > 120) ? {
|
||||
alignItems: 'flex-start',
|
||||
transform: 'translateY(12px)'
|
||||
} : {}
|
||||
@ -1393,6 +1394,30 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
onTouchClick(e, el) {
|
||||
let action = el.getAttribute('data-action')
|
||||
if (action === "children") {
|
||||
action = e.target?.getAttribute('data-action')
|
||||
}
|
||||
switch (action) {
|
||||
case "cancel-quote":
|
||||
this.cancelQuote()
|
||||
break;
|
||||
|
||||
case "record-convert-cancel":
|
||||
this.recordConvertIng = false
|
||||
break;
|
||||
|
||||
case "record-convert-voice":
|
||||
this.convertSend('voice')
|
||||
break;
|
||||
|
||||
case "record-convert-result":
|
||||
this.convertSend('result')
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
convertRecord() {
|
||||
if (this.recordBlob === null) {
|
||||
this.recordConvertIng = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user