random-font-size

1.1.2 • Public • Published

random-font-sizeVersion

Version

这是一个将文本其中的字符串随机放大的组件,适用于Vue2+

预览/Preview


demo

快速开始/How To Start


npm install random-font-size -S

or

yarn add random-font-size -S

main.js

import Vue from 'vue'
import RandomFontSize from 'random-font-size'
 
Vue.use(RandomFontSize)

Test.vue

<template>
     <random-font-size :data='font' :fontStyle='style'></random-font-size>
</template>
 
<script>
export default{
  data(){
    return{
      font: "如果你感到保持人性是值得的。即使这不能有任何结果,你也已经打败了他们!",
      style: {
        color: "black",
        "font-size": "25px"
      }
    }
  }
}
</script>

接口/Interface


属性/Props

属性名/Name 描述/Description 类型/Type 默认值/Default Value
data 节点树的数据 String 组件需要传入参数!
fontStyle 被放大字体的样式(将会被插入到其元素的style属性中) Object {"font-size": "20px"}

许可证/License


MIT

Package Sidebar

Install

npm i random-font-size

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

242 kB

Total Files

13

Last publish

Collaborators

  • shuirong