import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
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 Print from 'vue-print-nb'
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 './views/utils/directives/remarkNum'
import './views/utils/directives/inputNum'
import {message, modal} from 'ant-design-vue'
import {ApiUtils} from "./utils/ApiUtils"
const {confirm} = modal
Vue.prototype.ApiUtils = ApiUtils;
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
Vue.use(Print)
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')
