Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使途別予算額でレベルごとの税金名称リストを追加 #31

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion components/DailyBread.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@
<script lang="ts">
import Vue from 'vue'
import DanceBallroom from 'vue-material-design-icons/DanceBallroom.vue'
import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options'
import IncomeSelector from '~/components/molecules/IncomeSelector.vue'
import HouseTypeSelection from '@/components/molecules/HouseTypeSelection.vue'
import { DailyBreadItem } from '~/plugins/dataTransferObjects/dailyBreadData'

export type DataType = {
/**
Expand All @@ -163,8 +165,20 @@ export type DataType = {
* スライダーで選択した値
*/
sliderValue: Number
/**
* 自治体名
*/
region: string
}

type PropType = {}

type ComputedType = {
taxData: DailyBreadItem[]
}

type MethodType = {}

export default Vue.extend({
components: {
DanceBallroom,
Expand Down Expand Up @@ -215,7 +229,7 @@ export default Vue.extend({
},
},
},
})
} as ThisTypedComponentOptionsWithRecordProps<Vue, DataType, MethodType, ComputedType, PropType>)
</script>

<style scoped lang="scss">
Expand Down
18 changes: 17 additions & 1 deletion components/atoms/slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@

<script lang="ts">
import Vue from 'vue'
import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options'

type PropType = {
min: Number
max: Number
step: Number
value: Number
}

type ComputedType = {
inputedValue: Number
}

type MethodType = {}
type DataType = {}

export default Vue.extend({
props: {
/**
Expand Down Expand Up @@ -56,7 +72,7 @@ export default Vue.extend({
},
},
},
})
} as ThisTypedComponentOptionsWithRecordProps<Vue, DataType, MethodType, ComputedType, PropType>)
</script>

<style scoped lang='scss'>
Expand Down
28 changes: 23 additions & 5 deletions components/molecules/IncomeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,25 @@

<script lang="ts">
import Vue from 'vue'
import { ThisTypedComponentOptionsWithRecordProps } from 'vue/types/options'
import Slider from '@/components/atoms/slider.vue'

type DataType = {
region: string
sliderValue: number
timeout: NodeJS.Timeout
debouncedInput: string
sliderValue: Number
timeout: NodeJS.Timeout | null
}

type PropType = {
minYearlyIncome: Number
maxYearlyIncome: Number
value: number
}

type ComputedType = {}

type MethodType = {}

export default Vue.extend({
components: {
Slider,
Expand All @@ -90,14 +100,23 @@ export default Vue.extend({
},
},
props: {
/**
* 年収最小値
*/
minYearlyIncome: {
type: Number,
default: 1000000,
},
/**
* 年収最大値
*/
maxYearlyIncome: {
type: Number,
default: 20000000,
},
/**
* 年収初期値
*/
value: {
type: Number,
default: 0,
Expand All @@ -108,7 +127,6 @@ export default Vue.extend({
region: this.$accessor.regionCofogData.regionCofogData.governmentName,
sliderValue: this.value,
timeout: null,
debouncedInput: '',
}
},
computed: {
Expand All @@ -128,7 +146,7 @@ export default Vue.extend({
mounted() {
this.$accessor.dailyBreadData.setIncome(this.value)
},
})
} as ThisTypedComponentOptionsWithRecordProps<Vue, DataType, MethodType, ComputedType, PropType>)
</script>

<style lang="scss" scoped>
Expand Down
Loading