Fix disabled css selector Closes #1042 (#1076)

* Fix disabled css selector Closes #1042

* Run prettier
This commit is contained in:
Prospector 2023-04-07 18:37:18 -07:00 committed by GitHub
parent a37210b22e
commit 8d85158f91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 6 deletions

View File

@ -778,7 +778,7 @@
} }
&:disabled, &:disabled,
&[disabled] { &[disabled='true'] {
cursor: not-allowed; cursor: not-allowed;
filter: grayscale(50%); filter: grayscale(50%);
opacity: 0.5; opacity: 0.5;
@ -816,7 +816,7 @@ tr.button-transparent {
} }
&:disabled > *, &:disabled > *,
&[disabled] > * { &[disabled='true'] > * {
cursor: not-allowed; cursor: not-allowed;
filter: grayscale(50%); filter: grayscale(50%);
opacity: 0.5; opacity: 0.5;
@ -849,7 +849,7 @@ tr.button-transparent {
box-shadow: none; box-shadow: none;
&disabled, &disabled,
&[disabled] { &[disabled='true'] {
cursor: not-allowed; cursor: not-allowed;
box-shadow: none; box-shadow: none;
} }

View File

@ -399,7 +399,7 @@ textarea {
} }
&:disabled, &:disabled,
&[disabled] { &[disabled='true'] {
opacity: 0.6; opacity: 0.6;
pointer-events: none; pointer-events: none;
cursor: not-allowed; cursor: not-allowed;

View File

@ -1,8 +1,19 @@
<template> <template>
<label :class="{ 'long-style': longStyle }" @drop.prevent="handleDrop" @dragover.prevent> <label
:class="{ 'long-style': longStyle }"
:disabled="disabled"
@drop.prevent="handleDrop"
@dragover.prevent
>
<slot /> <slot />
{{ prompt }} {{ prompt }}
<input type="file" :multiple="multiple" :accept="accept" @change="handleChange" /> <input
type="file"
:multiple="multiple"
:accept="accept"
:disabled="disabled"
@change="handleChange"
/>
</label> </label>
</template> </template>
@ -43,6 +54,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
disabled: {
type: Boolean,
default: false,
},
}, },
emits: ['change'], emits: ['change'],
data() { data() {