diff --git a/.gitignore b/.gitignore index 34482087..89f50327 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ package-lock.json package/document/dist/ + # Editor directories and files .idea .vscode diff --git a/package/component/package.json b/package/component/package.json index 4b29ad3d..d52d961f 100644 --- a/package/component/package.json +++ b/package/component/package.json @@ -1,6 +1,6 @@ { "name": "@layui/layui-vue", - "version": "1.3.13", + "version": "1.3.14", "author": "就眠儀式", "license": "MIT", "description": "a component library for Vue 3 base on layui-vue", diff --git a/package/component/src/component/noticeBar/index.vue b/package/component/src/component/noticeBar/index.vue index c61b73fe..0e50a4cd 100644 --- a/package/component/src/component/noticeBar/index.vue +++ b/package/component/src/component/noticeBar/index.vue @@ -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 diff --git a/package/component/src/component/table/index.vue b/package/component/src/component/table/index.vue index 7b3c5127..4bdd676f 100644 --- a/package/component/src/component/table/index.vue +++ b/package/component/src/component/table/index.vue @@ -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([...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(null); let tableBody = ref(null); +let tableHeader = ref(null); let scrollWidthCell = ref(0); const getScrollWidth = () => { diff --git a/package/document-component/src/document/zh-CN/components/noticeBar.md b/package/document-component/src/document/zh-CN/components/noticeBar.md index da566021..7777fa9c 100644 --- a/package/document-component/src/document/zh-CN/components/noticeBar.md +++ b/package/document-component/src/document/zh-CN/components/noticeBar.md @@ -13,7 +13,7 @@ ::: demo