diff --git a/src/api/journal.js b/src/api/journal.js index 0f18cf54..61a3ced8 100644 --- a/src/api/journal.js +++ b/src/api/journal.js @@ -28,4 +28,11 @@ journalApi.update = (journalId, journal) => { }) } +journalApi.delete = journalId => { + return service({ + url: `${baseUrl}/${journalId}`, + method: 'delete' + }) +} + export default journalApi diff --git a/src/components/global.less b/src/components/global.less index 75dcf027..8fd6d716 100644 --- a/src/components/global.less +++ b/src/components/global.less @@ -8,7 +8,8 @@ body { height: auto; overflow-x: hidden; - &.mobile,&.tablet { + &.mobile, + &.tablet { .ant-layout-content { @@ -25,11 +26,14 @@ body { .ant-table-content { overflow-y: auto; } + .ant-table-body { min-width: 800px; } } + .topmenu { + /* 必须为 topmenu 才能启用流式布局 */ &.content-width-Fluid { .header-index-wide { @@ -43,7 +47,8 @@ body { .sidemenu { .ant-header-fixedHeader { - &.ant-header-side-opened, &.ant-header-side-closed { + &.ant-header-side-opened, + &.ant-header-side-closed { width: 100% } } @@ -60,6 +65,7 @@ body { padding: 0 24px; cursor: pointer; transition: color .3s; + &:hover { background: rgba(0, 0, 0, 0.025); } @@ -82,6 +88,7 @@ body { width: 100%; } } + /* 必须为 topmenu 才能启用流式布局 */ &.content-width-Fluid { .header-index-wide { @@ -123,7 +130,8 @@ body { position: relative; } - .header, .top-nav-header-index { + .header, + .top-nav-header-index { .user-wrapper { float: right; @@ -160,6 +168,7 @@ body { .action { color: rgba(255, 255, 255, 0.85); + a { color: rgba(255, 255, 255, 0.85); } @@ -172,7 +181,8 @@ body { } } - &.mobile,&.tablet { + &.mobile, + &.tablet { .top-nav-header-index { .header-index-wide { @@ -188,6 +198,7 @@ body { flex: 0; text-align: center; line-height: 58px; + h1 { display: none; } @@ -205,24 +216,27 @@ body { } } } + // } } } &.tablet { + // overflow: hidden; text-overflow:ellipsis; white-space: nowrap; .top-nav-header-index { .header-index-wide { .header-index-left { - .logo > a { + .logo>a { overflow: hidden; - text-overflow:ellipsis; + text-overflow: ellipsis; white-space: nowrap; } } + .ant-menu.ant-menu-horizontal { flex: 1 1; white-space: normal; @@ -233,9 +247,9 @@ body { } .top-nav-header-index { - box-shadow: 0 1px 4px rgba(0,21,41,.08); + box-shadow: 0 1px 4px rgba(0, 21, 41, .08); position: relative; - transition: background .3s,width .2s; + transition: background .3s, width .2s; .header-index-wide { max-width: 1200px; @@ -262,7 +276,8 @@ body { transition: all .3s; overflow: hidden; - img, svg { + img, + svg { display: inline-block; vertical-align: middle; height: 32px; @@ -330,8 +345,10 @@ body { background-color: rgb(0, 21, 41); } } + &.light { box-shadow: none; + .ant-drawer-content { background-color: #fff; } @@ -349,10 +366,11 @@ body { z-index: 10; height: auto; - .ant-layout-sider-children { + .ant-layout-sider-children { padding-top: 64px; overflow-y: hidden; - &:hover{ + + &:hover { overflow-y: auto; } } @@ -376,12 +394,15 @@ body { overflow: hidden; z-index: 9; - img, svg, h1 { + img, + svg, + h1 { display: inline-block; vertical-align: middle; } - img, svg { + img, + svg { height: 32px; width: 32px; } @@ -390,7 +411,7 @@ body { color: #fff; font-size: 20px; margin: 0; - font-family: Avenir,Helvetica Neue,Arial,Helvetica,sans-serif; + font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; font-weight: 600; vertical-align: middle; } @@ -422,6 +443,7 @@ body { user-select: none; } } + .user-dropdown-menu-wrapper.ant-dropdown-menu { padding: 4px 0; @@ -429,10 +451,9 @@ body { width: 160px; } - .ant-dropdown-menu-item > .anticon:first-child, - .ant-dropdown-menu-item > a > .anticon:first-child, - .ant-dropdown-menu-submenu-title > .anticon:first-child - .ant-dropdown-menu-submenu-title > a > .anticon:first-child { + .ant-dropdown-menu-item>.anticon:first-child, + .ant-dropdown-menu-item>a>.anticon:first-child, + .ant-dropdown-menu-submenu-title>.anticon:first-child .ant-dropdown-menu-submenu-title>a>.anticon:first-child { min-width: 12px; margin-right: 8px; } @@ -464,6 +485,7 @@ body { padding-right: 8px; width: auto; } + .ant-form-item-control { height: 32px; line-height: 32px; @@ -490,51 +512,57 @@ body { } } -.ant-card{ - .ant-card-head{ - padding: 0 16px!important; - .ant-card-head-wrapper{ - .ant-card-head-title{ - padding: 12px 0!important; +.ant-card { + .ant-card-head { + padding: 0 16px !important; + + .ant-card-head-wrapper { + .ant-card-head-title { + padding: 12px 0 !important; } } } } -.ant-card-wider-padding{ - .ant-card-body{ - padding: 24px!important; +.ant-card-wider-padding { + .ant-card-body { + padding: 24px !important; } } -.ant-form{ - .ant-form-item{ - padding-bottom: 0!important; +.ant-form { + .ant-form-item { + padding-bottom: 0 !important; margin-bottom: 20px; } } -.ant-list-item{ +.ant-list-item { word-break: break-all; } .card-container { background: #f5f5f5; - & > .ant-tabs-card { - & > .ant-tabs-content { + + &>.ant-tabs-card { + &>.ant-tabs-content { margin-top: -16px; - & > .ant-tabs-tabpane { + + &>.ant-tabs-tabpane { background: #fff; padding: 16px; } } - & > .ant-tabs-bar { + + &>.ant-tabs-bar { border-color: #fff; + .ant-tabs-tab { - border: none!important; - margin-right: 0!important; + border: none !important; + margin-right: 0 !important; background: transparent; } + .ant-tabs-tab-active { border-color: #fff; background: #fff; @@ -553,4 +581,23 @@ body { left: 0px; background: rgb(255, 255, 255); border-radius: 0px 0px 4px 4px; +} + +.page-wrapper { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + .ant-pagination-options-size-changer.ant-select{ + margin:0 + } } \ No newline at end of file diff --git a/src/views/attachment/AttachmentList.vue b/src/views/attachment/AttachmentList.vue index 38d28d2f..7dea534d 100644 --- a/src/views/attachment/AttachmentList.vue +++ b/src/views/attachment/AttachmentList.vue @@ -107,10 +107,7 @@ - +
- +
- +
- +
- +
- +
删除 - +
- +
diff --git a/src/views/interface/MenuList.vue b/src/views/interface/MenuList.vue index e26f46db..cae220a4 100644 --- a/src/views/interface/MenuList.vue +++ b/src/views/interface/MenuList.vue @@ -205,14 +205,15 @@ export default { if (this.menuToCreate.id) { menuApi.update(this.menuToCreate.id, this.menuToCreate).then(response => { this.$message.success('更新成功!') + this.loadMenus() }) } else { menuApi.create(this.menuToCreate).then(response => { this.$message.success('保存成功!') + this.loadMenus() }) } this.handleAddMenu() - this.loadMenus() }, toggleExpand() { this.fieldExpand = !this.fieldExpand diff --git a/src/views/post/PostList.vue b/src/views/post/PostList.vue index a176aa46..875ea7dd 100644 --- a/src/views/post/PostList.vue +++ b/src/views/post/PostList.vue @@ -176,11 +176,7 @@ - +
- +
diff --git a/src/views/sheet/internal/JournalList.vue b/src/views/sheet/internal/JournalList.vue index 9b7fd028..6b612045 100644 --- a/src/views/sheet/internal/JournalList.vue +++ b/src/views/sheet/internal/JournalList.vue @@ -17,7 +17,7 @@ :sm="24" > - + 查询 - 重置 + 重置
@@ -84,7 +87,14 @@ @click="handleEdit(item)" >编辑 - 删除 + + 删除 + {{ item.createTime | moment }} @@ -95,7 +105,7 @@ /> - + @@ -190,18 +200,25 @@ export default { this.journal = item this.visible = true }, + handleDelete(id) { + journalApi.delete(id).then(response => { + this.$message.success('删除成功!') + this.loadJournals() + }) + }, createOrUpdateJournal() { if (this.journal.id) { journalApi.update(this.journal.id, this.journal).then(response => { this.$message.success('更新成功!') + this.loadJournals() }) } else { journalApi.create(this.journal).then(response => { this.$message.success('发表成功!') + this.loadJournals() }) } this.visible = false - this.loadJournals() }, onPaginationChange(page, pageSize) { this.$log.debug(`Current: ${page}, PageSize: ${pageSize}`) diff --git a/src/views/sheet/internal/LinkList.vue b/src/views/sheet/internal/LinkList.vue index d2c8dde0..8c111378 100644 --- a/src/views/sheet/internal/LinkList.vue +++ b/src/views/sheet/internal/LinkList.vue @@ -183,14 +183,15 @@ export default { if (this.link.id) { linkApi.update(this.link.id, this.link).then(response => { this.$message.success('更新成功!') + this.loadLinks() }) } else { linkApi.create(this.link).then(response => { this.$message.success('保存成功!') + this.loadLinks() }) } this.handleAddLink() - this.loadLinks() } } } diff --git a/src/views/sheet/internal/PhotoList.vue b/src/views/sheet/internal/PhotoList.vue index af5d35cc..d7f4fcca 100644 --- a/src/views/sheet/internal/PhotoList.vue +++ b/src/views/sheet/internal/PhotoList.vue @@ -90,10 +90,7 @@
- +
- +