Skip to content

Commit a5e6ad5

Browse files
committed
docs: update example with props helper
1 parent 74a866c commit a5e6ad5

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

example/src/App.vue

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
</template>
1313

1414
<script lang="ts">
15-
import { Options, Vue } from '../../src'
15+
import { props } from '../../src'
1616
17-
@Options({
18-
props: {
19-
propMessage: String
20-
}
17+
const Props = props({
18+
propMessage: String
2119
})
22-
export default class App extends Vue {
23-
propMessage!: string
2420
21+
export default class App extends Props {
2522
// inital data
2623
msg: number = 123
2724

example/webpack.config.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,18 @@ module.exports = {
3232
},
3333
{
3434
test: /\.vue$/,
35-
use: ['vue-loader'],
35+
use: [
36+
{
37+
loader: 'vue-loader',
38+
options: {
39+
babelParserPlugins: [
40+
'jsx',
41+
'classProperties',
42+
'decorators-legacy',
43+
],
44+
},
45+
},
46+
],
3647
},
3748
],
3849
},

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy