(component): update

This commit is contained in:
就眠儀式 2022-10-22 15:39:48 +08:00
parent 74ec3e108f
commit 4b2f11c227
3 changed files with 44 additions and 17 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@layui/layui-vue", "name": "@layui/layui-vue",
"version": "1.7.0-dev.4", "version": "1.7.0-dev.19",
"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

@ -512,12 +512,25 @@ const radioProps = props.getRadioProps(props.data, props.index);
></lay-icon> ></lay-icon>
<lay-tooltip v-if="column.ellipsisTooltip" :isAutoShow="true"> <lay-tooltip v-if="column.ellipsisTooltip" :isAutoShow="true">
<slot :name="column.customSlot" :data="data" :column="column"></slot> <slot
:name="column.customSlot"
:data="data"
:column="column"
></slot>
<template #content> <template #content>
<slot :name="column.customSlot" :data="data" :column="column"></slot> <slot
:name="column.customSlot"
:data="data"
:column="column"
></slot>
</template> </template>
</lay-tooltip> </lay-tooltip>
<slot v-else :name="column.customSlot" :data="data" :column="column"></slot> <slot
v-else
:name="column.customSlot"
:data="data"
:column="column"
></slot>
</td> </td>
</template> </template>
@ -622,11 +635,25 @@ const radioProps = props.getRadioProps(props.data, props.index);
v-model:selectedKeys="tableSelectedKeys" v-model:selectedKeys="tableSelectedKeys"
v-model:selectedKey="tableSelectedKey" v-model:selectedKey="tableSelectedKey"
> >
<template v-for="name in slotsData" #[name]="slotProp: { data: any, column: any }"> <template
<slot :name="name" :data="slotProp.data" :column="slotProp.column"></slot> v-for="name in slotsData"
#[name]="slotProp: { data: any, column: any }"
>
<slot
:name="name"
:data="slotProp.data"
:column="slotProp.column"
></slot>
</template> </template>
<template v-if="slot.expand" #expand="slotProp: { data: any, column: any }"> <template
<slot name="expand" :data="slotProp.data" :column="slotProp.column"></slot> v-if="slot.expand"
#expand="slotProp: { data: any, column: any }"
>
<slot
name="expand"
:data="slotProp.data"
:column="slotProp.column"
></slot>
</template> </template>
</table-row> </table-row>
</template> </template>

View File

@ -840,12 +840,12 @@ onBeforeUnmount(() => {
:defaultExpandAll="defaultExpandAll" :defaultExpandAll="defaultExpandAll"
:getCheckboxProps="getCheckboxProps" :getCheckboxProps="getCheckboxProps"
:getRadioProps="getRadioProps" :getRadioProps="getRadioProps"
@row="rowClick"
@row-double="rowDoubleClick"
@row-contextmenu="rowContextmenu"
v-model:expandKeys="tableExpandKeys" v-model:expandKeys="tableExpandKeys"
v-model:selectedKeys="tableSelectedKeys" v-model:selectedKeys="tableSelectedKeys"
v-model:selectedKey="tableSelectedKey" v-model:selectedKey="tableSelectedKey"
@row="rowClick"
@row-double="rowDoubleClick"
@row-contextmenu="rowContextmenu"
> >
<template v-for="name in slotsData" #[name]="{ data }"> <template v-for="name in slotsData" #[name]="{ data }">
<slot :name="name" :data="data"></slot> <slot :name="name" :data="data"></slot>
@ -901,15 +901,15 @@ onBeforeUnmount(() => {
</div> </div>
<div v-if="page && page.total > 0" class="layui-table-page"> <div v-if="page && page.total > 0" class="layui-table-page">
<table-page <table-page
:show-page="page.showPage"
:showSkip="page.showSkip"
:showLimit="page.showLimit"
:showCount="page.showCount"
:limits="page.limits"
:showRefresh="page.showRefresh"
:total="page.total" :total="page.total"
:pages="page.pages" :pages="page.pages"
:theme="page.theme" :theme="page.theme"
:limits="page.limits"
:showSkip="page.showSkip"
:show-page="page.showPage"
:showRefresh="page.showRefresh"
:showLimit="page.showLimit"
:showCount="page.showCount"
v-model:current="page.current" v-model:current="page.current"
v-model:limit="page.limit" v-model:limit="page.limit"
@change="change" @change="change"