diff --git a/im-web/package.json b/im-web/package.json index 4c29794..2cf6146 100644 --- a/im-web/package.json +++ b/im-web/package.json @@ -8,18 +8,18 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "axios": "^1.1.3", - "core-js": "^3.6.5", - "element-ui": "^2.15.10", - "js-audio-recorder": "^1.0.7", - "localforage": "^1.10.0", - "sass": "^1.47.0", - "sass-loader": "^10.1.1", - "vue": "^2.6.11", - "vue-axios": "^3.5.0", - "vue-router": "^3.3.3", - "vuex": "^3.6.2", - "vuex-persist": "^3.1.3" + "axios": "1.7.7", + "core-js": "3.38.1", + "element-ui": "2.15.14", + "js-audio-recorder": "1.0.7", + "localforage": "1.10.0", + "sass": "1.32.12", + "sass-loader": "10.1.1", + "vue": "2.7.16", + "vue-axios": "3.5.2", + "vue-router": "3.6.5", + "vuex": "3.6.2", + "vuex-persist": "3.1.3" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.12", diff --git a/im-web/src/App.vue b/im-web/src/App.vue index 6e991bb..c34d3a7 100644 --- a/im-web/src/App.vue +++ b/im-web/src/App.vue @@ -1,115 +1,26 @@ \ No newline at end of file + diff --git a/im-web/src/api/emotion.js b/im-web/src/api/emotion.js index c391496..2d799a6 100644 --- a/im-web/src/api/emotion.js +++ b/im-web/src/api/emotion.js @@ -19,7 +19,7 @@ let textToImg = (emoText) => { return emoText; } let url = require(`@/assets/emoji/${idx}.gif`); - return `` + return `` } let textToUrl = (emoText) => { diff --git a/im-web/src/assets/image/online_app.png b/im-web/src/assets/image/online_app.png deleted file mode 100644 index 173d415..0000000 Binary files a/im-web/src/assets/image/online_app.png and /dev/null differ diff --git a/im-web/src/assets/image/online_web.png b/im-web/src/assets/image/online_web.png deleted file mode 100644 index 6e47078..0000000 Binary files a/im-web/src/assets/image/online_web.png and /dev/null differ diff --git a/im-web/src/assets/style/element.scss b/im-web/src/assets/style/element.scss new file mode 100644 index 0000000..8a26ba9 --- /dev/null +++ b/im-web/src/assets/style/element.scss @@ -0,0 +1,112 @@ +/* 改变 icon 字体路径变量,必需 */ +$--font-path: '~element-ui/lib/theme-chalk/fonts'; + +// 文字 +$--font-family: Microsoft YaHei, 'Avenir', Helvetica, Arial, sans-serif; +@import "thems"; +@import "~element-ui/packages/theme-chalk/src/index"; + +.el-message { + z-index: 99999999 !important; + background: #fff !important; + box-shadow: 0 4px 12px 0 rgb(0 0 0 / 15%); + border: none !important; + min-width: unset !important; + border-radius: 3px !important; + padding: 14px 18px 14px 16px !important; + + .el-message__content { + color: #000 !important; + } +} + +.el-scrollbar__thumb { + background-color: #A0A8AF !important; +} + +.el-dialog__title { + font-size: var(--im-font-size-larger); + color: var(--im-text-color); +} + +.el-dialog__header { + padding: 12px 18px !important; + +} + +.el-dialog__headerbtn { + top: 15px; + right: 20px; + font-size: 18px; +} + +.el-checkbox__inner { + border-radius: 50% !important; +} + + +.el-button--success { + //background-color: #688758 !important; + //border-color: #4cae1b !important; +} + +.el-button--danger { + //background-color: #ea4949 !important; + //border-color: #ea4949 !important; +} + +.el-button { + padding: 8px 15px !important; +} + +.el-checkbox { + display: flex; + align-items: center; + + //修改选中框的大小 + .el-checkbox__inner { + width: 16px; + height: 16px; + + //修改选中框中的对勾的大小和位置 + &::after { + height: 7px; + left: 5px; + top: 2px; + } + } + + // 修改点击文字颜色不变 + .el-checkbox__input.is-checked + .el-checkbox__label { + color: #333333; + } + + .el-checkbox__label { + line-height: 20px; + padding-left: 8px; + } +} + +.el-form-item { + margin-bottom: 15px !important; +} + +.el-input--small { + font-size: $--font-size-base; +} + +.el-input__inner { + padding: 0 10px; +} + +.el-textarea__inner { + padding: 5px 10px; + font-family: $--font-family; +} + +.el-tag--mini { + height: 18px; + padding: 0 2px; + line-height: 16px; + border-radius: 2px; +} diff --git a/im-web/src/assets/style/global.css b/im-web/src/assets/style/global.css deleted file mode 100644 index ce8be83..0000000 --- a/im-web/src/assets/style/global.css +++ /dev/null @@ -1,43 +0,0 @@ -@charset "UTF-8"; - -html { - height: 100%; - overflow: hidden; - -} - -body { - height: 100%; - margin: 0; - overflow: hidden; - -} - -section { - height: 100%; -} - -.el-dialog__body{ - padding: 10px 15px !important; -} - -::-webkit-scrollbar { - width: 6px; - height: 1px; -} - -::-webkit-scrollbar-thumb { - /*滚动条里面小方块*/ - border-radius: 2px; - -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); - background: #535353; -} - -::-webkit-scrollbar-track { - /*滚动条里面轨道*/ - -webkit-box-shadow: inset 0 0 5px transparent; - border-radius: 2px; - background: #ededed; -} - -/*# sourceMappingURL=v-im.cssss.map */ diff --git a/im-web/src/assets/style/im.scss b/im-web/src/assets/style/im.scss new file mode 100644 index 0000000..d3d40c0 --- /dev/null +++ b/im-web/src/assets/style/im.scss @@ -0,0 +1,91 @@ +@charset "UTF-8"; +@import "element"; + +// im全局样式变量 +:root { + // 主色 + --im-color-primary: #{$--color-primary}; + --im-color-primary-light-1: #{$--color-primary-light-1}; + --im-color-primary-light-2: #{$--color-primary-light-2}; + --im-color-primary-light-3: #{$--color-primary-light-3}; + --im-color-primary-light-4: #{$--color-primary-light-4}; + --im-color-primary-light-5: #{$--color-primary-light-5}; + --im-color-primary-light-6: #{$--color-primary-light-6}; + --im-color-primary-light-7: #{$--color-primary-light-7}; + --im-color-primary-light-8: #{$--color-primary-light-8}; + --im-color-primary-light-9: #{$--color-primary-light-9}; + + --im-color-sucess: #{$--color-success}; + --im-color-warning: #{$--color-warning}; + --im-color-danger: #{$--color-danger}; + --im-color-info: #{$--color-info}; + + // 文字颜色 + --im-text-color: #{$--color-text-regular}; + --im-text-color-light: #999999; + --im-text-color-lighter: #C0C4CC; + + // 文字大小 + --im-font-size: #{$--font-size-base}; + --im-font-size-small: #{$--font-size-small}; + --im-font-size-smaller: #{$--font-size-extra-small}; + --im-font-size-large: #{$--font-size-medium}; + --im-font-size-larger: #{$--font-size-large}; + --im-font-family: #{$--font-family}; + + + // 边框颜色 + --im-border: 1px solid #EBEEF5; + + // 阴影 + --im-box-shadow: #{$--box-shadow-base}; + --im-box-shadow-light: #{$--box-shadow-light}; + --im-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12); + --im-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16); + + // 背景色 + --im-background: #F3F3F3; + --im-background-active: #F1F1F1; + --im-background-active-dark: #E9E9E9; +} + +html { + height: 100%; + overflow: hidden; +} + +body { + height: 100%; + margin: 0; + overflow: hidden; +} + +section { + height: 100%; +} + +.el-dialog__body { + padding: 10px 20px !important; +} + +// 滚动条样式 +::-webkit-scrollbar { + width: 8px; + height: 1px; +} + +::-webkit-scrollbar-thumb { + border-radius: 4px; + background: hsla(0, 0%, 73%, .5); +} + +::-webkit-scrollbar-track { + border-radius: 4px; +} + +.search-input { + .el-input__inner { + border: unset !important; + } + +} diff --git a/im-web/src/assets/style/thems.scss b/im-web/src/assets/style/thems.scss new file mode 100644 index 0000000..569a39e --- /dev/null +++ b/im-web/src/assets/style/thems.scss @@ -0,0 +1,6 @@ +// 主题色 +$--color-primary: #2830d3; +//$--color-primary: #687ff0; +//$--color-primary: #096bff; +$--font-size-base: 14px; +$--color-text-regular: #000000; diff --git a/im-web/src/components/chat/ChatAtBox.vue b/im-web/src/components/chat/ChatAtBox.vue index 556b1cf..1d5bd02 100644 --- a/im-web/src/components/chat/ChatAtBox.vue +++ b/im-web/src/components/chat/ChatAtBox.vue @@ -123,9 +123,9 @@ position: fixed; width: 200px; height: 300px; - border: 1px solid #53a0e79c; - border-radius: 5px; - background-color: #f5f5f5; - box-shadow: 0px 0px 10px #ccc; + //border: 1px solid #53a0e79c; + //border-radius: 5px; + background-color: #fff; + box-shadow: var(--im-box-shadow); } - \ No newline at end of file + diff --git a/im-web/src/components/chat/ChatBox.vue b/im-web/src/components/chat/ChatBox.vue index 3239e69..2c60692 100644 --- a/im-web/src/components/chat/ChatBox.vue +++ b/im-web/src/components/chat/ChatBox.vue @@ -1,7 +1,7 @@