javascript 邮寄信封发件人和收件人
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 邮寄信封发件人和收件人相关的知识,希望对你有一定的参考价值。
class Person {
constructor(name, address, city, state, zip) {
this.name = name;
this.address = address;
this.city = city;
this.state = state;
this.zip = zip;
}
}
const Bob = new Person(
'Bob Jones',
'some address',
'some city',
'some state',
'some zip'
);
const Dwayne = new Person(
'Dwayne Johnson',
'another address',
'another city',
'another state',
'another zip'
);
const Stamp = () => {
return (
<div className="stamp">
<h2>Stamp</h2>
</div>
);
};
const AddressLabel = props => {
const { name, address, city, state, zip } = props.person;
return (
<div>
<p>{name}</p>
<p>{address}</p>
<p>
{city}, {state} {zip}
</p>
</div>
);
};
const Envelope = props => {
const { fromPerson, toPerson } = props;
return (
<div className="envelope-container">
<div className="envelope-top">
<AddressLabel person={fromPerson} />
<Stamp />
</div>
<div className="envelope-middle">
<AddressLabel person={toPerson} />
</div>
</div>
);
};
class App extends Component {
render() {
return (
<div className="App">
<Envelope fromPerson={Bob} toPerson={Dwayne} />
</div>
);
}
}
以上是关于javascript 邮寄信封发件人和收件人的主要内容,如果未能解决你的问题,请参考以下文章
如何邮寄到office 365?
电子邮件消息:电子邮件消息的标题部分、电子邮件信封、电子邮件消息正文和 SMTP
400 错误。需要收件人地址。 JavaScript
收件人地址需要带有 JavaScript 的 gmail api
javascript - postMessage 到沙盒 iframe,为啥收件人窗口原点为空?
JavaScript 按发件人排序Gmail邮件