feat(checkbox): 整理 checkbox 组件

This commit is contained in:
就眠仪式 2021-10-12 14:47:22 +08:00
parent 83c05c3cac
commit 6e9c4f3153

View File

@ -1,6 +1,6 @@
<template> <template>
<span @click="handleClick"> <span @click="handleClick">
<input type="checkbox" :name="name" title="写作" :value="label" /> <input type="checkbox" :name="name" :value="label" />
<div <div
class="layui-unselect" class="layui-unselect"
:class="[ :class="[
@ -22,13 +22,14 @@
<script setup name="LayCheckbox" lang="ts"> <script setup name="LayCheckbox" lang="ts">
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
const props = defineProps<{ const props =
defineProps<{
modelValue: string[] modelValue: string[]
label: string label: string
disabled?: boolean disabled?: boolean
name?: string name?: string
skin?: string skin?: string
}>() }>()
const hasValue = ref(false) const hasValue = ref(false)