js 數據操作 - daniel-qa/Vue GitHub Wiki
js 數據操作
Vue3 數據
Map
Array
Object
js Loop: For Of
三元運算式
js 常見邏輯運算符
js 數據比對
簡單字串處理
Ref 變數類型
初始值 | 內部值型態 (typeof ) |
例子 |
---|---|---|
數字 (number) | "number" |
const num = ref(0); |
字串 (string) | "string" |
const text = ref("hello"); |
布林值 (boolean) | "boolean" |
const isTrue = ref(false); |
陣列 (array) | "object" |
const list = ref([]); |
物件 (object) | "object" |
const obj = ref({}); |
null |
"object" |
const nullable = ref(null); |
未定義 (undefined) | "undefined" |
const undef = ref(undefined); |