uni-auth 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,11 +6,18 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
|
|
8
8
|
<script setup>
|
|
9
|
+
// #ifdef APP-PLUS
|
|
9
10
|
import { onMounted, onUnmounted, computed, ref } from 'vue'
|
|
10
11
|
import { contentEnum, safeHeight } from '../common/index.js'
|
|
11
12
|
const type = ref('')
|
|
12
13
|
const permissionListener = ref(null)
|
|
13
14
|
const isPermissionAlertShow = ref(false)
|
|
15
|
+
const props = defineProps({
|
|
16
|
+
top: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
})
|
|
14
21
|
onMounted(() => {
|
|
15
22
|
permissionListener.value = uni.createRequestPermissionListener()
|
|
16
23
|
permissionListener.value.onConfirm((e) => {
|
|
@@ -23,17 +30,14 @@ onMounted(() => {
|
|
|
23
30
|
})
|
|
24
31
|
})
|
|
25
32
|
const safeH = computed(() => {
|
|
33
|
+
if (props.top) return props.top + 'px'
|
|
26
34
|
const { statusBarHeight, menuButtonHeight } = safeHeight()
|
|
27
|
-
// #ifndef APP-PLUS
|
|
28
35
|
return statusBarHeight + menuButtonHeight + 20 + 'px'
|
|
29
|
-
// #endif
|
|
30
|
-
// #ifdef APP-PLUS
|
|
31
|
-
return statusBarHeight + menuButtonHeight + 'px'
|
|
32
|
-
// #endif
|
|
33
36
|
})
|
|
34
37
|
onUnmounted(() => {
|
|
35
38
|
permissionListener.value.stop()
|
|
36
39
|
})
|
|
40
|
+
// #endif
|
|
37
41
|
</script>
|
|
38
42
|
|
|
39
43
|
<style scoped>
|