chore: make some improvement (#8255)

* chore: make some improvement

* chore: upd
This commit is contained in:
neverland
2021-03-03 17:13:45 +08:00
committed by GitHub
parent 2d8914c2c8
commit d606b32c64
7 changed files with 21 additions and 16 deletions
+1 -1
View File
@@ -74,10 +74,10 @@ export default createComponent({
};
const renderValue = () => {
const hasTitle = slots.title || isDef(props.title);
const hasValue = slots.default || isDef(props.value);
if (hasValue) {
const hasTitle = slots.title || isDef(props.title);
return (
<div class={[bem('value', { alone: !hasTitle }), props.valueClass]}>
{slots.default ? slots.default() : <span>{props.value}</span>}