mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 09:08:51 +08:00
Compare commits
2 Commits
ca58733786
...
1c315a9c02
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c315a9c02 | ||
|
|
84ecdd32c1 |
@ -651,7 +651,7 @@ $-toast-fs: var(--wot-toast-fs, $-fs-content) !default; // 字号
|
|||||||
$-toast-line-height: var(--wot-toast-line-height, 20px) !default; // 行高
|
$-toast-line-height: var(--wot-toast-line-height, 20px) !default; // 行高
|
||||||
$-toast-with-icon-min-width: var(--wot-toast-with-icon-min-width, 150px) !default; // 有图标的情况下最小宽度
|
$-toast-with-icon-min-width: var(--wot-toast-with-icon-min-width, 150px) !default; // 有图标的情况下最小宽度
|
||||||
$-toast-icon-size: var(--wot-toast-icon-size, 32px) !default; // 图标大小
|
$-toast-icon-size: var(--wot-toast-icon-size, 32px) !default; // 图标大小
|
||||||
$-toast-icon-margin-right: var(--wot-toast-icon-margin-right, 12px) !default; // 图标右边距
|
$-toast-msg-margin-left: var(--wot-toast-msg-margin-left, 12px) !default; // 消息内容左边距
|
||||||
$-toast-icon-margin-bottom: var(--wot-toast-icon-margin-bottom, 12px) !default; // 图标下边距
|
$-toast-icon-margin-bottom: var(--wot-toast-icon-margin-bottom, 12px) !default; // 图标下边距
|
||||||
$-toast-loading-padding: var(--wot-toast-loading-padding, 10px) !default; // loading状态下的padding
|
$-toast-loading-padding: var(--wot-toast-loading-padding, 10px) !default; // loading状态下的padding
|
||||||
$-toast-loading-margin-bottom: var(--wot-toast-loading-margin-bottom, 16px) !default; // loading动画的margin-bottom
|
$-toast-loading-margin-bottom: var(--wot-toast-loading-margin-bottom, 16px) !default; // loading动画的margin-bottom
|
||||||
|
|||||||
@ -24,13 +24,11 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
font-family: "San Francisco", Rotobo, arial, "PingFang SC", "Noto SansCJK", "Microsoft Yahei", sans-serif;
|
font-family: "San Francisco", Rotobo, arial, "PingFang SC", "Noto SansCJK", "Microsoft Yahei", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include edeep(icon) {
|
@include edeep(icon) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $-toast-icon-margin-right;
|
|
||||||
font-size: $-toast-icon-size;
|
font-size: $-toast-icon-size;
|
||||||
|
|
||||||
@include when(vertical) {
|
@include when(vertical) {
|
||||||
margin-right: 0;
|
|
||||||
margin-bottom: $-toast-icon-margin-bottom;
|
margin-bottom: $-toast-icon-margin-bottom;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,6 +65,12 @@
|
|||||||
min-width: $-toast-with-icon-min-width;
|
min-width: $-toast-with-icon-min-width;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@include me(msg) {
|
||||||
|
margin-left: $-toast-msg-margin-left;
|
||||||
|
@include when(vertical) {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@include m(loading) {
|
@include m(loading) {
|
||||||
min-width: auto;
|
min-width: auto;
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
:name="iconClass"
|
:name="iconClass"
|
||||||
></wd-icon>
|
></wd-icon>
|
||||||
<!--文本-->
|
<!--文本-->
|
||||||
<view v-if="msg" class="wd-toast__msg">{{ msg }}</view>
|
<view v-if="msg" :class="`wd-toast__msg ${direction === 'vertical' ? 'is-vertical' : ''}`">{{ msg }}</view>
|
||||||
</view>
|
</view>
|
||||||
</wd-transition>
|
</wd-transition>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,13 +3,13 @@
|
|||||||
<view class="wd-video-preview__video" @click.stop="">
|
<view class="wd-video-preview__video" @click.stop="">
|
||||||
<video
|
<video
|
||||||
class="wd-video-preview__video"
|
class="wd-video-preview__video"
|
||||||
v-if="previdewVideo.url"
|
v-if="previewVideo.url"
|
||||||
:controls="true"
|
:controls="true"
|
||||||
:poster="previdewVideo.poster"
|
:poster="previewVideo.poster"
|
||||||
:title="previdewVideo.title"
|
:title="previewVideo.title"
|
||||||
play-btn-position="center"
|
play-btn-position="center"
|
||||||
:enableNative="true"
|
:enableNative="true"
|
||||||
:src="previdewVideo.url"
|
:src="previewVideo.url"
|
||||||
:enable-progress-gesture="false"
|
:enable-progress-gesture="false"
|
||||||
></video>
|
></video>
|
||||||
</view>
|
</view>
|
||||||
@ -36,13 +36,13 @@ import { useLockScroll } from '../composables/useLockScroll'
|
|||||||
defineProps(videoPreviewProps)
|
defineProps(videoPreviewProps)
|
||||||
|
|
||||||
const showPopup = ref<boolean>(false)
|
const showPopup = ref<boolean>(false)
|
||||||
const previdewVideo = reactive<PreviewVideo>({ url: '', poster: '', title: '' })
|
const previewVideo = reactive<PreviewVideo>({ url: '', poster: '', title: '' })
|
||||||
|
|
||||||
function open(video: PreviewVideo) {
|
function open(video: PreviewVideo) {
|
||||||
showPopup.value = true
|
showPopup.value = true
|
||||||
previdewVideo.url = video.url
|
previewVideo.url = video.url
|
||||||
previdewVideo.poster = video.poster
|
previewVideo.poster = video.poster
|
||||||
previdewVideo.title = video.title
|
previewVideo.title = video.title
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
@ -53,9 +53,9 @@ function close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleClosed() {
|
function handleClosed() {
|
||||||
previdewVideo.url = ''
|
previewVideo.url = ''
|
||||||
previdewVideo.poster = ''
|
previewVideo.poster = ''
|
||||||
previdewVideo.title = ''
|
previewVideo.title = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user