(四)演示 ref 定义类型
2022年11月30日
一、开发中 ref 定义类型
<script setup lang="ts">
import { ref } from 'vue'
interface Product {
id: number,
title: string,
price: number,
isStock: boolean,
}
const priducts = ref<Product[]>([
{
id: 1,
title: '牛仔裤',
price: 200,
isStock: true
}
])
</script>
Loading...