Merge branch 'next' into feat-tag
This commit is contained in:
commit
2631e24207
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
package-lock.json
|
||||||
package/document/dist/
|
package/document/dist/
|
||||||
|
|
||||||
# Editor directories and files
|
# Editor directories and files
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@layui/layui-vue",
|
"name": "@layui/layui-vue",
|
||||||
"version": "1.3.13",
|
"version": "1.3.14",
|
||||||
"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",
|
||||||
|
@ -169,7 +169,6 @@ onMounted(() => {
|
|||||||
|
|
||||||
.layui-notice-bar {
|
.layui-notice-bar {
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
width: 100%;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.layui-notice-bar .layui-notice-bar-warp {
|
.layui-notice-bar .layui-notice-bar-warp {
|
||||||
@ -186,6 +185,7 @@ onMounted(() => {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-notice-bar
|
.layui-notice-bar
|
||||||
.layui-notice-bar-warp
|
.layui-notice-bar-warp
|
||||||
.layui-notice-bar-warp-text-box
|
.layui-notice-bar-warp-text-box
|
||||||
|
@ -24,6 +24,7 @@ import LayDropdown from "../dropdown/index.vue";
|
|||||||
import LayPage from "../page/index.vue";
|
import LayPage from "../page/index.vue";
|
||||||
import LayEmpty from "../empty/index.vue";
|
import LayEmpty from "../empty/index.vue";
|
||||||
import TableRow from "./TableRow.vue";
|
import TableRow from "./TableRow.vue";
|
||||||
|
import { nextTick } from "vue";
|
||||||
|
|
||||||
export interface LayTableProps {
|
export interface LayTableProps {
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -88,6 +89,7 @@ const allChecked = ref(false);
|
|||||||
const hasChecked = ref(false);
|
const hasChecked = ref(false);
|
||||||
const tableDataSource = ref<any[]>([...props.dataSource]);
|
const tableDataSource = ref<any[]>([...props.dataSource]);
|
||||||
const tableColumns = ref([...props.columns]);
|
const tableColumns = ref([...props.columns]);
|
||||||
|
|
||||||
const tableColumnKeys = ref(
|
const tableColumnKeys = ref(
|
||||||
props.columns.map((item: any) => {
|
props.columns.map((item: any) => {
|
||||||
if (item.hide != true) {
|
if (item.hide != true) {
|
||||||
@ -128,6 +130,9 @@ watch(
|
|||||||
() => props.dataSource,
|
() => props.dataSource,
|
||||||
() => {
|
() => {
|
||||||
tableDataSource.value = [...props.dataSource];
|
tableDataSource.value = [...props.dataSource];
|
||||||
|
nextTick(() => {
|
||||||
|
getScrollWidth();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
@ -270,8 +275,8 @@ const sortTable = (e: any, key: string, sort: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let tableHeader = ref<HTMLElement | null>(null);
|
|
||||||
let tableBody = ref<HTMLElement | null>(null);
|
let tableBody = ref<HTMLElement | null>(null);
|
||||||
|
let tableHeader = ref<HTMLElement | null>(null);
|
||||||
let scrollWidthCell = ref(0);
|
let scrollWidthCell = ref(0);
|
||||||
|
|
||||||
const getScrollWidth = () => {
|
const getScrollWidth = () => {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-notice-bar text="以写作为工具,为道途,先帮助自己一程,再以自己的领悟帮助他人一程, 这是一种服务 。" mode="link"></lay-notice-bar>
|
<lay-notice-bar text="以创造性的行为实践于人世。若能以写作为工具,为道途,先帮助自己一程,再以领悟帮助他人一程。这是一种服务。" mode="link"></lay-notice-bar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-notice-bar leftIcon="layui-icon-mute" text="最好的爱是两个人彼此做个伴,不要束缚,不要缠绕,不要占有,不渴望从对方那里得到,只是并肩站在一起,看看这个世界。"></lay-notice-bar>
|
<lay-notice-bar leftIcon="layui-icon-mute" text="以一颗冷静思辨的态度去看待这个物质浮躁的新时代,大环境,恰当处理自身与外界环境的矛盾,如何身心健康,自在的成为自己。"></lay-notice-bar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -55,7 +55,7 @@ export default {
|
|||||||
::: demo
|
::: demo
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<lay-notice-bar leftIcon="layui-icon-mute" rightIcon="layui-icon-close" text="所有发生过的都是既定的。是应该发生。只能发生。" mode="closeable" background="#ecf5ff" ></lay-notice-bar>
|
<lay-notice-bar leftIcon="layui-icon-mute" rightIcon="layui-icon-close" text="事情总是会自动变化。顺其自然就好。" mode="closeable" background="#ecf5ff" ></lay-notice-bar>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1277,30 +1277,30 @@ export default {
|
|||||||
|
|
||||||
::: table
|
::: table
|
||||||
|
|
||||||
| 属性 | 描述 | 类型 | 默认值 | 可选值 |
|
| 属性 | 描述 | 类型 | 默认值 | 可选值 |
|
||||||
| -------------------- | ----------------------------- | --------- | ------- | -------------- |
|
| -------------------- | ----------------------------------------------------- | ------------------- | ---------- | ------------------ |
|
||||||
| columns | 列配置 - [更多](#tableColumn) | -- | -- | -- |
|
| columns | 列配置 - [更多](#tableColumn) | -- | -- | -- |
|
||||||
| dataSource | 数据源 | -- | -- | -- |
|
| dataSource | 数据源 | -- | -- | -- |
|
||||||
| checkbox | 开启复选框 | `boolean` | `false` | `true` `false` |
|
| checkbox | 开启复选框 | `boolean` | `false` | `true` `false` |
|
||||||
| id | 主键 | `string` | -- | -- |
|
| id | 主键 | `string` | -- | -- |
|
||||||
| v-model:selectedKeys | 选中项 (多选) | -- | -- | -- |
|
| v-model:selectedKeys | 选中项 (多选) | -- | -- | -- |
|
||||||
| v-model:selectedKey | 选中项 (单选) | -- | -- | -- |
|
| v-model:selectedKey | 选中项 (单选) | -- | -- | -- |
|
||||||
| default-toolbar | 工具栏 | `boolean` | `false` | `true` `false` |
|
| default-toolbar | 工具栏 | `boolean` | `false` | `true` `false` |
|
||||||
| size | 尺寸 | `string` | `md` | `lg` `md` `sm` |
|
| size | 尺寸 | `string` | `md` | `lg` `md` `sm` |
|
||||||
| children-column-name | 树节点字段 | `string` | `children`| -- |
|
| children-column-name | 树节点字段 | `string` | `children` | -- |
|
||||||
| indent-size | 树表行级缩进 | `number` | `30` | -- |
|
| indent-size | 树表行级缩进 | `number` | `30` | -- |
|
||||||
| height | 表格高度 | `number` | -- | -- |
|
| height | 表格高度 | `number` | -- | -- |
|
||||||
| maxHeight | 表格最大高度 | `number` | -- | -- |
|
| maxHeight | 表格最大高度 | `number` | -- | -- |
|
||||||
| even | 斑马条纹 | `boolean` | `false` | `true` `false` |
|
| even | 斑马条纹 | `boolean` | `false` | `true` `false` |
|
||||||
| cellStyle | 列样式 function(row, column, rowIndex, columnIndex) | `string` `function` | -- | -- |
|
| cellStyle | 列样式 function(row, column, rowIndex, columnIndex) | `string` `function` | -- | -- |
|
||||||
| rowStyle | 行样式 function(row, rowIndex) | `string` `function` | -- | -- |
|
| rowStyle | 行样式 function(row, rowIndex) | `string` `function` | -- | -- |
|
||||||
| cellClassName | 列类名称 function(row, column, rowIndex, columnIndex) | `string` `function` | -- | -- |
|
| cellClassName | 列类名称 function(row, column, rowIndex, columnIndex) | `string` `function` | -- | -- |
|
||||||
| rowClassName | 行类名称 function(row, rowIndex) | `string` `function` | -- | -- |
|
| rowClassName | 行类名称 function(row, rowIndex) | `string` `function` | -- | -- |
|
||||||
| skin | 风格 | `string` | -- | `line` `row` `nob` |
|
| skin | 风格 | `string` | -- | `line` `row` `nob` |
|
||||||
| expand-index | 展开所在列 | `number` | -- | -- |
|
| expand-index | 展开所在列 | `number` | -- | -- |
|
||||||
| default-expand-all | 默认展开所有列 | `boolean` | `false` | `true` `false` |
|
| default-expand-all | 默认展开所有列 | `boolean` | `false` | `true` `false` |
|
||||||
| expand-keys | 展开的列 | `array` | `[]` | -- |
|
| expand-keys | 展开的列 | `array` | `[]` | -- |
|
||||||
| span-method | 合并算法 | `function` | -- | -- |
|
| span-method | 合并算法 | `function` | -- | -- |
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -1322,9 +1322,9 @@ export default {
|
|||||||
|
|
||||||
::: table
|
::: table
|
||||||
|
|
||||||
| 插槽 | 描述 | 参数 |
|
| 插槽 | 描述 | 参数 |
|
||||||
| ------- | ------------ | ---- |
|
| ------- | ------------ | ---- |
|
||||||
| toolbar | 自定义工具栏 | -- |
|
| toolbar | 自定义工具栏 | -- |
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@ -1335,19 +1335,19 @@ export default {
|
|||||||
|
|
||||||
::: table
|
::: table
|
||||||
|
|
||||||
| 插槽 | 描述 | 类型 | 默认值 | 可选值 |
|
| 插槽 | 描述 | 类型 | 默认值 | 可选值 |
|
||||||
| --------------- | ------------------------------ | --------- | ------- | ---------------------------- |
|
| --------------- | ------------------------------ | --------- | ------- | --------------------------- |
|
||||||
| title | 列标题 | -- | -- | -- |
|
| title | 列标题 | -- | -- | -- |
|
||||||
| key | 数据字段 | -- | -- | -- |
|
| key | 数据字段 | -- | -- | -- |
|
||||||
| customSlot | 自定义插槽 | -- | -- | -- |
|
| customSlot | 自定义插槽 | -- | -- | -- |
|
||||||
| width | 宽度 | -- | -- | -- |
|
| width | 宽度 | -- | -- | -- |
|
||||||
| minWidth | 最小宽度 | -- | `100px` | -- |
|
| minWidth | 最小宽度 | -- | `100px` | -- |
|
||||||
| sort | 排序 | -- | -- | -- |
|
| sort | 排序 | -- | -- | -- |
|
||||||
| titleSlot | 标题插槽 | -- | -- | -- |
|
| titleSlot | 标题插槽 | -- | -- | -- |
|
||||||
| align | 对齐方式 | `string` | `left` | `left` `right` `center` |
|
| align | 对齐方式 | `string` | `left` | `left` `right` `center` |
|
||||||
| ellipsisTooltip | 当内容过长被隐藏时显示 tooltip | `boolean` | `false` | `true` `false` |
|
| ellipsisTooltip | 当内容过长被隐藏时显示 tooltip | `boolean` | `false` | `true` `false` |
|
||||||
| fixed | 列固定 | `string` | -- | `left` `right` |
|
| fixed | 列固定 | `string` | -- | `left` `right` |
|
||||||
| type | 列类型 | `string` | -- | `number` `checkbox` `radio` |
|
| type | 列类型 | `string` | -- | `number` `checkbox` `radio` |
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
@ -11,7 +11,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<lay-timeline>
|
<lay-timeline>
|
||||||
<lay-timeline-item title="1.3.x">
|
<lay-timeline-item title="1.3.x">
|
||||||
<ul>
|
<ul>
|
||||||
|
<a name="1-3-14"></a>
|
||||||
|
<li>
|
||||||
|
<h3>1.3.14 <span class="layui-badge-rim">2022-08-06</span></h3>
|
||||||
|
<ul>
|
||||||
|
<li>[修复] button 组件 hover 状态无效果的问题。</li>
|
||||||
|
<li>[修复] table 组件 data-source 远程加载后 scroll 计算错误。 </li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
<a name="1-3-13"></a>
|
<a name="1-3-13"></a>
|
||||||
<li>
|
<li>
|
||||||
<h3>1.3.13 <span class="layui-badge-rim">2022-08-04</span></h3>
|
<h3>1.3.13 <span class="layui-badge-rim">2022-08-04</span></h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user