1.0.0 • Published 8 years ago

inputx v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

InputX(特别提醒)


组件基于

superplaceholder.js npm version完成

Super charge your input placeholders


InstallationUsage

inputx是Vue.js的组件,基于superplaceholder.js完成,主要对input的placeholders属性做打字的效果。

Installation

  • NPM: npm install inputx

Usage

template

	<inputX :sentences='startVal'></inputX>

script

<script>
  import inputX from 'inputx';
  export default {
    components: { inputX },
    data () {
      return {
        sentences: ['理想很丰满','现实很骨感'],
      }
    }
  }
</script>

options(其他配置项)

// 文字之间的延迟
    letterDelay: {
      type: Number,
      default: 150,
    },
    // 句子之间的延迟
    sentenceDelay: {
      type: Number,
      default: 1000,
    },
    // 是否获取焦点开始,将false设置为autostart
    startOnFocus: {
      type: Boolean,
      default: false,
    },
    // 是否句子循环
    loop: {
      type: Boolean,
      default: true,
    },
    // 初始化传递的语句
    shuffle: {
      type: Boolean,
      default: true,
    },
    // 是否显示游标
    showCursor: {
      type: Boolean,
      default: true,
    },
    // 要显示的游标文字
    cursor: {
      type: String,
      default: '|',
    },

Browser Support

superplaceholder.js works best on latest versions of Google Chrome, Firefox and Safari and Chrome mobile.

For all non-supported browsers, the library will graceful degradate without any explicit handling in your code.

Contributing

MIT License

Read more on MIT License.

1.0.0

8 years ago