Sorucetree 動作對應
Checkout Commit
目前的前一個 commit
git checkout HEAD~1
復原
git checkout -
- is a alias of @{-1} which represents the name of the previous current branch
TL;DR
沒想到連 Dataset 本身也是一個 component,所以要記得匯入並 use 它。
// <script setup lang="ts">
import { computed } from 'vue'
import { type EChartsOption } from 'echarts'
import { use } from 'echarts/core'
import { DatasetComponent } from 'echarts/components'
import VueECharts from 'vue-echarts'
從值取得型別。
取得陣列中項目的型別
const list = [666, 'bruh', true] as const
type Item = typeof list[number] // true | "bruh" | 666
// 💡 拆解步驟:
type List = typeof list
type ItemOfList = List[number]
Value(值)
value 就是在執行時期,能夠在表達式中引用的變數。
例如 let x = 5 會建立一個叫做 x 的 value,而且可以透過 console.log(x) 把值印出來。
:::success
🌕 我喜歡用陰陽的陽來形容 value
:::
ES6(JavaScript 本來就有的):