🐛(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",
"version": "1.3.14",
"version": "1.4.0",
"author": "就眠儀式",
"license": "MIT",
"description": "a component library for Vue 3 base on layui-vue",

View File

@ -22,7 +22,6 @@
height: @size;
line-height: @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">
<input type="checkbox" :name="name" :value="value" />
<div
class="layui-unselect layui-form-checkbox"
class="layui-form-checkbox"
:class="{
'layui-form-checked': isChecked,
'layui-checkbox-disabled layui-disabled': isDisabled,
}"
:lay-skin="skin"
>
<span class="layui-checkbox-label"
><slot>{{ label }}</slot></span
<span class="layui-checkbox-label">
<slot>{{ label }}</slot>
</span
>
<lay-icon
:type="

View File

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

View File

@ -79,11 +79,14 @@ const styles = computed(() => {
<span>
<div>
<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 v-else>
<slot v-if="isActive" name="onswitch-icon"></slot>
<slot v-else name="unswitch-icon"></slot>
<slot v-if="isActive" name="onswitch-icon"></slot>
<slot v-else name="unswitch-icon"></slot>
</template>
</div>
</span>

View File

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

View File

@ -237,18 +237,18 @@ export default {
::: table
| 属性 | 描述 | 可选值 |
| ------------- | -------------- | -------------- |
| name | 原生 name 属性 | -- |
| v-model | 是否启用 | `true` `false` |
| disabled | 禁用 | `true` `false` |
| onswitch-text | 启用描述 | `启动` |
| unswitch-text | 禁用描述 | `禁用` |
| onswitch-value | 启用值 | `true` |
| unswitch-value | 禁用值 | `false` |
| size | 尺寸 | `lg` `md` `sm` `xs` |
| loading | 加载状态 | `true` `false` |
| loading-icon | 加载图标 | -- |
| 属性 | 描述 | 可选值 |
| ------------- | -------------- | --------------------- |
| name | 原生 name 属性 | -- |
| v-model | 是否启用 | `true` `false` |
| disabled | 禁用 | `true` `false` |
| onswitch-text | 启用描述 | `启动` |
| unswitch-text | 禁用描述 | `禁用` |
| onswitch-value | 启用值 | `true` |
| unswitch-value | 禁用值 | `false` |
| size | 尺寸 | `lg` `md` `sm` `xs` |
| loading | 加载状态 | `true` `false` |
| loading-icon | 加载图标 | -- |
:::