import React, { Component } from "react";
import { render } from "react-dom";
class App extends Component {
constructor(props) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getIn = (state, path) => { | |
if (!state) { | |
return state | |
} | |
const length = path.length | |
if (!length) { | |
return undefined | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getStrFullLength = (str = '') => | |
str.split('').reduce((pre, cur) => { | |
const charCode = cur.charCodeAt(0); | |
console.log(cur, charCode) | |
if(charCode >= 0&& charCode <= 128) { | |
return pre + 1; | |
} else { | |
return pre + 2; | |
} | |
}, 0) |
<div class="select-style">
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
</div>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body{ | |
font-family: 'Montserrat', sans-serif; | |
margin:0; | |
} | |
.container { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
align-content: center; |
OlderNewer