0.1.0 • Published 8 months ago

font-animation v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

font-animation

安装

npm i font-animation --save-dev

使用

<template>
    <div id="app">
        <fontAnimation
                style="position:absolute;left: 0;right: 0;margin: auto"
                can-click
                :fontStyle="{
            color: '#ffa500',
            fontWeight: 'bolder'
        }"
                text="这组件真棒!"
                @handle-click="textClick">
            <template slot="prepend">
                <span style="margin-right: 8px">【插槽】</span>
            </template>
            <template slot="append">
                <span>【插槽】</span>
            </template>
        </fontAnimation>
    </div>
</template>

<script>
    export default {
        methods: {
            textClick(e) {
                console.log(e, "e")
            }
        },
    };
</script>

属性

属性名默认值类型描述是否必填
text""Boolean显示的文字true
canClicktrue;Boolean字体是否可点击 可选值:true / false
fontStyle{color: "#ffa500",fontWeight: "bolder"}Object字体样式

插槽

插槽描述
prepend前置插槽
append后置插槽

事件

事件名描述返回值
handle-click点击事件点击文本的内容