# 基础示例

  • 我们也可以直接调用工具从而实现动画

请输入密码:当前密码为777696, 完成后点击回车键

<template>
  <div>
    <p>请输入密码:当前密码为{{password}}, 完成后点击回车键</p>
    <higher-input 
      input-type="password"
      placeholder="请输入内容"
      v-model="value"
      maxlength="6"
      show-word-limit
      ref="input"
      @keyup.enter.native="enter">
    </higher-input>
  </div>
</template>
<script>
// const { setAnimation } = require('db-tidy-ui/lib/utils/animation.js')
export default {
  mixins: [require('@public/mixin/animation/utils.js').default], // vuepreess兼容写法项目勿用
  data () {
    return {
      value: null,
      password: 777696
    }
  },
  methods: {
    // enter() {    
    //   if(this.value != this.password)  {
    //     setAnimation(this.$refs.input.$el, 600, {
    //       classNames: ['shakeX']
    //     })
    //   }
    // }
  }
}
</script>
Expand Copy