<script lang="ts" setup> import { computed, ref } from 'vue' const search = ref('') const filterTableData = computed(() => tableData.filter( (data) => !search.value || data.name.toLowerCase().includes(search.value.toLowerCase()) ) ) const tableData: User[] = [ { date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', } ] </script>改写成Vue3 setup js语言形式
理解问题<script lang="ts" setup> import { computed, ref } from 'vue' const search = ref('') const filterTableData = computed(() => tableData.filter( (data) => !search.value || data.name.toLowerCase().includes(search.value.toLowerCase()) ) ) const tableData: User[] = [ { date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', } ] </script>改写成Vue3 setup js语言形式
已完成理解「<script lang="ts" setup> import { computed, ref } from 'vue' const search = ref('') const filterTableData = computed(() => tableData.filter( (data) => !search.value || data.name.toLowerCase().includes(search.value.toLowerCase()) ) ) const tableData: User[] = [ { date: '2016-05-03', name: 'Tom', address: 'No. 189, Grove St, Los Angeles', } ] </script>改写成Vue3 setup js语言形式」
展开阅读网页