You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1002 B
50 lines
1002 B
<template> |
|
<div class="check" @click.stop="change"> |
|
<img v-show="!modelValue" src="../assets/img/icon/components/check/round-gray.png" alt=""> |
|
<img v-show="modelValue && mode === 'gray'" src="../assets/img/icon/components/check/check-gray.png" alt=""> |
|
<img v-show="modelValue && mode === 'red'" src="../assets/img/icon/components/check/check-red.png" alt=""> |
|
</div> |
|
</template> |
|
<script> |
|
export default { |
|
name: "Check", |
|
props: { |
|
modelValue: { |
|
type: Boolean, |
|
default: false |
|
}, |
|
mode: { |
|
type: String, |
|
default: 'gray'//red |
|
} |
|
}, |
|
data() { |
|
return {} |
|
}, |
|
computed: {}, |
|
created() { |
|
}, |
|
methods: { |
|
change(){ |
|
this.$emit('update:modelValue',!this.modelValue) |
|
this.$emit('change',!this.modelValue) |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style scoped lang="less"> |
|
@import "../assets/scss/index"; |
|
|
|
.check { |
|
@width: 1.4rem; |
|
width: @width; |
|
height: @width; |
|
|
|
>img { |
|
width: 100%!important; |
|
height: 100%!important; |
|
} |
|
|
|
} |
|
</style>
|
|
|