fix
							parent
							
								
									1a2b9228e5
								
							
						
					
					
						commit
						72102ede33
					
				|  | @ -1,3 +1,17 @@ | ||||||
|  | 
 | ||||||
|  | const parseStyleText = (cssText = '') => { | ||||||
|  |   const res = {} | ||||||
|  |   const listDelimiter = /;(?![^(]*\))/g | ||||||
|  |   const propertyDelimiter = /:(.+)/ | ||||||
|  |   cssText.split(listDelimiter).forEach(function (item) { | ||||||
|  |     if (item) { | ||||||
|  |       const tmp = item.split(propertyDelimiter) | ||||||
|  |       tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim()) | ||||||
|  |     } | ||||||
|  |   }) | ||||||
|  |   return res | ||||||
|  | } | ||||||
|  | 
 | ||||||
| const hasProp = (instance, prop) => { | const hasProp = (instance, prop) => { | ||||||
|   const $options = instance.$options || {} |   const $options = instance.$options || {} | ||||||
|   const propsData = $options.propsData || {} |   const propsData = $options.propsData || {} | ||||||
|  | @ -106,7 +120,7 @@ export function getStyle (ele) { | ||||||
|   } else if (ele.$vnode && ele.$vnode.data) { |   } else if (ele.$vnode && ele.$vnode.data) { | ||||||
|     data = ele.$vnode.data |     data = ele.$vnode.data | ||||||
|   } |   } | ||||||
|   return data.style || data.staticStyle |   return data.style || parseStyleText(data.staticStyle || '') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export function getComponentName (opts) { | export function getComponentName (opts) { | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ import placements from './placements' | ||||||
| import { loopMenuItemRecusively, noop } from './util' | import { loopMenuItemRecusively, noop } from './util' | ||||||
| import BaseMixin from '../_util/BaseMixin' | import BaseMixin from '../_util/BaseMixin' | ||||||
| import { getComponentFromProp } from '../_util/props-util' | import { getComponentFromProp } from '../_util/props-util' | ||||||
|  | import { requestAnimationTimeout, cancelAnimationTimeout } from '../_util/requestAnimationTimeout' | ||||||
| 
 | 
 | ||||||
| let guid = 0 | let guid = 0 | ||||||
| 
 | 
 | ||||||
|  | @ -73,10 +74,10 @@ export default { | ||||||
|     //   this.clearSubMenuTimers() |     //   this.clearSubMenuTimers() | ||||||
|     // } |     // } | ||||||
|     if (this.minWidthTimeout) { |     if (this.minWidthTimeout) { | ||||||
|       clearTimeout(this.minWidthTimeout) |       cancelAnimationTimeout(this.minWidthTimeout) | ||||||
|     } |     } | ||||||
|     if (this.mouseenterTimeout) { |     if (this.mouseenterTimeout) { | ||||||
|       clearTimeout(this.mouseenterTimeout) |       cancelAnimationTimeout(this.mouseenterTimeout) | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|  | @ -86,7 +87,7 @@ export default { | ||||||
|         return |         return | ||||||
|       } |       } | ||||||
|       const self = this |       const self = this | ||||||
|       this.minWidthTimeout = setTimeout(() => { |       this.minWidthTimeout = requestAnimationTimeout(() => { | ||||||
|         if (!self.$refs.subMenuTitle || !self.$refs.menuInstance) { |         if (!self.$refs.subMenuTitle || !self.$refs.menuInstance) { | ||||||
|           return |           return | ||||||
|         } |         } | ||||||
|  | @ -282,7 +283,7 @@ export default { | ||||||
|       } |       } | ||||||
|       if (type === 'mouseenter') { |       if (type === 'mouseenter') { | ||||||
|       // make sure mouseenter happen after other menu item's mouseleave |       // make sure mouseenter happen after other menu item's mouseleave | ||||||
|         this.mouseenterTimeout = setTimeout(() => { |         this.mouseenterTimeout = requestAnimationTimeout(() => { | ||||||
|           openChange() |           openChange() | ||||||
|         }, 0) |         }, 0) | ||||||
|       } else { |       } else { | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ message | done | ||||||
| Select | done | Select | done | ||||||
| Input | done | Input | done | ||||||
| InputNumber | InputNumber | ||||||
| AutoComplete | AutoComplete | done | ||||||
| Modal | Modal | ||||||
| Alert | Alert | ||||||
| Calendar | Calendar | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 tangjinzhou
						tangjinzhou