banner-background
avatar
powerfulyang
这个人没有留下什么...
用户头像
powerfulyang
Fri, Nov 18, 2022 4:11 PM

timeline-item-129

生活小常识-辣椒辣手

  • :以食用油搓一搓手,就能大大降低不適感。
  • 酒精:辣椒素會溶解在酒精當中,若沒有醫療用酒精,也可以用廚房常備的米酒塗抹、搓洗。
  • :酸性的醋能夠和辣椒中和,因此用醋擦手亦能舒緩疼痛。
  • 糖水:糖跟醋一樣能夠中和辣椒的辣度,將手放入糖水中浸泡,便會有效減少灼熱感。
  • 熱水:辣椒素在高溫下會蒸發,若手邊沒有酒、醋等食材,便可改選用溫熱的水洗手,當下會感到疼痛,但恢復效果比冷水好上很多。
  • 冰牛奶:吃到辣食時,一般人會喝牛奶解辣,同理也可以運用此;把手放入冰牛奶中浸泡,牛奶含有的蛋白質會讓疼痛感很快就散去。
用户头像
powerfulyang
Mon, Nov 14, 2022 4:49 PM
用户头像
powerfulyang
Wed, Nov 2, 2022 4:28 PM

timeline-item-125

How to use React label element?

If you try to render a <label> element bound to a text input using the standard for attribute, then it produces HTML missing that attribute and prints a warning to the console.

js
1
2
<label for={'user'}>{'User'}</label>
<input type={'text'} id={'user'} />

Since for is a reserved keyword in JavaScript, use htmlFor instead.

js
1
2
<label htmlFor={'user'}>{'User'}</label>
<input type={'text'} id={'user'} />
用户头像
powerfulyang
Wed, Nov 2, 2022 3:53 PM

timeline-item-124

React v16 support custom DOM attributes.
In the past, React used to ignore unknown DOM attributes. If you wrote JSX with an attribute that React doesn't recognize, React would just skip it.
For example, let's take a look at the below attribute:

js
1
<div mycustomattribute={'something'} />

Would render an empty div to the DOM with React v15:

html
1
<div />

In React v16 any unknown attributes will end up in the DOM:

html
1
<div mycustomattribute='something' />
用户头像
powerfulyang
Wed, Oct 26, 2022 3:31 PM

timeline-item-123

梗图

用户头像
powerfulyang
Tue, Oct 25, 2022 12:21 PM

timeline-item-122

丢失的 plugins

用户头像
powerfulyang
Tue, Oct 25, 2022 10:06 AM

timeline-item-121

2022-10-25 日报

  • fetch method: Patch 会导致 nginx 报 400 Bad Request,需要全大写 PATCH。
用户头像
powerfulyang
Sun, Oct 23, 2022 11:18 PM

timeline-item-118

2022-10-23 日报

  • 了解到 dvh, 解决 Safari 100% 高度问题
用户头像
powerfulyang
Fri, Oct 21, 2022 10:59 AM

timeline-item-117

2022-10-21 日报

用户头像
powerfulyang
Wed, Oct 19, 2022 2:38 PM