Commit 471f581b by ext.wangyuman1

Merge branch 'vue3-master' of https://e.coding.net/linkwechat/linkwechat-front/l…

…inkwechat into bs-dev-wangyuman
2 parents 2ccdd365 ea54e802
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
"vue": "^3.2.47", "vue": "^3.2.47",
"vue-cropper": "^1.0.8", "vue-cropper": "^1.0.8",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vue3-count-to": "^1.1.2",
"vuedraggable": "^4.1.0" "vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
......

10.6 KB | W: | H:

11.7 KB | W: | H:

vue3-lw-pc/public/static/POST_QRCODE.png
vue3-lw-pc/public/static/POST_QRCODE.png
vue3-lw-pc/public/static/POST_QRCODE.png
vue3-lw-pc/public/static/POST_QRCODE.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -188,7 +188,7 @@ export default { ...@@ -188,7 +188,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.chart { .chart {
position: relative; position: relative;
height: 100%; max-height: 100%;
min-width: 400px; min-width: 400px;
min-height: 400px; min-height: 400px;
} }
......
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.chart { .chart {
position: relative; position: relative;
height: 100%; max-height: 100%;
min-width: 400px; min-width: 400px;
min-height: 400px; min-height: 400px;
} }
......
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.chart { .chart {
height: 100%; max-height: 100%;
min-width: 200px; min-width: 200px;
min-height: 200px; min-height: 200px;
} }
......
import { Quill } from '@vueup/vue-quill' import { QuillEditor, Quill } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
window.Quill = Quill window.Quill = Quill
export { QuillEditor, Quill }
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
</div> </div>
</template> </template>
<script> <script>
import './Quill' import { QuillEditor, Quill } from './Quill'
import { QuillEditor, Quill } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'
import ImageResize from 'quill-image-resize-module' import ImageResize from 'quill-image-resize-module'
Quill.register('modules/ImageResize', ImageResize) Quill.register('modules/ImageResize', ImageResize)
import SelectEmoji from '@/components/SelectEmoji' import SelectEmoji from '@/components/SelectEmoji'
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
</template> </template>
</el-popover> </el-popover>
</div> </div>
{{ item.num }} <CountTo class="view-item-num" :start-val="0" :end-val="item.num" :duration="durationCount" />
<!-- <CountTo class="view-item-num" :start-val="0" :end-val="item.num" :duration="durationCount" /> -->
</div> </div>
</div> </div>
</div> </div>
...@@ -66,7 +65,7 @@ ...@@ -66,7 +65,7 @@
<div class="companyName">{{ $store.user.companyName }}</div> <div class="companyName">{{ $store.user.companyName }}</div>
<div class="info"> <div class="info">
当前版本: 当前版本:
<span class="fr">{{ lwConfig._version||table.currentEdition }}</span> <span class="fr">{{ lwConfig._version || table.currentEdition }}</span>
</div> </div>
<div class="info"> <div class="info">
使用人数: 使用人数:
...@@ -171,11 +170,11 @@ ...@@ -171,11 +170,11 @@
import { getUserProfile } from '@/api/system/user' import { getUserProfile } from '@/api/system/user'
import * as api from '@/api/index' import * as api from '@/api/index'
// import { getCustomerServiceQrUrl } from '@/api/login' // import { getCustomerServiceQrUrl } from '@/api/login'
// import CountTo from 'vue-count-to' import { CountTo } from 'vue3-count-to'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
// CountTo, CountTo,
Dynamics: defineAsyncComponent(() => import('./components/dynamics')), Dynamics: defineAsyncComponent(() => import('./components/dynamics')),
TabContent: defineAsyncComponent(() => import('./components/TabContent')), TabContent: defineAsyncComponent(() => import('./components/TabContent')),
}, },
......
...@@ -130,7 +130,7 @@ export default { ...@@ -130,7 +130,7 @@ export default {
<template> <template>
<div> <div>
<div class="operation"> <div class="operation mb20">
<el-button-group> <el-button-group>
<el-button type="primary" :plain="timeRange != 7" @click="setTime(7)">近一周</el-button> <el-button type="primary" :plain="timeRange != 7" @click="setTime(7)">近一周</el-button>
<el-button type="primary" :plain="timeRange != 30" @click="setTime(30)">近一月</el-button> <el-button type="primary" :plain="timeRange != 30" @click="setTime(30)">近一月</el-button>
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
placeholder="请选择群主" /> placeholder="请选择群主" />
</div> </div>
<ChartLine <ChartLine
style="height: 400px"
v-loading="loading.customerGroup" v-loading="loading.customerGroup"
:xData="customerGroup.xData" :xData="customerGroup.xData"
:legend="legend['customerGroup']" :legend="legend['customerGroup']"
...@@ -187,6 +188,7 @@ export default { ...@@ -187,6 +188,7 @@ export default {
</el-select> </el-select>
</div> </div>
<ChartLine <ChartLine
style="height: 400px"
v-loading="loading.customerGroupMember" v-loading="loading.customerGroupMember"
:xData="customerGroupMember.xData" :xData="customerGroupMember.xData"
:legend="legend['customerGroupMember']" :legend="legend['customerGroupMember']"
......
...@@ -12,7 +12,7 @@ import AutoImport from 'unplugin-auto-import/vite' // 自动导入ref等api ...@@ -12,7 +12,7 @@ import AutoImport from 'unplugin-auto-import/vite' // 自动导入ref等api
import rollupPluginVisualizer from 'rollup-plugin-visualizer' import rollupPluginVisualizer from 'rollup-plugin-visualizer'
import vitePluginCompression from 'vite-plugin-compression' import vitePluginCompression from 'vite-plugin-compression'
import vitePluginCdnImport from 'vite-plugin-cdn-import' import vitePluginCdnImport, { autoComplete } from 'vite-plugin-cdn-import'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig(async ({ command, mode }) => { export default defineConfig(async ({ command, mode }) => {
...@@ -74,6 +74,9 @@ export default defineConfig(async ({ command, mode }) => { ...@@ -74,6 +74,9 @@ export default defineConfig(async ({ command, mode }) => {
build: { build: {
outDir: 'pc', outDir: 'pc',
minify: 'terser', minify: 'terser',
reportCompressedSize: false, // 启用/禁用 gzip 压缩大小报告
// modulePreload: false, // { polyfill: false }
// modulePreload: { polyfill: false },
terserOptions: { terserOptions: {
compress: { compress: {
//生产环境时移除console //生产环境时移除console
...@@ -81,35 +84,53 @@ export default defineConfig(async ({ command, mode }) => { ...@@ -81,35 +84,53 @@ export default defineConfig(async ({ command, mode }) => {
drop_debugger: true, drop_debugger: true,
}, },
}, },
// rollupOptions: { rollupOptions: {
// // vite打包是通过rollup来打包的 output: {
// output: { assetFileNames: 'assets/[ext]/[name]-[hash][extname]',
// manualChunks: (id) => { chunkFileNames: 'assets/js/[name]-[hash].js',
// // 可以在这里打印看一下id的值,这里将node_modules中的包打包为 chunk-libs 文件 manualChunks: (id) => {
// // console.log(id) // 可以在这里打印看一下id的值,这里将node_modules中的包打包为 chunk-libs 文件
// console.log(id)
// if (
// id.includes('node_modules') &&
// (id.includes('@vue/dist/vue') || id.includes('pinia') || id.includes('vue-router'))
// ) {
// return 'vue-modules'
// } else
if (id.includes('assets/icons/svg')) {
return 'icons-svg'
}
// if (id.includes('benz-amr-recorder')) { // if (id.includes('benz-amr-recorder')) {
// return 'benz-amr-recorder' // return 'benz-amr-recorder'
// } else if (id.includes('cos-js-sdk-v5')) {
// return 'cos-js-sdk-v5'
// } else if (id.includes('aliyun-oss-sdk')) { // } else if (id.includes('aliyun-oss-sdk')) {
// return 'aliyun-oss-sdk' // return 'aliyun-oss-sdk'
// } else if (id.includes('fabric')) {
// return 'fabric'
// } else if (id.includes('echarts')) { // } else if (id.includes('echarts')) {
// return 'echarts' // return 'echarts'
// } else if (id.includes('element-plus')) { // } else if (id.includes('element-plus')) {
// return 'element-plus' // return 'element-plus'
// } else if (id.includes('node_modules')) { // } else
// return 'chunk-libs' else if (['quill-image-resize-module', 'Quill'].some((e) => id.includes(e))) {
// } else if (id.includes('src/components')) { return 'quill-image-resize-module'
} else if (id.includes('node_modules')) {
return id.split('node_modules/')[1].split('/')[0]
}
// else if (id.includes('src/components')) {
// return 'chunk-components' // return 'chunk-components'
// } // }
// // else if (id.includes('views/')) { // else if (id.includes('views/')) {
// // let first = id.split('views/')[1] // let first = id.split('views/')[1]
// // if (first.includes('/')) { // if (first.includes('/')) {
// // return first.match(/(\w+)\/(\w+)/)[0].replace('/', '-') // a/b/c... a-b // return first.match(/(\w+)\/(\w+)/)[0].replace('/', '-') // a/b/c... a-b
// // } // }
// // return first.split('.')[0] // a.vue a // return first.split('.')[0] // a.vue a
// // } // }
// }, },
// }, },
// }, },
}, },
plugins: [ plugins: [
// '@vue/babel-plugin-jsx', // '@vue/babel-plugin-jsx',
...@@ -147,7 +168,7 @@ export default defineConfig(async ({ command, mode }) => { ...@@ -147,7 +168,7 @@ export default defineConfig(async ({ command, mode }) => {
}), }),
vitePluginCompression({ vitePluginCompression({
disable: !env._ISGZIP, // 是否禁用压缩,默认为 false disable: !env._ISGZIP, // 是否禁用压缩,默认为 false
threshold: 100000, // 启用压缩的文件大小限制,单位是字节,默认为 0, 对大于 100kb 的文件进行压缩 threshold: 10000, // 启用压缩的文件大小限制,单位是字节,默认为 0, 对大于 10kb 的文件进行压缩
// filter:过滤器,对哪些类型的文件进行压缩,默认为 ‘/.(js|mjs|json|css|html)$/i’ // filter:过滤器,对哪些类型的文件进行压缩,默认为 ‘/.(js|mjs|json|css|html)$/i’
// verbose: true:是否在控制台输出压缩结果,默认为 true // verbose: true:是否在控制台输出压缩结果,默认为 true
// deleteOriginFile:压缩后是否删除原文件,默认为 false // deleteOriginFile:压缩后是否删除原文件,默认为 false
...@@ -156,24 +177,39 @@ export default defineConfig(async ({ command, mode }) => { ...@@ -156,24 +177,39 @@ export default defineConfig(async ({ command, mode }) => {
}), }),
env._ISCDN && env._ISCDN &&
vitePluginCdnImport({ vitePluginCdnImport({
// prodUrl: 'https://unpkg.com/{name}@{version}/{path}',
modules: [ modules: [
// autoComplete('vue'),
// autoComplete('axios'),
{ {
name: 'axios', // 包名 name: 'axios', // 包名
var: 'axios', // 对应cdn包导出的变量,如jQuery导出的是$ var: 'axios', // 对应cdn包导出的变量,如jQuery导出的是$
path: '//cdn.bootcdn.net/ajax/libs/axios/1.4.0/axios.min.js', path: '//cdn.bootcdn.net/ajax/libs/axios/1.4.0/axios.min.js',
}, },
// { // {
// name: 'element-plus',
// var: 'ElementPlus',
// version: '2.3.6',
// path: 'dist/index.full.js',
// css: 'dist/index.css',
// },
// {
// name: '@element-plus/icons-vue',
// var: 'ElementPlusIconsVue',
// version: '2.1.0',
// path: 'dist/index.iife.min.js',
// },
// {
// name: 'ali-oss', // name: 'ali-oss',
// var: 'OSS', // var: 'OSS',
// path: 'http://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js', // path: 'http://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js',
// }, // },
], ],
}), }),
process.env.npm_config_report &&
rollupPluginVisualizer({ rollupPluginVisualizer({
emitFile: false, //使用 emitFile 生成文件。 属性为 true,打包后的分析文件会出现在打包好的文件包下;设置为 false ,则会出现在项目根目录下 emitFile: false, //使用 emitFile 生成文件。 属性为 true,打包后的分析文件会出现在打包好的文件包下;设置为 false ,则会出现在项目根目录下
filename: 'report.html', //生成分析网页文件名 filename: 'report.html', //生成分析网页文件名
open: true, //在默认用户代理中打开生成的文件 open: false, //在默认用户代理中打开生成的文件
gzipSize: true, //从源代码中收集 gzip 大小并将其显示在图表中 gzipSize: true, //从源代码中收集 gzip 大小并将其显示在图表中
// brotliSize: true, //从源代码中收集 brotli 大小并将其显示在图表中 // brotliSize: true, //从源代码中收集 brotli 大小并将其显示在图表中
}), }),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!