提交 fb2f543d 编写于 作者: Q qiang

feat: uni.showModal 内容支持主动换行

上级 a93f5201
<template> <template>
<transition name="uni-fade"> <transition name="uni-fade">
<uni-modal <uni-modal
v-show="visible" v-show="visible"
@touchmove.prevent> @touchmove.prevent>
<div class="uni-mask"/> <div class="uni-mask"/>
<div class="uni-modal"> <div class="uni-modal">
<div <div
v-if="title" v-if="title"
class="uni-modal__hd"> class="uni-modal__hd">
<strong class="uni-modal__title">{{ title }}</strong> <strong class="uni-modal__title">{{ title }}</strong>
</div> </div>
<div <div
class="uni-modal__bd" class="uni-modal__bd"
@touchmove.stop>{{ content }}</div> @touchmove.stop>{{ content }}</div>
<div class="uni-modal__ft"> <div class="uni-modal__ft">
<div <div
v-if="showCancel" v-if="showCancel"
:style="{color:cancelColor}" :style="{color:cancelColor}"
class="uni-modal__btn uni-modal__btn_default" class="uni-modal__btn uni-modal__btn_default"
@click="_close('cancel')">{{ cancelText }}</div> @click="_close('cancel')">{{ cancelText }}</div>
<div <div
:style="{color:confirmColor}" :style="{color:confirmColor}"
class="uni-modal__btn uni-modal__btn_primary" class="uni-modal__btn uni-modal__btn_primary"
@click="_close('confirm')">{{ confirmText }}</div> @click="_close('confirm')">{{ confirmText }}</div>
</div> </div>
</div> </div>
...@@ -113,6 +113,7 @@ export default { ...@@ -113,6 +113,7 @@ export default {
font-size: 18px; font-size: 18px;
word-wrap:break-word; word-wrap:break-word;
word-break:break-all; word-break:break-all;
white-space: pre;
overflow : hidden; overflow : hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
...@@ -127,6 +128,7 @@ export default { ...@@ -127,6 +128,7 @@ export default {
line-height: 1.4; line-height: 1.4;
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
white-space: pre;
color: #999999; color: #999999;
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
...@@ -189,4 +191,4 @@ export default { ...@@ -189,4 +191,4 @@ export default {
uni-modal .uni-modal__btn_primary { uni-modal .uni-modal__btn_primary {
color: #007aff; color: #007aff;
} }
</style> </style>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册