Skip to content

Commit

Permalink
fix: fix uiParts and column-after slot for cascader (#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodemen authored and Justineo committed May 7, 2021
1 parent 183098f commit 60a027e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
8 changes: 0 additions & 8 deletions packages/veui-theme-dls/components/Cascader.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
import { IconChevronDown, IconTimesCircle } from 'dls-icons-vue'
import config from 'veui/managers/config'

const CHECKBOX_SIZE_MAP = {
xs: 's',
s: 's',
m: 'm',
l: 'm'
}

const TAG_SIZE_MAP = {
xs: 's',
s: 's',
Expand All @@ -32,7 +25,6 @@ config.defaults(
},
parts: {
clear: 'icon aux',
checkbox: ({ size }) => CHECKBOX_SIZE_MAP[size] || size,
tag: ({ size }) => TAG_SIZE_MAP[size] || size
}
},
Expand Down
13 changes: 12 additions & 1 deletion packages/veui-theme-dls/components/CascaderPane.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { IconChevronRight } from 'dls-icons-vue'
import config from 'veui/managers/config'

const CHECKBOX_SIZE_MAP = {
xs: 's',
s: 's',
m: 'm',
l: 'm'
}

config.defaults(
{
icons: {
Expand All @@ -9,8 +16,12 @@ config.defaults(
ui: {
size: {
values: ['xs', 's', 'm', 'l'],
inherit: true
inherit: true,
default: 'm'
}
},
parts: {
checkbox: ({ size }) => CHECKBOX_SIZE_MAP[size] || size
}
},
'cascaderpane'
Expand Down
3 changes: 3 additions & 0 deletions packages/veui-theme-dls/trigger.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@adjusted-select-padding-y: dls-sum(@dls-select-padding-y, -1px);
@trigger: ~"@{veui-prefix}-trigger";

cursor: pointer;

&-icon {
display: flex;
position: relative;
Expand Down Expand Up @@ -62,6 +64,7 @@
}

&-searchable {
cursor: text;
.@{veui-prefix}-input-input {
display: block;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/veui/src/components/Cascader/CascaderPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
<veui-checkbox
v-if="multiple"
tabindex="-1"
:ui="uiParts.checkbox"
:checked="option.checked"
:indeterminate="option.partialChecked"
:disabled="isDisabled(option, parents, group.parents)"
Expand Down Expand Up @@ -119,7 +120,7 @@
</abstract-tree>
<div
v-if="$scopedSlots['column-after']"
:class="$c('cascader-column-column-after')"
:class="$c('cascader-pane-column-after')"
>
<slot
name="column-after"
Expand Down
1 change: 1 addition & 0 deletions packages/veui/src/components/_SelectTrigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default {
return (
<Tag
key={value}
ui={this.uiParts.tag}
data-key={value}
onRemove={() => this.$emit('remove', item)}
disabled={this.realDisabled || this.realReadonly || disabled}
Expand Down

0 comments on commit 60a027e

Please sign in to comment.