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
@@ -36,7 +36,7 @@
36
36
 
37
37
  <!-- 选项卡 -->
38
38
  <view class="hy-action-sheet__actions" v-if="actions && actions.length">
39
- <button
39
+ <view
40
40
  v-for="(action, rowIndex) in actions"
41
41
  :key="rowIndex"
42
42
  :class="`hy-action-sheet__action ${
@@ -55,7 +55,7 @@
55
55
  >
56
56
  {{ action?.sub }}
57
57
  </view>
58
- </button>
58
+ </view>
59
59
  </view>
60
60
  <!-- 选项卡 -->
61
61
 
@@ -1,127 +1,126 @@
1
- import type { CSSProperties } from 'vue'
2
- import { HyApp } from 'hy-app/typing/modules/common'
1
+ import type { CSSProperties } from "vue";
3
2
  export interface IActionSheetAction {
4
3
  /**
5
4
  * 选项名称
6
5
  */
7
- name: string
6
+ name: string;
8
7
  /**
9
8
  * 描述信息
10
9
  */
11
- sub?: string
10
+ sub?: string;
12
11
  /**
13
12
  * 颜色
14
13
  */
15
- color?: string
14
+ color?: string;
16
15
  /**
17
16
  * 禁用
18
17
  */
19
- disabled?: boolean
18
+ disabled?: boolean;
20
19
  /**
21
20
  * 加载中状态
22
21
  */
23
- loading?: boolean
22
+ loading?: boolean;
24
23
  }
25
24
  export interface IActionSheetPanel {
26
25
  /**
27
26
  * 图片地址
28
27
  */
29
- iconUrl: string
28
+ iconUrl: string;
30
29
  /**
31
30
  * 标题内容
32
31
  */
33
- name: string
32
+ name: string;
34
33
  }
35
34
  export interface HyActionSheetProps {
36
35
  /**
37
36
  * 操作菜单是否展示 ( 默认 false )
38
37
  * */
39
- modelValue?: boolean
38
+ modelValue?: boolean;
40
39
  /**
41
40
  * 菜单选项
42
41
  * */
43
- actions?: IActionSheetAction[]
42
+ actions?: IActionSheetAction[];
44
43
  /**
45
44
  * 自定义面板项,可以为字符串数组,也可以为对象数组,如果为二维数组,则为多行展示
46
45
  * */
47
- panels?: Array<IActionSheetPanel | IActionSheetPanel[]>
46
+ panels?: Array<IActionSheetPanel | IActionSheetPanel[]>;
48
47
  /**
49
48
  * 圆角值 (默认 20 )
50
49
  * */
51
- round?: string | number
50
+ round?: string | number;
52
51
  /**
53
52
  * 标题
54
53
  * */
55
- title?: string
54
+ title?: string;
56
55
  /**
57
56
  * 标题文字位置
58
57
  * */
59
- titleAlign?: HyApp.RowCenterType
58
+ titleAlign?: HyApp.RowCenterType;
60
59
  /**
61
60
  * 取消按钮的提示文字,不为空时显示按钮
62
61
  * */
63
- cancelText?: string
62
+ cancelText?: string;
64
63
  /**
65
64
  * 点击某个菜单项时是否关闭弹窗 (默认 true )
66
65
  * */
67
- closeOnClickAction?: boolean
66
+ closeOnClickAction?: boolean;
68
67
  /**
69
68
  * 点击遮罩是否允许关闭 (默认 true )
70
69
  * */
71
- closeOnClickOverlay?: boolean
70
+ closeOnClickOverlay?: boolean;
72
71
  /**
73
72
  * 弹框动画持续时间 ( 默认 200 )
74
73
  * */
75
- duration?: number
74
+ duration?: number;
76
75
  /**
77
76
  * 菜单层级 ( 默认 100 )
78
77
  * */
79
- zIndex?: number
78
+ zIndex?: number;
80
79
  /**
81
80
  * 处理底部安全区 (默认 true )
82
81
  * */
83
- safeAreaInsetBottom?: boolean
82
+ safeAreaInsetBottom?: boolean;
84
83
  /**
85
84
  * 自定义外部样式
86
85
  * */
87
- customStyle?: CSSProperties
86
+ customStyle?: CSSProperties;
88
87
  /**
89
88
  * 自定义外部类名
90
89
  * */
91
- customClass?: string
90
+ customClass?: string;
92
91
  /**
93
92
  * 自定义标题类名
94
93
  * */
95
- customHeaderClass?: string
94
+ customHeaderClass?: string;
96
95
  }
