过滤器格式化时间
This commit is contained in:
		
							parent
							
								
									40facf16f0
								
							
						
					
					
						commit
						7421fd70bb
					
				@ -16,9 +16,17 @@ import router from './router'
 | 
			
		||||
import '@/icons' // icon
 | 
			
		||||
import '@/permission' // permission control
 | 
			
		||||
 | 
			
		||||
// 第三方组件全局注册
 | 
			
		||||
import Component from '@/components'
 | 
			
		||||
Vue.use(Component)
 | 
			
		||||
 | 
			
		||||
// 批量注册
 | 
			
		||||
import * as myfilter from '@/filters'
 | 
			
		||||
// 遍历注册
 | 
			
		||||
for (const key in myfilter) {
 | 
			
		||||
  Vue.filter(key, myfilter[key])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * If you don't want to use mock-server
 | 
			
		||||
 * you want to use MockJs for mock api
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,11 @@
 | 
			
		||||
          <el-table-column label="手机号" sortable="" prop="mobile" />
 | 
			
		||||
          <el-table-column label="聘用形式" sortable="" prop="formOfEmployment" :formatter="formatEmployment" />
 | 
			
		||||
          <el-table-column label="部门" sortable="" prop="departmentName" />
 | 
			
		||||
          <el-table-column label="入职时间" sortable="" prop="timeOfEntry" />
 | 
			
		||||
          <el-table-column label="入职时间" sortable="" prop="timeOfEntry">
 | 
			
		||||
            <template slot-scope="{row}">
 | 
			
		||||
              {{ row.timeOfEntry | formatDate }}
 | 
			
		||||
            </template>
 | 
			
		||||
          </el-table-column>
 | 
			
		||||
          <el-table-column label="账户状态" sortable="" prop="enableState" />
 | 
			
		||||
          <el-table-column label="操作" fixed="right" width="280">
 | 
			
		||||
            <template>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user