@volverjs/ui-vue 0.0.10-beta.27 → 0.0.10-beta.28
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.
- package/dist/components/VvAction/VvAction.es.js +17 -4
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.vue.d.ts +7 -7
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +17 -4
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.es.js +30 -7
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +3 -3
- package/dist/components/VvCombobox/VvCombobox.es.js +30 -7
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +5 -5
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +1 -1
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +6 -6
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +17 -4
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +11 -11
- package/dist/components/VvInputFile/VvInputFile.es.js +30 -7
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +1 -1
- package/dist/components/VvNav/VvNav.es.js +17 -4
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNav/VvNav.vue.d.ts +3 -3
- package/dist/components/VvNavItem/VvNavItem.es.js +17 -4
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +8 -8
- package/dist/components/VvTab/VvTab.es.js +17 -4
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +1 -1
- package/dist/components/index.es.js +30 -7
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/index.es.js +3 -2
- package/dist/composables/index.umd.js +1 -1
- package/dist/composables/usePersistence.d.ts +1 -1
- package/dist/icons.es.js +226 -226
- package/dist/icons.umd.js +1 -1
- package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +6 -6
- package/package.json +45 -45
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAction/VvAction.vue +13 -3
- package/src/components/VvButton/VvButton.vue +11 -1
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// props and emit
|
|
12
12
|
const props = defineProps(VvActionProps)
|
|
13
13
|
const emit = defineEmits(VvActionEvents)
|
|
14
|
+
const instance = getCurrentInstance()
|
|
14
15
|
|
|
15
16
|
// inject plugin
|
|
16
17
|
const volver = useVolver()
|
|
@@ -104,24 +105,33 @@
|
|
|
104
105
|
e.preventDefault()
|
|
105
106
|
return
|
|
106
107
|
}
|
|
108
|
+
if (instance?.vnode.props?.onClick) {
|
|
109
|
+
emit('click', e)
|
|
110
|
+
return
|
|
111
|
+
}
|
|
107
112
|
dropdownEventBus?.emit('click', e)
|
|
108
|
-
emit('click', e)
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
/**
|
|
112
116
|
* @description Catch mouseover event
|
|
113
117
|
*/
|
|
114
118
|
const onMouseover = (e: Event) => {
|
|
119
|
+
if (instance?.vnode.props?.onMouseover) {
|
|
120
|
+
emit('mouseover', e)
|
|
121
|
+
return
|
|
122
|
+
}
|
|
115
123
|
dropdownEventBus?.emit('mouseover', e)
|
|
116
|
-
emit('mouseover', e)
|
|
117
124
|
}
|
|
118
125
|
|
|
119
126
|
/**
|
|
120
127
|
* @description Catch mouseleave event
|
|
121
128
|
*/
|
|
122
129
|
const onMouseleave = (e: Event) => {
|
|
130
|
+
if (instance?.vnode.props?.onMouseleave) {
|
|
131
|
+
emit('mouseleave', e)
|
|
132
|
+
return
|
|
133
|
+
}
|
|
123
134
|
dropdownEventBus?.emit('mouseleave', e)
|
|
124
|
-
emit('mouseleave', e)
|
|
125
135
|
}
|
|
126
136
|
</script>
|
|
127
137
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
export default {
|
|
3
3
|
name: 'VvButton',
|
|
4
|
+
inheritAttrs: false,
|
|
4
5
|
}
|
|
5
6
|
</script>
|
|
6
7
|
|
|
@@ -82,6 +83,14 @@
|
|
|
82
83
|
const toggleValue = computed(() => {
|
|
83
84
|
return props.value !== undefined ? props.value : name.value
|
|
84
85
|
})
|
|
86
|
+
const hasListeners = computed(() => {
|
|
87
|
+
if (!toggle.value) {
|
|
88
|
+
return undefined
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
onClick,
|
|
92
|
+
}
|
|
93
|
+
})
|
|
85
94
|
const onClick = () => {
|
|
86
95
|
if (toggle.value) {
|
|
87
96
|
if (Array.isArray(modelValue.value)) {
|
|
@@ -108,6 +117,8 @@
|
|
|
108
117
|
<template>
|
|
109
118
|
<VvAction
|
|
110
119
|
v-bind="{
|
|
120
|
+
...attrs,
|
|
121
|
+
...hasListeners,
|
|
111
122
|
disabled,
|
|
112
123
|
pressed,
|
|
113
124
|
active,
|
|
@@ -121,7 +132,6 @@
|
|
|
121
132
|
:id="hasId"
|
|
122
133
|
ref="element"
|
|
123
134
|
:class="bemCssClasses"
|
|
124
|
-
@click="onClick"
|
|
125
135
|
>
|
|
126
136
|
<!-- @slot Default slot -->
|
|
127
137
|
<slot>
|