Download sd-webui-openpose-editor/src/components/IconSwitch.vue from jun34GTR/exqq: direct link, hf CLI and curl.
- Browser
- Download file 686 Bytes
-
https://huggingface.co/jun34GTR/exqq/resolve/main/sd-webui-openpose-editor/src/components/IconSwitch.vue
- Command line
-
hf download hf://jun34GTR/exqq/sd-webui-openpose-editor/src/components/IconSwitch.vue
-
curl -L -o IconSwitch.vue https://huggingface.co/jun34GTR/exqq/resolve/main/sd-webui-openpose-editor/src/components/IconSwitch.vue
686 Bytes
| <script lang="ts"> | |
| export default { | |
| props: { | |
| modelValue: { | |
| type: Boolean, | |
| required: true, | |
| }, | |
| }, | |
| computed: { | |
| state: { | |
| get() { | |
| return this.modelValue; | |
| }, | |
| set(value: boolean) { | |
| this.$emit('update:modelValue', value); | |
| }, | |
| }, | |
| }, | |
| methods: { | |
| toggleState() { | |
| this.state = !this.state; | |
| }, | |
| }, | |
| }; | |
| </script> | |
| <template> | |
| <div @click.stop="toggleState" class="icon-switch"> | |
| <slot name="enable-state" v-if="state"></slot> | |
| <slot name="disable-state" v-else></slot> | |
| </div> | |
| </template> | |
| <style scoped> | |
| .icon-switch { | |
| cursor: pointer; | |
| } | |
| </style> |