0.1.102 • Published 5 years ago

@beisen/tool-tip v0.1.102

Weekly downloads
28
License
ISC
Repository
gitlab
Last release
5 years ago

ToolTip使用说明

功能

用于文字提示

使用说明

tip默认向上显示,当向上显示不下时,会向下显示  

使用方法

1. 将组件包裹在需要有提示信息的元素的外部,每个组件内部只能有一个元素
2. 适用于行内元素 如input、button、a和有span包裹的文字等  
3. 一般情况下只需要设置title值即可
4. 可以传简易的html标签  

项目运行、打包

* `cnpm install` 或 `npm install`
* `npm run dev` (开发环境打包 port:8080)
* `npm run build` (生产环境打包)  

使用参数

  • title : 提示内容 //需要提示的内容文字,必须是字符串
  • hidden: 组件是否隐藏 可选参数 :true,false 默认不隐藏, 可不设置
  • side :组件是否左右显示 可选参数 true ,false 默认为false 可不设置,一般情况下均为false
  • alwaysShowTips: 总是显示tooltip,默认为false,该参数和组件显示特性有关(该组件只有当包裹文字宽度大于外部宽度,即出现...这种显示不全的情况下才会显示tooltip)
  • htmlTag: 数组格式,['<center>', '<a>'] 为防止xss攻击,自定义允许渲染的html标签,组件内默认为 <span>,<p>,</br>,<br/> 凡是含有其他标签的字符串,均不会处理为html
  • tipsPosition: 'bottom' 目前仅支持bottom参数,当设置该参数为bottom时,tips会向下显示, 默认为自适应判断
  • tipsReason: "功能说明" 如果有该参数,未打点情况下会优先显示该参数,打点情况下会显示两行说明,如下显示
  • 名称
  • B: 说明

  • tipsDes: "功能描述", 自定义前置描述 B

ToolTip组件调用方法

1.安装npm组件包

npm install @beisen/tool-tip --save-dev  

2.引用组件

import ToolTip from "src/index"  

3.传入参数
该参数为上述参数,传入方式使用: {...参数}

export default class TestToolTip extends React.Component {
    constructor(props){
        super(props)
    }
    render() {
        let data = {
            title: '提示内容',
            hidden: false,
            side: true,
            alwaysShowTips: true,
            tipsPosition: 'buttom',
            htmlTag: ["<span>"], //组件内默认为 <span>,<p>,</br>,<br/>凡是含有其他标签的字符串,均不会处理为html
            tipsReason: 'reason',
            tipsDes: "des" 
        }
        return(
            <div> 
                <ToolTip {...data}> 
                    <input />
                </ToolTip>
            </div>
         ) 
    }
}  
    <ToolTip title='提示内容'> 
      <a href="#">内容热区</a>
    </ToolTip>
    <ToolTip title={data} side={true}> 
      <span>内容热区<span>  //左右自适应显示
    <ToolTip>
    <ToolTip title={v.text}> 
      <img href="#">内容热区 />
    </ToolTip>
