import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'ant-design-vue/dist/antd.less'
// 引入antd
// import antd from 'ant-design-vue'
// import 'ant-design-vue/dist/antd.css'
// Vue.use(antd)
// // 引入公共样式
// import '../static/css/global.less'
// // 引入nprogress进度条
// import 'nprogress/nprogress.css'
import './antd/register'
import api from './api'
import {optionalChaining} from "./views/utils/common";
import Moment from 'moment';
import './views/utils/directives/debounce'
import './views/utils/directives/throttle'
import './views/utils/directives/int'
import './views/utils/directives/price'
import {message, modal} from 'ant-design-vue'
const {confirm} = modal

Vue.prototype.$api = api;
Vue.prototype.$isNot = optionalChaining; // 非空判断，为空返回 "未知"
Vue.prototype.$message= message
Vue.prototype.$confirm= confirm
Vue.filter('formatDate', function(value) {// 定义全局时间戳过滤器
    return Moment(value).format('YYYY-MM-DD')
})
Vue.config.productionTip = false

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
