12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <u-navbar :titleStyle="{ color: '#fff' }" :autoBack="true" :title="state.title" :placeholder="true" :safeAreaInsetTop="true" :bgColor="proxy.$settingStore.themeColor.color">
- <template #left>
- <view class="u-navbar__content__left__item">
- <u-icon name="arrow-left" size="20" color="#fff"></u-icon>
- </view>
- </template>
- </u-navbar>
- <view class="view-text">
- <!-- <u-parse class="uni-body view-content" :content="content"></u-parse> -->
- <h3 style="text-align: center; line-height: 45px">{{ state.contentTitle }}</h3>
- <view>{{ state.content }}</view>
- </view>
- </template>
- <script setup>
- /*----------------------------------依赖引入-----------------------------------*/
- import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
- import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
- /*----------------------------------接口引入-----------------------------------*/
- /*----------------------------------组件引入-----------------------------------*/
- /*----------------------------------store引入-----------------------------------*/
- import { useStores, commonStores } from "@/store/modules/index";
- /*----------------------------------公共方法引入-----------------------------------*/
- /*----------------------------------公共变量-----------------------------------*/
- const { proxy } = getCurrentInstance();
- const useStore = useStores();
- /*----------------------------------变量声明-----------------------------------*/
- const state = reactive({
- title: "",
- content: "",
- contentTitle: "",
- });
- onLoad((options) => {
- state.title = options.title;
- state.content = options.content;
- state.contentTitle = options.contentTitle;
- });
- onShow(() => {
- //调用系统主题颜色
- proxy.$settingStore.systemThemeColor([1]);
- });
- </script>
- <style lang="scss" scoped>
- .view-text {
- padding: 5px;
- .view-content {
- font-size: 12px;
- color: #333;
- line-height: 24px;
- word-wrap: break-word;
- }
- }
- </style>
|