diff --git a/app.wxss b/app.wxss index 9f9823908cdc0da0c77445ebb73babdfd6bf9a3d..bfc91dd220dfefb644d028bb7ceaf90ce58abcf1 100644 --- a/app.wxss +++ b/app.wxss @@ -16,7 +16,7 @@ } .kg-text-normal-gray { - font-size: 30rpx; + font-size: 33rpx; color: rgb(78, 78, 78); } @@ -60,16 +60,19 @@ } .kg-quantity-cell { - justify-content: space-between; - height: 120rpx; + /* height: 120rpx; */ width: auto; border-radius: 6rpx; box-shadow: 0rpx 0rpx 8rpx 8rpx #f2f6f9; - padding: 0rpx 20rpx; + padding: 30rpx 20rpx; margin-bottom: 20rpx; + display: flex; + flex-direction: column; + } .kg-flex-row { + justify-content: space-between; display: flex; flex-direction: row; align-items: center; diff --git a/pages/add_record/index.wxml b/pages/add_record/index.wxml index 311bc9d298f01c20890e1a6ec6f34944d999a8ad..fec9f8b83edc8bc4ea3b6d7cd64ecedb2ed70332 100644 --- a/pages/add_record/index.wxml +++ b/pages/add_record/index.wxml @@ -23,9 +23,15 @@ <view class='kg-separater'></view> <!-- æ•°é‡ --> <view style='margin:20rpx'> - <template is='quantity_cell' data="{{type:'input',unit:'毫å‡'}}"></template> - <template is='quantity_cell' data="{{type:'input',unit:'毫å‡'}}"></template> - <template is='quantity_cell' data="{{type:'select',unit:'毫å‡'}}"></template> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'input',unit:'毫å‡'}}"></template> + </view> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'input',unit:'毫å‡'}}"></template> + </view> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'select',options:['å°‘','æ£å¸¸','多多']}}"></template> + </view> </view> <view class='kg-separater'></view> <template is="section_header" data="{{title:'今日æ‹ç…§'}}"></template> @@ -46,14 +52,31 @@ </view> <!-- ç¡è§‰ --> -<view hidden='{{controlIndex != 1}}'></view> -<!-- 滑动区域 --> -<scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'> - <view style='margin:20rpx'> - <template is='quantity_cell' data="{{type:'input',unit:'分钟'}}"></template> - <template is='quantity_cell' data="{{type:'input',unit:'分钟'}}"></template> - <template is='quantity_cell' data="{{type:'select',unit:'分钟'}}"></template> - </view> -</scroll-view> -<view hidden='{{controlIndex != 2}}'>WC</view> +<view hidden='{{controlIndex != 1}}'> + <!-- 滑动区域 --> + <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'> + <view style='margin:20rpx'> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'input',unit:'分钟'}}"></template> + </view> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'input',unit:'分钟'}}"></template> + </view> + </view> + </scroll-view> +</view> + +<!-- WC --> +<view hidden='{{controlIndex != 2}}'> + <scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx - 140rpx)' scroll-y='true'> + <view style='margin:20rpx'> + <view class='kg-quantity-cell'> + <template is='quantity_cell' data="{{type:'select',options:['pee','poo','diaper']}}"></template> + <text class='kg-text-normal-gray' style='margin-top:20rpx' space="ensp">pee: 4次 poo: 1次 diaper: 9次</text> + </view> + </view> + </scroll-view> +</view> + + <template is="operate_btn" data="{{title:'ä¿å˜'}}"></template> \ No newline at end of file diff --git a/template/operate_btn/index.wxml b/template/operate_btn/index.wxml index 33bd6f4af9e6cc7eddf132b03658e224759e362c..4d89a8abe1e437ba51085d65ccc3bc6fb4efa815 100644 --- a/template/operate_btn/index.wxml +++ b/template/operate_btn/index.wxml @@ -12,21 +12,23 @@ <!--é€šç”¨çš„åˆ†åŒºæ ‡é¢˜--> <template name='section_header'> <view class='kg-section-header'> - <view style='width:10rpx; height:30rpx;background-color:#f9aa76; margin-left:20rpx'></view> + <view style='width:10rpx; height:33rpx;background-color:#f9aa76; margin-left:20rpx'></view> <view class='kg-text-normal-gray' style='margin-left:16rpx'>{{title}}</view> </view> </template> <template name='quantity_cell'> - <view class='kg-flex-row kg-quantity-cell'> + <view class='kg-flex-row '> <view class='g-text-normal-dark'>å¼ å°åŽ</view> + <!-- 输入型cell --> <view class='kg-flex-row' hidden="{{type != 'input'}}"> <input class='kg-border' style='width:140rpx;margin-right:10rpx;'></input> <view class='kg-text-normal-gray'>{{unit}}</view> </view> + <!-- 选择型cell --> <view class='kg-flex-row' hidden="{{type != 'select'}}"> - <view wx:for="{{['å°‘','æ£å¸¸','多']}}"> - <view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tap' data-index='{{index}}' style='width: 100rpx;margin-right: 0rpx;margin-bottom: 0rpx;margin-left:20rpx;'>{{item}}</view> + <view wx:for="{{options}}"> + <view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tap' data-index='{{index}}' style='width: 120rpx;margin-right: 0rpx;margin-bottom: 0rpx;margin-left:20rpx;'>{{item}}</view> </view> </view> </view>