sunui-password.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template name='sunui-password'>
  2. <view>
  3. <text class="sunui-eye-iconfont" :class="showpass?'icon-yanjing-bi':'icon-yanjing-zheng'" @tap="showTap"></text>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. showpass:true
  11. };
  12. },
  13. name:'sunui-password',
  14. methods:{
  15. showTap(){
  16. this.showpass = !this.showpass;
  17. this.$emit('change',this.showpass);
  18. }
  19. }
  20. }
  21. </script>
  22. <style>
  23. @font-face {font-family: "sunui-eye-iconfont";
  24. src: url('//at.alicdn.com/t/iconfont.eot?t=1557740566630'); /* IE9 */
  25. src: url('//at.alicdn.com/t/iconfont.eot?t=1557740566630#iefix') format('embedded-opentype'), /* IE6-IE8 */
  26. url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAPEAAsAAAAAB9gAAAN2AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqDNIMGATYCJAMMCwgABCAFhG0HRBvaBsguoRzbUaQhzA7XPv/dnjJ/l2ylgTyAiIensdr7M7Oq7S6pRsH7JsQi3kg08QQhkjRkLZFQ8Hnt6jMHMQewgpmZnfHLZs+sQFT4aOFO6MAGkEG9n19LGP1wcVhvaptI44hUsU6G6tehytza1pA8CcWkVcTyStw3TA/gP5+4d9oUn8+yXOZY/qkLMA4ooLE2FVEBBcQtY5NhZE6s/A8TaJoXjDqr55UBA4U9KhD3BkwzMCiYlI7qUBeqDQuLeANV1NMr5BVeR9+P/4o6SSWzJ85upLeBpF/kj0UfglwNSJB4OgfEZWRsAApxvdF1kXaS2qCtqat0uouripCmioKJRIamutE/XiKq7Mo2WIF04hfpcQl+sWkJ17+MKup4is+UPn5TUSb0OhPb7ftpWrG2/fDGMUlmsgvrd/c3HeK4adruseVcKLcWDkynH3Y9trFXN7xPZY8zinr0nTkFHk5mZS+tHx/aypdj/aoNFDLTTmk6HQ+bcrRmn2WVb5PyxRWbUxNOXLj4TVzzKIbnt+eeZl6Xd6nAT19dD414SW/jnAdc7fLD3Xbj+SdDaevv/lY0fYeN7KPsnXiB5HG1n/GHQnJ2xMbcgX5Gt3/5ZDO2OfPnNwHpOPDLVze93VtHvXLbk+Ufl0836D3a6h6na777eDWxk9h5svgDfLis53ire5dGfvgRNQl/f6qtxe67ka23M+rukJo5hhHvy2FBlHXkiqI9zqRopzMKhJ5CK3KDJnYyf08g8HxDXv53v/HozzM/vN4q4Ae4NgVDgfNQfzJ38E+JkXXFkNrmXDSRJ7Lc2dlcQAIEktr/UwtD39g1E3QloW6SIamZQ1a3QC70DVS0HKCq7gSa1mUubxnBtEVpYM0YQei7RtL1DVnfa3Khf0XF1H9U9SOj6XyMNmxZitvYmSVqJqgNtnRBtlWWaNdKjOLqEsRohGacl0aMCoTVbBRGbO2Us5lIQniKKep2JpIQGtJYFmEGOQ4JggwVLHOolYSqCFESw7ZvNL0otFUWgZEzMKQZgbSBWnSBWK1kEjpoThhVPl8CYWgImuEOQp23AoKpse1DEUKFI8iZKglFuJVn1NoxIhEEDaJhMhGUQRyI4KRkkNLcj4O0IkKpGBKKRGG0EY1VhS6vEd9vCzTZJ+VIkaNoPmhIHCsxIS2saWrvVqHACAAAAA==') format('woff2'),
  27. url('//at.alicdn.com/t/iconfont.woff?t=1557740566630') format('woff'),
  28. url('//at.alicdn.com/t/iconfont.ttf?t=1557740566630') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
  29. url('//at.alicdn.com/t/iconfont.svg?t=1557740566630#iconfont') format('svg'); /* iOS 4.1- */
  30. }
  31. .sunui-eye-iconfont {
  32. font-family: "sunui-eye-iconfont" !important;
  33. font-size: 16px;
  34. font-style: normal;
  35. -webkit-font-smoothing: antialiased;
  36. -moz-osx-font-smoothing: grayscale;
  37. }
  38. .icon-yanjing-bi:before {
  39. content: "\e61d";
  40. }
  41. .icon-yanjing-zheng:before {
  42. content: "\e621";
  43. }
  44. .sunui-eye-iconfont {
  45. font-size: 50upx;
  46. }
  47. </style>