123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <template>
- <div class="h100">
- <keep-alive>
- <router-view v-if="$route.meta.keepAlive"></router-view>
- </keep-alive>
- <router-view v-if="!$route.meta.keepAlive"></router-view>
- </div>
- </template>
- <script>
- import $ from 'jquery'
- export default {
- name: "app",
- created() { },
- mounted() {
- let width=$("body").width();
- console.log(width)
- if(width>=1200){
- let fontsize=width/1920*40;//fontsize为当前屏幕的基数字体,相对于设计稿计算得到的。
- $("html").css("font-size",`${fontsize}px`)
- }
- if(width<=750){
- let fontsize=width/400*40;
- $("html").css("font-size",`${fontsize}px`)
- }
- //当加载页面的时候设置生效
- window.onresize = () => {
- return (() => {
- let width=$("body").width();
- if(width>=1200){
- let fontsize=width/1920*40;
- $("html").css("font-size",`${fontsize}px`)
- }
- if(width<=750){
- let fontsize=width/400*40;
- $("html").css("font-size",`${fontsize}px`)
- }
- })()
- }
- }
- };
- </script>
- <style>
- * {
- font-family: '微软雅黑';
- }
- .h100 {
- height: 100vh;
- box-sizing: border-box;
- }
- /* flex */
- .flexCoum {
- display: flex;
- flex-wrap: wrap;
- flex-direction: column;
- height: 100%;
- }
- /* 超出隐藏 */
- .textBeyondHiding {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .flexCoum-box {
- flex: 1;
- overflow: auto;
- }
- /* 去除滚动条 */
- .contentRoll::-webkit-scrollbar { width: 0 !important }
- .contentRoll { -ms-overflow-style: none; }
- .contentRoll { overflow: -moz-scrollbars-none; }
- .popupDiv {
- background: #F4F4F4;
- position: relative;
- height: 100%;
- width: 100%;
- display: flex;
- flex-direction: column;
- }
- .popupSearch {
- width: 100%;
- }
- .popupCon {
- width: 100%;
- overflow: auto;
- position: relative;
- }
- .paddingDiv {
- box-sizing: border-box;
- margin: 0 15px;
- }
- .popupTitle {
- color: #333333;
- padding: 0 30px;
- position: relative;
- line-height: 20px;
- }
- .popupTitle::after {
- content: '';
- width: 3px;
- height: 100%;
- border-radius: 3px;
- background: #409eff;
- position: absolute;
- top: 0;
- left: 15px;
- }
- .popupItem {
- background: #FFFFFF;
- padding: 10px 10px;
- border-radius: 6px;
- margin-top: 14px;
- position: relative;
- }
- .marginTop {
- margin-top: 15px;
- }
- .paddingTop {
- padding-top: 10px;
- }
- .popupItem p {
- width: 100%;
- overflow: hidden;
- white-space:nowrap;
- text-overflow: ellipsis;
- line-height: 22px;
- }
- .popupItemOne {
- font-size: 15px;
- color: #333;
- }
- .popupItemTwo {
- font-size: 13px;
- color: #999;
- margin-top: 10px;
- }
- .popupItemIcon {
- position: absolute;
- right: 7px;
- top: 50%;
- font-size: 20px;
- margin-top: -10px;
- color: #999;
- }
- .popupConBox {
- box-sizing: border-box;
- }
- .borderNone {
- border-radius: 0;
- }
- .marginNone {
- margin: 0 !important;
- }
- .popupBtn {
- padding: 0 15px;
- margin-top: 10px;
- margin-bottom: 15px;
- }
- .conBorder {
- width: auto !important;
- margin: 0 15px;
- border-radius: 10px;
- box-sizing: border-box;
- }
-
- .userNameClass_left {
- display: inline-block;
- width: 100px;
- }
- .userNameClass_right {
- display: inline-block;
- width: 150px;
- float: right;
- text-align: right;
- overflow: hidden;
- white-space:nowrap;
- text-overflow: ellipsis;
- }
- </style>
|