-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
Copy pathOther.vue
64 lines (61 loc) · 1.12 KB
/
Other.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<script>
// this computed property should be visible
// even if component has no 'computed' defined
const computedPropMixin = {
computed: {
computedPropFromMixin() {
return null
},
},
}
export default {
name: 'OtherWithMine',
components: {
Mine: {
inject: ['foo', 'noop', 'answer'],
render: h => h('div', { class: 'mine' }, 'mine'),
data() {
return {
// testing all data types
a() {},
b: /123/,
c: document.createElement('div'),
d: null,
e: undefined,
f: true,
g: 12345,
h: 'I am a really long string mostly just to see how the horizontal scrolling works.',
}
},
},
},
mixins: [computedPropMixin],
provide: {
foo: 'bar',
noop: (a, b, c) => {},
answer: 42,
},
inheritAttrs: false,
props: ['id'],
data() {
const a = { c() {} }
a.a = a
const b = []
b[0] = b
return {
a,
b,
}
},
}
</script>
<template>
<div>
Other {{ id }}
<Mine />
</div>
</template>
<style lang="stylus">
.mine
display inline-block
</style>