2021-07-14から1日間の記事一覧
:not を使用してCSSの上書きを回避する。 // bad .item-item { margin-bottom: 20px; &:last-child { margin-bottom: 0; } } // good .list-item { &:not(:last-child) { margin-bottom: 20px; } }
this.$nuxt.error(); 引数として、statusCodeとmessageを指定することが出来る。 this.$nuxt.error({ statusCode: 404, message: 'エラーが発生しました。', });
const obj = { a: 'c', b: 'd', }; type Keys = keyof typeof obj; type Values = typeof obj[Keys] // 'c' | 'd';