hy-app 0.3.15 → 0.4.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.
Files changed (106) hide show
  1. package/components/hy-action-sheet/hy-action-sheet.vue +2 -2
  2. package/components/hy-action-sheet/typing.d.ts +32 -33
  3. package/components/hy-back-top/hy-back-top.vue +36 -32
  4. package/components/hy-button/hy-button.vue +7 -7
  5. package/components/hy-button/typing.d.ts +39 -40
  6. package/components/hy-calendar/index.scss +1 -1
  7. package/components/hy-card/hy-card.vue +3 -3
  8. package/components/hy-cell/hy-cell.vue +125 -118
  9. package/components/hy-cell/index.scss +7 -7
  10. package/components/hy-checkbox/hy-checkbox.vue +17 -16
  11. package/components/hy-checkbox/index.scss +1 -1
  12. package/components/hy-checkbox-group/hy-checkbox-group.vue +6 -4
  13. package/components/hy-checkbox-item/hy-checkbox-item.vue +56 -44
  14. package/components/hy-checkbox-item/index.scss +1 -1
  15. package/components/hy-checkbox-item/typing.d.ts +3 -2
  16. package/components/hy-code-input/hy-code-input.vue +314 -314
  17. package/components/hy-code-input/index.scss +12 -12
  18. package/components/hy-count-down/index.scss +1 -1
  19. package/components/hy-datetime-picker/index.scss +1 -1
  20. package/components/hy-datetime-picker/typing.d.ts +0 -1
  21. package/components/hy-divider/index.scss +3 -3
  22. package/components/hy-dropdown-item/hy-dropdown-item.vue +2 -2
  23. package/components/hy-dropdown-item/index.scss +5 -5
  24. package/components/hy-float-button/hy-float-button.vue +1 -1
  25. package/components/hy-float-button/index.scss +9 -18
  26. package/components/hy-folding-panel/index.scss +1 -1
  27. package/components/hy-form/hy-form.vue +2 -7
  28. package/components/hy-form-item/hy-form-item.vue +203 -201
  29. package/components/hy-form-item/typing.d.ts +20 -14
  30. package/components/hy-grid/hy-grid.vue +23 -23
  31. package/components/hy-grid/index.scss +2 -8
  32. package/components/hy-icon/index.scss +8 -8
  33. package/components/hy-input/hy-input.vue +45 -44
  34. package/components/hy-input/index.scss +12 -11
  35. package/components/hy-line-progress/index.scss +3 -3
  36. package/components/hy-list/hy-list.vue +2 -2
  37. package/components/hy-list/index.scss +4 -4
  38. package/components/hy-loading/hy-loading.vue +2 -3
  39. package/components/hy-loading/index.scss +17 -15
  40. package/components/hy-menu/hy-menu.vue +38 -30
  41. package/components/hy-menu/index.scss +1 -1
  42. package/components/hy-menu/typing.d.ts +16 -12
  43. package/components/hy-modal/hy-modal.vue +11 -11
  44. package/components/hy-modal/index.scss +17 -17
  45. package/components/hy-modal/typing.d.ts +0 -2
  46. package/components/hy-navbar/hy-navbar.vue +3 -3
  47. package/components/hy-navbar/index.scss +10 -11
  48. package/components/hy-notice-bar/hy-column-notice.vue +2 -2
  49. package/components/hy-notice-bar/hy-row-notice.vue +3 -3
  50. package/components/hy-notice-bar/index.scss +9 -12
  51. package/components/hy-notify/hy-notify.vue +8 -5
  52. package/components/hy-notify/index.scss +2 -2
  53. package/components/hy-number-step/index.scss +9 -10
  54. package/components/hy-pagination/index.scss +7 -2
  55. package/components/hy-parse/index.scss +0 -9
  56. package/components/hy-picker/hy-picker.vue +1 -1
  57. package/components/hy-picker/index.scss +9 -16
  58. package/components/hy-popover/hy-popover.vue +6 -4
  59. package/components/hy-popup/hy-popup.vue +4 -2
  60. package/components/hy-popup/index.scss +45 -32
  61. package/components/hy-qrcode/hy-qrcode.vue +3 -3
  62. package/components/hy-qrcode/index.scss +18 -17
  63. package/components/hy-radio/hy-radio.vue +20 -18
  64. package/components/hy-radio/index.scss +26 -22
  65. package/components/hy-rate/hy-rate.vue +5 -5
  66. package/components/hy-rate/index.scss +4 -4
  67. package/components/hy-read-more/hy-read-more.vue +19 -20
  68. package/components/hy-read-more/index.scss +12 -6
  69. package/components/hy-scroll-list/hy-scroll-list.vue +3 -6
  70. package/components/hy-scroll-list/index.scss +4 -4
  71. package/components/hy-search/index.scss +9 -8
  72. package/components/hy-slider/hy-slider.vue +5 -5
  73. package/components/hy-slider/index.scss +12 -12
  74. package/components/hy-status-bar/index.scss +3 -1
  75. package/components/hy-steps/hy-steps.vue +50 -23
  76. package/components/hy-submit-bar/hy-submit-bar.vue +1 -1
  77. package/components/hy-submit-bar/index.scss +5 -4
  78. package/components/hy-subsection/hy-subsection.vue +3 -3
  79. package/components/hy-subsection/index.scss +7 -7
  80. package/components/hy-swipe-action/hy-swipe-action.vue +8 -8
  81. package/components/hy-swipe-action/index.scss +8 -4
  82. package/components/hy-swiper/hy-swiper-indicator.vue +2 -2
  83. package/components/hy-swiper/hy-swiper.vue +6 -6
  84. package/components/hy-swiper/index.scss +6 -10
  85. package/components/hy-switch/hy-switch.vue +4 -4
  86. package/components/hy-switch/index.scss +4 -22
  87. package/components/hy-tabs/hy-tabs.vue +16 -16
  88. package/components/hy-tabs/index.scss +16 -16
  89. package/components/hy-tag/index.scss +1 -1
  90. package/components/hy-text/index.scss +3 -3
  91. package/components/hy-textarea/hy-textarea.vue +11 -11
  92. package/components/hy-textarea/index.scss +11 -10
  93. package/components/hy-toast/hy-toast.vue +5 -5
  94. package/components/hy-toast/index.scss +8 -8
  95. package/components/hy-tooltip/hy-tooltip.vue +193 -183
  96. package/components/hy-tooltip/index.scss +69 -45
  97. package/components/hy-upload/hy-upload.vue +15 -10
  98. package/components/hy-upload/index.scss +37 -36
  99. package/components/hy-warn/hy-warn.vue +11 -11
  100. package/components/hy-warn/index.scss +76 -82
  101. package/components/hy-waterfall/index.scss +2 -1
  102. package/composables/usePopover.ts +2 -2
  103. package/libs/css/mixin.scss +0 -9
  104. package/package.json +2 -2
  105. package/utils/inside.ts +4 -1
  106. package/utils/utils.ts +187 -162
