Skip to content

Commit 24815e4

Browse files
author
dx123456
committed
feat: 优化写法
1 parent 90cfdf0 commit 24815e4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/layer.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727
<Col span="4">
2828
<Button
2929
long
30-
v-if="item.isLock"
31-
@click="doLock(item)"
32-
icon="md-lock"
30+
:icon="item.isLock ? 'md-lock' : 'md-unlock'"
3331
type="text"
32+
@click="doLock(item)"
3433
></Button>
35-
<Button long v-else @click="doLock(item)" icon="md-unlock" type="text"></Button>
3634
</Col>
3735
</Row>
3836
</div>

0 commit comments

Comments
 (0)