update dialog
This commit is contained in:
		@@ -3,12 +3,8 @@
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
const compareCache = (dataForm, cache) => {
 | 
			
		||||
	// 一个简单的比对 dataForm 和 cache 的方法,也许需要优化地更精细
 | 
			
		||||
	// 由于js不保证对象属性的顺序,所以此方法可能在某些情况下失效
 | 
			
		||||
  // 或者使用 _.isEqual() --- 也不是很完美
 | 
			
		||||
	return JSON.stringify(dataForm) === JSON.stringify(cache)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	name: 'AddOrUpdateDialog',
 | 
			
		||||
	data() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user