From b01ba107bc5f0782cbbbd48d1df4c9fdc315f8cd Mon Sep 17 00:00:00 2001 From: 15906671117 <35553436@qq.com> Date: Wed, 20 Apr 2022 13:31:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E6=A0=8F=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component/noticeBar/index.ts | 8 + .../src/component/noticeBar/index.vue | 257 ++++++++++++++++++ package/component/src/index.ts | 3 + .../document/zh-CN/components/noticeBar.md | 132 +++++++++ package/document/src/router/zh-CN.ts | 5 + package/document/src/view/utils/menus.ts | 6 + 6 files changed, 411 insertions(+) create mode 100644 package/component/src/component/noticeBar/index.ts create mode 100644 package/component/src/component/noticeBar/index.vue create mode 100644 package/document/src/document/zh-CN/components/noticeBar.md diff --git a/package/component/src/component/noticeBar/index.ts b/package/component/src/component/noticeBar/index.ts new file mode 100644 index 00000000..5511c18f --- /dev/null +++ b/package/component/src/component/noticeBar/index.ts @@ -0,0 +1,8 @@ +import type { App } from "vue"; +import Component from "./index.vue"; + +Component.install = (app: App) => { + app.component(Component.name, Component); +}; + +export default Component; diff --git a/package/component/src/component/noticeBar/index.vue b/package/component/src/component/noticeBar/index.vue new file mode 100644 index 00000000..09449eb5 --- /dev/null +++ b/package/component/src/component/noticeBar/index.vue @@ -0,0 +1,257 @@ + + + + + \ No newline at end of file diff --git a/package/component/src/index.ts b/package/component/src/index.ts index 39ef2a38..61feee16 100644 --- a/package/component/src/index.ts +++ b/package/component/src/index.ts @@ -82,6 +82,7 @@ import LayDatePicker from "./component/datePicker/index"; import LayTransition from "./component/transition/index"; import LayUpload from "./component/upload/index"; import LayRipple from "./component/ripple/index"; +import LayNoticeBar from "./component/noticeBar/index"; import LayConfigProvider from "./provider"; import { InstallOptions } from "./types"; @@ -162,6 +163,7 @@ const components: Record = { LayTransition, LayUpload, LayRipple, + LayNoticeBar }; const install = (app: App, options?: InstallOptions): void => { @@ -250,6 +252,7 @@ export { LayTransition, LayUpload, LayRipple, + LayNoticeBar, install, }; diff --git a/package/document/src/document/zh-CN/components/noticeBar.md b/package/document/src/document/zh-CN/components/noticeBar.md new file mode 100644 index 00000000..4d659a1a --- /dev/null +++ b/package/document/src/document/zh-CN/components/noticeBar.md @@ -0,0 +1,132 @@ +::: anchor +::: + +::: title 基本介绍 +::: + +::: describe 全局展示操作反馈信息。 +::: + +::: title 基础使用 +::: + +::: demo + + + + + +::: + +::: title 使用图标 +::: + +::: demo + + + + + +::: + +::: title 允许关闭 +::: + +::: demo + + + + + +::: + +::: title 垂直滚动 +::: + +::: demo + + + + +::: + +::: title Notice Bar 属性 +::: + +::: table + +| 事件 | 描述 | 参数 | +| ---- | -------- | --------------------- | +| mode | 模式 | 'link' 'closeable' | +| text | 内容 | 滚动内容 | +| leftIcon | 左侧图标 | -- | +| rightIcon | 右侧图标 | -- | +| scrollable | 是否开启垂直滚动|true,false| +| textlist | 垂直滚动内容| Array| +::: + + + +::: previousNext transfer +::: diff --git a/package/document/src/router/zh-CN.ts b/package/document/src/router/zh-CN.ts index cb7cb519..d2562560 100644 --- a/package/document/src/router/zh-CN.ts +++ b/package/document/src/router/zh-CN.ts @@ -382,6 +382,11 @@ const zhCN = [ component: () => import("../document/zh-CN/components/ripple.md"), meta: { title: "水波纹" }, }, + { + path: "/zh-CN/components/noticeBar", + component: () => import("../document/zh-CN/components/noticeBar.md"), + meta: { title: "通告栏" }, + }, ], }, ], diff --git a/package/document/src/view/utils/menus.ts b/package/document/src/view/utils/menus.ts index 40dafc3e..aa4233a5 100644 --- a/package/document/src/view/utils/menus.ts +++ b/package/document/src/view/utils/menus.ts @@ -351,6 +351,12 @@ const menus = [ subTitle: "scroll", path: "/zh-CN/components/scroll", }, + { + id: 114, + title: "通告栏", + subTitle: "noticeBar", + path: "/zh-CN/components/noticeBar", + }, ], }, {