diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-03-25 19:56:22 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-03-25 19:56:22 +1100 |
| commit | 58aba42dbd153c1d51ddd845f88648cd78d56ded (patch) | |
| tree | d5facb5efe033f75cdd4105e1603aa301f581e33 /src/components | |
| parent | b59e007e6d23483abe8973fe5c21412ddf8709b7 (diff) | |
Fix typescript errors
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/SearchModal.vue | 4 | ||||
| -rw-r--r-- | src/components/Settings.vue | 10 | ||||
| -rw-r--r-- | src/components/TileInfoModal.vue | 2 | ||||
| -rw-r--r-- | src/components/TileTree.vue | 2 |
4 files changed, 11 insertions, 7 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index 6675885..91e6748 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -14,11 +14,11 @@ export default defineComponent({ } }, onSearchEnter(){ - this.$emit('search-node', this.$refs.searchInput.value); + this.$emit('search-node', (this.$refs.searchInput as HTMLInputElement).value); }, }, mounted(){ - this.$refs.searchInput.focus(); + (this.$refs.searchInput as HTMLInputElement).focus(); }, emits: ['search-node', 'search-close'] }); diff --git a/src/components/Settings.vue b/src/components/Settings.vue index b56de12..d35549e 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -21,13 +21,17 @@ export default defineComponent({ this.$emit('layout-option-change'); }, onMinTileSzChg(){ - if (Number(this.$refs.minTileSzInput.value) > Number(this.$refs.maxTileSzInput.value)){ + let minInput = this.$refs.minTileSzInput as HTMLInputElement; + let maxInput = this.$refs.maxTileSzInput as HTMLInputElement; + if (Number(minInput.value) > Number(maxInput.value)){ this.layoutOptions.maxTileSz = this.layoutOptions.minTileSz; } this.onLayoutOptChg(); }, - onMaxTileSzChg(evt){ - if (Number(this.$refs.maxTileSzInput.value) < Number(this.$refs.minTileSzInput.value)){ + onMaxTileSzChg(){ + let minInput = this.$refs.minTileSzInput as HTMLInputElement; + let maxInput = this.$refs.maxTileSzInput as HTMLInputElement; + if (Number(maxInput.value) < Number(minInput.value)){ this.layoutOptions.minTileSz = this.layoutOptions.maxTileSz; } this.onLayoutOptChg(); diff --git a/src/components/TileInfoModal.vue b/src/components/TileInfoModal.vue index 812470c..f15781a 100644 --- a/src/components/TileInfoModal.vue +++ b/src/components/TileInfoModal.vue @@ -4,7 +4,7 @@ import {TolNode} from '../lib'; export default defineComponent({ props: { - tolNode: {type: Object as PropType<TolNode>}, + tolNode: {type: Object as PropType<TolNode>, required: true}, options: {type: Object, required: true}, }, computed: { diff --git a/src/components/TileTree.vue b/src/components/TileTree.vue index 6ea78c5..da11754 100644 --- a/src/components/TileTree.vue +++ b/src/components/TileTree.vue @@ -229,7 +229,7 @@ export default defineComponent({ onSearchClose(){ this.searchOpen = false; }, - onSearchNode(node){ + onSearchNode(node: string){ console.log('Searched for: ' + node); this.searchOpen = false; }, |
