'admin-21.12.12:更新修复查看CHANGELOG.md文件'

This commit is contained in:
lyt 2021-12-12 21:27:33 +08:00
parent 94af6f8e1e
commit 646eac1c88
6 changed files with 60 additions and 33 deletions

View File

@ -2,6 +2,17 @@
🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支) 🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支)
## 1.2.1
`2021.12.12`
- 🌟 更新 依赖更新最新版本
- 🎯 优化 cropper 裁剪时卡顿问题 [#I4M2VQ](https://gitee.com/lyt-top/vue-next-admin/issues/I4M2VQ)
- 🎯 优化 Wangeditor 富文本编辑器的问题 [#I4LPC1](https://gitee.com/lyt-top/vue-next-admin/issues/I4LPC1)、[#I4LM7I](https://gitee.com/lyt-top/vue-next-admin/issues/I4LM7I)
- 🐞 修复 浏览器标题问题
- 🐞 修复 element plus svg 图标引入
- 🐞 修复 工作流不可以拖线连接问题
## 1.2.0 ## 1.2.0
`2021.11.28` `2021.11.28`

View File

@ -10,13 +10,14 @@
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/" "lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^0.2.4",
"axios": "^0.24.0", "axios": "^0.24.0",
"countup.js": "^2.0.8", "countup.js": "^2.0.8",
"cropperjs": "^1.5.12", "cropperjs": "^1.5.12",
"echarts": "^5.2.2", "echarts": "^5.2.2",
"echarts-gl": "^2.0.8", "echarts-gl": "^2.0.8",
"echarts-wordcloud": "^2.0.0", "echarts-wordcloud": "^2.0.0",
"element-plus": "^1.2.0-beta.5", "element-plus": "^1.2.0-beta.6",
"jsplumb": "^2.15.6", "jsplumb": "^2.15.6",
"mitt": "^3.0.0", "mitt": "^3.0.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
@ -30,28 +31,28 @@
"vue-grid-layout": "^3.0.0-beta1", "vue-grid-layout": "^3.0.0-beta1",
"vue-i18n": "^9.1.9", "vue-i18n": "^9.1.9",
"vue-router": "^4.0.12", "vue-router": "^4.0.12",
"vue-web-screen-shot": "^1.3.0", "vue-web-screen-shot": "^1.3.2",
"vuex": "^4.0.2", "vuex": "^4.0.2",
"wangeditor": "^4.7.10" "wangeditor": "^4.7.10"
}, },
"devDependencies": { "devDependencies": {
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/clipboard": "^2.0.1", "@types/clipboard": "^2.0.1",
"@types/node": "^16.11.11", "@types/node": "^16.11.12",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.10.7", "@types/sortablejs": "^1.10.7",
"@typescript-eslint/eslint-plugin": "^5.5.0", "@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.5.0", "@typescript-eslint/parser": "^5.6.0",
"@vitejs/plugin-vue": "^1.10.1", "@vitejs/plugin-vue": "^2.0.0",
"@vue/compiler-sfc": "^3.2.23", "@vue/compiler-sfc": "^3.2.26",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"eslint": "^8.4.0", "eslint": "^8.4.1",
"eslint-plugin-vue": "^8.1.1", "eslint-plugin-vue": "^8.2.0",
"prettier": "^2.5.0", "prettier": "^2.5.1",
"sass": "^1.44.0", "sass": "^1.45.0",
"sass-loader": "^12.3.0", "sass-loader": "^12.4.0",
"typescript": "^4.5.2", "typescript": "^4.5.3",
"vite": "^2.6.14", "vite": "^2.7.1",
"vue-eslint-parser": "^8.0.1" "vue-eslint-parser": "^8.0.1"
}, },
"browserslist": [ "browserslist": [

View File

@ -42,6 +42,7 @@ export default {
isShowDialog: false, isShowDialog: false,
cropperImg: '', cropperImg: '',
cropperImgBase64: '', cropperImgBase64: '',
cropper: null,
}); });
// //
const openDialog = (imgs: any) => { const openDialog = (imgs: any) => {
@ -59,12 +60,14 @@ export default {
const onCancel = () => { const onCancel = () => {
closeDialog(); closeDialog();
}; };
// //
const onSubmit = () => {}; const onSubmit = () => {
// state.cropperImgBase64 = state.cropper.getCroppedCanvas().toDataURL('image/jpeg');
};
// cropperjs // cropperjs
const initCropper = () => { const initCropper = () => {
const letImg: any = document.querySelector('.cropper-warp-left-img'); const letImg: any = document.querySelector('.cropper-warp-left-img');
const cropper = new Cropper(letImg, { state.cropper = new Cropper(letImg, {
viewMode: 1, viewMode: 1,
dragMode: 'none', dragMode: 'none',
initialAspectRatio: 1, initialAspectRatio: 1,
@ -74,7 +77,7 @@ export default {
autoCropArea: 0.6, autoCropArea: 0.6,
zoomOnWheel: false, zoomOnWheel: false,
crop: () => { crop: () => {
state.cropperImgBase64 = cropper.getCroppedCanvas().toDataURL('image/jpeg'); state.cropperImgBase64 = state.cropper.getCroppedCanvas().toDataURL('image/jpeg');
}, },
}); });
}; };

View File

@ -5,7 +5,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { toRefs, reactive, onMounted } from 'vue'; import { toRefs, reactive, onMounted, watch } from 'vue';
import wangeditor from 'wangeditor'; import wangeditor from 'wangeditor';
export default { export default {
name: 'wngEditor', name: 'wngEditor',
@ -20,6 +20,11 @@ export default {
type: Boolean, type: Boolean,
default: () => false, default: () => false,
}, },
// placeholder
placeholder: {
type: String,
default: () => '请输入内容',
},
// //
// //
// https://v3.cn.vuejs.org/guide/migration/v-model.html#%E8%BF%81%E7%A7%BB%E7%AD%96%E7%95%A5 // https://v3.cn.vuejs.org/guide/migration/v-model.html#%E8%BF%81%E7%A7%BB%E7%AD%96%E7%95%A5
@ -32,8 +37,9 @@ export default {
// //
// https://doc.wangeditor.com/ // https://doc.wangeditor.com/
const initWangeditor = () => { const initWangeditor = () => {
state.editor = new wangeditor('#wangeditor'); state.editor = new wangeditor(`#${props.id}`);
state.editor.config.placeholder = '请输入内容'; state.editor.config.zIndex = 1;
state.editor.config.placeholder = props.placeholder;
state.editor.config.uploadImgShowBase64 = true; state.editor.config.uploadImgShowBase64 = true;
state.editor.config.showLinkImg = false; state.editor.config.showLinkImg = false;
onWangeditorChange(); onWangeditorChange();
@ -51,6 +57,14 @@ export default {
onMounted(() => { onMounted(() => {
initWangeditor(); initWangeditor();
}); });
//
// https://gitee.com/lyt-top/vue-next-admin/issues/I4LM7I
watch(
() => props.modelValue,
(value) => {
state.editor.txt.html(value);
}
);
return { return {
...toRefs(state), ...toRefs(state),
}; };

View File

@ -1,5 +1,5 @@
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import * as svg from '@element-plus/icons'; import * as svg from '@element-plus/icons-vue';
// 获取阿里字体图标 // 获取阿里字体图标
const getAlicdnIconfont = () => { const getAlicdnIconfont = () => {

View File

@ -1,6 +1,6 @@
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import type { App } from 'vue'; import type { App } from 'vue';
import * as svg from '@element-plus/icons'; import * as svg from '@element-plus/icons-vue';
import router from '/@/router/index'; import router from '/@/router/index';
import { store } from '/@/store/index'; import { store } from '/@/store/index';
import { i18n } from '/@/i18n/index'; import { i18n } from '/@/i18n/index';
@ -25,7 +25,6 @@ export function elSvg(app: App) {
* @method const title = useTitle(); ==> title() * @method const title = useTitle(); ==> title()
*/ */
export function useTitle() { export function useTitle() {
return () => {
nextTick(() => { nextTick(() => {
let webTitle = ''; let webTitle = '';
let globalTitle: string = store.state.themeConfig.themeConfig.globalTitle; let globalTitle: string = store.state.themeConfig.themeConfig.globalTitle;
@ -34,7 +33,6 @@ export function useTitle() {
: (webTitle = i18n.global.t(router.currentRoute.value.meta.title as any)); : (webTitle = i18n.global.t(router.currentRoute.value.meta.title as any));
document.title = `${webTitle} - ${globalTitle}` || globalTitle; document.title = `${webTitle} - ${globalTitle}` || globalTitle;
}); });
};
} }
/** /**