diff --git a/index.html b/index.html index 97764dc..ff3273d 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,8 @@ - + + diff --git a/src/views/pages/richedit/index.vue b/src/views/pages/richedit/index.vue index fb9bd0f..1fad76c 100644 --- a/src/views/pages/richedit/index.vue +++ b/src/views/pages/richedit/index.vue @@ -290,6 +290,7 @@ import { highlightTitle } from '/@/utils/highlight'; import clipboard from 'clipboard'; import { Session } from '/@/utils/storage'; import recordDialog from './dialog/recordDialog.vue'; +import { isMobileByWidth } from '/@/utils/Utils' const recordDialogRef = ref(); /** 管理后台需求文件0519(V1.1) start */ @@ -701,6 +702,9 @@ function recordDialogClose() { } // 页面加载时 onMounted(async () => { + if (isMobileByWidth() && Session.get('userInfoLocal').userType == '01') { + router.push('/richeditMobile'); + } NextLoading.done(); getTagSourceFn(); getData(); diff --git a/src/views/pages/richedit/indexMobile.vue b/src/views/pages/richedit/indexMobile.vue index aa237d5..28b2235 100644 --- a/src/views/pages/richedit/indexMobile.vue +++ b/src/views/pages/richedit/indexMobile.vue @@ -32,7 +32,7 @@ -
+
@@ -116,14 +116,12 @@ import { } from '/@/api/api'; import preventBack from 'vue-prevent-browser-back';//组件内单独引入 import router from '/@/router'; +import { highlightTitle } from '/@/utils/highlight'; const loading = ref(false) const tabsList = ref([ - { - name: "全部", - status: null, - }, + { name: "审核中", status: 3, @@ -132,7 +130,10 @@ const tabsList = ref([ name: "已发布", status: 2, }, - + { + name: "全部", + status: null, + }, ]) const tabIndex = ref(0) @@ -215,17 +216,17 @@ async function getData() { tableData.data.push(...data); } - // tableData.data.forEach((item, index) => { - // item.columns.forEach((childItem, childIndex) => { - // if (childIndex < 2) { - // if (!item.columnsMin) { - // item.columnsMin = []; - // } - // item.columnsMin.push(childItem); - // } - // }); - // item.title = highlightTitle(item.title, form.value.keyword); - // }); + tableData.data.forEach((item, index) => { + item.columns.forEach((childItem, childIndex) => { + if (childIndex < 2) { + if (!item.columnsMin) { + item.columnsMin = []; + } + item.columnsMin.push(childItem); + } + }); + item.title = highlightTitle(item.title, form.value.keyword); + }); } } catch (error) { loading.value = false; @@ -327,7 +328,8 @@ function restData() { onMounted(() => { - getData(); + changeTab(0) + // getData(); }) @@ -336,6 +338,7 @@ onMounted(() => { .all { display: flex; flex-direction: column; + max-width: 100vw; height: 100vh; scrollbar-width: none; /* Firefox */ @@ -398,10 +401,19 @@ onMounted(() => { .card_title { font-size: 15px; font-weight: bold; - width: 80%; + width: 73%; + // overflow: hidden; + // text-overflow: ellipsis; + // white-space: nowrap; + + height: 43px; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + display: -webkit-box; + text-overflow: ellipsis; //属性规定当文本溢出包含元素时发生的事情 text-overflow: clip|ellipsis|string; (修剪/省略号/指定字符串) + -webkit-line-clamp: 2; + /*要显示的行数*/ + /* autoprefixer: off */ + -webkit-box-orient: vertical; //属性规定框的子元素应该被水平或垂直排列 } .r_point { @@ -430,4 +442,9 @@ onMounted(() => { padding: 0 0px 0 15px; } } + +:deep(.highlight) { + color: #ff0000; + font-weight: bold; +}