应用背景色处理函数
This commit is contained in:
parent
307e2ee29b
commit
55883c67b9
|
|
@ -60,7 +60,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="description-content">
|
<view class="description-content">
|
||||||
<rich-text
|
<rich-text
|
||||||
:nodes="activityData.content"
|
:nodes="removeBackgroundStyle(activityData.content)"
|
||||||
class="content-html"
|
class="content-html"
|
||||||
></rich-text>
|
></rich-text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -100,6 +100,7 @@ import StatusDisplay from "../../components/status-display/status-display.vue";
|
||||||
import ActivityCard from "../../components/activity-card/activity-card.vue";
|
import ActivityCard from "../../components/activity-card/activity-card.vue";
|
||||||
import activityApi from "../../api/activity/activity.js";
|
import activityApi from "../../api/activity/activity.js";
|
||||||
import activityFormatter from "../../utils/activity-data-formatter.js";
|
import activityFormatter from "../../utils/activity-data-formatter.js";
|
||||||
|
import { removeBackgroundStyle } from "../../composables/clearnBackgroundColor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -133,6 +134,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
removeBackgroundStyle,
|
||||||
// 加载页面数据
|
// 加载页面数据
|
||||||
async loadPageData() {
|
async loadPageData() {
|
||||||
if (!this.actId) return;
|
if (!this.actId) return;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { removeBackgroundStyle } from "../../composables/clearnBackgroundColor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectDetail",
|
name: "projectDetail",
|
||||||
data() {
|
data() {
|
||||||
|
|
@ -49,6 +51,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
removeBackgroundStyle,
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
//return this.$u.date(timestamp, "yyyy-mm-dd");
|
//return this.$u.date(timestamp, "yyyy-mm-dd");
|
||||||
|
|
@ -62,13 +65,6 @@ export default {
|
||||||
// }
|
// }
|
||||||
return timestamp;
|
return timestamp;
|
||||||
},
|
},
|
||||||
|
|
||||||
removeBackgroundStyle(html) {
|
|
||||||
if (!html) return [];
|
|
||||||
|
|
||||||
// 1. 移除背景色样式
|
|
||||||
return html.replace(/background-color:[^;"]*;?/g, "");
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
import CommonEnum from "../../enum/common";
|
import CommonEnum from "../../enum/common";
|
||||||
import { createPagination } from "../../composables/winB_Pagination";
|
import { createPagination } from "../../composables/winB_Pagination";
|
||||||
import { getProjectSchedule } from "../../api/institutionalStructure/institutionalStructureDetail";
|
import { getProjectSchedule } from "../../api/institutionalStructure/institutionalStructureDetail";
|
||||||
|
import { removeBackgroundStyle } from "../../composables/clearnBackgroundColor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
|
|
@ -115,12 +116,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
removeBackgroundStyle(html) {
|
removeBackgroundStyle,
|
||||||
if (!html) return [];
|
|
||||||
|
|
||||||
// 1. 移除背景色样式
|
|
||||||
return html.replace(/background-color:[^;"]*;?/g, "");
|
|
||||||
},
|
|
||||||
|
|
||||||
goProjectDetail(item) {
|
goProjectDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user