123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <template>
- <view>
- <view class="content">
- <view class="title">
- <picker mode="selector" :range="array" :value="index" @change="bindPickerChange">
- <view class="title_select">
- <view>{{array[index]}}</view>
- <view class="icon">
- <uni-icons type="arrowdown"></uni-icons>
- </view>
- </view>
- </picker>
- </view>
- <view class="inner">
- <slot></slot>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- array: ['今日各科室下井人数', '当前各科室下井人数'],
- index: 0,
- };
- },
- methods: {
- bindPickerChange: function(e) {
- console.log('picker发送选择改变,携带值为', e.target.value)
- this.$emit("changeDepart",e.target.value)
- this.index = e.target.value
- },
- }
- }
- </script>
- <style lang="scss">
- .content {
- margin-bottom: 20rpx;
- margin-top: 16rpx;
- background: #FFFFFF;
- box-shadow: 0px 3rpx 29rpx 0px rgba(59, 74, 116, 0.14);
- border-radius: 20rpx;
- .title {
- line-height: 96rpx;
- text-align: center;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #232627;
-
-
- .title_select{
- display: flex;
- justify-content: center;
- .icon{
- margin-left: 20rpx;
- }
- }
- }
- .inner {
- // height: 200rpx;
- }
- }
- </style>
|