修复开启动态搜索, 搜索无反应
This commit is contained in:
		
							parent
							
								
									c64b497482
								
							
						
					
					
						commit
						036126d58c
					
				
							
								
								
									
										2
									
								
								dist/static/2.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/static/2.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/xm-select.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/xm-select.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -7,62 +7,17 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
var demo1 = xmSelect.render({
 | 
					var demo1 = xmSelect.render({
 | 
				
			||||||
	el: '#demo1', 
 | 
						el: '#demo1', 
 | 
				
			||||||
	paging: true,
 | 
						data: [
 | 
				
			||||||
	pageSize: 2,
 | 
						],
 | 
				
			||||||
	autoRow: true,
 | 
					 | 
				
			||||||
	tree: {
 | 
					 | 
				
			||||||
		strict: false,
 | 
					 | 
				
			||||||
		show: true,
 | 
					 | 
				
			||||||
		showFolderIcon: true,
 | 
					 | 
				
			||||||
		showLine: true,
 | 
					 | 
				
			||||||
		indent: 20,
 | 
					 | 
				
			||||||
		expandedKeys: [ 14 ],
 | 
					 | 
				
			||||||
		lazy: true,
 | 
					 | 
				
			||||||
		load: function(item, cb){
 | 
					 | 
				
			||||||
			setTimeout(function(){
 | 
					 | 
				
			||||||
				if(item.name.endsWith('2')){
 | 
					 | 
				
			||||||
					return cb([]);
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				cb([
 | 
					 | 
				
			||||||
					{name: item.name + 1, value: item.value + '1', children: [] },
 | 
					 | 
				
			||||||
					{name: item.name + 2, value: item.value + '2', children: [] },
 | 
					 | 
				
			||||||
				])
 | 
					 | 
				
			||||||
			}, 500)
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	model: {
 | 
					 | 
				
			||||||
		icon: 'show'
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	radio: true,
 | 
					 | 
				
			||||||
	toolbar: {
 | 
					 | 
				
			||||||
		show: true
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
	height: 'auto',
 | 
					 | 
				
			||||||
	on: function(a){
 | 
					 | 
				
			||||||
		console.log(this)
 | 
					 | 
				
			||||||
	}.bind('#demo1'),
 | 
					 | 
				
			||||||
	data(){
 | 
					 | 
				
			||||||
		return [
 | 
					 | 
				
			||||||
			{name: '北京市时代峰峻莱克斯顿荆防颗粒受到了开发建设的路口附近', value: -1, children: [
 | 
					 | 
				
			||||||
				{name: '朝阳区', value: 1, children: [
 | 
					 | 
				
			||||||
					{name: '河北省', value: -12, children: [
 | 
					 | 
				
			||||||
						{name: '廊坊市', value: 14, selected: true},
 | 
					 | 
				
			||||||
						{name: '石家庄', value: 15, selected: true},
 | 
					 | 
				
			||||||
						{name: '邯郸市', value: 16},
 | 
					 | 
				
			||||||
					]}
 | 
					 | 
				
			||||||
					
 | 
					 | 
				
			||||||
				]},
 | 
					 | 
				
			||||||
				{name: '海淀区', value: 2},
 | 
					 | 
				
			||||||
				{name: '通州区', value: 3},
 | 
					 | 
				
			||||||
			]},
 | 
					 | 
				
			||||||
			{name: '河北省', value: -2, children: [
 | 
					 | 
				
			||||||
				{name: '廊坊市', value: 4},
 | 
					 | 
				
			||||||
				{name: '石家庄', value: 5},
 | 
					 | 
				
			||||||
				{name: '邯郸市', value: 6},
 | 
					 | 
				
			||||||
			]},
 | 
					 | 
				
			||||||
		]
 | 
					 | 
				
			||||||
	},
 | 
					 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setTimeout(function(){
 | 
				
			||||||
 | 
						demo1.update({
 | 
				
			||||||
 | 
							empty: 'xxx'
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}, 1000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
:::
 | 
					:::
 | 
				
			||||||
 | 
				
			|||||||
@ -258,7 +258,7 @@ class General extends Component{
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const search = (
 | 
							const search = (
 | 
				
			||||||
			<div class='xm-search'>
 | 
								<div class={ filterable ? 'xm-search' : 'xm-search dis' }>
 | 
				
			||||||
				<i class="xm-iconfont xm-icon-sousuo"></i>
 | 
									<i class="xm-iconfont xm-icon-sousuo"></i>
 | 
				
			||||||
				<input class="xm-input xm-search-input" placeholder={ searchTips } />
 | 
									<input class="xm-input xm-search-input" placeholder={ searchTips } />
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
@ -466,7 +466,7 @@ class General extends Component{
 | 
				
			|||||||
			<div onClick={ this.blockClick } tabindex="1" style="outline: none;">
 | 
								<div onClick={ this.blockClick } tabindex="1" style="outline: none;">
 | 
				
			||||||
				<div>
 | 
									<div>
 | 
				
			||||||
					{ config.toolbar.show && toolbar }
 | 
										{ config.toolbar.show && toolbar }
 | 
				
			||||||
					{ filterable && search }
 | 
										{ search }
 | 
				
			||||||
					<div class="scroll-body" style={ {maxHeight: config.height} }>{ arr }</div>
 | 
										<div class="scroll-body" style={ {maxHeight: config.height} }>{ arr }</div>
 | 
				
			||||||
					{ config.paging && paging }
 | 
										{ config.paging && paging }
 | 
				
			||||||
				</div>
 | 
									</div>
 | 
				
			||||||
 | 
				
			|||||||
@ -318,7 +318,7 @@ class Tree extends Component{
 | 
				
			|||||||
		)
 | 
							)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const search = (
 | 
							const search = (
 | 
				
			||||||
			<div class='xm-search'>
 | 
								<div class={ filterable ? 'xm-search' : 'xm-search dis' }>
 | 
				
			||||||
				<i class="xm-iconfont xm-icon-sousuo"></i>
 | 
									<i class="xm-iconfont xm-icon-sousuo"></i>
 | 
				
			||||||
				<input class="xm-input xm-search-input" placeholder={ searchTips } />
 | 
									<input class="xm-input xm-search-input" placeholder={ searchTips } />
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
@ -332,7 +332,7 @@ class Tree extends Component{
 | 
				
			|||||||
		// { config.toolbar.show && toolbar }
 | 
							// { config.toolbar.show && toolbar }
 | 
				
			||||||
		return (
 | 
							return (
 | 
				
			||||||
			<div onClick={ this.blockClick } class="xm-body-tree" >
 | 
								<div onClick={ this.blockClick } class="xm-body-tree" >
 | 
				
			||||||
				{ filterable && search }
 | 
									{ search }
 | 
				
			||||||
				<div class="scroll-body" style={ {maxHeight: config.height} }>{ arr }</div>
 | 
									<div class="scroll-body" style={ {maxHeight: config.height} }>{ arr }</div>
 | 
				
			||||||
			</div>
 | 
								</div>
 | 
				
			||||||
		)
 | 
							)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user