97
96
 
98
97
  interface SelectEventParams {
99
98
  /**
100
99
  * 选中的内容
101
100
  * */
102
- item: any
101
+ item: any;
103
102
  /**
104
103
  * 选中的横向索引
105
104
  * */
106
- rowIndex?: number
105
+ rowIndex?: number;
107
106
  /**
108
107
  * 选中的竖列索引
109
108
  * */
110
- colIndex?: number
109
+ colIndex?: number;
111
110
  /**
112
111
  * 选中的索引
113
112
  * */
114
- index?: number
113
+ index?: number;
115
114
  }
116
115
  export interface IActionSheetEmits {
117
116
  /** 选中了某个动作时触发 */
118
- (e: 'select', params: SelectEventParams): void
117
+ (e: "select", params: SelectEventParams): void;
119
118
  /** 点击取消按钮时触发 */
120
- (e: 'cancel'): void
119
+ (e: "cancel"): void;
121
120
  /** 点击遮罩或关闭按钮时触发 */
122
- (e: 'close'): void
121
+ (e: "close"): void;
123
122
  /** 打开面板时触发 */
124
- (e: 'open'): void
123
+ (e: "open"): void;
125
124
  /** 手动更新弹窗显示隐藏 */
126
- (e: 'update:modelValue', visible: boolean): void
125
+ (e: "update:modelValue", visible: boolean): void;
127
126
  }
@@ -25,31 +25,31 @@
25
25
 
26
26
  <script lang="ts">
27
27
  export default {
28
- name: 'hy-back-top',
28
+ name: "hy-back-top",
29
29
  options: {
30
30
  addGlobalClass: true,
31
31
  virtualHost: true,
32
- styleIsolation: 'shared',
32
+ styleIsolation: "shared",
33
33
  },
34
- }
34
+ };
35
35
  </script>
36
36
 
37
37
  <script setup lang="ts">
38
- import { computed, toRefs } from 'vue'
39
- import type { CSSProperties, PropType } from 'vue'
40
- import { addUnit, getPx } from '../../utils'
41
- import { IconConfig } from '../../config'
42
- import type { IBackTopEmit } from './typing'
43
- import type HyIconProps from '../hy-icon/typing'
38
+ import { computed, toRefs } from "vue";
39
+ import type { CSSProperties, PropType } from "vue";
40
+ import { addUnit, getPx } from "../../utils";
41
+ import { IconConfig } from "../../config";
42
+ import type { IBackTopEmit } from "./typing";
43
+ import type HyIconProps from "../hy-icon/typing";
44
44
  // 组件
45
- import HyTransition from '../hy-transition/hy-transition.vue'
46
- import HyIcon from '../hy-icon/hy-icon.vue'
45
+ import HyTransition from "../hy-transition/hy-transition.vue";
46
+ import HyIcon from "../hy-icon/hy-icon.vue";
47
47
 
48
48
  /**
49
49
  * 该组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。
50
50
  * @displayName hy-back-top
51
51
  */
52
- defineOptions({})
52
+ defineOptions({});
53
53
 
54
54
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
55
55
  const props = defineProps({
@@ -59,7 +59,7 @@ const props = defineProps({
59
59
  * */
60
60
  mode: {
61
61
  type: String,
62
- default: 'circle',
62
+ default: "circle",
63
63
  },
64
64
  /** 自定义图标属性集合 */
65
65
  icon: {
@@ -101,41 +101,45 @@ const props = defineProps({
101
101
  customStyle: {
102
102
  type: Object as PropType<CSSProperties>,
103
103
  default: {
104
- transform: 'rotate(180deg)',
104
+ transform: "rotate(180deg)",
105
105
  },
106
106
  },
107
- })
108
- const { customStyle, duration, mode, bottom, right, top, scrollTop } = toRefs(props)
109
- const emit = defineEmits<IBackTopEmit>()
107
+ });
108
+ const { customStyle, duration, mode, bottom, right, top, scrollTop } =
109
+ toRefs(props);
110
+ const emit = defineEmits<IBackTopEmit>();
110
111
 
111
112
  const backTopStyle = computed<CSSProperties>(() => {
112
113
  return {
113
114
  bottom: addUnit(bottom.value),
114
115
  right: addUnit(right.value),
115
- width: '40px',
116
- height: '40px',
117
- position: 'fixed',
116
+ width: "40px",
117
+ height: "40px",
118
+ position: "fixed",
118
119
  zIndex: 10,
119
- }
120
- })
120
+ };
121
+ });
121
122
  const contentStyle = computed<CSSProperties>(() => {
122
123
  const style: CSSProperties = {
123
- borderRadius: mode.value === 'circle' ? '50%' : '4px',
124
- }
125
- return Object.assign(style, customStyle.value)
126
- })
124
+ borderRadius: mode.value === "circle" ? "50%" : "4px",
125
+ };
126
+ return Object.assign(style, customStyle.value);
127
+ });
127
128
  const show = computed<boolean>(() => {
128
- return getPx(scrollTop.value) > getPx(top.value)
129
- })
129
+ return getPx(scrollTop.value) > getPx(top.value);
130
+ });
130
131
  const backToTop = () => {
131
132
  uni.pageScrollTo({
132
133
  scrollTop: 0,
134
+ // #ifndef MP-ALIPAY
135
+ // 支付宝不支持duration属性
133
136
  duration: duration.value,
134
- })
135
- emit('click')
136
- }
137
+ // #endif
138
+ });
139
+ emit("click");
140
+ };
137
141
  </script>
138
142
 
139
143
  <style lang="scss" scoped>
140
- @import './index.scss';
144
+ @import "./index.scss";
141
145
  </style>
@@ -55,13 +55,13 @@
55
55
  :customStyle="icon?.customStyle || { marginRight: '2px' }"
56
56
  ></HyIcon>
57
57
  <!-- @slot 插入默认的值 -->
58
- <slot>
59
- <text
60
- class="hy-button__text"
61
- :style="[{ fontSize: textSize + 'px' }]"
62
- >{{ text }}</text
63
- >
64
- </slot>
58
+ <slot v-if="$slots.default"></slot>
59
+ <text
60
+ v-else
61
+ class="hy-button__text"
62
+ :style="[{ fontSize: textSize + 'px' }]"
63
+ >{{ text }}</text
64
+ >
65
65
  </template>
66
66
  </button>
67
67
  <!-- #endif -->
@@ -1,6 +1,5 @@
1
- import type { CSSProperties } from 'vue'
2
- import type HyIconProps from '../hy-icon/typing'
3
- import HyApp from 'hy-app'
1
+ import type { CSSProperties } from "vue";
2
+ import type HyIconProps from "../hy-icon/typing";
4
3
 
5
4
  export interface HyButtonProps {
6
5
  /**
@@ -8,158 +7,158 @@ export interface HyButtonProps {
8
7
  * @default true
9
8
  * @type {boolean}
10
9
  * */
11
- hairline?: boolean
10
+ hairline?: boolean;
12
11
  /**
13
12
  * 按钮的预置样式
14
13
  * @type {ThemeType}
15
14
  * @default 'primary'
16
15
  * @values info, primary, error, warning, success
17
16
  * */
18
- type?: HyApp.ThemeType
17
+ type?: HyApp.ThemeType;
19
18
  /**
20
19
  * 按钮尺寸
21
20
  * @type {'large' | 'medium' | 'small' | 'mini'}
22
21
  * @default 'medium'
23
22
  * */
24
- size?: 'large' | 'medium' | 'small' | 'mini'
23
+ size?: "large" | "medium" | "small" | "mini";
25
24
  /**
26
25
  * 按钮形状,circle(两边为半圆),square(带圆角) (默认 'square' )
27
26
  * */
28
- shape?: HyApp.ShapeType
27
+ shape?: HyApp.ShapeType;
29
28
  /**
30
29
  * 按钮是否镂空,背景色透明 (默认 false)
31
30
  * */
32
- plain?: boolean
31
+ plain?: boolean;
33
32
  /**
34
33
  * 是否禁用 (默认 false)
35
34
  * */
36
- disabled?: boolean
35
+ disabled?: boolean;
37
36
  /**
38
37
  * 按钮名称前是否带 loading 图标(App-nvue 平台,在 ios 上为雪花,Android上为圆圈) (默认 false)
39
38
  * */
40
- loading?: boolean
39
+ loading?: boolean;
41
40
  /**
42
41
  * 加载中提示文字
43
42
  * */
44
- loadingText?: string
43
+ loadingText?: string;
45
44
  /**
46
45
  * 加载状态图标类型 (默认 'spinner' )
47
46
  * */
48
- loadingMode?: HyApp.LoadingMode
47
+ loadingMode?: HyApp.LoadingMode;
49
48
  /**
50
49
  * 加载图标大小 (默认 13 )
51
50
  * */
52
- loadingSize?: number
51
+ loadingSize?: number;
53
52
  /**
54
53
  * 开放能力,具体请看uniapp稳定关于button组件部分说明
55
54
  * */
56
- openType?: string
55
+ openType?: string;
57
56
  /**
58
57
  * 用于 <form> 组件,点击分别会触发 <form> 组件的 submit/reset 事件
59
58
  * */
60
- formType?: string
59
+ formType?: string;
61
60
  /**
62
61
  * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 (注:只微信小程序、QQ小程序有效)
63
62
  * */
64
- appParameter?: string
63
+ appParameter?: string;
65
64
  /**
66
65
  * 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效(默认 true )
67
66
  * */
68
- hoverStopPropagation?: boolean
67
+ hoverStopPropagation?: boolean;
69
68
  /**
70
69
  * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文(默认 en )
71
70
  * */
72
- lang?: string
71
+ lang?: string;
73
72
  /**
74
73
  * 会话来源,openType="contact"时有效
75
74
  * */
76
- sessionFrom?: string
75
+ sessionFrom?: string;
77
76
  /**
78
77
  * 会话内消息卡片标题,openType="contact"时有效
79
78
  * */
80
- sendMessageTitle?: string
79
+ sendMessageTitle?: string;
81
80
  /**
82
81
  * 会话内消息卡片点击跳转小程序路径,openType="contact"时有效
83
82
  * */
84
- sendMessagePath?: string
83
+ sendMessagePath?: string;
85
84
  /**
86
85
  * 会话内消息卡片图片,openType="contact"时有效
87
86
  * */
88
- sendMessageImg?: string
87
+ sendMessageImg?: string;
89
88
  /**
90
89
  * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,openType="contact"时有效(默认false)
91
90
  * */
92
- showMessageCard?: boolean
91
+ showMessageCard?: boolean;
93
92
  /**
94
93
  * 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取
95
94
  * */
96
- dataName?: string
95
+ dataName?: string;
97
96
  /**
98
97
  * 节流时间,一定时间内只能触发一次 (默认 0 )
99
98
  * */
100
- throttleTime?: number
99
+ throttleTime?: number;
101
100
  /**
102
101
  * 按住后多久出现点击态,单位毫秒 (默认 0 )
103
102
  * */
104
- hoverStartTime?: number
103
+ hoverStartTime?: number;
105
104
  /**
106
105
  * 手指松开后点击态保留时间,单位毫秒 (默认 200 )
107
106
  * */
108
- hoverStayTime?: number
107
+ hoverStayTime?: number;
109
108
  /**
110
109
  * 按钮文字,之所以通过props传入,是因为slot传入的话(注:nvue中无法控制文字的样式)
111
110
  * */
112
- text?: string
111
+ text?: string;
113
112
  /**
114
113
  * 按钮图标api集合
115
114
  * */
116
- icon?: Partial<HyIconProps>
115
+ icon?: Partial<HyIconProps>;
117
116
  /**
118
117
  * 按钮颜色,支持传入linear-gradient渐变色
119
118
  * */
120
- color?: string
119
+ color?: string;
121
120
  /**
122
121
  * 阻止事件冒泡
123
122
  * */
124
- stop?: boolean
123
+ stop?: boolean;
125
124
  /**
126
125
  * 定义需要用到的外部样式
127
126
  * @note 类型问题
128
127
  * */
129
- customStyle?: CSSProperties
128
+ customStyle?: CSSProperties;
130
129
  /**
131
130
  * 自定义外部类名
132
131
  * */
133
- customClass?: string
132
+ customClass?: string;
134
133
  }
135
134
 
136
135
  export interface IButtonEmits {
137
136
  /**
138
137
  * 点击按钮事件
139
138
  * */
140
- (e: 'click', event: Event): void
139
+ (e: "click", event: Event): void;
141
140
  /**
142
141
  * 仅限微信小程序,当使用开放能力时,发生错误的回调
143
142
  * */
144
- (e: 'error', event: Event): void
143
+ (e: "error", event: Event): void;
145
144
  /**
146
145
  * 微信小程序获取手机号
147
146
  * */
148
- (e: 'getphonenumber', event: Event): void
147
+ (e: "getphonenumber", event: Event): void;
149
148
  /**
150
149
  * 微信小程序用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo
151
150
  * */
152
- (e: 'getuserinfo', event: Event): void
151
+ (e: "getuserinfo", event: Event): void;
153
152
  /**
154
153
  * 仅限微信小程序,在打开授权设置页并关闭后回调
155
154
  * */
156
- (e: 'opensetting', event: Event): void
155
+ (e: "opensetting", event: Event): void;
157
156
  /**
158
157
  * 仅限微信小程序,打开 APP 成功的回调
159
158
  * */
160
- (e: 'launchapp', event: Event): void
159
+ (e: "launchapp", event: Event): void;
161
160
  /**
162
161
  * 仅限微信小程序,用户同意隐私协议事件回调,open-type="agreePrivacyAuthorization"时有效
163
162
  * */
164
- (e: 'agreeprivacyauthorization', event: Event): void
163
+ (e: "agreeprivacyauthorization", event: Event): void;
165
164
  }
@@ -5,7 +5,7 @@
5
5
  /* 主样式 */
6
6
  @include b(calendar){
7
7
  /* 确认按钮 */
8
- &__confirm {
8
+ @include e(confirm) {
9
9
  padding: 7px 18px;
10
10
  }
11
11
 
@@ -9,7 +9,9 @@
9
9
  }"
10
10
  @tap="headClick"
11
11
  >
12
- <view v-if="!$slots.header" class="hy-card--head__flex">
12
+ <!-- @slot 头部插槽 -->
13
+ <slot v-if="$slots.header" name="header" />
14
+ <view v-else class="hy-card--head__flex">
13
15
  <view class="hy-card--head__left" v-if="title">
14
16
  <image
15
17
  :src="thumb"
@@ -44,8 +46,6 @@
44
46
  </text>
45
47
  </view>
46
48
  </view>
47
- <!-- @slot 头部插槽 -->
48
- <slot name="header" v-else />
49
49
  </view>
50
50
  <view
51
51
  @tap="bodyClick"