复审
This commit is contained in:
24
src/main.js
24
src/main.js
@@ -23,7 +23,29 @@ import 'quill/dist/quill.bubble.css'
|
||||
// 注册富文本编辑器组件为全局组件
|
||||
Vue.use(VueQuillEditor)
|
||||
|
||||
|
||||
// 时间过滤器
|
||||
// 定义时间过滤器(不含时分秒)
|
||||
Vue.filter('formatDate', function(originVal) {
|
||||
const dt = new Date(originVal * 1000)
|
||||
const y = dt.getFullYear()
|
||||
const m = (dt.getMonth() + 1 + '').padStart(2, '0')
|
||||
const d = (dt.getDate() + '').padStart(2, '0')
|
||||
const hh = (dt.getHours() + '').padStart(2, '0')
|
||||
const mm = (dt.getMinutes() + '').padStart(2, '0')
|
||||
const ss = (dt.getSeconds() + '').padStart(2, '0')
|
||||
return `${y}-${m}-${d}`
|
||||
})
|
||||
// 含时分秒
|
||||
Vue.filter('formatDatehms', function(originVal) {
|
||||
const dt = new Date(originVal * 1000)
|
||||
const y = dt.getFullYear()
|
||||
const m = (dt.getMonth() + 1 + '').padStart(2, '0')
|
||||
const d = (dt.getDate() + '').padStart(2, '0')
|
||||
const hh = (dt.getHours() + '').padStart(2, '0')
|
||||
const mm = (dt.getMinutes() + '').padStart(2, '0')
|
||||
const ss = (dt.getSeconds() + '').padStart(2, '0')
|
||||
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
|
||||
})
|
||||
// 引入wps文档编辑
|
||||
import mammoth from "mammoth";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user