Skip to content

Commit

Permalink
perf: 👌屏蔽单击事件的外抛
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjone committed May 15, 2023
1 parent 8a3621c commit baaedba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/column/selection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
name="arrow-right"
:class="['expand-icon', { 'expand-icon__expanded': data?.isExpand }]"
:style="{ width: `${rowHeight / 2}px`, height: `${rowHeight / 2}px` }"
@click="
@click.stop="
() => {
data?.setExpand(!data.isExpand);
flattenData();
}
"
/>

<input v-if="$styleBox.showCheckbox" v-model="checked" type="checkbox" />
<input
v-if="$styleBox.showCheckbox"
v-model="checked"
type="checkbox"
@click.stop
/>
</template>

<script lang="ts" setup>
Expand Down
1 change: 1 addition & 0 deletions src/components/slider/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
? 0
: `calc(calc(100% - ${height}) / 2)`
}"
@click.stop
>
<div
:class="[
Expand Down

0 comments on commit baaedba

Please sign in to comment.