0.1.8 • Published 4 years ago

tooltip-canmen v0.1.8

Weekly downloads
45
License
-
Repository
-
Last release
4 years ago

tooltip

下载插件:

npm install tooltip-canmen --save

插件使用(全体):

main.js文件: 
import 'tooltip-canmen/src/index.js'
import 'tooltip-canmen/lib/them-chalk/index.css

插件使用(按需):

xxx.vue文件: 
import 'tooltip-canmen/src/xxx.js'
import 'tooltip-canmen/lib/them-chalk/xxx.css

插件图标来源:iconfont

使用:在index.html中引入此css

https://at.alicdn.com/t/font_1290583_7cv8iva22hc.css

对话框(messageBox)

字段名默认值作用
messageString对话框内容
htmlTxtDomhtml内容(dom)
tipTitleString对话框头部文字
headerShowBoolean是否显示对话框头部
messageString模态框内容
tipTitleString对话框头部文字
headerShowBoolean是否显示对话框头部
footerShowBoolean是否显示对话框尾部(button)
timerBoolean是否定时关闭
durationNumber(毫秒)对话框显示时长
resultBoolean对话框操作结果(确定、取消)

使用方法(messageBox)

this.$messageBox({message:'请输入弹框内容'})
.then(res=>{
    <!-- 确定按钮返回值 -->
    console.log(res)
}).catch(cancel=>{
    <!-- 取消|关闭按钮返回值 -->
    console.log(cancel)
})

提示框(message)

字段名默认值作用
messageString提示框内容
htmlTxthtml-Stringhtml内容(dom)
iconShowBoolean提示框图标是否显示
timerNumber(毫秒)弹出框显示时长

使用方法(message)

this.$message({message:'请输入提示内容'})

分页(pages)

字段名默认值作用
pageNowNumber当前页码
pageNumNumber分页数
dataSum(props)Number数据总条数
pageSize(props)Number每页条数
turnBtn(props)Boolean是否显示页面跳转按钮
countPage(props)Boolean是否显示数据总条数

使用方法(pages)

    <y-pages :dataSum="50" :pageSize="10" @getPage="yourFnc" ref="pages" />
    ...
    methods:{
        yourFnc(page){  //获取当前页码
            console.log(page)

            // 修改当前页码
            // this.refs.pages = 3
        }
    }

轮播图(carousel)

字段名类型作用
heightNumber高度
carouselDataArray轮播图数据
autoplayBoolean是否自动轮播
intervalNumber(ms)自动切换轮播时间
speedNumber(ms)切换轮播的最小间隔时间(不大于css-transtion时间)

使用方法(carousel)

    <y-carousel :carouselData="imgs" :autoplay="false"></y-carousel>
    ...
    data(){
        return{
            imgs:[
                {path:'xxx.jpg'},
                {path:'xxx.jpg'}
            ]
        }
    }

Customize configuration

See Configuration Reference.

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago