adtec-core-package 1.4.1 → 1.4.2
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/package.json
CHANGED
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
<!--创建时间: 2024/11/24 下午3:12-->
|
|
4
4
|
<!--修改时间: 2024/11/24 下午3:12-->
|
|
5
5
|
<template>
|
|
6
|
-
<el-button
|
|
7
|
-
|
|
6
|
+
<el-button
|
|
7
|
+
v-if="elementType === 'button'"
|
|
8
|
+
:disabled="disabled"
|
|
9
|
+
ref="ref_icons"
|
|
10
|
+
@click.stop="iconClick"
|
|
11
|
+
style="padding: 8px 10px; margin-left: 4px">
|
|
8
12
|
<el-icon
|
|
9
13
|
@mouseenter="visible = true"
|
|
10
14
|
@mouseleave="visible = false"
|
|
11
15
|
class="icon-btn"
|
|
12
16
|
style="margin: 0"
|
|
13
|
-
:class="getClass"
|
|
14
|
-
>
|
|
17
|
+
:class="getClass">
|
|
15
18
|
<svg v-if="selcomp" class="icon" aria-hidden="true">
|
|
16
19
|
<use :href="'#' + iconName"></use>
|
|
17
20
|
</svg>
|
|
@@ -24,20 +27,17 @@
|
|
|
24
27
|
effect="light"
|
|
25
28
|
trigger="click"
|
|
26
29
|
virtual-triggering
|
|
27
|
-
:virtual-ref="ref_icons"
|
|
28
|
-
/>
|
|
30
|
+
:virtual-ref="ref_icons" />
|
|
29
31
|
</el-icon>
|
|
30
32
|
</el-button>
|
|
31
33
|
<el-icon
|
|
32
34
|
v-else-if="disabled"
|
|
33
|
-
@click.stop="iconClick($event)"
|
|
34
35
|
ref="ref_icons"
|
|
35
36
|
:disabled="disabled"
|
|
36
37
|
@mouseenter="visible = true"
|
|
37
38
|
@mouseleave="visible = false"
|
|
38
39
|
class="icon-btn"
|
|
39
|
-
:class="getClass"
|
|
40
|
-
>
|
|
40
|
+
:class="getClass">
|
|
41
41
|
<svg v-if="selcomp" class="icon" aria-hidden="true">
|
|
42
42
|
<use :href="'#' + iconName"></use>
|
|
43
43
|
</svg>
|
|
@@ -50,17 +50,17 @@
|
|
|
50
50
|
effect="light"
|
|
51
51
|
trigger="click"
|
|
52
52
|
virtual-triggering
|
|
53
|
-
:virtual-ref="ref_icons"
|
|
54
|
-
/>
|
|
53
|
+
:virtual-ref="ref_icons" />
|
|
55
54
|
</el-icon>
|
|
56
55
|
<el-icon
|
|
57
56
|
v-else
|
|
58
57
|
ref="ref_icons"
|
|
58
|
+
@click.stop="iconClick"
|
|
59
59
|
@mouseenter="visible = true"
|
|
60
60
|
@mouseleave="visible = false"
|
|
61
61
|
class="icon-btn"
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
style="cursor:not-allowed !important"
|
|
63
|
+
:class="getClass">
|
|
64
64
|
<svg v-if="selcomp" class="icon" aria-hidden="true">
|
|
65
65
|
<use :href="'#' + iconName"></use>
|
|
66
66
|
</svg>
|
|
@@ -73,13 +73,12 @@
|
|
|
73
73
|
effect="light"
|
|
74
74
|
trigger="click"
|
|
75
75
|
virtual-triggering
|
|
76
|
-
:virtual-ref="ref_icons"
|
|
77
|
-
/>
|
|
76
|
+
:virtual-ref="ref_icons" />
|
|
78
77
|
</el-icon>
|
|
79
78
|
</template>
|
|
80
79
|
<script setup lang="ts">
|
|
81
|
-
import {useVModel} from '@vueuse/core'
|
|
82
|
-
import {computed, ref} from 'vue'
|
|
80
|
+
import { useVModel } from '@vueuse/core'
|
|
81
|
+
import { computed, ref } from 'vue'
|
|
83
82
|
|
|
84
83
|
const visible = ref(false)
|
|
85
84
|
const ref_icons = ref()
|
|
@@ -90,13 +89,9 @@ const selcomp = computed(() => {
|
|
|
90
89
|
return false
|
|
91
90
|
}
|
|
92
91
|
})
|
|
93
|
-
const iconClick=(
|
|
94
|
-
//@ts-ignore
|
|
95
|
-
console.log(event)
|
|
96
|
-
window.event.stopPropagation()
|
|
92
|
+
const iconClick = (ev: any) => {
|
|
97
93
|
//@ts-ignore
|
|
98
|
-
|
|
99
|
-
return
|
|
94
|
+
emit('click', ev)
|
|
100
95
|
}
|
|
101
96
|
/**
|
|
102
97
|
* 获取样式
|
|
@@ -180,7 +175,7 @@ const props = defineProps({
|
|
|
180
175
|
default: false,
|
|
181
176
|
},
|
|
182
177
|
})
|
|
183
|
-
const emit = defineEmits(['update:modelValue'])
|
|
178
|
+
const emit = defineEmits(['update:modelValue', 'click'])
|
|
184
179
|
const iconName = useVModel(props, 'modelValue', emit)
|
|
185
180
|
</script>
|
|
186
181
|
<style scoped lang="scss">
|
|
@@ -195,7 +190,7 @@ const iconName = useVModel(props, 'modelValue', emit)
|
|
|
195
190
|
}
|
|
196
191
|
|
|
197
192
|
&--disabled {
|
|
198
|
-
color: var(--el-color-disabled-text-color);
|
|
193
|
+
color: var(--el-color-disabled-text-color) !important;
|
|
199
194
|
cursor: not-allowed !important;
|
|
200
195
|
}
|
|
201
196
|
|