Files
hospital-rescue-app-v2/uni_modules/tmx-ui/components/x-tabs/tabs-item.uvue
T
2026-09-24 16:25:22 +08:00

49 lines
745 B
Plaintext

<script lang="uts">
export default {
data() {
return {
}
},
emits:['change','destory'],
props:{
id:{
type:String,
default:''
}
},
methods: {
getNodeinfo(){
let t = this;
uni.createSelectorQuery()
.in(t)
.select('.xTabsItemChildren')
.boundingClientRect((rect:any)=>{
t.$emit('change',rect as NodeInfo,t.id)
}).exec()
}
},
mounted() {
this.getNodeinfo()
},
beforeUnmount() {
this.$emit('destory',this.id)
},
}
</script>
<template>
<view class="xTabsItemChildren">
<slot></slot>
</view>
</template>
<style>
.xTabsItemChildren{
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
flex: 1;
}
</style>