hy-app 0.2.7 → 0.2.8

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.
@@ -20,8 +20,8 @@
20
20
  </view>
21
21
  </view>
22
22
  <hy-transition
23
- class="hy-popover__pos"
24
- :custom-style="popover.popStyle.value"
23
+ custom-class="hy-popover__pos"
24
+ :custom-style="popover.popStyle"
25
25
  :show="showPopover"
26
26
  name="fade"
27
27
  :duration="200"
@@ -3,7 +3,7 @@ import { getRect, isObject } from '../utils'
3
3
  import { IOffset, IPlacementVo } from '@/package/components/hy-popover/typing'
4
4
 
5
5
  export function usePopover(visibleArrow = true) {
6
- const { proxy } = getCurrentInstance() as any
6
+ const instance = getCurrentInstance()
7
7
  const popStyle = ref<CSSProperties>()
8
8
  const arrowStyle = ref<string>('')
9
9
  const showStyle = ref<string>('')
@@ -40,7 +40,7 @@ export function usePopover(visibleArrow = true) {
40
40
  }
41
41
 
42
42
  // 初始化数据获取
43
- getRect('#target', false, proxy).then((rect) => {
43
+ getRect('#target', false, instance).then((rect) => {
44
44
  if (!rect) return
45
45
  left.value = rect.left as number
46
46
  bottom.value = rect.bottom as number
@@ -49,7 +49,7 @@ export function usePopover(visibleArrow = true) {
49
49
  top.value = rect.top as number
50
50
  })
51
51
  // 用透明度可在初始化时获取到pop尺寸
52
- getRect('#pos', false, proxy).then((rect) => {
52
+ getRect('#pos', false, instance).then((rect) => {
53
53
  if (!rect) return
54
54
  popWidth.value = rect.width as number
55
55
  popHeight.value = rect.height as number
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.2.7",
4
- "description": "feat: 气泡组件",
3
+ "version": "0.2.8",
4
+ "description": "fix: 气泡组件在小程序没有相对定位",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},