diff --git a/src/components/index.ts b/src/components/index.ts
index 90c3935..db4d73b 100644
--- a/src/components/index.ts
+++ b/src/components/index.ts
@@ -9,6 +9,7 @@ import ArticleView from "./article-view";
import NotifyEditor from "./notify-editor";
import NotifyView from "./notify-view";
import BottomPopup from "./bottom-popup";
+import Space from "./space";
export default [
RootLayout,
@@ -20,7 +21,8 @@ export default [
ArticleView,
NotifyEditor,
NotifyView,
- BottomPopup
+ BottomPopup,
+ Space
];
export {
@@ -33,9 +35,19 @@ export {
ArticleView,
NotifyEditor,
NotifyView,
- BottomPopup
+ BottomPopup,
+ Space
};
+export type {
+ SpaceAlign,
+ SpaceDirection,
+ SpaceProps,
+ SpaceSeparator,
+ SpaceSize,
+ SpaceSlots
+} from "./space";
+
export type {
CodeEditorExpose
} from "./code-editor";
diff --git a/src/components/space/index.ts b/src/components/space/index.ts
new file mode 100644
index 0000000..7941a56
--- /dev/null
+++ b/src/components/space/index.ts
@@ -0,0 +1,14 @@
+import view from "./index.vue";
+import { WebToolkit } from "timi-web";
+
+export type {
+ SpaceAlign,
+ SpaceDirection,
+ SpaceProps,
+ SpaceSeparator,
+ SpaceSize,
+ SpaceSlots
+} from "./type";
+
+export const Space = WebToolkit.withInstall(view);
+export default Space;
diff --git a/src/components/space/index.vue b/src/components/space/index.vue
new file mode 100644
index 0000000..74aca32
--- /dev/null
+++ b/src/components/space/index.vue
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/space/type.ts b/src/components/space/type.ts
new file mode 100644
index 0000000..2a3d8cd
--- /dev/null
+++ b/src/components/space/type.ts
@@ -0,0 +1,33 @@
+import type { VNodeChild } from "vue";
+
+/** Space 对齐方式。 */
+export type SpaceAlign = "start" | "end" | "center" | "baseline";
+
+/** Space 排列方向。 */
+export type SpaceDirection = "vertical" | "horizontal";
+
+/** Space 预设或自定义间距。 */
+export type SpaceSize = number | string;
+
+/** Space 分隔符内容。 */
+export type SpaceSeparator = string | VNodeChild | (() => VNodeChild);
+
+/** Space 组件属性。 */
+export interface SpaceProps {
+ /** 对齐方式。 */
+ align?: SpaceAlign;
+ /** 是否自动换行,仅在 horizontal 时有效。 */
+ breakLine?: boolean;
+ /** 间距方向。 */
+ direction?: SpaceDirection;
+ /** 分隔符,也可以使用 separator 插槽。 */
+ separator?: SpaceSeparator;
+ /** 间距大小,数组依次表示横向和纵向间距。 */
+ size?: SpaceSize | SpaceSize[];
+}
+
+/** Space 插槽。 */
+export interface SpaceSlots {
+ default?: () => VNodeChild[];
+ separator?: () => VNodeChild[];
+}