Browse Source

键盘样式问题

master
maochaoying 2 years ago
parent
commit
a355504130
  1. 8
      src/components/AddPreSetting.vue
  2. 10
      src/components/UpdatePreSetting.vue

8
src/components/AddPreSetting.vue

@ -220,7 +220,7 @@
<div class="btn" @click="save">保存</div> <div class="btn" @click="save">保存</div>
<div class="btn ml" @click="hiddleSettingModal">返回</div> <div class="btn ml" @click="hiddleSettingModal">返回</div>
</div> </div>
<div class="key_wrap" v-if="showkeyboard" id="keyboard_formula">
<div class="key_wrap" v-show="showkeyboard" id="keyboard_formula">
<SimpleKeyboard @onChange="onChange" :input="formula_id" /> <SimpleKeyboard @onChange="onChange" :input="formula_id" />
</div> </div>
</div> </div>
@ -788,10 +788,10 @@ onMounted(() => {
} }
.key_wrap { .key_wrap {
position: absolute; position: absolute;
left: 0;
right: 0;
right: 97px;
bottom: 0; bottom: 0;
height: 230px;
height: 245px;
width: 520px;
} }
} }
</style> </style>

10
src/components/UpdatePreSetting.vue

@ -220,7 +220,7 @@
<!-- <div class="btn" @click="save">保存</div> --> <!-- <div class="btn" @click="save">保存</div> -->
<div class="btn ml" @click="hiddleSettingModal">返回</div> <div class="btn ml" @click="hiddleSettingModal">返回</div>
</div> </div>
<div class="key_wrap" v-if="showkeyboard" id="keyboard_formula">
<div class="key_wrap" v-show="showkeyboard" id="keyboard_formula">
<SimpleKeyboard @onChange="onChange" :input="formula_id" /> <SimpleKeyboard @onChange="onChange" :input="formula_id" />
</div> </div>
</div> </div>
@ -723,6 +723,7 @@ const setSprayLiquidVal = () => {
const showkeyboard = ref(false) const showkeyboard = ref(false)
const onChange = a => { const onChange = a => {
console.log(a)
formula_id.value = a formula_id.value = a
} }
const handleShowKeyBoard = () => { const handleShowKeyBoard = () => {
@ -733,6 +734,7 @@ onMounted(() => {
document.addEventListener('click', e => { document.addEventListener('click', e => {
let box = document.getElementById('keyboard_formula') let box = document.getElementById('keyboard_formula')
let room = document.getElementById('id_formula') let room = document.getElementById('id_formula')
let fontBox = document.getElementsByClassName('hg-candidate-box')
if (!box?.contains(e.target) && e.target != room) { if (!box?.contains(e.target) && e.target != room) {
showkeyboard.value = false showkeyboard.value = false
} }
@ -837,10 +839,10 @@ onMounted(() => {
} }
.key_wrap { .key_wrap {
position: absolute; position: absolute;
left: 0;
right: 0;
right: 97px;
bottom: 0; bottom: 0;
height: 230px;
height: 245px;
width: 520px;
} }
} }
</style> </style>
Loading…
Cancel
Save