| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view class="container">
- <!-- 头部搜索栏区域 -->
- <view class="search">
- <uni-search-bar cancelButton="none" focus v-model="searchValue" @input="input" @clear="clear" @blur="blur">
- </uni-search-bar>
- </view>
- <!-- 新增考勤组区域 -->
- <view class="add">
- 123
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- searchValue: ""
- };
- },
- methods: {
- blur(res) {
- uni.showToast({
- title: '搜索:' + res.value,
- icon: 'none'
- })
- },
- input(res) {
- console.log('----input:', res)
- },
- clear(res) {
- uni.showToast({
- title: 'clear事件,清除值为:' + res.value,
- icon: 'none'
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- padding-top: 20rpx;
- background-color: skyblue;
- .search {
- box-sizing: border-box;
- padding: 0 30rpx;
- width: 750rpx;
- height: 90rpx;
- border-radius: 170rpx;
- background-color: #fff;
- }
- .add {
- margin-top: 20rpx;
- background-color: #fff;
- }
- }
- ::v-deep .uni-searchbar {
- padding: 10rpx;
- }
- </style>
|