refac: linter 관련 설정 변경 및 적용, map_theme 변수 제거
- eslint에 prettier 조합 - prettierrc에 width 120, tabWidth 2 - gameStor->map_theme 제거 - map_theme, mapTheme를 GameConst::$mapName으로 대체 - eslint에서 vue/vue3-essential 대신 vue3-recommended 적용 - vue/max-attributes-per-line 완화 - vue/v-on-event-hyphenation 해제 - vue/attribute-hyphenation 해제 - 일부 tsc import type warning 해결 - 일부 vue template type warning 해결 - 일부 vue SFC를 script setup으로 변경 - TipTap - TopBackBar - BottomBackBar - BoardArticle - ProcessCity
This commit is contained in:
@@ -1,104 +1,63 @@
|
||||
<template>
|
||||
<div class="input-group">
|
||||
<b-button
|
||||
v-if="maxAmount > 20000"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.max(amount - 10000, minAmount)"
|
||||
>-만</b-button
|
||||
>
|
||||
<b-button
|
||||
v-if="maxAmount > 2000"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.max(amount - 1000, minAmount)"
|
||||
>-천</b-button
|
||||
>
|
||||
<b-button
|
||||
v-if="maxAmount > 200"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.max(amount - 100, minAmount)"
|
||||
>-백</b-button
|
||||
>
|
||||
<b-button v-if="maxAmount > 20000" class="btn-sm" @click="amount = Math.max(amount - 10000, minAmount)">
|
||||
-만
|
||||
</b-button>
|
||||
<b-button v-if="maxAmount > 2000" class="btn-sm" @click="amount = Math.max(amount - 1000, minAmount)">
|
||||
-천
|
||||
</b-button>
|
||||
<b-button v-if="maxAmount > 200" class="btn-sm" @click="amount = Math.max(amount - 100, minAmount)"> -백 </b-button>
|
||||
<input
|
||||
v-model="amount"
|
||||
type="number"
|
||||
class="form-control text-end"
|
||||
:max="maxAmount"
|
||||
:min="minAmount"
|
||||
:step="step"
|
||||
v-model="amount"
|
||||
placeholder="금액"
|
||||
/>
|
||||
<b-dropdown right text="" class="amount-dropdown" v-if="amountGuide">
|
||||
<b-dropdown-item
|
||||
v-for="guide in amountGuide"
|
||||
:key="guide"
|
||||
@click="amount = guide"
|
||||
><div class="text-end">
|
||||
<b-dropdown v-if="amountGuide" right text="" class="amount-dropdown">
|
||||
<b-dropdown-item v-for="guide in amountGuide" :key="guide" @click="amount = guide">
|
||||
<div class="text-end">
|
||||
{{ guide.toLocaleString() }}
|
||||
</div></b-dropdown-item
|
||||
>
|
||||
</div>
|
||||
</b-dropdown-item>
|
||||
</b-dropdown>
|
||||
<b-button
|
||||
v-if="maxAmount > 200"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.min(amount + 100, maxAmount)"
|
||||
>+백</b-button
|
||||
>
|
||||
<b-button
|
||||
v-if="maxAmount > 2000"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.min(amount + 1000, maxAmount)"
|
||||
>+천</b-button
|
||||
>
|
||||
<b-button
|
||||
v-if="maxAmount > 20000"
|
||||
class="btn-sm"
|
||||
@click="amount = Math.min(amount + 10000, maxAmount)"
|
||||
>+만</b-button
|
||||
>
|
||||
<b-button v-if="maxAmount > 200" class="btn-sm" @click="amount = Math.min(amount + 100, maxAmount)"> +백 </b-button>
|
||||
<b-button v-if="maxAmount > 2000" class="btn-sm" @click="amount = Math.min(amount + 1000, maxAmount)">
|
||||
+천
|
||||
</b-button>
|
||||
<b-button v-if="maxAmount > 20000" class="btn-sm" @click="amount = Math.min(amount + 10000, maxAmount)">
|
||||
+만
|
||||
</b-button>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import { defineComponent } from "vue";
|
||||
import VueTypes from "vue-types";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
minAmount: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
maxAmount: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
amountGuide: {
|
||||
type: Array as PropType<number[]>,
|
||||
required: false,
|
||||
},
|
||||
step: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1,
|
||||
},
|
||||
modelValue: VueTypes.number.isRequired,
|
||||
minAmount: VueTypes.number.isRequired,
|
||||
maxAmount: VueTypes.number.isRequired,
|
||||
amountGuide: VueTypes.arrayOf(Number).def([1000, 2000, 5000, 10000]),
|
||||
step: VueTypes.number.def(1),
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
watch: {
|
||||
amount(val: number) {
|
||||
this.$emit("update:modelValue", val);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
amount: this.modelValue,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
amount(val: number) {
|
||||
this.$emit("update:modelValue", val);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss">
|
||||
.btn-group.amount-dropdown > .btn {
|
||||
border-radius: 0;
|
||||
@@ -107,4 +66,4 @@ export default defineComponent({
|
||||
.btn-group.amount-dropdown .dropdown-menu.show {
|
||||
min-width: 6rem;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user