carNo.vue 625 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view class="carNo flex align_center">
  3. <view class="prv">{{prv}}</view>
  4. <view class="other">{{other}}</view>
  5. </view>
  6. </template>
  7. <script>
  8. export default{
  9. props: {
  10. val: {
  11. type: String,
  12. default: ''
  13. },
  14. },
  15. computed: {
  16. prv() {
  17. return this.val.substr(0,1)
  18. },
  19. other(){
  20. return this.val.substr(1,this.val.length)
  21. }
  22. },
  23. }
  24. </script>
  25. <style lang="scss">
  26. .carNo{
  27. border: 1px solid #424D5E;
  28. border-radius: 4rpx 0 0 4rpx;
  29. overflow: hidden;
  30. font-size: 24rpx;
  31. .prv{
  32. background-color: #424D5E;
  33. color: #FFFFFF;
  34. }
  35. >view{
  36. padding: 2rpx 10rpx;
  37. }
  38. }
  39. </style>