Listbox+time picker

本文主要讲述listbox与 time picker的混合使用

	<template>
		<view>
			<view class="body"> 
				 <view class="select-view">
						<xfl-select 
						:list="list" :showItemNum="5" 
						:clearable="false" :style_Container="listBoxStyle" 
						:initValue="'全部'" :selectHideType="'independent'"
						@change="xfl_select_change">
						</xfl-select> 
				</view>
				<div  v-show="cus_timepicker_show"  style="width: 100px; margin: 10rpx 10rpx;">
					<view class="uni-list-select">
						<view class="uni-list-cell-select">
							<view class="uni-list-cell-db">
								<picker style="width: 100px;" mode="date" :value="date_start" :start="startDate" :end="endDate" @change="bindDateChange">
									<view class="uni-input">{{date_start}}</view>
								</picker>
							</view>
						</view>
					</view>
				</div>	
				<div  v-show="cus_timepicker_show"  style="width: 100px; margin: 10rpx 10rpx;">
					<view class="uni-list-select">
						<view class="uni-list-cell-select">
							<view class="uni-list-cell-db">
								<picker style="width: 100px;" mode="date" :value="date_end" :start="startDate" :end="endDate" @change="endDateChange">
									<view class="uni-input">{{date_end}}</view>
								</picker>
							</view>
						</view>
					</view>
				</div>	
			</view> 

					
				
		</view>
	</template>
	<script>
		import uniPopup from '@/components/uni-popup/uni-popup.vue'
		import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
		import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
		import uniSearchBar from '@/components/uni-search-bar/uni-search-bar.vue'
		import uniCombox from "@/components/uni-combox/uni-combox"
		import xflSelect from '@/components/xfl-select/xfl-select.vue'
	  
	    function getDate(type) {
	    	const date = new Date();
	    
	    	let year = date.getFullYear();
	    	let month = date.getMonth() + 1;
	    	let day = date.getDate();
	    
	    	if (type === 'start') {
	    		year = year - 60;
	    	} else if (type === 'end') {
	    		year = year + 2;
	    	}
	    	month = month > 9 ? month : '0' + month;;
	    	day = day > 9 ? day : '0' + day;
	    
	    	return `${year}-${month}-${day}`;
	    }
	
		export default {
			components: {
				uniPopup,
				uniPopupMessage,
				uniPopupDialog,
				uniSearchBar,
				uniCombox,
				xflSelect
			},
	
			data() {
				return {
					date_start: '开始时间',
					date_end: '结束时间',
					startDate:getDate('start'),
					endDate:getDate('end'),
					
					listBoxStyle: `height: 40px; font-size: 16px;`,
					
					list: ['全部', '近一周', '近一月', '近一年', '自定义'],
					
					// list: ['全部',  '自定义'],
					tabIndex : '0', //选中标签栏的序列
					cus_timepicker_show:false,
	
				}
			},
	
			
			methods: {
		
			tabTap(index) {
				console.log(index)
				this.tabIndex = index;
			
			},
			tabChange(e) {
				console.log(e.detail)
				const index = e.detail.current
				this.tabIndex = index;
			},
			bindDateChange(e) {
				this.date_start = e.detail.value
			},
			endDateChange(e) {
				this.date_end = e.detail.value
			},
			confirmDialog() {
				this.$refs.dialogInput.open()
			},
			dialogInputConfirm(done, val) {
				done()
			},
			xfl_select_change(val){
					if(val.newVal=="自定义"){
						// console.log("弹出时间框");
						this.cus_timepicker_show = true;
					}else{
						if(this.cus_timepicker_show){
							this.cus_timepicker_show=false;
						}
					}
				}
			},
			}
	</script>
	
	
	<style>
	
		
			
	</style>
	

