hy-app 0.4.6 → 0.4.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.
@@ -4,38 +4,39 @@
4
4
  :style="submitBarStyle"
5
5
  >
6
6
  <view class="hy-submit-bar__left">
7
- <slot name="left">
8
- <view
9
- class="hy-submit-bar__left--item"
10
- v-for="(item, i) in menus"
11
- :key="i"
12
- @tap="clickMenuFn(i)"
13
- >
14
- <HyIcon
15
- :name="item.icon"
16
- :label="item.text"
17
- :color="iconColor"
18
- :label-color="iconLabelColor"
19
- labelPos="bottom"
20
- space="7"
21
- :size="20"
22
- ></HyIcon>
23
- <HyBadge
24
- :value="item?.badge?.value"
25
- :absolute="true"
26
- :offset="item?.badge?.offset || [-5, 20]"
27
- :isDot="item?.badge?.isDot"
28
- :type="item?.badge?.type"
29
- :color="item?.badge?.color"
30
- :shape="item?.badge?.shape"
31
- :numberType="item?.badge?.numberType"
32
- :inverted="item?.badge?.inverted"
33
- ></HyBadge>
34
- </view>
35
- </slot>
7
+ <slot v-if="$slots.left" name="left"></slot>
8
+ <view
9
+ v-else-if="menus.length"
10
+ class="hy-submit-bar__left--item"
11
+ v-for="(item, i) in menus"
12
+ :key="i"
13
+ @tap="clickMenuFn(i)"
14
+ >
15
+ <HyIcon
16
+ :name="item.icon"
17
+ :label="item.text"
18
+ :color="iconColor"
19
+ :label-color="iconLabelColor"
20
+ labelPos="bottom"
21
+ space="7"
22
+ :size="20"
23
+ ></HyIcon>
24
+ <HyBadge
25
+ :value="item?.badge?.value"
26
+ :absolute="true"
27
+ :offset="item?.badge?.offset || [-5, 20]"
28
+ :isDot="item?.badge?.isDot"
29
+ :type="item?.badge?.type"
30
+ :color="item?.badge?.color"
31
+ :shape="item?.badge?.shape"
32
+ :numberType="item?.badge?.numberType"
33
+ :inverted="item?.badge?.inverted"
34
+ ></HyBadge>
35
+ </view>
36
36
  </view>
37
37
  <view class="hy-submit-bar__right">
38
- <slot name="right">
38
+ <slot v-if="$slots.right" name="right"></slot>
39
+ <template v-else>
39
40
  <view
40
41
  class="hy-submit-bar__right--button"
41
42
  v-if="showLeftBtn"
@@ -64,7 +65,7 @@
64
65
  ></HyLoading>
65
66
  {{ rightBtnText }}
66
67
  </view>
67
- </slot>
68
+ </template>
68
69
  </view>
69
70
  </view>
70
71
  </template>
@@ -169,6 +170,11 @@ const props = defineProps({
169
170
  type: String,
170
171
  default: "circle",
171
172
  },
173
+ /** 层级 */
174
+ zIndex: {
175
+ type: [Number, String],
176
+ default: 999,
177
+ },
172
178
  /** 定义需要用到的外部样式 */
173
179
  customStyle: {
174
180
  type: Object as PropType<CSSProperties>,
@@ -186,6 +192,7 @@ const submitBarStyle = computed(() => {
186
192
  const style: CSSProperties = {
187
193
  bottom: 0,
188
194
  left: 0,
195
+ zIndex: props.zIndex,
189
196
  };
190
197
  if (props.fixed) style.position = "fixed";
191
198
  return Object.assign(style, props.customStyle);
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <view
3
- :class="['hy-tooltip', customClass]"
4
- :style="customStyle"
5
- @click.stop="closeHandler"
6
- >
2
+ <view :class="['hy-tooltip', customClass]" :style="customStyle">
7
3
  <HyOverlay
8
4
  :show="showTooltip && tooltipTop !== -10000 && overlay"
9
5
  :customStyle="{ backgroundColor: 'rgba(0, 0, 0, 0)' }"
@@ -35,7 +31,7 @@
35
31
  v-if="showCopy"
36
32
  class="hy-tooltip__container--list__btn"
37
33
  hover-class="hy-tooltip__container--list__btn--hover"
38
- @tap="setClipboardData"
34
+ @tap.stop="setClipboardData"
39
35
  >
40
36
  <text class="hy-tooltip__container--list__btn--text">复制</text>
41
37
  </view>
@@ -16,7 +16,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
16
16
  background-clip: padding-box;
17
17
  text-align: center;
18
18
  min-height: 36px;
19
- z-index: $hy-tooltip--z-index;
19
+ z-index: 99999;
20
20
  transition: opacity 0.2s;
21
21
  box-shadow: $hy-box-shadow;
22
22
  border-radius: $hy-border-radius-sm;
@@ -67,7 +67,6 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
67
67
  padding: 0;
68
68
  @include flex(row);
69
69
  align-items: center;
70
- z-index: 999;
71
70
 
72
71
  @include e(btn) {
73
72
  padding: $hy-border-margin-padding-base;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.4.6",
4
- "description": "fix: 修复toast的缓存问题",
3
+ "version": "0.4.7",
4
+ "description": "fix: 修复tooltip点击无法复制问题",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},