🐛(component): 修复 transfer 标题 与 项描述 在个别分辨率区间显示不全的问题

This commit is contained in:
就眠儀式 2022-08-07 17:23:09 +08:00
parent 97446b1fb0
commit 4cb92078c3
7 changed files with 36 additions and 33 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@layui/layui-vue", "name": "@layui/layui-vue",
"version": "1.3.14", "version": "1.4.0",
"author": "就眠儀式", "author": "就眠儀式",
"license": "MIT", "license": "MIT",
"description": "a component library for Vue 3 base on layui-vue", "description": "a component library for Vue 3 base on layui-vue",

View File

@ -22,7 +22,6 @@
height: @size; height: @size;
line-height: @size; line-height: @size;
font-size: @font-size; font-size: @font-size;
margin-top: 1px;
} }
} }
} }

View File

@ -116,15 +116,16 @@ const isDisabled = computed(() => {
<span @click.stop="handleClick" class="layui-checkbox" :size="size"> <span @click.stop="handleClick" class="layui-checkbox" :size="size">
<input type="checkbox" :name="name" :value="value" /> <input type="checkbox" :name="name" :value="value" />
<div <div
class="layui-unselect layui-form-checkbox" class="layui-form-checkbox"
:class="{ :class="{
'layui-form-checked': isChecked, 'layui-form-checked': isChecked,
'layui-checkbox-disabled layui-disabled': isDisabled, 'layui-checkbox-disabled layui-disabled': isDisabled,
}" }"
:lay-skin="skin" :lay-skin="skin"
> >
<span class="layui-checkbox-label" <span class="layui-checkbox-label">
><slot>{{ label }}</slot></span <slot>{{ label }}</slot>
</span
> >
<lay-icon <lay-icon
:type=" :type="

View File

@ -13,19 +13,21 @@ export interface LayPageProps {
total: number; total: number;
limit: number; limit: number;
theme?: string; theme?: string;
modelValue?: number; showPage?: boolean;
showPage?: boolean | string; showSkip?: boolean;
showSkip?: boolean | string; showCount?: boolean;
showCount?: boolean | string; showLimit?: boolean;
showLimit?: boolean | string; showInput?: boolean;
showInput?: boolean | string; showRefresh?: boolean;
showRefresh?: boolean | string;
pages?: number; pages?: number;
limits?: number[]; limits?: number[];
modelValue?: number;
} }
const props = withDefaults(defineProps<LayPageProps>(), { const props = withDefaults(defineProps<LayPageProps>(), {
limit: 10, limit: 10,
pages: 10,
modelValue: 1,
theme: "green", theme: "green",
showPage: false, showPage: false,
showSkip: false, showSkip: false,
@ -33,8 +35,6 @@ const props = withDefaults(defineProps<LayPageProps>(), {
showLimit: true, showLimit: true,
showInput: false, showInput: false,
showRefresh: false, showRefresh: false,
modelValue: 1,
pages: 10,
limits: () => [10, 20, 30, 40, 50], limits: () => [10, 20, 30, 40, 50],
}); });

View File

@ -79,7 +79,10 @@ const styles = computed(() => {
<span> <span>
<div> <div>
<template v-if="loading"> <template v-if="loading">
<i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop" :class="loadingIcon"></i> <i
class="layui-icon layui-anim layui-anim-rotate layui-anim-loop"
:class="loadingIcon"
></i>
</template> </template>
<template v-else> <template v-else>
<slot v-if="isActive" name="onswitch-icon"></slot> <slot v-if="isActive" name="onswitch-icon"></slot>

View File

@ -199,7 +199,7 @@ const boxStyle = computed(() => {
value="all" value="all"
@change="allLeftChange" @change="allLeftChange"
> >
<span>{{ title[0] }}</span> {{ title[0] }}
</LayCheckbox> </LayCheckbox>
</div> </div>
<div class="layui-transfer-search" v-if="showSearch"> <div class="layui-transfer-search" v-if="showSearch">
@ -217,7 +217,7 @@ const boxStyle = computed(() => {
:value="dataSource[id]" :value="dataSource[id]"
> >
<slot v-if="slots.item" name="item" :data="dataSource"></slot> <slot v-if="slots.item" name="item" :data="dataSource"></slot>
<span v-else>{{ dataSource.title }}</span> <template v-else>{{ dataSource.title }}</template>
</LayCheckbox> </LayCheckbox>
</li> </li>
</ul> </ul>
@ -250,7 +250,7 @@ const boxStyle = computed(() => {
value="all" value="all"
@change="allRightChange" @change="allRightChange"
> >
<span>{{ title[1] }}</span> {{ title[1] }}
</LayCheckbox> </LayCheckbox>
</div> </div>
<div class="layui-transfer-search" v-if="showSearch"> <div class="layui-transfer-search" v-if="showSearch">
@ -268,7 +268,7 @@ const boxStyle = computed(() => {
:value="dataSource[id]" :value="dataSource[id]"
> >
<slot v-if="slots.item" name="item" :data="dataSource"></slot> <slot v-if="slots.item" name="item" :data="dataSource"></slot>
<span v-else>{{ dataSource.title }}</span> <template v-else>{{ dataSource.title }}</template>
</LayCheckbox> </LayCheckbox>
</li> </li>
</ul> </ul>

View File

@ -238,7 +238,7 @@ export default {
::: table ::: table
| 属性 | 描述 | 可选值 | | 属性 | 描述 | 可选值 |
| ------------- | -------------- | -------------- | | ------------- | -------------- | --------------------- |
| name | 原生 name 属性 | -- | | name | 原生 name 属性 | -- |
| v-model | 是否启用 | `true` `false` | | v-model | 是否启用 | `true` `false` |
| disabled | 禁用 | `true` `false` | | disabled | 禁用 | `true` `false` |