kongdeqiang
2023-06-06 6f1282471e5fd213443ac1f6dabfd3ef8b08c5c3
src/main.js
@@ -14,6 +14,8 @@
import StringUtil from './assets/js/StringUtil'
import TscPrintUtil from './assets/js/TscPrintUtil'
import Print from './assets/js/print'
import moment from 'moment'
Vue.prototype.$moment = moment;
Vue.use(Print) // 注册
import ViewUI from 'view-design';
@@ -21,12 +23,44 @@
// import style
import 'view-design/dist/styles/iview.css';
import preview from 'vue-photo-preview'
//preview的参数
var option = {
    minZoom:0.3,
    maxSpreadZoom: 20, // 控制预览图最大的倍数,默认是2倍,我这里改成了原图
    fullscreenEl: false, //控制是否显示右上角全屏按钮
    closeEl: true, //控制是否显示右上角关闭按钮
    tapToClose: true, //点击滑动区域应关闭图库
    shareEl: false, //控制是否显示分享按钮
    zoomEl: true, //控制是否显示放大缩小按钮
    counterEl: true, //控制是否显示左上角图片数量按钮
    arrowEl: true,  //控制如图的左右箭头(pc浏览器模拟手机时)
    tapToToggleControls: true, //点击应切换控件的可见性
    allowPanToNext:true, //当前项目缩放时,允许滑动到下一个/上一个项目
    clickToCloseNonZoomable: false,//点击图片应关闭图库,仅当图像小于视口的大小时
    closeOnVerticalDrag:false,//垂直拖动和未缩放图像时,请关闭图库
    pinchToClose:false,//捏以关闭画廊手势
    getDoubleTapZoom:()=>1 //函数应返回缩放级别,在双击手势后,用户单击缩放图标或鼠标单击图像本身时,图像将缩放到该级别
}
Vue.use(preview,option)
Vue.use(ViewUI);
Vue.config.productionTip = false
Vue.use(ElementUI, {
    size: 'small'
});
import echarts from 'echarts'
Vue.prototype.$echarts = echarts;
import '@/utils/lib-fiexible'
import {getStore,setStore,removeStore} from "./libs/store";
Vue.prototype.getStore = getStore
Vue.prototype.setStore = setStore
Vue.prototype.removeStore = removeStore
Vue.prototype.$axios = axios;
axios.defaults.withCredentials = true
// 对提交的数据进行json序列化,可能存在问题,暂时未发现什么问题