|
@@ -34,7 +34,6 @@ const useDocument = useDocumentStore()
|
|
|
const { item } = defineProps(['item'])
|
|
|
const {
|
|
|
type,
|
|
|
- img,
|
|
|
dataElement,
|
|
|
title,
|
|
|
disabled,
|
|
@@ -46,8 +45,6 @@ const {
|
|
|
unmount,
|
|
|
} = item
|
|
|
|
|
|
-const isSVG = img?.trim().toLowerCase().startsWith('<svg');
|
|
|
-
|
|
|
const NOOP = (e) => {
|
|
|
e?.stopPropagation()
|
|
|
e?.preventDefault()
|
|
@@ -58,8 +55,12 @@ const activeState = ref(initialState);
|
|
|
const stateOptions = states[activeState.value];
|
|
|
const isActive = ref(false);
|
|
|
|
|
|
+const { img } = stateOptions;
|
|
|
+const isSVG = img?.trim().toLowerCase().startsWith('<svg');
|
|
|
+
|
|
|
const onClick = () => {
|
|
|
- stateOptions.onClick(updateState, stateOptions);
|
|
|
+ updateState();
|
|
|
+ stateOptions.onClick(stateOptions);
|
|
|
};
|
|
|
|
|
|
const updateState = () => {
|