@infinitebrahmanuniverse/nolb-_beisen_@everything-registry/sub-chunk-119tita-react-componentstita-talentuiux-banner-componentux-bounty-increase-tree-compux-abnormal-attendanceux-addetail-pageux-attachment-new-typeux-attachment-typesux-work-report-drawerux-platform-treeux-platform-user-selector-dragux-task-drawerux-task-listux-test-with-router-pageux-text-imageux-thunder-calendarux-tms-popupux-todo-listux-test-pageux-reward-order-compux-reward-wrapux-search-formux-remain-annual-leaveux-report-last-evaluation-resultux-diligence-listux-evaluation-reportsux-feature-avatarux-italent-appux-caption-componentsux-card-page-templateux-solutionux-tag-cloudux-tub-tmpl-task-weekux-tub-tmpl-userux-tub-tmpl-work-statisticalux-universal-user-infoux-user-basic-infoux-user-basic-infosux-user-selector2ux-vacation-balanceux-week-daily-statisticsux-week-task-completionux-work-calendarux-m-report-alldeg-scoreux-m-report-evaluation-scoreux-m-user-infosux-medalux-my-bountyux-my-meetting-componentux-performance-process-snapshotux-person-evaluation-resultux-person-last-alldeg-scoreux-person-last-alldeg-scoresux-person-last-evaluation-scoreux-plan-completion-rateux-last-test-resultsux-last-thas-resultux-m-last-alldeg-scoreux-m-last-evaluation-scoreux-jobs-pageux-online-user-viewux-pagebuilderux-platform-form-containerux-platform-ocean-table-mobileux-m-performance-historyux-my-todo-viewux-company-announcementux-company-key-wordux-compapy-tags-order-coux-create-project@talentui/external-components-bootstrap@talentui/page-templatesmetadata-page-builderpc-italent-appstore-managepage-templatesassess-create-projectassess-solution@beisen/ux-company-announcement@beisen/ux-computationrule@beisen/ux-reward@beisen/lookup-v2@beisen/tub-tmpl-work-statistical@beisen/ux-upaas-ethos@beisen/time-picker@beisen/tita-react-components@beisen/tms-react@beisen/recruit-dropdown-list@beisen/features-avatar@beisen/calendar@beisen/platform-baseplatform-shared-cmps@beisen-cmps/italent-attachmentlist@beisen-cmps/italent-create-summary@beisen-cmps/italent-create-task@beisen-cmps/italent-feed-13@beisen-cmps/italent-feed-14@beisen-cmps/form-uploader@beisen-cmps/italent-feed-20
0.1.102

5 years ago

0.1.101

5 years ago

0.1.100

5 years ago

0.1.99

5 years ago

0.1.98

5 years ago

0.1.97

5 years ago

0.1.96

5 years ago

0.1.95

5 years ago

0.1.94

5 years ago

0.1.93

5 years ago

0.1.92

5 years ago

0.1.91

5 years ago

0.1.90

5 years ago

0.1.89

5 years ago

0.1.88

5 years ago

0.1.87

5 years ago

0.1.86

5 years ago

0.1.85

5 years ago

0.1.84

5 years ago

0.1.83

5 years ago

0.1.82

5 years ago

0.1.81

5 years ago

0.1.80

5 years ago

0.1.79

5 years ago

0.1.78

5 years ago

0.1.77

5 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74-1

5 years ago

0.1.74

6 years ago

0.1.73

6 years ago

0.1.72

6 years ago

0.1.71

6 years ago

0.1.69

6 years ago

0.1.68

6 years ago

0.1.67

6 years ago

0.1.66

6 years ago

0.1.65

6 years ago

0.1.64

6 years ago

0.1.63

6 years ago

0.1.62

6 years ago

0.1.61

6 years ago

0.1.60

6 years ago

0.1.59

6 years ago

0.1.58

6 years ago

0.1.56

6 years ago

0.1.55

6 years ago

0.1.54

6 years ago

0.1.53

6 years ago

0.1.52

6 years ago

0.1.51

6 years ago

0.1.50

6 years ago

0.1.49

6 years ago

0.1.48

6 years ago

0.1.47

6 years ago

0.1.46

6 years ago

0.1.45

6 years ago

0.1.44

6 years ago

0.1.43

6 years ago

0.1.42

6 years ago

0.1.41

6 years ago

0.1.40

6 years ago

0.1.39

6 years ago

0.1.38

7 years ago

0.1.37

7 years ago

0.1.36

7 years ago

0.1.35

7 years ago

0.1.34

7 years ago

0.1.33

7 years ago

0.1.32

7 years ago

0.1.31

7 years ago

0.1.30

7 years ago

0.1.29

7 years ago

0.1.28

7 years ago

0.1.27

7 years ago

0.1.26

7 years ago

0.1.25

7 years ago

0.1.24

7 years ago

0.1.23

7 years ago

0.1.22

7 years ago

0.1.21

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.12

7 years ago

0.1.11

7 years ago

0.1.10

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago