<template>
  <div class="location-hash">
      <slot />
  </div>
</template>
<script>
export default {
    name: 'location-hash',
    props: {
        value: {
            type: String | Number
        }
    },
    mounted() {
    },
    methods: {
        onChange() {
            this.changeHash(this.value)
            this.$emit('onHashChange')
        }
    },
    watch: {
        value(newValue, oldValue) {
            this.onChange()
        }
    }
}
</script>