hy-app 0.3.6 → 0.3.7
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.
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
<text>{{ item.content }}</text>
|
|
33
33
|
</view>
|
|
34
34
|
</view>
|
|
35
|
-
|
|
36
|
-
<!-- 用户自定义样式 -->
|
|
37
|
-
<slot name="content" v-else />
|
|
38
35
|
</view>
|
|
39
36
|
</view>
|
|
40
37
|
<hy-transition
|
|
@@ -156,7 +153,6 @@ const props = defineProps({
|
|
|
156
153
|
/** 显示的内容,也可以通过 slot#content 传入 */
|
|
157
154
|
content: {
|
|
158
155
|
type: [String, Array] as PropType<string | any[]>,
|
|
159
|
-
required: true,
|
|
160
156
|
},
|
|
161
157
|
/**
|
|
162
158
|
* 指定 popover 的放置位置
|
|
@@ -118,7 +118,7 @@ export function usePopover(visibleArrow = true) {
|
|
|
118
118
|
left: `${offsetX}px`,
|
|
119
119
|
bottom: `${verticalY}px`,
|
|
120
120
|
},
|
|
121
|
-
`left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value
|
|
121
|
+
`left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value + 25) - offsetX}px;`,
|
|
122
122
|
],
|
|
123
123
|
],
|
|
124
124
|
[
|
|
@@ -128,7 +128,7 @@ export function usePopover(visibleArrow = true) {
|
|
|
128
128
|
right: `${offsetX}px`,
|
|
129
129
|
bottom: `${verticalY}px`,
|
|
130
130
|
},
|
|
131
|
-
`right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value
|
|
131
|
+
`right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value + 25) - offsetX}px; transform: translateX(50%);`,
|
|
132
132
|
],
|
|
133
133
|
],
|
|
134
134
|
// 下
|
|
@@ -150,7 +150,7 @@ export function usePopover(visibleArrow = true) {
|
|
|
150
150
|
left: `${offsetX}px`,
|
|
151
151
|
top: `${verticalY}px`,
|
|
152
152
|
},
|
|
153
|
-
`left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value
|
|
153
|
+
`left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value + 25) - offsetX}px;`,
|
|
154
154
|
],
|
|
155
155
|
],
|
|
156
156
|
[
|
|
@@ -160,7 +160,7 @@ export function usePopover(visibleArrow = true) {
|
|
|
160
160
|
right: `${offsetX}px`,
|
|
161
161
|
top: `${verticalY}px`,
|
|
162
162
|
},
|
|
163
|
-
`right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value
|
|
163
|
+
`right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value + 25) - offsetX}px; transform: translateX(50%);`,
|
|
164
164
|
],
|
|
165
165
|
],
|
|
166
166
|
// 左
|
|
File without changes
|