|
72 | 72 | </view> |
73 | 73 |
|
74 | 74 | <view class="f-form-content" v-else-if="item.type=='number'"> |
75 | | - <input :focus="item.focus" :ref="item.field" placeholder-style="color:rgb(192 196 204);font-size:15px;" type="number" |
76 | | - v-model="formFields[item.field]" border="none" |
| 75 | + <input :focus="item.focus" :ref="item.field" placeholder-style="color:rgb(192 196 204);font-size:15px;" |
| 76 | + type="number" v-model="formFields[item.field]" border="none" |
77 | 77 | :placeholder="item.placeholder||('请输入'+item.title)"></input> |
78 | 78 | </view> |
79 | 79 | <view class="f-form-content" v-else-if="item.type=='decimal'"> |
80 | | - <input :focus="item.focus" :ref="item.field" placeholder-style="color:rgb(192 196 204);font-size:15px;" type="digit" |
81 | | - v-model="formFields[item.field]" border="none" |
| 80 | + <input :focus="item.focus" :ref="item.field" placeholder-style="color:rgb(192 196 204);font-size:15px;" |
| 81 | + type="digit" v-model="formFields[item.field]" border="none" |
82 | 82 | :placeholder="item.placeholder||('请输入'+item.title)"></input> |
83 | 83 | </view> |
84 | 84 | <view class="f-form-content" v-else-if="item.type=='switch'"> |
|
110 | 110 | :placeholder="item.placeholder||('请输入'+item.title)"></input> |
111 | 111 | </view> |
112 | 112 | <view v-if="item.extra" @click="extraClick(item,inFormFields)"> |
113 | | - <u-icon v-if="item.extra.icon" :name="item.extra.icon" :color="item.extra.clor||'#ffff'" size="20"></u-icon> |
| 113 | + <u-icon v-if="item.extra.icon" :name="item.extra.icon" :color="item.extra.clor||'#ffff'" size="20"> |
| 114 | + </u-icon> |
114 | 115 | <text :style="item.extra.style">{{item.extra.text}}</text> |
115 | 116 | </view> |
116 | 117 | </view> |
|
127 | 128 | <view class="vol-action-sheet-select-title">请选择{{actionSheetCurrentItem.title}} |
128 | 129 | <text class="vol-action-sheet-select-confirm" @click="actionConfirmClick">确定</text> |
129 | 130 | </view> |
130 | | - <!-- 超过10个下拉框选项默认开启搜索 --> |
131 | | - <view class="vol-action-sheet-select-filter" v-show="actionSheetCurrentItem.data&&actionSheetCurrentItem.data.length>=10"> |
132 | | - <view |
133 | | - style="padding-left:20rpx;flex:1;font-size: 22px;color: #909399;background: white;"> |
| 131 | + <!-- 超过10个下拉框选项默认开启搜索 --> |
| 132 | + <view class="vol-action-sheet-select-filter" |
| 133 | + v-show="actionSheetCurrentItem.data&&actionSheetCurrentItem.data.length>=10"> |
| 134 | + <view style="padding-left:20rpx;flex:1;font-size: 22px;color: #909399;background: white;"> |
134 | 135 | <u--input placeholder="请输入关键字搜索" v-model="searchText"> |
135 | 136 | </u--input> |
136 | 137 | </view> |
137 | 138 | <view class="search-btn"> |
138 | | - <u-button type="primary" icon="trash" @click="searchText=''" |
139 | | - size="small">清除</u-button> |
| 139 | + <u-button type="primary" icon="trash" @click="searchText=''" size="small">清除</u-button> |
140 | 140 | </view> |
141 | 141 | </view> |
142 | 142 | <view class="vol-action-sheet-select-content"> |
|
201 | 201 | pickerCurrentItem: {}, //当前选项 |
202 | 202 | pickerCurrentRangeIndex: 0, |
203 | 203 | actionSheetModel: false, |
204 | | - actionSheetCurrentItem: {}, //当前选项 |
| 204 | + actionSheetCurrentItem: { |
| 205 | + min: 633715200000, |
| 206 | + max: 0 |
| 207 | + }, //当前选项 |
205 | 208 | actionSheetSelectValues: [], //当前选中的项 |
206 | 209 | numberModel: false, |
207 | 210 | numberType: 'number', |
|
223 | 226 | } else if (option.max && typeof option.max == 'string') { |
224 | 227 | option.max = Number(new Date(option.max.replace(/-/g, "/"))) |
225 | 228 | } |
| 229 | + if (!this.pickerCurrentItem.max) { |
| 230 | + this.pickerCurrentItem.max = option.max; |
| 231 | + } |
226 | 232 | } |
227 | | - |
228 | | - if(option.hasOwnProperty('focus')){ |
229 | | - option.focus=false; |
| 233 | +
|
| 234 | + if (option.hasOwnProperty('focus')) { |
| 235 | + option.focus = false; |
230 | 236 | } |
231 | 237 | }) |
232 | 238 | this.inFormOptions = this.formOptions; |
|
296 | 302 | this.$emit('dicInited', result); |
297 | 303 | }, |
298 | 304 | showActionSheet(item) { |
299 | | - this.searchText=''; |
| 305 | + this.searchText = ''; |
300 | 306 | this.actionSheetSelectValues = []; |
301 | 307 | this.actionSheetCurrentItem = item; |
302 | 308 | var value = this.inFormFields[item.field]; |
|
603 | 609 | deletePic(item, event) { |
604 | 610 | this.inFormFields[item.field].splice(event.index, 1) |
605 | 611 | }, |
606 | | - extraClick(item,inFormFields){ |
607 | | - this.$emit('extraClick',item,inFormFields) |
| 612 | + extraClick(item, inFormFields) { |
| 613 | + this.$emit('extraClick', item, inFormFields) |
608 | 614 | } |
609 | 615 | }, |
610 | 616 | // #ifdef MP-WEIXIN |
|
670 | 676 | // } |
671 | 677 | // } |
672 | 678 | .vol-action-sheet-select-filter { |
673 | | - display: flex; |
674 | | - background: #ffff; |
675 | | - padding: 10rpx; |
676 | | - border-bottom: 1px solid #eeee; |
| 679 | + display: flex; |
| 680 | + background: #ffff; |
| 681 | + padding: 10rpx; |
| 682 | + border-bottom: 1px solid #eeee; |
| 683 | +
|
677 | 684 | .search-btn { |
678 | | - position: relative; |
679 | | - top: 3px; |
| 685 | + position: relative; |
| 686 | + top: 3px; |
680 | 687 | // margin-left: 20rpx; |
681 | 688 | // padding-right: 20rpx; |
682 | 689 | // width: 100rpx; |
|
0 commit comments