WebApp【公共组件库】@前端(For Git Submodule)
Tevin
2021-03-31 db8dce39ed0f314551d0f65a1a99f6ce2407ecaa
调整筛选组件api
2 files modified
17 ■■■■■ changed files
plugins/filter/CFilter.vue 14 ●●●●● patch | view | raw | blame | history
plugins/filter/cFilter.scss 3 ●●●● patch | view | raw | blame | history
plugins/filter/CFilter.vue
@@ -10,10 +10,10 @@
            v-if="bar"
        >
            <CFilterSelect
                v-if="!bar.type || bar.type==='select'"
                v-if="bar.type==='select'"
                type="bar"
                :label="bar.label"
                :options="bar.options"
                :options="selectOptions[bar.name]"
                :onChange="evt=>handleChange(bar.name, evt)"
            />
        </view>
@@ -39,10 +39,10 @@
                    :key="index"
                >
                    <CFilterSelect
                        v-if="!item.type || item.type==='select'"
                        v-if="item.type==='select'"
                        type="item"
                        :label="item.label"
                        :options="item.options"
                        :options="selectOptions[item.name]"
                        :onChange="evt=>handleChange(item.name, evt)"
                    />
                </view>
@@ -67,10 +67,12 @@
        CFilterSelect,
    },
    props: {
        // 筛选横条
        // 筛选横条项目
        bar: Object,
        // 展开层筛选项目列表
        // 筛选展开层项目列表
        items: Array,
        // 各个项目的选项列表
        selectOptions: Object,
        // 筛选变化时的回调
        onChange: Function,
    },
plugins/filter/cFilter.scss
@@ -13,6 +13,7 @@
    color: #666;
    background-color: #fff;
    border-top: 1px solid #eee;
    box-sizing: border-box;
    .c-filter-bar {
        float: left;
        width: 550px;
@@ -39,6 +40,7 @@
        .c-filter-drawer-list {
            height: calc(100% - 90px);
            border-top: 1PX solid #eee;
            box-sizing: border-box;
            .box {
                min-height: 20px;
                padding: 30px 0 10px 30px;
@@ -75,7 +77,6 @@
    &.type-bar {
        .content {
            height: 86px;
            line-height: 1;
            .label {
                color: #666;
            }