diff --git a/docs/.vitepress/components/BColumnTip/index.md b/docs/.vitepress/components/BColumnTip/index.md new file mode 100644 index 0000000..f9eb42b --- /dev/null +++ b/docs/.vitepress/components/BColumnTip/index.md @@ -0,0 +1,18 @@ +# BTagsPanel +图标悬浮提示说明 + +## 组件注册 + +```js +import { BColumnTip } from '@fesjs/traction-widget'; +app.use(BColumnTip); +``` +## 代码演示 +### 基础用法 +使用场景: +1. 常规文字后追加 +2. 在表格的列名后追加,说明列名含义 + +--USE + +--CODE \ No newline at end of file diff --git a/docs/.vitepress/components/BColumnTip/use.vue b/docs/.vitepress/components/BColumnTip/use.vue new file mode 100644 index 0000000..6073f7a --- /dev/null +++ b/docs/.vitepress/components/BColumnTip/use.vue @@ -0,0 +1,43 @@ + + diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 24441b6..66b2877 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -93,6 +93,7 @@ export default defineConfig({ { text: 'BTableHeaderConfig', link: '/components/BTableHeaderConfig' }, { text: 'BSearch', link: '/components/BSearch' }, { text: 'BDynamicForms', link: '/components/BDynamicForms'}, + { text: 'BColumnTip', link: '/components/BColumnTip'}, ] }, { diff --git a/packages/traction-widget/components/ColumnTip/ColumnTip.vue b/packages/traction-widget/components/ColumnTip/ColumnTip.vue new file mode 100644 index 0000000..1a7ad47 --- /dev/null +++ b/packages/traction-widget/components/ColumnTip/ColumnTip.vue @@ -0,0 +1,26 @@ + + diff --git a/packages/traction-widget/components/ColumnTip/index.ts b/packages/traction-widget/components/ColumnTip/index.ts new file mode 100644 index 0000000..cf60e58 --- /dev/null +++ b/packages/traction-widget/components/ColumnTip/index.ts @@ -0,0 +1,9 @@ +import { withInstall } from '../_util/withInstall'; +import ColumnTip from './ColumnTip.vue'; + +import type { SFCWithInstall } from '../_util/interface'; + +type ColumnTipType = SFCWithInstall; +export const BColumnTip = withInstall(ColumnTip as ColumnTipType); + +export default BColumnTip; diff --git a/packages/traction-widget/components/ColumnTip/style/index.less b/packages/traction-widget/components/ColumnTip/style/index.less new file mode 100644 index 0000000..897ac43 --- /dev/null +++ b/packages/traction-widget/components/ColumnTip/style/index.less @@ -0,0 +1,10 @@ +.wd-column-tip { + position:relative; + .wd-hint-icon-column { + position: absolute; + transform: translateY(-50%); + top: 55%; + color: #B7B7BC; + margin: 0px 6px; + } + } \ No newline at end of file diff --git a/packages/traction-widget/components/ColumnTip/style/index.ts b/packages/traction-widget/components/ColumnTip/style/index.ts new file mode 100644 index 0000000..d74e52e --- /dev/null +++ b/packages/traction-widget/components/ColumnTip/style/index.ts @@ -0,0 +1 @@ +import './index.less'; diff --git a/packages/traction-widget/components/_style.ts b/packages/traction-widget/components/_style.ts index be33b6d..216b720 100644 --- a/packages/traction-widget/components/_style.ts +++ b/packages/traction-widget/components/_style.ts @@ -8,3 +8,4 @@ import './TablePage/style'; import './TagSelector/style'; import './VerticalLayout/style'; import './TagsPanel/style'; +import './ColumnTip/style'; diff --git a/packages/traction-widget/components/index.ts b/packages/traction-widget/components/index.ts index fcfb71d..0af2896 100644 --- a/packages/traction-widget/components/index.ts +++ b/packages/traction-widget/components/index.ts @@ -9,6 +9,7 @@ import { BSearch } from './Search'; import { BTablePage } from './TablePage'; import { BNavBar } from './NavBar'; import { BNavHeader } from './NavHeader'; +import { BColumnTip } from './ColumnTip'; const components = [ BTagsPanel, @@ -19,7 +20,8 @@ const components = [ BSearch, BTablePage, BNavBar, - BNavHeader + BNavHeader, + BColumnTip ]; const install = (app: any): any => { @@ -46,7 +48,8 @@ export { BSearch, BTablePage, BNavBar, - BNavHeader + BNavHeader, + BColumnTip }; export default { @@ -66,5 +69,6 @@ export default { BSearch, BTablePage, BNavBar, - BNavHeader + BNavHeader, + BColumnTip };