vue3+ts创建二维数组响应式变量及赋值
创建二维响应式数组
const caculatorList = ref([[] as caculatorType[]]);
赋值
caculatorList.value = [ [ { value: "0", type: "number", bgColor: "#aaa" }, { value: ".", type: "other", bgColor: "#aaa" }, { value: "=", type: "operator", bgColor: "#aaa" }, ], [ { value: "1", type: "number", bgColor: "#aaa" }, { value: "2", type: "number", bgColor: "#aaa" }, { value: "3", type: "number", bgColor: "#aaa" }, { value: "+", type: "operator", bgColor: "#ed8e09" }, ], ]