uni-auth 1.0.9 → 1.1.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-auth",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -11,6 +11,12 @@ import { contentEnum, safeHeight } from '../common/index.js'
11
11
  const type = ref('')
12
12
  const permissionListener = ref(null)
13
13
  const isPermissionAlertShow = ref(false)
14
+ const props = defineProps({
15
+ top: {
16
+ type: String,
17
+ default: '',
18
+ },
19
+ })
14
20
  onMounted(() => {
15
21
  permissionListener.value = uni.createRequestPermissionListener()
16
22
  permissionListener.value.onConfirm((e) => {
@@ -23,13 +29,9 @@ onMounted(() => {
23
29
  })
24
30
  })
25
31
  const safeH = computed(() => {
32
+ if (props.top) return props.top + 'px'
26
33
  const { statusBarHeight, menuButtonHeight } = safeHeight()
27
- // #ifndef APP-PLUS
28
34
  return statusBarHeight + menuButtonHeight + 20 + 'px'
29
- // #endif
30
- // #ifdef APP-PLUS
31
- return statusBarHeight + menuButtonHeight + 'px'
32
- // #endif
33
35
  })
34
36
  onUnmounted(() => {
35
37
  permissionListener.value.stop()