Closed runxc1 closed 5 years ago
Thank you, I needed this to follow the instructions.
I had to use this to get the tutorial working with vue-loader v15. What do we need to do to get his merged in?
Is anyone having problems with Mixins? If I include a mixin and try to use one of its properties, I get:
Property 'initialEnthusiasm' does not exist on type 'CombinedVueInstance<Vue, {}, {}, {}, Readonly<Record<never, any>>>'.
src/mixins/chicken.ts
export default {
props: ['name', 'initialEnthusiasm'],
};
src/components/Hello.vue
<template>
<div>
<div class="greeting">Hello {{name}}{{exclamationMarks}}</div>
<button @click="decrement">-</button>
<button @click="increment">+</button>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import Chicken from '../mixins/chicken';
export default Vue.extend({
mixins:[Chicken],
data() {
return {
enthusiasm: this.initialEnthusiasm,
}
},
methods: {
increment() { this.enthusiasm++; },
decrement() {
if (this.enthusiasm > 1) {
this.enthusiasm--;
}
},
},
computed: {
exclamationMarks(): string {
return Array(this.enthusiasm + 1).join('!');
}
}
});
</script>
<style>
.greeting {
font-size: 20px;
}
</style>
May I kindly ask: Why is this PR not merged? I just spent quite some time to figure out why had errors with the loaders only to find out that the this guide is outdated. To then find a perfectly fine solution (AFAIT) in a PR which is not merged does not make sense to me...
@DanielRosenwasser As top dev - can you merge it?
please merge?
Ya'll should consider merging this. I ran into this while using the getting started guide, and had to spend some time finding this issue before I could move forward. Seems like others are experiencing this too.
Why is this not merged yet?
With the new vue cli 3 and the vue ui which can be used to start a new project very easily. The whole tutorial seems very out of date.
thanks~i get it~
Alright, lets get this in now 👍
If you follow this tutorial today you will run into errors as the vue loader was updated to version 15 a month ago and requires a couple additional configuration settings not found in the current documentation