diff --git a/README.md b/README.md index 88611e2dd..bc5e6684b 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,18 @@ https://www.jianshu.com/p/c1ee7e4247bf @Synchronized : 同步方法安全的转化 @Getter(lazy=true) : @Log : 支持各种logger对象,使用时用对应的注解,如:@Log4j + + + + +beforCreate(创建之前) +Created(创建之后) +beforMount(载入之前) +Mounted(载入之后) +beforUpdate(更新之前) +Updated(更新之后) +beforDestroy(销毁之前) +Destroyed(销毁之后) +activate(keep-alive组件激活时调用) +deactivated(keep-alive组件停用时调用) +errorCaptured(这个组件的作用是接受子孙组件报错是调用,三个参数 错误对象、错误的组件、错误信息) diff --git a/ruoyi-note/src/main/java/com/ruoyi/note/service/impl/NmNoteServiceImpl.java b/ruoyi-note/src/main/java/com/ruoyi/note/service/impl/NmNoteServiceImpl.java index 6b91fd198..3ab8ce85b 100644 --- a/ruoyi-note/src/main/java/com/ruoyi/note/service/impl/NmNoteServiceImpl.java +++ b/ruoyi-note/src/main/java/com/ruoyi/note/service/impl/NmNoteServiceImpl.java @@ -83,6 +83,8 @@ public class NmNoteServiceImpl implements INmNoteService { nmNote.setCreateTime(DateUtils.getNowDate()); nmNote.setTitle(DateUtil.now()); nmNote.setTiymceUeditor(defaultUidGenerator.getUID()); + //创建文章>>mongodb + redisCache.setCacheObject(Constants.NM_NOTE_CONTENT+nmNote.getTiymceUeditor(),"请开始你的创作!"); return nmNoteMapper.insertSelective(nmNote); } diff --git a/ruoyi-ui/src/components/BookmarkList/index.vue b/ruoyi-ui/src/components/BookmarkList/index.vue index 2c14e8ca1..c0eb8797c 100644 --- a/ruoyi-ui/src/components/BookmarkList/index.vue +++ b/ruoyi-ui/src/components/BookmarkList/index.vue @@ -42,6 +42,7 @@ components: {format}, props: { bookmarkList: Array, + property: null, }, data: function () { return { @@ -49,25 +50,19 @@ noteTime:true, isBookmarkIcon:false, Ueditor:undefined, - } }, + mounted(){ + this.showView(this.property); + }, + updated(){ + this.showView(this.property); + }, created() { var that=this; //便签ID that.Ueditor = that.$route.query.Ueditor; - var a=2; - if(a==2){ - //便签模式 只能这么显示 - this.isdescription=false; - this.noteTime=true; - this.isBookmarkIcon=false; - }else { - this.isdescription=true; - this.noteTime=false; - this.isBookmarkIcon=true; - } }, filters: { //timeago.js插件 @@ -83,6 +78,27 @@ this.$emit('on-windowurl', noteId, tiymceueditor,bookmarkId,url); } + , + showView(e) { + var that=this; + switch (e) { + case 0: + //网页模式 + that.isdescription = true; + that.noteTime = false; + that.isBookmarkIcon = true; + break; + case 1: + //便签模式 + that.isdescription = true; + that.noteTime = true; + that.isBookmarkIcon = false; + break; + default: + + } + + } } } diff --git a/ruoyi-ui/src/store/getters.js b/ruoyi-ui/src/store/getters.js index b98552150..d13d863ac 100644 --- a/ruoyi-ui/src/store/getters.js +++ b/ruoyi-ui/src/store/getters.js @@ -1,15 +1,15 @@ -const getters = { - sidebar: state => state.app.sidebar, - size: state => state.app.size, - device: state => state.app.device, - visitedViews: state => state.tagsView.visitedViews, - cachedViews: state => state.tagsView.cachedViews, - token: state => state.user.token, - avatar: state => state.user.avatar, - name: state => state.user.name, - introduction: state => state.user.introduction, - roles: state => state.user.roles, - permissions: state => state.user.permissions, - permission_routes: state => state.permission.routes -} -export default getters +const getters = { + sidebar: state => state.app.sidebar, + size: state => state.app.size, + device: state => state.app.device, + visitedViews: state => state.tagsView.visitedViews, + cachedViews: state => state.tagsView.cachedViews, + token: state => state.user.token, + avatar: state => state.user.avatar, + name: state => state.user.name, + introduction: state => state.user.introduction, + roles: state => state.user.roles, + permissions: state => state.user.permissions, + permission_routes: state => state.permission.routes, +} +export default getters diff --git a/ruoyi-ui/src/views/bookmark/bookmark/index.vue b/ruoyi-ui/src/views/bookmark/bookmark/index.vue index 5d94cea4e..bfc78fe0f 100644 --- a/ruoyi-ui/src/views/bookmark/bookmark/index.vue +++ b/ruoyi-ui/src/views/bookmark/bookmark/index.vue @@ -2,7 +2,7 @@
加载中...
没有更多了
@@ -279,11 +279,11 @@ -