You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					97 lines
				
				4.7 KiB
			
		
		
			
		
	
	
					97 lines
				
				4.7 KiB
			| 
								 
											2 years ago
										 
									 | 
							
								<wux-popup
							 | 
						||
| 
								 | 
							
								    position="bottom"
							 | 
						||
| 
								 | 
							
								    visible="{{ popupVisible }}"
							 | 
						||
| 
								 | 
							
								    hasHeader="{{ false }}"
							 | 
						||
| 
								 | 
							
								    hasFooter="{{ false }}"
							 | 
						||
| 
								 | 
							
								    mountOnEnter="{{ false }}"
							 | 
						||
| 
								 | 
							
								    safeArea="bottom"
							 | 
						||
| 
								 | 
							
								    bind:close="close"
							 | 
						||
| 
								 | 
							
								    bind:closed="onClosed"
							 | 
						||
| 
								 | 
							
								>
							 | 
						||
| 
								 | 
							
								    <view class="{{ classes.wrap }}" wx:if="{{ mounted }}">
							 | 
						||
| 
								 | 
							
								        <view class="{{ classes.toolbar }}" wx:if="{{ toolbar }}" catchtouchmove="noop">
							 | 
						||
| 
								 | 
							
								            <view class="{{ classes.inner }}">
							 | 
						||
| 
								 | 
							
								                <view class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" bindtap="onCancel" wx:if="{{ toolbar.cancelText }}">{{ toolbar.cancelText }}</view>
							 | 
						||
| 
								 | 
							
								                <view class="{{ classes.title }}">{{ toolbar.title }}</view>
							 | 
						||
| 
								 | 
							
								                <view class="{{ classes.confirm }}" hover-class="{{ classes.hover }}" bindtap="onConfirm" wx:if="{{ toolbar.confirmText }}">{{ toolbar.confirmText }}</view>
							 | 
						||
| 
								 | 
							
								            </view>
							 | 
						||
| 
								 | 
							
								        </view>
							 | 
						||
| 
								 | 
							
								        <scroll-view scroll-y scroll-top="{{ scrollTop }}" class="{{ prefixCls + '__scroll-view' }}">
							 | 
						||
| 
								 | 
							
								            <wux-radio-group
							 | 
						||
| 
								 | 
							
								                id="wux-select"
							 | 
						||
| 
								 | 
							
								                value="{{ inputValue }}"
							 | 
						||
| 
								 | 
							
								                bind:change="onValueChange"
							 | 
						||
| 
								 | 
							
								                wx:if="{{ !multiple }}"
							 | 
						||
| 
								 | 
							
								            >
							 | 
						||
| 
								 | 
							
								                <block wx:for="{{ mergedOptions }}" wx:for-item="option" wx:key="index" wx:if="{{ mergedOptions.length > 0 }}">
							 | 
						||
| 
								 | 
							
								                    <wux-cell
							 | 
						||
| 
								 | 
							
								                        title="{{ option.title }}"
							 | 
						||
| 
								 | 
							
								                        hoverClass="none"
							 | 
						||
| 
								 | 
							
								                        data-group="{{ option.isGroup }}"
							 | 
						||
| 
								 | 
							
								                        wx:if="{{ option.isGroup }}"
							 | 
						||
| 
								 | 
							
								                    />
							 | 
						||
| 
								 | 
							
								                    <wux-radio
							 | 
						||
| 
								 | 
							
								                        wrapStyle="{{ option.isGroupOption ? { paddingLeft: 30 } : '' }}"
							 | 
						||
| 
								 | 
							
								                        prefixCls="{{ option.prefixCls || 'wux-radio' }}"
							 | 
						||
| 
								 | 
							
								                        cellPrefixCls="{{ option.cellPrefixCls || 'wux-cell' }}"
							 | 
						||
| 
								 | 
							
								                        selectablePrefixCls="{{ option.selectablePrefixCls || 'wux-selectable' }}"
							 | 
						||
| 
								 | 
							
								                        thumb="{{ option.thumb || '' }}"
							 | 
						||
| 
								 | 
							
								                        title="{{ option.title || '' }}"
							 | 
						||
| 
								 | 
							
								                        label="{{ option.label || '' }}"
							 | 
						||
| 
								 | 
							
								                        value="{{ option.value }}"
							 | 
						||
| 
								 | 
							
								                        checked="{{ inputValue === option.value }}"
							 | 
						||
| 
								 | 
							
								                        disabled="{{ option.disabled }}"
							 | 
						||
| 
								 | 
							
								                        color="{{ option.color || 'balanced' }}"
							 | 
						||
