Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5987caa

Browse files
committed
code cleanup
1 parent 1b63db7 commit 5987caa

File tree

18 files changed

+2384
-2549
lines changed

18 files changed

+2384
-2549
lines changed

‎demo/index.js‎

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ReactV from "../src/ReactV";
1+
import ReactV from "../src/ReactV.ts";
22
import React from "react";
33
import ReactDOM from "react-dom"
44

@@ -24,42 +24,19 @@ class App extends ReactV.Component {
2424
age: 16,
2525
o : { name: "hi"}
2626
}
27-
mounted(){
27+
watch = {
28+
o(v, old ){
29+
console.log("object changed", v, old)
30+
}
31+
}
32+
mounted() {
33+
console.log("mounted")
2834
setTimeout(() => {
2935
console.log("changed", this)
3036
this.o.name = "proots"
31-
this.set(this.o, "gender", "male");
37+
// this.set(this.o, "gender", "male");
3238
}, 1000);
3339
}
34-
watch = {
35-
status(val, old){
36-
console.log("status updated....", val, old);
37-
},
38-
illuminate(val, old) {
39-
if ( val === 3 ) {
40-
this.status = "troix";
41-
}
42-
},
43-
o(val, old) {
44-
console.log(val.name, old.name)
45-
}
46-
}
47-
methods = {
48-
change() {
49-
this.times = this.times + 1;
50-
this.illuminate = this.illuminate + 1;
51-
}
52-
}
53-
computed = {
54-
calc : {
55-
get() {
56-
return `Name:${this.o.name}, Age:${this.age}`
57-
},
58-
set(newVal) {
59-
this.age = newVal;
60-
}
61-
}
62-
}
6340
render(){
6441
const { o, age, calc} = this;
6542
return (

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /