muzhiyu-ui 1.0.12 → 1.0.14

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.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <view class="mu-button" :class="buttonClass" :style="wrapStyle" @tap="handleClick" @click="handleClick">
2
+ <view class="mu-button" :class="buttonClass" :style="wrapStyle">
3
3
  <button
4
4
  class="mu-button__inner"
5
5
  hover-class="mu-button__inner--active"
@@ -64,6 +64,7 @@ import { computed, useSlots, inject } from 'vue'
64
64
  defineOptions({
65
65
  name: 'mu-button',
66
66
  options: {
67
+ virtualHost: true,
67
68
  styleIsolation: 'shared'
68
69
  }
69
70
  })
@@ -110,6 +111,7 @@ const props = defineProps({
110
111
 
111
112
  const emit = defineEmits([
112
113
  'click',
114
+ 'tap',
113
115
  'getuserinfo',
114
116
  'getphonenumber',
115
117
  'getrealtimephonenumber',
@@ -246,9 +248,14 @@ const innerStyle = computed(() => {
246
248
  return style
247
249
  })
248
250
 
251
+ let lastClickTime = 0
249
252
  function handleClick(e) {
250
253
  if (props.disabled || props.loading) return
254
+ const now = Date.now()
255
+ if (now - lastClickTime < 60) return
256
+ lastClickTime = now
251
257
  emit('click', e)
258
+ emit('tap', e)
252
259
  }
253
260
 
254
261
  function onGetUserInfo(e) { emit('getuserinfo', e) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muzhiyu-ui",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢组件库",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "uni_modules": {
30
30
  "id": "muzhiyu-ui",
31
31
  "name": "muzhiyu-ui 极奢组件库",
32
- "version": "1.0.12",
32
+ "version": "1.0.14",
33
33
  "description": "基于 UniApp Vue3 + SCSS 打造的全端极奢 UI 组件库",
34
34
  "site": "",
35
35
  "displayName": "MuzhiyuUI 极奢全端组件库"