12345678910111213141516171819202122232425262728 |
- <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>
|