提交 6f00f494 编写于 作者: D DCloud_LXH

fix: useBooleanAttr

上级 f96cfa22
......@@ -76,13 +76,14 @@ export default /*#__PURE__*/ defineBuiltInComponent({
useListeners(props, { 'label-click': _onClick })
return () => {
const { booleanAttrs } = useBooleanAttr(props, 'disabled')
const booleanAttrs = useBooleanAttr(props, 'disabled')
return (
<uni-checkbox {...booleanAttrs} onClick={_onClick}>
<div class="uni-checkbox-wrapper">
<div
class="uni-checkbox-input"
// @ts-ignore
class={{ 'uni-checkbox-input-disabled': props.disabled }}
>
{checkboxChecked.value
......
......@@ -80,7 +80,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
useListeners(props, { 'label-click': _onClick })
return () => {
const { booleanAttrs } = useBooleanAttr(props, 'disabled')
const booleanAttrs = useBooleanAttr(props, 'disabled')
return (
<uni-radio {...booleanAttrs} onClick={_onClick}>
......
......@@ -87,7 +87,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
return () => {
const { color, type } = props
const { booleanAttrs } = useBooleanAttr(props, 'disabled')
const booleanAttrs = useBooleanAttr(props, 'disabled')
return (
<uni-switch ref={rootRef} {...booleanAttrs} onClick={_onClick}>
......@@ -95,6 +95,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
<div
v-show={type === 'switch'}
class="uni-switch-input"
// @ts-ignore
class={[switchChecked.value ? 'uni-switch-input-checked' : '']}
style={{
backgroundColor: switchChecked.value ? color : '#DFDFDF',
......
//#region Functions
import { reactive, nextTick, watch } from 'vue'
import { reactive, nextTick, watch, watchEffect } from 'vue'
import { extend } from '@vue/shared'
import {
defineAsyncApi,
......@@ -27,7 +27,7 @@ import type {
import { once } from '@dcloudio/uni-shared'
//#endregion
let showToastState: ToastProps
export let showToastState: ToastProps
let showType: 'onShowToast' | 'onShowLoading' | '' = ''
let timeoutId: number
const onHidePopupOnce = /*#__PURE__*/ once(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册