npm install
npm run serve
npm run build
npm run publish-build
npm run upload
新建.env.xxx环境文件,基本包含常见4个常量,
# 打包模式 production 固定值,这样与正式打包输出一样
NODE_ENV = production
# 区分打包配置
VUE_APP_MODE = lh
# 打包完成后输出的文件名
outputName = 漯河-评标5.0
# 输出的资源文件夹名称
outputFile = 前端包
在package.json新建命令
"xxx": "vue-cli-service build --mode xxx"
先获取菜单构建菜单对象,然后匹配相应路由,全局当前路由对象完整信息
控制DOM节点数据 https://github.com/x-extends/vxe-table
大部分方法是Promise,注意异步
方式一,在根节点 router-view 控制显示隐藏
<template>
<div id="app">
<router-view v-if="routerAlive" />
</div>
</template>
<script>
export default {
name: "App",
components: {},
data() {
return {
routerAlive: true,
};
},
provide() {
return {
routerRefresh: this.routerRefresh,
};
},
methods: {
// 这种方式解决跳转同类型路由不刷新
routerRefresh() {
this.routerAlive = false;
this.$nextTick(() => {
this.routerAlive = true;
});
},
},
};
</script>
方式二,在 router-view 添加不同key
<template>
<div class="main-view">
<transition name="fade" mode="out-in">
<keep-alive :include="cachedViews">
<router-view :key="key"/>
</keep-alive>
</transition>
</div>
</template>
<script>
export default {
name: "MainView",
computed: {
cachedViews() {
return []; // 控制缓存
},
key() {
return this.$route.fullPath; // 为后续解决同级不刷问题
},
},
created(){
console.log(this.$route)
}
};
</script>
canEdit 是针对整个页面能否编辑 true 能编辑 false 不能编辑 readonly 是针对单个格能否编辑 true 不能编辑 false 能编辑
okKey 判断是否一键评审按钮 canEdit 判断单元格能否编辑
有默认值:在修改时候需要判断是否修改默认值不同,和默认值不同时 要弹窗意见 无默认值:修改为不通过时,需要弹窗意见
用来判断是否当前的流程节点
用来判断是否具备 点击跳转路由的权限
https://blog.csdn.net/github_37533433/article/details/78936236
http://192.168.1.10:9041/pdf/web/viewer.html DEFAULT_RANGE_CHUNK_SIZE 设置下载大小
本地调试需要是 localhost 开头,ip地址不行
https://mozilla.github.io/pdf.js/es5/build/pdf.js https://mozilla.github.io/pdf.js/es5/build/pdf.worker.js
$store.state.app.tagsView.itemData.activity.canEdit 控制一键评审 、表格编辑
"vxe-table": "^2.9.23", "xe-utils": "^2.7.13"
设计师给出的字体,文件大小20M左右,肯定是不行的,这时候需要去优化字体,压缩字体,提出只涉及到的字体
npm install font-spider -g
在src/assets/fonts
下
用node的环境下执行
font-spider *.html
最后会生成一个字体,他就是把网页中需要的字体提取出来,然后在生成一个字体文件,就大大减少了字体大小