根据uniapp调整工程结构
This commit is contained in:
30
components/AiPhone.vue
Normal file
30
components/AiPhone.vue
Normal file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<section class="AiPhone">
|
||||
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(phone)" class="phone-icon" v-if="phone"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AiPhone",
|
||||
props: {
|
||||
phone: {default: ""}
|
||||
},
|
||||
methods: {
|
||||
callPhone(phoneNumber) {
|
||||
uni.makePhoneCall({phoneNumber})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AiPhone {
|
||||
.phone-icon {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: sub;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user