Skip to content

Commit

Permalink
fix(search): 修复样式问题, close #29
Browse files Browse the repository at this point in the history
  • Loading branch information
josonyang committed Mar 17, 2022
1 parent 43cba1c commit ac1dd2a
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
12 changes: 6 additions & 6 deletions site/docs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ export default {
path: '/mobile-vue/components/tabs',
component: () => import('@/tabs/tabs.md'),
},
{
title: 'DropdownMenu 下拉菜单',
name: 'dropdown-menu',
path: '/mobile-vue/components/dropdown-menu',
component: () => import('@/dropdown-menu/dropdown-menu.md'),
},
// {
// title: 'DropdownMenu 下拉菜单',
// name: 'dropdown-menu',
// path: '/mobile-vue/components/dropdown-menu',
// component: () => import('@/dropdown-menu/dropdown-menu.md'),
// },
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/_common
2 changes: 1 addition & 1 deletion src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export { Indexes, IndexesCell, IndexesAnchor } from './indexes';
export { Picker, PickerItem } from './picker';
export { Tag, CheckTag } from './tag';
export { TabBar, TabBarItem } from './tab-bar';
export { DropdownMenu, DropdownItem } from './dropdown-menu';
// export { DropdownMenu, DropdownItem } from './dropdown-menu';
export { Collapse, CollapsePanel } from './collapse';
export { Tabs, TabPanel } from './tabs';
export { Swiper, SwiperItem } from './swiper';
Expand Down
1 change: 1 addition & 0 deletions src/grid/style/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import '../../_common/style/mobile/components/grid/_index.less';
import '../../_common/style/mobile/components/grid-item/_index.less';
2 changes: 1 addition & 1 deletion src/loading/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface TdLoadingProps {
/**
* 加载提示文案
*/
text?: String;
text?: string;
/**
* 加载组件类型
* @default circular
Expand Down
15 changes: 8 additions & 7 deletions src/search/search.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template>
<div :class="classes">
<form :class="`${name}__form`">
<div :class="`${name}__form`">
<div :class="`${name}__box`">
<div :class="`${name}__icon-search`">
<t-icon-search></t-icon-search>
</div>
<input
<t-input
ref="searchInput"
v-model="currentValue"
:class="`${name}__input`"
type="text"
type="search"
:autofocus="autofocus"
:placeholder="placeholder"
/>
Expand All @@ -23,8 +23,8 @@
</div>
<span :class="`${name}__label-text`">{{ placeholder }}</span>
</label>
</form>
<t-button v-show="!state.labelActive" :class="`${name}__cancel-button`" @click="onCancel">
</div>
<t-button v-show="!state.labelActive" variant="text" :class="`${name}__cancel-button`" @click="onCancel">
{{ cancelButtonText }}
</t-button>
</div>
Expand All @@ -35,17 +35,18 @@ import { SearchIcon as TIconSearch, CloseCircleFilledIcon as TCloseIcon } from '
import { ref, reactive, computed, defineComponent, nextTick } from 'vue';
import config from '../config';
import TButton from '../button';
import TInput from '../input';
const { prefix } = config;
const name = `${prefix}-search`;
export default defineComponent({
name,
components: { TIconSearch, TCloseIcon, TButton },
components: { TIconSearch, TCloseIcon, TButton, TInput },
props: {
autofocus: {
type: Boolean,
default: true,
default: false,
},
clearable: {
type: Boolean,
Expand Down
4 changes: 2 additions & 2 deletions src/swiper/swiper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<slot></slot>
</div>
<template v-if="navigation">
<span v-if="direction === 'horizontal' && navigation.showSlideBtn">
<span v-if="direction === 'horizontal' && 'showSlideBtn' in navigation && navigation.showSlideBtn">
<span :class="`${name}__btn btn-prev`" @click="prev(1)">
<chevron-left-icon size="20px" />
</span>
Expand All @@ -21,7 +21,7 @@
</span>
</span>
<span v-if="'type' in navigation" :class="`${name}__pagination ${name}__pagination-${navigation.type || ''}`">
<template v-if="['dots', 'dots-bar'].includes(navigation.type)">
<template v-if="['dots', 'dots-bar'].includes(navigation.type || '')">
<span
v-for="(item, index) in paginationList"
:key="'page' + index"
Expand Down

0 comments on commit ac1dd2a

Please sign in to comment.