diff --git a/package/document/src/document/zh-CN/components/table.md b/package/document/src/document/zh-CN/components/table.md index a8e21e52..e78890a3 100644 --- a/package/document/src/document/zh-CN/components/table.md +++ b/package/document/src/document/zh-CN/components/table.md @@ -256,7 +256,6 @@ export default { align: "left" },{ title:"密码", - width: "180px", customSlot:"password", key:"password", align: "center" diff --git a/package/document/src/document/zh-CN/guide/changelog.md b/package/document/src/document/zh-CN/guide/changelog.md index 2d5903f1..e1768f83 100644 --- a/package/document/src/document/zh-CN/guide/changelog.md +++ b/package/document/src/document/zh-CN/guide/changelog.md @@ -20,6 +20,7 @@
  • [修复] checkbox 组件夜间模式样式不兼容。
  • [修复] table 组件 columns 配置 width 属性不生效。
  • [优化] table 组件 columns 配置 width 未设置时自动分配宽度。
  • +
  • [优化] layer 方法 option callback 参数为可选。
  • diff --git a/package/layer/package.json b/package/layer/package.json index a77c024b..fb0680b4 100644 --- a/package/layer/package.json +++ b/package/layer/package.json @@ -1,6 +1,6 @@ { "name": "@layui/layer-vue", - "version": "1.3.11", + "version": "1.3.12", "description": "a component library for Vue 3 base on layui-vue", "homepage": "http://www.layui-vue.com", "module": "lib/layer-vue.es.js", diff --git a/package/layer/src/index.ts b/package/layer/src/index.ts index 2619c3ca..10ea3004 100644 --- a/package/layer/src/index.ts +++ b/package/layer/src/index.ts @@ -77,7 +77,7 @@ const layer = { return layer.create(option, defaultOption, callback); }, // 消息 - msg: (message: string, option: any, callback: Function) => { + msg: (message: string, option?: any, callback?: Function) => { let defaultOption = { type: 0, title: false, @@ -92,7 +92,7 @@ const layer = { return layer.create(option, defaultOption, callback); }, // 加载 - load: (load: number, option: any, callback: Function) => { + load: (load: number, option?: any, callback?: Function) => { let defaultOption = { type: 3, load: load, @@ -103,7 +103,7 @@ const layer = { return layer.create(option, defaultOption, callback); }, // 确认 - confirm: (msg: string, option: any, callback: Function) => { + confirm: (msg: string, option?: any, callback?: Function) => { let defaultOption = { type: 0, content: msg, @@ -112,7 +112,7 @@ const layer = { return layer.create(option, defaultOption, callback); }, // 创建弹出层 - create: (option: any, defaultOption: any, callback: Function) => { + create: (option: any, defaultOption: any, callback?: Function) => { // 销毁定时 let timer: NodeJS.Timeout; // 聚合配置 Opt diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 594e2696..cd81b199 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,7 +45,7 @@ importers: '@babel/preset-env': ^7.15.8 '@babel/preset-typescript': ^7.15.0 '@layui/icons-vue': ^1.0.7 - '@layui/layer-vue': ^1.3.11 + '@layui/layer-vue': ^1.3.12 '@rollup/plugin-babel': ^5.3.0 '@types/node': ^16.11.9 '@vitejs/plugin-vue': ^2.3.1