-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathtst.js
More file actions
123 lines (110 loc) · 1.73 KB
/
Copy pathtst.js
File metadata and controls
123 lines (110 loc) · 1.73 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
var Vue = require('vue');
new Vue({
render: function(ce) {
return ce(a, b, c);
},
data: {
dataA: 42
}
});
new Vue({
data: () => ({
dataA: 42
}),
});
Vue.component("my-component", {
data: () => ({
dataA: 42
}),
methods: {
method: function() {
this.dataB = true;
}
}
});
new Vue({
computed: {
x: () => 42,
y: { get: () => 42 },
z1: { set: function(){ this.z2 = 42; } }
}
});
new Vue({
template: danger
});
var Extended1 = Vue.extend({
data: function () {
return {
fromSuper: 42
};
}
});
new Extended1({
data: { fromSub: 42 }
});
var Extended2 = Vue.extend({
data: function () {
return {
fromSuper: 42
};
}
});
new Vue({
mixins: Extended2,
data: { fromSub: 42 }
});
new Vue({
mixins: [{data: { fromMixin1: 42 } }, {data: { fromMixin2: 42 } }],
data: { fromSub: 42 }
});
var mixinData = { };
mixinData.fromMixinValue = 42;
var mixin = {data: mixinData };
var mixins = [mixin];
new Vue({
mixins: mixins,
data: { fromSub: 42 }
});
var DeadExtended = Vue.extend({
data: function () {
return {
deadExtended: 42
};
}
});
new Vue({
created: function(){ this.created = true; }
});
(function() {
var data = { dataA: 42 };
function f() {
return data;
}
new Vue({
data: f,
});
});
(function() {
new Vue({
data: { dataA: 42 },
methods: {
m: function() { this.dataA; }
}
});
});
let base = Vue.extend({
data: { fromBase: 123 }
});
let subclass = new Vue({
extends: base
});
let subclass2 = base.extend({
data: {
fromSubclass2: 100
}
});
sink(Vue.ref(source("ref")).value);
sink(Vue.shallowRef(source("shallowRef")).value);
sink(Vue.toRef(source("toRef")).value);
sink(Vue.reactive(source("reactive")));
sink(Vue.computed(() => source("computed")).value);