结果展示:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
The initial release (v1) comes with the following features: 4 Different theme colors Responsive design Documentation HTML pages including: Dashboard with stats, charts and recent events UI elements Buttons Treeview Form elements Wysiwyg editor Wizard Customizable widgets Image gallery Pricing tables Invoice Inbox Timeline FAQ User profile Login, register and forgot password Error 404 and error 500 pages And a few other Custom elements and plugins including: Pure CSS3 checkbox, radio and On/Off switch elements (not available in IE8) File input control Simple color picker Custom scrollbars Onpage help to provide better help for users Bootstrap, jQuery UI and third party plugins and elements including: jQuery jQuery UI (Custom Build) Twitter Bootstrap FontAwesome Google "Open Sans" Font jQuery Flot Charts jQuery Sparklines Easy Pie Chart jQuery Knob jQuery Validate FuelUX (Spinner & Wizard & Treeview) FullCalendar jQuery ColorBox jQuery dataTables jQuery Chosen jQuery Masked Input jQuery Input Limiter jQuery AutoSize Bootstrap Colorpicker Bootstrap Datepicker Bootstrap Timepicker Bootstrap DateRange Picker Bootstrap Date-Time Picker Bootbox.js jQuery Gritter jQuery slimScroll Spin.js jQuery UI Touch Punch Google Code Prettify ExplorerCanvas Mindmup Wysiwyg Editor Toopay Markdown Editor X-editable Select2 Bootstrap Tags jQuery Mobile (Custom Build) jqGrid Dropzone.js Nestable lists plugin typeahead.js Dual listbox Multiselect jQuery raty The following is on to-do list and will be added to Ace in next updates: New features & elements such as : Wysiwyg editor (now available) Treeview (now available) Timeline (now available) Search results Tables with details FAQ page (now available) User profile (now available) Inline editable data (now available) File upload and management Email template (now available) Inbox & messages (now available) Misc. page templates Cookie support for saving client-side customizations (now available) RTL Support (now available) Adding LESS files as well as Javascript client-side template files such as Mustache. (now available) Please note that support is provided via email as mentioned in the documentation page.
TMS Components for IntraWeb allows rich design-time editing of webpages from the Delphi IDE directly on IntraWeb forms. IntraWeb and the TMS Components for IntraWeb allow an unprecedented RAD way of web application development with Delphi, making web development as easy as dropping components on a form. Message dialog Modal dialog control Async events Async updates Input capabilities Highly customisable Treeview Async events Async updates Nodes with checkboxes Nodes with radiobuttons Link, hint, color, images per node Smooth controls TTIWSmoothTimeLine: timeline component TTIWSmoothGauge: gauge component TTIWSmoothLEDLabel: LED label component TTIWSmoothLabel: label with gradient/texture fill Labels TTIWDateLabel: label showing todays date TTIWPopupMenuLabel: label with attached popup menu TTIWGradientLabel: label with gradient background TTIWCalculatingLabel component: client-side calculating label TTIWNoSpamEmail component : email hyperlink that cannot be traced by spambots Menus TTIWStaticMenu: static menu with hover effect TTIWMainMenu, TTIWSideMenu: dropdown menu controls TTIWPopupMenuButton: button with attached popup menu TTIWDocumentPopup: right-click popup menu for document Edit controls TTIWAdvEdit, TTIWDBAdvEdit: advanced edit control TTIWAdvLUEdit, TTIWDBAdvLUEdit: advanced lookup edit control TTIWEMailEdit: edit control with regular expression validation for email TTIWAdvSpinEdit, TTIWDBAdvSpinEdit: data-aware and not data-aware spin edit controls TTIWAdvTimeEdit, TTIWDBAdvTimeEdit: edit component specific for entering time values TTIWAdvDateEdit, TTIWDBAdvDateEdit: edit component specific for entering date values TTIWCCNumEdit: credit card number edit control with client side basic validation TTIWCCExpEdit: credit card expiry date edit control with client side basic validation TTIWFilePicker: edit control with attached file picker button TTIWPersistentEdit: edit control with cookie persistency TTIWEditLinkLink: client side edit to listbox link TTIWTextAreaLimiter component : multi-line textbox with full client-side length limitation and display

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值