Merge branch 'next' into feat-tag

This commit is contained in:
sight
2022-08-06 19:24:48 +08:00
7 changed files with 62 additions and 46 deletions

View File

@@ -169,7 +169,6 @@ onMounted(() => {
.layui-notice-bar {
padding: 0 15px;
width: 100%;
border-radius: 4px;
}
.layui-notice-bar .layui-notice-bar-warp {
@@ -186,6 +185,7 @@ onMounted(() => {
overflow: hidden;
position: relative;
}
.layui-notice-bar
.layui-notice-bar-warp
.layui-notice-bar-warp-text-box

View File

@@ -24,6 +24,7 @@ import LayDropdown from "../dropdown/index.vue";
import LayPage from "../page/index.vue";
import LayEmpty from "../empty/index.vue";
import TableRow from "./TableRow.vue";
import { nextTick } from "vue";
export interface LayTableProps {
id?: string;
@@ -88,6 +89,7 @@ const allChecked = ref(false);
const hasChecked = ref(false);
const tableDataSource = ref<any[]>([...props.dataSource]);
const tableColumns = ref([...props.columns]);
const tableColumnKeys = ref(
props.columns.map((item: any) => {
if (item.hide != true) {
@@ -128,6 +130,9 @@ watch(
() => props.dataSource,
() => {
tableDataSource.value = [...props.dataSource];
nextTick(() => {
getScrollWidth();
});
},
{ 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 tableHeader = ref<HTMLElement | null>(null);
let scrollWidthCell = ref(0);
const getScrollWidth = () => {