| 
								 | 
							
								                        data-index="{{ index }}"
							 | 
						||
| 
								 | 
							
								                        data-group-option="{{ option.isGroupOption }}"
							 | 
						||
| 
								 | 
							
								                        wx:else
							 | 
						||
| 
								 | 
							
								                    />
							 | 
						||
| 
								 | 
							
								                </block>
							 | 
						||
| 
								 | 
							
								            </wux-radio-group>
							 | 
						||
| 
								 | 
							
								            <wux-checkbox-group
							 | 
						||
| 
								 | 
							
								                id="wux-select"
							 | 
						||
| 
								 | 
							
								                value="{{ inputValue }}"
							 | 
						||
| 
								 | 
							
								                bind:change="onValueChange"
							 | 
						||
| 
								 | 
							
								                wx:else
							 | 
						||
| 
								 | 
							
								            >
							 | 
						||
| 
								 | 
							
								                <block wx:for="{{ mergedOptions }}" wx:for-item="option" wx:key="index" wx:if="{{ mergedOptions.length > 0 }}">
							 | 
						||
| 
								 | 
							
								                    <wux-cell
							 | 
						||
| 
								 | 
							
								                        title="{{ option.title }}"
							 | 
						||
| 
								 | 
							
								                        hoverClass="none"
							 | 
						||
| 
								 | 
							
								                        data-group="{{ option.isGroup }}"
							 | 
						||
| 
								 | 
							
								                        wx:if="{{ option.isGroup }}"
							 | 
						||
| 
								 | 
							
								                    />
							 | 
						||
| 
								 | 
							
								                    <wux-checkbox
							 | 
						||
| 
								 | 
							
								                        wrapStyle="{{ option.isGroupOption ? { paddingLeft: 30 } : '' }}"
							 | 
						||
| 
								 | 
							
								                        prefixCls="{{ option.prefixCls || 'wux-checkbox' }}"
							 | 
						||
| 
								 | 
							
								                        cellPrefixCls="{{ option.cellPrefixCls || 'wux-cell' }}"
							 | 
						||
| 
								 | 
							
								                        selectablePrefixCls="{{ option.selectablePrefixCls || 'wux-selectable' }}"
							 | 
						||
| 
								 | 
							
								                        title="{{ option.title || '' }}"
							 | 
						||
| 
								 | 
							
								                        label="{{ option.label || '' }}"
							 | 
						||
| 
								 | 
							
								                        extra="{{ option.extra || '' }}"
							 | 
						||
| 
								 | 
							
								                        value="{{ option.value }}"
							 | 
						||
| 
								 | 
							
								                        checked="{{ common.getChecked(inputValue, option) }}"
							 | 
						||
| 
								 | 
							
								                        disabled="{{ option.disabled }}"
							 | 
						||
| 
								 | 
							
								                        color="{{ option.color || 'balanced' }}"
							 | 
						||
| 
								 | 
							
								                        data-index="{{ index }}"
							 | 
						||
| 
								 | 
							
								                        data-group-option="{{ option.isGroupOption }}"
							 | 
						||
| 
								 | 
							
								                        wx:else
							 | 
						||
| 
								 | 
							
								                    />
							 | 
						||
| 
								 | 
							
								                </block>
							 | 
						||
| 
								 | 
							
								            </wux-checkbox-group>
							 | 
						||
| 
								 | 
							
								        </scroll-view>
							 | 
						||
| 
								 | 
							
								        <view class="{{ prefixCls + '__prompt' }}" wx:if="{{ !mergedOptions || mergedOptions.length === 0 }}">
							 | 
						||
| 
								 | 
							
								            <wux-prompt
							 | 
						||
| 
								 | 
							
								                visible
							 | 
						||
| 
								 | 
							
								                icon="{{ mergedNotFoundContent.icon }}"
							 | 
						||
| 
								 | 
							
								                title="{{ mergedNotFoundContent.title }}"
							 | 
						||
| 
								 | 
							
								                text="{{ mergedNotFoundContent.text }}"
							 | 
						||
| 
								 | 
							
								                wrapStyle="{{ { backgroundColor: 'unset' } }}"
							 | 
						||
| 
								 | 
							
								                wx:if="{{ mergedNotFoundContent }}"
							 | 
						||
| 
								 | 
							
								            />
							 | 
						||
| 
								 | 
							
								            <slot name="notFoundContent" wx:else></slot>
							 | 
						||
| 
								 | 
							
								        </view>
							 | 
						||
| 
								 | 
							
								    </view>
							 | 
						||
| 
								 | 
							
								</wux-popup>
							 | 
						||
| 
								 | 
							
								<slot></slot>
							 |