diff --git a/demo/src/main.js b/demo/src/main.js index e641246..116c271 100644 --- a/demo/src/main.js +++ b/demo/src/main.js @@ -1,5 +1,5 @@ -// 引入 Admin Framework(框架内部已包含所有依赖和样式) -import AdminFramework from '../../dist/admin-framework.js' +// 开发环境直接引用源码以支持热更新 +import AdminFramework from '../../src/index.js' // 引入组件映射表 import componentMap from './router/component-map.js' diff --git a/src/components/treeGrid/component/subColmns.vue b/src/components/treeGrid/component/subColmns.vue index dc595c9..5d7df69 100644 --- a/src/components/treeGrid/component/subColmns.vue +++ b/src/components/treeGrid/component/subColmns.vue @@ -15,8 +15,19 @@ export default { }, methods: { colStyle(col) { - const width = col && col.width ? col.width : '150px' - return { width } + // 为不同类型的列设置合适的默认宽度 + let defaultWidth = '150px' + if (col && col.type === 'operation') { + defaultWidth = '200px' // 操作列需要更多空间 + } else if (col && col.key === 'name' || col.key === 'title') { + defaultWidth = '200px' // 名称列通常需要更多空间 + } + + const width = col && col.width ? col.width : defaultWidth + return { + width, + minWidth: col.minWidth || width + } } } } diff --git a/src/components/treeGrid/component/subTreeGrid.vue b/src/components/treeGrid/component/subTreeGrid.vue index 3c8edd2..9225612 100644 --- a/src/components/treeGrid/component/subTreeGrid.vue +++ b/src/components/treeGrid/component/subTreeGrid.vue @@ -1,5 +1,5 @@