|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import { ref, reactive,withDefaults,defineProps} from 'vue'
|
|
import { ref, reactive,withDefaults,defineProps} from 'vue'
|
|
-import { aaList} from '../types/demo16.ts';
|
|
|
|
|
|
+import {aaList} from '../types/demo16';
|
|
// 1.传什么 接什么
|
|
// 1.传什么 接什么
|
|
// defineProps(['name','hobby']);
|
|
// defineProps(['name','hobby']);
|
|
// let score:aaList = reactive([
|
|
// let score:aaList = reactive([
|
|
@@ -41,7 +41,7 @@ import { aaList} from '../types/demo16.ts';
|
|
const props = withDefaults(defineProps<{score:aaList,name:string,hobby:string}>(), {
|
|
const props = withDefaults(defineProps<{score:aaList,name:string,hobby:string}>(), {
|
|
name:'未知用户',
|
|
name:'未知用户',
|
|
hobby: '吃饭',
|
|
hobby: '吃饭',
|
|
- score:[{name:'胡',grad:0}]
|
|
|
|
|
|
+ score:()=>{[{name:'胡',grad:0}]}
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|