mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 03:12:15 +00:00
Fix all type errors in design system (#3956)
* 📘 Fix type errors in design system * 🔥 Remove unneeded `?` * 🔧 Add design system to Vetur * 📘 Improve typing of `$el` * ♻️ Address feedback * 📘 Type leftover `MouseEvent` * 📘 Type `event.target` properly
This commit is contained in:
@@ -77,24 +77,27 @@ export default Vue.extend({
|
||||
},
|
||||
);
|
||||
},
|
||||
onClick(e) {
|
||||
if (e.target.localName !== 'a') return;
|
||||
onClick(event: MouseEvent) {
|
||||
if (!(event.target instanceof HTMLElement)) return;
|
||||
|
||||
if (e.target.dataset && e.target.dataset.key) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
if (event.target.localName !== 'a') return;
|
||||
|
||||
if (e.target.dataset.key === 'show-less') {
|
||||
if (event.target.dataset && event.target.dataset.key) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
if (event.target.dataset.key === 'show-less') {
|
||||
this.showFullContent = false;
|
||||
} else if (this.canTruncate && e.target.dataset.key === 'toggle-expand') {
|
||||
} else if (this.canTruncate && event.target.dataset.key === 'toggle-expand') {
|
||||
this.showFullContent = !this.showFullContent;
|
||||
} else {
|
||||
this.$emit('action', e.target.dataset.key);
|
||||
this.$emit('action', event.target.dataset.key);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" module>
|
||||
|
||||
Reference in New Issue
Block a user