@@ -7,7 +7,7 @@
7
7
  overflow: hidden;
8
8
 
9
9
  /* 标题 */
10
- &__title {
10
+ @include e(title) {
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  justify-content: center;
@@ -20,12 +20,12 @@
20
20
  }
21
21
 
22
22
  /* 内容 */
23
- &__content {
23
+ @include e(content) {
24
24
  padding: 20px;
25
25
  @include flex;
26
26
  justify-content: center;
27
27
 
28
- &__text {
28
+ @include m(text) {
29
29
  font-size: $hy-font-size-sm;
30
30
  color: $hy-text-color--grey;
31
31
  flex: 1;
@@ -34,32 +34,32 @@
34
34
  }
35
35
 
36
36
  /* 底部按钮 */
37
- &__button {
37
+ @include e(button) {
38
38
  /* 两个按钮的样式 */
39
- &-exact {
40
- .hy-modal__button-group__wrapper:first-child {
39
+ @include m(exact) {
40
+ .first {
41
41
  margin-right: $hy-border-margin-padding-lg;
42
42
  }
43
- &--reverse {
44
- .hy-modal__button-group__wrapper:last-child {
43
+ @include m(reverse) {
44
+ .last {
45
45
  margin-right: $hy-border-margin-padding-lg;
46
46
  }
47
47
  }
48
48
  }
49
49
 
50
50
 
51
- &-group {
51
+ @include m(group) {
52
52
  @include flex;
53
53
  padding: 20px;
54
54
 
55
55
  /* 自定义底部按钮 */
56
- &--confirm-button {
56
+ @include e(confirm-button) {
57
57
  flex-direction: column;
58
58
  padding: 0 25px 15px;
59
59
  }
60
60
 
61
61
 
62
- &__wrapper {
62
+ @include e(wrapper) {
63
63
  flex: 1;
64
64
  @include flex;
65
65
  justify-content: center;
@@ -68,28 +68,28 @@
68
68
  border-radius: $hy-border-radius-semicircle;
69
69
 
70
70
  /* 确认 */
71
- &--confirm {
71
+ @include m(confirm) {
72
72
  background-color: $hy-primary;
73
- &-text {
73
+ @include e(text) {
74
74
  color: #FFFFFF;
75
75
  }
76
76
  }
77
77
 
78
78
  /* 取消 */
79
- &--cancel {
79
+ @include m(cancel) {
80
80
  //background-color: $hy-background--empty;
81
81
  background-color: $hy-background--empty;
82
82
 
83
- &-text {
83
+ @include e(text) {
84
84
  color: $hy-text-color;
85
85
  }
86
86
  }
87
87
 
88
- &--hover {
88
+ @include m(hover) {
89
89
  opacity: 0.7;
90
90
  }
91
91
 
92
- &__text {
92
+ @include m(text) {
93
93
  font-size: 16px;
94
94
  text-align: center;
95
95
  }
@@ -1,5 +1,3 @@
1
- import { RowCenterType } from "hy-app/typing/modules/common";
2
-
3
1
  export default interface HyModalProps {
4
2
  /**
5
3
  * @description 是否显示模态框,请赋值给show (默认 false )
@@ -7,7 +7,7 @@
7
7
  height: addUnit(getPx(height) + statusBarHeight),
8
8
  }"
9
9
  ></view>
10
- <view :class="[fixed && 'hy-navbar--fixed']">
10
+ <view :class="[fixed && 'hy-navbar__fixed']">
11
11
  <HyStatusBar v-if="safeAreaInsetTop" :bgColor="bgColor"></HyStatusBar>
12
12
  <view
13
13
  :class="[border && 'hy-border__bottom', 'hy-navbar__content']"
@@ -34,7 +34,7 @@
34
34
  :style="{
35
35
  color: leftIconColor,
36
36
  }"
37
- class="hy-navbar__content__left__text"
37
+ class="hy-navbar__content__left--text"
38
38
  >
39
39
  {{ leftText }}
40
40
  </text>
@@ -75,7 +75,7 @@
75
75
  >
76
76
  <slot name="right">
77
77
  <HyIcon v-if="rightIcon" :name="rightIcon" size="20"></HyIcon>
78
- <text v-if="rightText" class="hy-navbar__content__right__text">{{
78
+ <text v-if="rightText" class="hy-navbar__content__right--text">{{
79
79
  rightText
80
80
  }}</text>
81
81
  </slot>
@@ -11,7 +11,7 @@
11
11
  z-index: 11;
12
12
  }
13
13
 
14
- &__content {
14
+ @include e(content) {
15
15
  @include flex(row);
16
16
  align-items: center;
17
17
  height: 44px;
@@ -19,8 +19,7 @@
19
19
  position: relative;
20
20
  justify-content: center;
21
21
 
22
- &__left,
23
- &__right {
22
+ @include e(left, right) {
24
23
  padding: 0 13px;
25
24
  position: absolute;
26
25
  top: 0;
@@ -29,36 +28,36 @@
29
28
  align-items: center;
30
29
  }
31
30
 
32
- &__left {
31
+ @include e(left){
33
32
  left: 0;
34
33
 
35
- &--hover {
34
+ @include m(hover) {
36
35
  opacity: 0.7;
37
36
  }
38
37
 
39
- &__text {
38
+ @include m(text) {
40
39
  font-size: 15px;
41
40
  margin-left: 3px;
42
41
  }
43
42
  }
44
43
 
45
- &__center {
44
+ @include e(center) {
46
45
  display: flex;
47
46
  flex-direction: column;
48
47
  text-align: center;
49
- &--title {
48
+ @include m(title) {
50
49
  font-size: $hy-font-size-base;
51
50
  }
52
- &--sub {
51
+ @include m(sub) {
53
52
  font-size: $hy-font-size-sm;
54
53
  color: $hy-text-color--grey;
55
54
  }
56
55
  }
57
56
 
58
- &__right {
57
+ @include e(right) {
59
58
  right: 0;
60
59
 
61
- &__text {
60
+ @include m(text) {
62
61
  font-size: 15px;
63
62
  margin-left: 3px;
64
63
  }
@@ -18,10 +18,10 @@
18
18
  <swiper-item
19
19
  v-for="(item, index) in text"
20
20
  :key="index"
21
- class="hy-notice__swiper__item"
21
+ class="hy-notice__swiper--item"
22
22
  :style="{ justifyContent: justifyContent }"
23
23
  >
24
- <text class="hy-notice__swiper__item__text" :style="[textStyle]">{{
24
+ <text class="hy-notice__swiper--item__text" :style="[textStyle]">{{
25
25
  item
26
26
  }}</text>
27
27
  </swiper-item>
@@ -7,8 +7,8 @@
7
7
  </slot>
8
8
  <view class="hy-notice__content" ref="hy-notice__content">
9
9
  <view
10
- ref="hy-notice__content__text"
11
- class="hy-notice__content__text"
10
+ ref="hy-notice__content--text"
11
+ class="hy-notice__content--text"
12
12
  :style="animationStyle"
13
13
  >
14
14
  <text
@@ -74,7 +74,7 @@ watch(
74
74
  // 进行一定的延时
75
75
  await sleep();
76
76
  // 查询盒子和文字的宽度
77
- textWidth = (await getRect(".hy-notice__content__text", false, instance))
77
+ textWidth = (await getRect(".hy-notice__content--text", false, instance))
78
78
  .width;
79
79
  boxWidth = (await getRect(".hy-notice__content", false, instance)).width;
80
80
  // 根据t=s/v(时间=路程/速度),这里为何不需要加上#u-notice-box的宽度,因为中设置了.u-notice-content样式中设置了padding-left: 100%
@@ -16,7 +16,7 @@
16
16
  border-radius: $hy-border-radius-sm;
17
17
  }
18
18
 
19
- &__left-icon {
19
+ @include e(left-icon) {
20
20
  align-items: center;
21
21
  margin-right: 5px;
22
22
  :deep(.hy-icon) {
@@ -24,25 +24,22 @@
24
24
  }
25
25
  }
26
26
 
27
- &__right-icon {
27
+ @include e(right-icon) {
28
+ margin-left: 5px;
29
+ align-items: center;
28
30
  :deep(.hy-icon) {
29
31
  color: $hy-warning;
30
32
  }
31
33
  }
32
34
 
33
- &__right-icon {
34
- margin-left: 5px;
35
- align-items: center;
36
- }
37
-
38
- &__content {
35
+ @include e(content) {
39
36
  text-align: right;
40
37
  flex: 1;
41
38
  @include flex;
42
39
  flex-wrap: nowrap;
43
40
  overflow: hidden;
44
41
 
45
- &__text {
42
+ @include m(text) {
46
43
  font-size: 14px;
47
44
  color: $hy-warning;
48
45
  /* #ifndef APP-NVUE */
@@ -57,18 +54,18 @@
57
54
  }
58
55
  }
59
56
 
60
- &__swiper {
57
+ @include e(swiper) {
61
58
  height: 16px;
62
59
  @include flex;
63
60
  align-items: center;
64
61
  flex: 1;
65
62
 
66
- &__item {
63
+ @include m(item) {
67
64
  @include flex;
68
65
  align-items: center;
69
66
  overflow: hidden;
70
67
 
71
- &__text {
68
+ @include e(text) {
72
69
  font-size: 14px;
73
70
  color: $hy-warning;
74
71
  }
@@ -5,18 +5,21 @@
5
5
  :style="[backgroundColor, customStyle]"
6
6
  >
7
7
  <hy-status-bar v-if="tmpConfig?.safeAreaInsetTop"></hy-status-bar>
8
- <view class="hy-notify--wrapper">
9
- <slot name="icon">
8
+ <view class="hy-notify__wrapper">
9
+ <template
10
+ v-if="['success', 'warning', 'error'].includes(tmpConfig.type)"
11
+ >
12
+ <slot v-if="$slots.icon" name="icon"></slot>
10
13
  <hy-icon
11
- v-if="['success', 'warning', 'error'].includes(tmpConfig.type)"
14
+ v-else
12
15
  :name="tmpConfig?.icon || icon"
13
16
  :color="tmpConfig?.color"
14
17
  :size="tmpConfig.fontSize"
15
18
  :customStyle="{ marginRight: '4px' }"
16
19
  ></hy-icon>
17
- </slot>
20
+ </template>
18
21
  <text
19
- class="hy-notify--wrapper__text"
22
+ class="hy-notify__wrapper--text"
20
23
  :style="{
21
24
  fontSize: addUnit(tmpConfig?.fontSize),
22
25
  color: tmpConfig?.color,
@@ -5,13 +5,13 @@
5
5
  @include b(notify) {
6
6
  padding: $hy-border-margin-padding-base;
7
7
 
8
- @include m(wrapper) {
8
+ @include e(wrapper) {
9
9
  @include flex;
10
10
  align-items: center;
11
11
  text-align: center;
12
12
  justify-content: center;
13
13
 
14
- &__text {
14
+ @include m(text) {
15
15
  font-size: $hy-font-size-base;
16
16
  text-align: center;
17
17
  }
@@ -6,15 +6,13 @@
6
6
  @include flex(row);
7
7
  align-items: center;
8
8
 
9
- &__slot {
9
+ @include e(slot) {
10
10
  /* #ifndef APP-NVUE */
11
11
  touch-action: none;
12
12
  /* #endif */
13
13
  }
14
14
 
15
- &__input,
16
- &__plus,
17
- &__minus {
15
+ @include e(input, plus, minus) {
18
16
  background-color: $hy-background--empty;
19
17
  width: 35px;
20
18
  @include flex;
@@ -24,27 +22,27 @@
24
22
  touch-action: none;
25
23
  /* #endif */
26
24
 
27
- &--hover {
25
+ @include m(hover) {
28
26
  background-color: $hy-background--hover;
29
27
  }
30
28
 
31
- &--disabled {
29
+ @include m(disabled) {
32
30
  color: $hy-text-color--disabled;
33
31
  background-color: $hy-background--disabled;
34
32
  }
35
33
  }
36
34
 
37
- &__plus {
35
+ @include e(plus) {
38
36
  border-top-right-radius: 4px;
39
37
  border-bottom-right-radius: 4px;
40
38
  }
41
39
 
42
- &__minus {
40
+ @include e(minus) {
43
41
  border-top-left-radius: 4px;
44
42
  border-bottom-left-radius: 4px;
45
43
  }
46
44
 
47
- &__input {
45
+ @include e(input) {
48
46
  position: relative;
49
47
  text-align: center;
50
48
  font-size: 15px;
@@ -53,8 +51,9 @@
53
51
  @include flex;
54
52
  align-items: center;
55
53
  justify-content: center;
54
+ color: $hy-text-color;
56
55
 
57
- &--disabled {
56
+ @include m(disabled) {
58
57
  color: $hy-text-color--disabled;
59
58
  background-color: $hy-background--disabled;
60
59
  }
@@ -15,12 +15,14 @@
15
15
  align-items: center;
16
16
  padding: $hy-border-margin-padding-base;
17
17
  }
18
+
18
19
  @include e(message) {
19
20
  text-align: center;
20
21
  font-size: $hy-font-size-sm;
21
22
  padding: 1px 0 16px 0;
22
23
  }
23
- &__nav {
24
+
25
+ @include e(nav) {
24
26
  min-width: 60px;
25
27
  @include m(active){
26
28
  color: rgba(0,0,0,0.65)
@@ -29,15 +31,18 @@
29
31
  color: rgba(0,0,0,0.15)
30
32
  }
31
33
  }
34
+
32
35
  @include e(size){
33
36
  flex: 1;
34
37
  text-align: center;
35
38
  font-size: $hy-font-size-sm;
36
39
  }
40
+
37
41
  @include e(separator){
38
42
  padding: 0 4px;
39
43
  }
40
- &__left {
44
+
45
+ @include e(left) {
41
46
  display: inline-block;
42
47
  }
43
48
  @include e(current){
@@ -1,9 +0,0 @@
1
-
2
- .hy-overlay {
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- background-color: rgba(0, 0, 0, 0.7);
9
- }
@@ -81,8 +81,8 @@
81
81
  >
82
82
  <view
83
83
  v-if="Array.isArray(item)"
84
- class="hy-picker--view__column__item u-line-1"
85
84
  :class="[
85
+ 'hy-picker--view__column__item',
86
86
  index1 === innerIndex[index] &&
87
87
  'hy-picker--view__column__item--selected',
88
88
  ]"
@@ -17,22 +17,22 @@
17
17
  }
18
18
  }
19
19
 
20
- &__title {
20
+ @include e(title) {
21
21
  @include flex();
22
22
  justify-content: space-between;
23
23
  padding: $hy-border-margin-padding-lg;
24
- &--center {
24
+ @include m(center) {
25
25
  font-size: $hy-font-size-base;
26
26
  color: $hy-text-color--grey;
27
27
  }
28
28
 
29
- &--right {
29
+ @include m(right) {
30
30
  color: $hy-primary;
31
31
  }
32
32
  }
33
33
 
34
34
  @include m(view) {
35
- &__column {
35
+ @include e(column) {
36
36
  @include flex;
37
37
  flex: 1;
38
38
  justify-content: center;
@@ -41,17 +41,10 @@
41
41
  background: $hy-background--hover;
42
42
  }
43
43
 
44
- &__item {
45
- @include flex;
46
- justify-content: center;
47
- align-items: center;
48
- font-size: 16px;
49
- text-align: center;
50
- /* #ifndef APP-NVUE */
51
- display: block;
52
- /* #endif */
53
-
54
- &--disabled {
44
+ @include e(item) {
45
+ color: $hy-text-color;
46
+ @include lineEllipsis;
47
+ @include m(disabled) {
55
48
  /* #ifndef APP-NVUE */
56
49
  cursor: not-allowed;
57
50
  /* #endif */
@@ -60,7 +53,7 @@
60
53
  }
61
54
  }
62
55
 
63
- :deep(.hy-picker--view__mask) {
56
+ @include edeep(mask) {
64
57
  background-image: none;
65
58
  }
66
59
  }
@@ -34,11 +34,11 @@
34
34
  </view>
35
35
  </view>
36
36
  </view>
37
+
37
38
  <hy-transition
38
39
  custom-class="hy-popover__pos"
39
40
  :custom-style="popover.popStyle.value"
40
41
  :show="showPopover"
41
- name="fade"
42
42
  :duration="200"
43
43
  >
44
44
  <view class="hy-popover__container">
@@ -195,6 +195,7 @@ const emit = defineEmits<IPopoverEmits>();
195
195
  const slots = useSlots();
196
196
  const queue = inject<Queue | null>(queueKey, null);
197
197
  const selector: string = "popover";
198
+ const visibleArrow = ref<boolean>(true);
198
199
  const { proxy } = getCurrentInstance() as any;
199
200
  const popover = usePopover();
200
201
  const showPopover = ref<boolean>(false); // 控制popover显隐
@@ -213,7 +214,7 @@ watch(
213
214
  watch(
214
215
  () => props.placement,
215
216
  (newVal) => {
216
- popover.init(newVal, true, selector);
217
+ popover.init(newVal, visibleArrow.value, selector);
217
218
  },
218
219
  );
219
220
 
@@ -229,7 +230,6 @@ watch(
229
230
  (newValue) => {
230
231
  if (newValue) {
231
232
  popover.control(props.placement, props.offset);
232
- // provide/inject在微信小程序不能使用,所以执行两个保存方法
233
233
  if (queue && queue.closeOther) {
234
234
  queue.closeOther(proxy);
235
235
  } else {
@@ -245,7 +245,9 @@ watch(
245
245
  );
246
246
 
247
247
  onMounted(() => {
248
- popover.init(props.placement, true, selector);
248
+ setTimeout(() => {
249
+ popover.init(props.placement, visibleArrow.value, selector);
250
+ }, 2000);
249
251
  });
250
252
 
251
253
  onBeforeMount(() => {
@@ -24,8 +24,10 @@
24
24
  <view
25
25
  v-if="closeable"
26
26
  @tap.stop="close"
27
- class="hy-popup__content__close"
28
- :class="['hy-popup__content__close--' + closeIconPos]"
27
+ :class="[
28
+ 'hy-popup__content__close',
29
+ 'hy-popup__content__close--' + closeIconPos,
30
+ ]"
29
31
  hover-class="hy-popup__content__close--hover"
30
32
  hover-stay-time="150"
31
33
  >
@@ -5,56 +5,69 @@
5
5
  @include b(popup) {
6
6
  flex: 1;
7
7
 
8
- &__content {
8
+ @include e(content) {
9
9
  background-color: $hy-background--container;
10
10
  position: relative;
11
11
 
12
- &--round-top {
13
- border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
14
- }
12
+ @include m(round) {
15
13
 
16
- &--round-left {
17
- border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
18
- }
14
+ &-top {
15
+ border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
16
+ }
19
17
 
20
- &--round-right {
21
- border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
22
- }
18
+ &-left {
19
+ border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
20
+ }
23
21
 
24
- &--round-bottom {
25
- border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
26
- }
22
+ &-right {
23
+ border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
24
+ }
27
25
 
28
- &--round-center {
29
- border-radius: $hy-border-radius-lg;
26
+ &-bottom {
27
+ border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
28
+ }
29
+
30
+ &-center {
31
+ border-radius: $hy-border-radius-lg;
32
+ }
30
33
  }
31
34
 
32
- &__close {
35
+ @include e(close) {
33
36
  position: absolute;
34
37
 
35
- &--hover {
38
+ @include m(hover) {
36
39
  opacity: 0.4;
37
40
  }
38
41
  }
39
42
 
40
- &__close--top-left {
41
- top: $hy-border-margin-padding-lg;
42
- left: $hy-border-margin-padding-lg;
43
- }
43
+ @include e(close) {
44
44
 
45
- &__close--top-right {
46
- top: $hy-border-margin-padding-lg;
47
- right: $hy-border-margin-padding-lg;
48
- }
45
+ @include m(top) {
49
46
 
50
- &__close--bottom-left {
51
- bottom: $hy-border-margin-padding-lg;
52
- left: $hy-border-margin-padding-lg;
53
- }
47
+ &-left {
48
+ top: $hy-border-margin-padding-lg;
49
+ left: $hy-border-margin-padding-lg;
50
+ }
51
+
52
+ &-right {
53
+ top: $hy-border-margin-padding-lg;
54
+ right: $hy-border-margin-padding-lg;
55
+ }
56
+
57
+ }
58
+ @include m(bottom) {
59
+
60
+ &-left {
61
+ bottom: $hy-border-margin-padding-lg;
62
+ left: $hy-border-margin-padding-lg;
63
+ }
64
+
65
+ &-right {
66
+ right: $hy-border-margin-padding-lg;
67
+ bottom: $hy-border-margin-padding-lg;
68
+ }
69
+ }
54
70
 
55
- &__close--bottom-right {
56
- right: $hy-border-margin-padding-lg;
57
- bottom: $hy-border-margin-padding-lg;
58
71
  }
59
72
  }
60
73
  }