Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
click on icon behaves now like click on resource name
Browse files Browse the repository at this point in the history
  • Loading branch information
lookacat committed Feb 16, 2022
1 parent 1f69c0a commit 2b314c9
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions src/components/organisms/OcResource/OcResource.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
<template>
<div class="oc-resource oc-text-overflow">
<oc-img
v-if="hasThumbnail"
:key="thumbnail"
:src="thumbnail"
class="oc-resource-thumbnail"
width="40"
height="40"
/>
<oc-resource-icon v-else :resource="resource" />
<component
:is="componentType"
v-bind="componentProps"
v-if="isResourceClickable"
:target="linkTargetBlank"
:aria-describedby="opensInNewWindowDescriptionId"
@click.stop="emitClick"
@click.native.stop
>
<oc-img
v-if="hasThumbnail"
:key="thumbnail"
:src="thumbnail"
class="oc-resource-thumbnail"
width="40"
height="40"
/>
<oc-resource-icon v-else :resource="resource" />
</component>
<div class="oc-resource-details oc-text-overflow">
<component
:is="componentType"
Expand Down Expand Up @@ -205,6 +215,9 @@ export default {
},
methods: {
hover() {
console.log("hover")
},
emitClick() {
if (this.isFolder) {
return
Expand Down

0 comments on commit 2b314c9

Please sign in to comment.