group.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <view class="container">
  3. <!-- 头部搜索栏区域 -->
  4. <view class="search">
  5. <uni-search-bar cancelButton="none" focus v-model="searchValue" @input="input" @clear="clear" @blur="blur">
  6. </uni-search-bar>
  7. </view>
  8. <!-- 新增考勤组区域 -->
  9. <view class="add">
  10. 123
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. searchValue: ""
  19. };
  20. },
  21. methods: {
  22. blur(res) {
  23. uni.showToast({
  24. title: '搜索:' + res.value,
  25. icon: 'none'
  26. })
  27. },
  28. input(res) {
  29. console.log('----input:', res)
  30. },
  31. clear(res) {
  32. uni.showToast({
  33. title: 'clear事件,清除值为:' + res.value,
  34. icon: 'none'
  35. })
  36. },
  37. }
  38. }
  39. </script>
  40. <style lang="scss" scoped>
  41. .container {
  42. padding-top: 20rpx;
  43. background-color: skyblue;
  44. .search {
  45. box-sizing: border-box;
  46. padding: 0 30rpx;
  47. width: 750rpx;
  48. height: 90rpx;
  49. border-radius: 170rpx;
  50. background-color: #fff;
  51. }
  52. .add {
  53. margin-top: 20rpx;
  54. background-color: #fff;
  55. }
  56. }
  57. ::v-deep .uni-searchbar {
  58. padding: 10rpx;
  59. }
  60. </style>