mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-15 23:47:33 +08:00
code refactor
This commit is contained in:
@@ -41,8 +41,8 @@ const zoomLevel = ref<number>(1);
|
||||
const mapSupported = computed<boolean>(() => !!mapInstance.value);
|
||||
const mapDependencyLoaded = computed<boolean>(() => mapInstance.value?.dependencyLoaded || false);
|
||||
|
||||
const finalMapStyle = computed<Record<string, unknown>>(() => {
|
||||
const styles: Record<string, unknown> = Object.assign({}, props.mapStyle);
|
||||
const finalMapStyle = computed<Record<string, string>>(() => {
|
||||
const styles: Record<string, string> = Object.assign({}, props.mapStyle);
|
||||
|
||||
if (props.height) {
|
||||
styles['height'] = props.height;
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div class="pin-codes-input" :style="`grid-template-columns: repeat(${length}, minmax(0, 1fr))`">
|
||||
<div class="pin-code-input pin-code-input-outline"
|
||||
:class="{ 'pin-code-input-focued': codes[index].focused }" :key="index"
|
||||
v-for="(code, index) in codes">
|
||||
v-for="(_, index) in codes">
|
||||
<input ref="pin-code-input" min="0" maxlength="1" pattern="[0-9]*"
|
||||
:value="codes[index].value"
|
||||
:type="codes[index].inputType"
|
||||
:disabled="disabled ? 'disabled' : undefined"
|
||||
:autofocus="autofocus && index === 0 ? 'autofocus' : undefined"
|
||||
:disabled="disabled ? true : undefined"
|
||||
:autofocus="autofocus && index === 0 ? true : undefined"
|
||||
@focus="codes[index].focused = true"
|
||||
@blur="codes[index].focused = false"
|
||||
@keydown="onKeydown(index, $event)"
|
||||
|
||||
Reference in New Issue
Block a user