@coffic/cosy-ui 0.9.23 → 0.9.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index-astro.ts
CHANGED
@@ -58,7 +58,6 @@ export * from './src-astro/types/article';
|
|
58
58
|
export * from './src-astro/types/footer';
|
59
59
|
export * from './src-astro/types/header';
|
60
60
|
export * from './src-astro/types/heading';
|
61
|
-
export * from './src-astro/types/layout';
|
62
61
|
export * from './src-astro/types/main';
|
63
62
|
export * from './src-astro/types/nav';
|
64
63
|
export * from './src-astro/types/product';
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { IFooterProps } from '
|
2
|
-
import type { IHeaderProps } from '
|
3
|
-
import type { IMainContentProps } from '
|
4
|
-
import type { IMetaProps } from '
|
5
|
-
import type { ISidebarProps } from '
|
1
|
+
import type { IFooterProps } from '../types/footer';
|
2
|
+
import type { IHeaderProps } from '../types/header';
|
3
|
+
import type { IMainContentProps } from '../types/main';
|
4
|
+
import type { IMetaProps } from './meta';
|
5
|
+
import type { ISidebarProps } from '../types/sidebar';
|
6
6
|
|
7
7
|
export interface IAppLayoutProps {
|
8
8
|
/**
|
@@ -108,6 +108,16 @@ const { id, title = '', class: className = '' } = Astro.props;
|
|
108
108
|
if (trigger) {
|
109
109
|
console.log('Modal: 触发模态框', id);
|
110
110
|
modal.showModal();
|
111
|
+
|
112
|
+
// 在modal显示后自动focus到第一个input元素
|
113
|
+
setTimeout(() => {
|
114
|
+
const firstInput = modal.querySelector(
|
115
|
+
'input, textarea, select, [contenteditable="true"]'
|
116
|
+
);
|
117
|
+
if (firstInput) {
|
118
|
+
firstInput.focus();
|
119
|
+
}
|
120
|
+
}, 100); // 延迟100ms确保modal完全显示
|
111
121
|
}
|
112
122
|
};
|
113
123
|
|