Skip to content

Commit bcb3523

Browse files
author
qq281113270
committed
合并冲突
2 parents 7de6f2b + 4b7d1e0 commit bcb3523

File tree

5 files changed

+25
-202
lines changed

5 files changed

+25
-202
lines changed

common/js/browser.v5.8.38.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36472,19 +36472,6 @@ module.exports = function(it){
3647236472
return Object(defined(it));
3647336473
};
3647436474
},{"245":245}],308:[function(_dereq_,module,exports){
36475-
// 7.1.1 ToPrimitive(input [, PreferredType])
36476-
var isObject = _dereq_(265);
36477-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
36478-
// and the second argument - flag - preferred type is a string
36479-
module.exports = function(it, S){
36480-
if(!isObject(it))return it;
36481-
var fn, val;
36482-
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
36483-
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
36484-
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
36485-
throw TypeError("Can't convert object to primitive value");
36486-
};
36487-
},{"265":265}],309:[function(_dereq_,module,exports){
3648836475
var id = 0
3648936476
, px = Math.random();
3649036477
module.exports = function(key){
@@ -36496,7 +36483,6 @@ var store = _dereq_(294)('wks')
3649636483
, Symbol = _dereq_(256).Symbol;
3649736484
module.exports = function(name){
3649836485
return store[name] || (store[name] =
36499-
Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name));
3650036486
};
3650136487
},{"256":256,"294":294,"309":309}],311:[function(_dereq_,module,exports){
3650236488
var classof = _dereq_(237)

es5.html

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<<<<<<< HEAD
21
<!DOCTYPE html>
32
<html>
43

@@ -15,78 +14,37 @@
1514

1615
</head>
1716
<style>
18-
.lsft-box{
17+
.lsft-box {
1918
float: left;
2019
width: 48%;
2120
height: 100vh;
2221
}
23-
.right-box{
24-
float: right;
25-
width: 48%;
26-
height: 100vh;
27-
}
28-
*{
29-
padding: 0;
30-
margin: 0;
31-
}
32-
.textarea{
33-
font-size: 18px;
34-
display: block;
35-
/* width: 100%;
36-
height: 100vh; */
37-
}
38-
</style>
39-
<body>
40-
41-
<div id="example" class="lsft-box"></div>
42-
<script src="./es5_code/es5_react_code/01/01.js" ></script>
43-
44-
</body>
4522

46-
=======
47-
<!DOCTYPE html>
48-
<html>
49-
50-
<head>
51-
<meta charset="UTF-8" />
52-
<title>Hello React!</title>
53-
<script src="./common/js/ajax.js"></script>
54-
<!--官方提供的 CDN 地址:-->
55-
<!-- <script src="./common/js/react.development.v16.12.0.js"></script>
56-
<script src="./common/js/react-dom.development.v16.12.0.js"></script> -->
57-
<!-- <script src="./common/js/browser-polyfill.5.8.38.js"></script> -->
58-
<script src="./common/js/react.v16.12.0.js"></script>
59-
<script src="./common/js/browser.5.8.38.js"></script>
60-
61-
</head>
62-
<style>
63-
.lsft-box{
64-
float: left;
65-
width: 48%;
66-
height: 100vh;
67-
}
68-
.right-box{
23+
.right-box {
6924
float: right;
7025
width: 48%;
7126
height: 100vh;
7227
}
73-
*{
28+
29+
* {
7430
padding: 0;
7531
margin: 0;
7632
}
77-
.textarea{
33+
34+
.textarea {
7835
font-size: 18px;
7936
display: block;
8037
/* width: 100%;
8138
height: 100vh; */
8239
}
8340
</style>
41+
8442
<body>
8543

86-
<div id="example" class="lsft-box"></div>
87-
<script src="./es5_code/es5_react_code/01/01.js" ></script>
44+
<div id="example" class="lsft-box"></div>
45+
<script src="./es5_code/es5_react_code/01/01.js"></script>
8846

8947
</body>
9048

91-
>>>>>>> 46e5d654750168326619cd5ec4cf48a1c0506d86
49+
9250
</html>
Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
1-
<<<<<<< HEAD
2-
var number=0;
3-
const H=()=>(
4-
<div onClick={()=>{
5-
console.log(++number)
6-
}}>
7-
点击事件
8-
</div>
9-
);
10-
ReactDOM.render(
11-
<H/>,
12-
document.getElementById('example')
13-
=======
14-
var number=0;
15-
const H=()=>(
16-
<div onClick={()=>{
17-
console.log(++number)
18-
}}>
19-
点击事件
20-
</div>
21-
);
22-
ReactDOM.render(
23-
<H/>,
24-
document.getElementById('example')
25-
>>>>>>> 46e5d654750168326619cd5ec4cf48a1c0506d86
26-
);
1+
2+
var number = 0;
3+
const H = () => (
4+
<div onClick={() => {
5+
console.log(++number)
6+
}}>
7+
点击事件
8+
</div>
9+
);
10+
ReactDOM.render(
11+
<H />,
12+
document.getElementById('example')
13+
14+
);
Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,5 @@
1-
<<<<<<< HEAD
2-
// 创建一个 theme Context, 默认 theme 的值为 light
3-
const ThemeContext = React.createContext();
4-
5-
function Button(props){
61
console.log('props===',props)
7-
return (
8-
<button>{props.theme}</button>
9-
)
10-
}
11-
12-
function ThemedButton(props) {
13-
// ThemedButton 组件从 context 接收 theme
14-
return (
15-
<ThemeContext.Consumer>
16-
{
17-
theme =>{
18-
console.log('theme=',theme)
19-
console.log('props==',props)
20-
return <Button {...props} theme={theme} />
21-
}
22-
23-
24-
25-
}
26-
</ThemeContext.Consumer>
27-
);
28-
}
292

30-
// 中间组件
31-
function Toolbar(props) {
32-
return (
33-
<div>
34-
<ThemedButton />
35-
</div>
36-
);
37-
}
38-
39-
class App extends React.Component {
40-
render() {
41-
return (
42-
<ThemeContext.Provider value="dark">
43-
<Toolbar />
44-
</ThemeContext.Provider>
45-
);
46-
}
47-
}
48-
49-
ReactDOM.render(
50-
<App/>,
51-
document.getElementById('example')
52-
);
53-
=======
543
// 创建一个 theme Context, 默认 theme 的值为 light
554
const ThemeContext = React.createContext();
565

@@ -102,4 +51,4 @@ ReactDOM.render(
10251
<App/>,
10352
document.getElementById('example')
10453
);
105-
>>>>>>> 46e5d654750168326619cd5ec4cf48a1c0506d86
54+
Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,4 @@
1-
<<<<<<< HEAD
2-
<!DOCTYPE html>
3-
<html lang="en">
4-
5-
<head>
6-
<meta charset="UTF-8">
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
9-
<title>Document</title>
10-
</head>
11-
<style>
12-
#d{
13-
width: 100px;
14-
height: 100px;
15-
position: absolute;
16-
background: red;
17-
left: 0px;
18-
}
19-
</style>
20-
<body>
21-
<div id='d'>
22-
23-
</div>
24-
<script>
25-
var d=document.getElementById('d');
26-
var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
27-
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
28-
29-
var cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame;
30-
31-
var start = window.mozAnimationStartTime||Date.now(); // 只有Firefox支持mozAnimationStartTime属性,其他浏览器可以使用Date.now()来替代.
321

33-
var myReq;
34-
var left=0;
35-
function step(timestamp) {
36-
console.log('timestamp=',timestamp)
37-
console.log('timestamp=',timestamp/1000) //运行多少ms
38-
// console.log('start=',start)
39-
var progress = timestamp - start;
40-
// console.log('progress=',progress)
41-
d.style.left =(left++) + "px";
42-
// console.log('Math=',Math.min(progress / 10, 200) )
43-
myReq = requestAnimationFrame(step);
44-
if (left >200) {
45-
// 暂停定时器
46-
window.cancelAnimationFrame(myReq);
47-
48-
}
49-
}
50-
myReq = requestAnimationFrame(step);
51-
52-
// window.cancelAnimationFrame(myReq);
53-
</script>
54-
</body>
55-
56-
=======
572
<!DOCTYPE html>
583
<html lang="en">
594

@@ -107,6 +52,3 @@
10752
// window.cancelAnimationFrame(myReq);
10853
</script>
10954
</body>
110-
111-
>>>>>>> 46e5d654750168326619cd5ec4cf48a1c0506d86
112-
</html>

0 commit comments

Comments
 (0)