feat:给公共组件添加组件实例的name属性,便于component.ts函数的批量全局注册组件

This commit is contained in:
talktao 2022-03-25 10:51:27 +08:00
parent ec41a92858
commit d7d21b3b89
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,9 @@
<script lang="ts">
export default{
name: 'CustomHeader'
}
</script>
<script setup lang="ts">
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'

View File

@ -1,3 +1,8 @@
<script lang="ts">
export default{
name: 'TabBar'
}
</script>
<script setup lang="ts">
import { reactive, ref } from 'vue'
@ -22,7 +27,7 @@ import { reactive, ref } from 'vue'
const active = ref('home')
const onChange = (value) => {
console.log(value,'value');
// console.log(value,'value');
emit('chang', value)
}
@ -37,8 +42,6 @@ import { reactive, ref } from 'vue'
</div>
</template>
<style lang="scss" scoped>
</style>