: 发布 1.0.5 版本

This commit is contained in:
就眠儀式 2022-05-01 15:03:02 +08:00
parent c31f944865
commit 48f8f64ff4
5 changed files with 26 additions and 57 deletions

View File

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

View File

@ -1,38 +0,0 @@
<template>
<th
v-if="tableColumnKeys.includes(column.key)"
class="layui-table-cell"
:style="{
textAlign: column.align,
flex: column.width ? '0 0 ' + column.width : '1',
}"
>
<span>
<template v-if="column.titleSlot">
<slot :name="column.titleSlot"></slot>
</template>
<template v-else>
{{ column.title }}
</template>
</span>
<!-- 插槽 -->
<slot></slot>
</th>
</template>
<script lang="ts">
export default {
name: "Column",
};
</script>
<script lang="ts" setup>
export interface LayTableProps {
column?: any;
tableColumnKeys?: any;
}
const props = withDefaults(defineProps<LayTableProps>(), {
});
</script>

View File

@ -5,7 +5,6 @@ export default {
</script>
<script setup lang="ts">
import Column from "./Column.vue";
import { ref, watch, useSlots, withDefaults, onMounted } from "vue";
import { v4 as uuidv4 } from "../../utils/guidUtil";
import { Recordable } from "../../types";
@ -57,19 +56,6 @@ const tableColumnKeys = ref(
})
);
const tableColumns1 = [];
/**
* 复杂表头
*
* 思路 Column 处理为多级别 tr
*/
tableColumns.value.forEach((tableColumn) => {
})
watch(
() => props.dataSource,
() => {
@ -282,8 +268,24 @@ onMounted(() => {
/>
</div>
</th>
<template v-for="column in columns" :key="column">
<column :tableColumnKeys="tableColumnKeys" :column="column">
<template v-for="column in columns" :key="column">
<th
v-if="tableColumnKeys.includes(column.key)"
class="layui-table-cell"
:style="{
textAlign: column.align,
flex: column.width ? '0 0 ' + column.width : '1',
}"
>
<span>
<template v-if="column.titleSlot">
<slot :name="column.titleSlot"></slot>
</template>
<template v-else>
{{ column.title }}
</template>
</span>
<!-- 插槽 -->
<span
v-if="column.sort"
class="layui-table-sort layui-inline"
@ -300,7 +302,7 @@ onMounted(() => {
title="降序"
></i>
</span>
</column>
</th>
</template>
</tr>
</thead>

View File

@ -116,6 +116,11 @@ a:hover {
color: #777;
}
a cite {
font-style: normal;
*cursor: pointer;
}
.layui-border-box,
.layui-border-box * {
box-sizing: border-box;

View File

@ -43,7 +43,7 @@
rel="nofollow"
class="site-star"
>
<i class="layui-icon"></i> Star <cite id="getStars">746</cite>
<i class="layui-icon"></i> Star <cite id="getStars">863</cite>
</a>
<a
href="https://gitee.com/layui-vue"