|
@@ -16,6 +16,13 @@
|
|
|
{ width: width },
|
|
|
customStyle,
|
|
|
]"
|
|
|
+ :open-type="openType"
|
|
|
+ :form-type="formType"
|
|
|
+ @getuserinfo="getUserInfo"
|
|
|
+ @contact="contact"
|
|
|
+ @getphonenumber="getPhoneNumber"
|
|
|
+ @opensetting="openSetting"
|
|
|
+ @error="error"
|
|
|
@click="handleClick"
|
|
|
>
|
|
|
<view class="fs-loader" v-if="loading"></view>
|
|
@@ -29,6 +36,8 @@
|
|
|
import { computed, useAttrs } from 'vue'
|
|
|
|
|
|
const props = defineProps({
|
|
|
+ openType: String,
|
|
|
+ formType: String,
|
|
|
size: {
|
|
|
type: String,
|
|
|
validator(value) {
|
|
@@ -63,7 +72,7 @@
|
|
|
loading: Boolean
|
|
|
})
|
|
|
|
|
|
- const emits = defineEmits(['click'])
|
|
|
+ const emits = defineEmits(['click','getuserinfo','contact','getphonenumber','opensetting','error'])
|
|
|
|
|
|
const handleClick = e => {
|
|
|
if (props.link && !props.disabled) {
|
|
@@ -73,6 +82,21 @@
|
|
|
}
|
|
|
!props.disabled && emits('click')
|
|
|
}
|
|
|
+ const getuserinfo = (event) => {
|
|
|
+ emits('getuserinfo', event.detail)
|
|
|
+ }
|
|
|
+ const contact = (event) => {
|
|
|
+ emits('contact', event.detail)
|
|
|
+ }
|
|
|
+ const getphonenumber = (event) => {
|
|
|
+ emits('getphonenumber', event.detail)
|
|
|
+ }
|
|
|
+ const opensetting = (event) => {
|
|
|
+ emits('opensetting', event.detail)
|
|
|
+ }
|
|
|
+ const error = (event) => {
|
|
|
+ emits('error', event.detail)
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|