Browse Source

mycomponents/common 文件迁移 8/8-10/25

pull/1/head
test 4 months ago
parent
commit
61ecba7dc9
  1. 24
      src/mycomponents/common/comMessage.vue

24
src/mycomponents/common/comMessage.vue

@ -8,15 +8,21 @@
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<scroll-view style="max-height: 400rpx; " scroll-y="true">
<slot name="content"> <slot name="content">
<text class="content" :style="{'color': textColor?textColor:'#000'}" v-if="textColor"> <view class="" style="display: flex;align-items: center;justify-content: center;">
<text class="text_content" :style="{'color': textColor?textColor:'#000'}" >
{{content}} {{content}}
</text> </text>
<rich-text class="content" :nodes="content" v-else> </rich-text> </view>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot> </slot>
</scroll-view>
<view class="split_line"></view> <view class="split_line"></view>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px"> <view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 50px">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> <view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{ color: cancelColor }">{{ cancelText }}</text> <text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view> </view>
@ -61,7 +67,7 @@ const seconds = ref(0)
const success = ref(() => {}) const success = ref(() => {})
const version = ref('') const version = ref('')
const modal = ref(null) const modal = ref(null)
const textColor = ref('#000') const textColor = ref('')
const count = ref(0) const count = ref(0)
// onMounted(() => { // onMounted(() => {
// const systemInfo = uni.getSystemInfoSync() // const systemInfo = uni.getSystemInfoSync()
@ -405,7 +411,7 @@ const showModal = (data) => {
if (data.textColor) { if (data.textColor) {
textColor.value = data.textColor textColor.value = data.textColor
} else { } else {
textColor.value = '#000' textColor.value = ''
} }
if (data.showConfirmButton === false || data.showConfirmButton === true) { if (data.showConfirmButton === false || data.showConfirmButton === true) {
showConfirmButton.value = data.showConfirmButton showConfirmButton.value = data.showConfirmButton
@ -491,6 +497,7 @@ defineExpose({
display: flex; // display: flex; //
flex-direction: column; // flex-direction: column; //
align-items: center; // align-items: center; //
margin: 8rpx;
// background-image: url() // background-image: url()
} }
@ -542,4 +549,11 @@ defineExpose({
.def_text { .def_text {
color: $uni-color-primary; color: $uni-color-primary;
} }
.text_content{
padding: 10rpx;
font-size: 32rpx;
text-align: center;
word-break: break-all;
white-space: normal;
}
</style> </style>

Loading…
Cancel
Save