|
@ -2,7 +2,7 @@ |
|
|
import pinyinDict from 'libs/pinyinDict.json' |
|
|
import pinyinDict from 'libs/pinyinDict.json' |
|
|
import { useDeviceStore } from 'stores/deviceStore' |
|
|
import { useDeviceStore } from 'stores/deviceStore' |
|
|
import type { Ref } from 'vue' |
|
|
import type { Ref } from 'vue' |
|
|
import { computed, defineEmits, defineProps, onMounted, ref, watch, watchEffect } from 'vue' |
|
|
|
|
|
|
|
|
import { computed, onMounted, ref, watch, watchEffect } from 'vue' |
|
|
|
|
|
|
|
|
const props = defineProps<{ |
|
|
const props = defineProps<{ |
|
|
modelValue: string |
|
|
modelValue: string |
|
@ -50,12 +50,15 @@ watchEffect(() => { |
|
|
inputValue.value = props.modelValue |
|
|
inputValue.value = props.modelValue |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
watch(() => props.isVisible, (newVal) => { |
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
|
() => props.isVisible, |
|
|
|
|
|
(newVal) => { |
|
|
console.log('deviceStete.deviceType--2-', deviceStete.isLowCost) |
|
|
console.log('deviceStete.deviceType--2-', deviceStete.isLowCost) |
|
|
if (!deviceStete.isLowCost) { |
|
|
if (!deviceStete.isLowCost) { |
|
|
isOpen.value = newVal |
|
|
isOpen.value = newVal |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
const activeKey = ref('') |
|
|
const activeKey = ref('') |
|
|
const keyboardLayout = computed(() => { |
|
|
const keyboardLayout = computed(() => { |
|
@ -207,7 +210,12 @@ const handleTouchEnd = () => { |
|
|
v-for="(cnName, cnIndex) in cnList" |
|
|
v-for="(cnName, cnIndex) in cnList" |
|
|
:key="cnIndex" |
|
|
:key="cnIndex" |
|
|
class="cn-name" |
|
|
class="cn-name" |
|
|
@click="(e) => { e.stopPropagation(); handleKeyCn(cnName) }" |
|
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
e => { |
|
|
|
|
|
e.stopPropagation(); |
|
|
|
|
|
handleKeyCn(cnName); |
|
|
|
|
|
} |
|
|
|
|
|
" |
|
|
> |
|
|
> |
|
|
{{ cnName }} |
|
|
{{ cnName }} |
|
|
</div> |
|
|
</div> |
|
@ -225,12 +233,28 @@ const handleTouchEnd = () => { |
|
|
'key-text': key !== ' ' && keyboardType === 'text', |
|
|
'key-text': key !== ' ' && keyboardType === 'text', |
|
|
}" |
|
|
}" |
|
|
:style="keyboardType === 'number' ? 'height: 10vh' : 'height:3rem;'" |
|
|
:style="keyboardType === 'number' ? 'height: 10vh' : 'height:3rem;'" |
|
|
@click="(e) => { |
|
|
|
|
|
e.stopPropagation() |
|
|
|
|
|
handleKeyPress(key) |
|
|
|
|
|
}" |
|
|
|
|
|
|
|
|
@click=" |
|
|
|
|
|
e => { |
|
|
|
|
|
e.stopPropagation(); |
|
|
|
|
|
handleKeyPress(key); |
|
|
|
|
|
} |
|
|
|
|
|
" |
|
|
> |
|
|
> |
|
|
{{ key === ' ' ? '空格' : key === 'del' ? '删除' : key === 'enter' ? '确认' : key === 'close' ? '关闭' : key === 'cn' ? '英文' : key === 'en' ? '拼音' : key }} |
|
|
|
|
|
|
|
|
{{ |
|
|
|
|
|
key === ' ' |
|
|
|
|
|
? '空格' |
|
|
|
|
|
: key === 'del' |
|
|
|
|
|
? '删除' |
|
|
|
|
|
: key === 'enter' |
|
|
|
|
|
? '确认' |
|
|
|
|
|
: key === 'close' |
|
|
|
|
|
? '关闭' |
|
|
|
|
|
: key === 'cn' |
|
|
|
|
|
? '英文' |
|
|
|
|
|
: key === 'en' |
|
|
|
|
|
? '拼音' |
|
|
|
|
|
: key |
|
|
|
|
|
}} |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -321,7 +345,7 @@ const handleTouchEnd = () => { |
|
|
|
|
|
|
|
|
.key-space { |
|
|
.key-space { |
|
|
margin-top: 3.5px; |
|
|
margin-top: 3.5px; |
|
|
width: 75vw;; |
|
|
|
|
|
|
|
|
width: 75vw; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.key-special { |
|
|
.key-special { |
|
|