vue2+vantui短视频模板

效果图:
静态模板: 包含评论层, 合集层, 自定义video进度条
他

在这里插入图片描述
在这里插入图片描述
完整代码. 可根据你的业务需求自行调整

<template>
  <div class="container_box" id="video_box">
    <div class="van_swipe">
      <!--vant van-swipe 滑动组件 -->
      <van-swipe
        :show-indicators="false"
        @change="onChange"
        vertical
        :loop="false"
        ref="swipe"
      >
        <van-swipe-item
          v-for="(item, index) in videoList"
          :key="index"
          class="product_swiper"
        >
          <div class="video_container">
            <video
              :ref="`video${index}`"
              controlslist="nodownload nofullscreen noremoteplayback noplaybackrate"
              class="video_box"
              disablePictureInPicture
              controls
              width="100%"
              height="100%"
              webkit-playsinline="true"
              x5-playsinline=""
              x5-video-player-type="h5"
              x5-video-player-fullscreen=""
              playsinline
              preload="auto"
              :poster="item.cover"
              :src="item.url"
              @timeupdate="updateProgressBar(index)"
              :playOrPause="playOrPause"
              x-webkit-airplay="allow"
              x5-video-orientation="portrait"
              @click="pauseVideo"
              @ended="onPlayerEnded($event)"
              loop="loop"
            ></video>
            <!-- 封面 -->
            <!-- <img
              v-show="isVideoShow"
              class="play"
              @click="playvideo"
              :src="item.cover"
            /> -->
            <!-- 播放暂停按钮 -->
            <div
              class="icon_left"
              @click="onBack"
            >
              <img
                src="../../assets/images/left.png"
              />
            </div>
            <div
              v-show="iconPlayShow"
              class="icon_play"
              @click="playvideo"
            >
              <img
                src="../../assets/images/play_icon.png"
              />
            </div>
          </div>
          <!-- 右侧点赞、分享功能 -->
          <div class="tools_right">
            <div class="tools_r_li" @click="changeFollow(item, index)">
              <!-- <i
                class="iconfont icon-yixianshi-"
                :class="item.follow ? 'follow_active' : ''"
              ></i> -->
              <van-icon name="good-job" size="30" />
              <div class="tools_r_num">{{item.loveCount}}w</div>
            </div>
            <div class="tools_r_li" @click="changeShare">
              <van-icon name="star" size="30" />
              <div class="tools_r_num">{{item.shareCount}}w</div>
            </div>
            <div class="tools_r_li" @click="openComments">
              <van-icon name="chat" size="30" />
              <div class="tools_r_num">{{item.shareCount}}w</div>
            </div>
            <div class="tools_r_li" @click="changeShare">
              <van-icon name="add" size="30" />
            </div>
          </div>
          <!-- 底部作品描述 -->
          <div class="production_box">
            <div class="production_name">@{{item.name}}</div>
            <div class="production_des">
              <i
                v-for="(list, index) in item.buyShopList"
                :key="index"
                class="production_des_i"
              >
                {{list.ShopName}}
              </i>
            </div>
          </div>
          <!-- @click="seekTo(index, $event)" -->
          <div class="custom-progress-bar"
          >
            <van-slider v-model="videoProgress[index]" @change="onSliderChange($event, index)" button-size="10" active-color="#fff"/>
          </div>
          <!-- 合集盒子 -->
          <div class="intersection" @click="openIntersPopup">
            <div>
              <div class="left">
                <!-- <van-icon name="video" size="20" color="#999"/> -->
                <img src="../../assets/images/heji.png" alt="">
                <span>勇哥牛牛, 不怕困难</span>
              </div>
              <div class="right">
                <van-icon name="arrow-up" size="18" color="#999"/>
              </div>
            </div>
          </div>
        </van-swipe-item>
      </van-swipe>
      <!--底部操作栏-->
      <!-- <div class="container_bottom"> -->
        <!-- <div
          class="bottom_tab"
          :class="tabIndex == 0 ? 'tab_active' : ''"
          @click="changeTab(0)"
        >
          <span class="bottom_tab_span">首页</span>
        </div>
        <div
          class="bottom_tab"
          :class="tabIndex == 1 ? 'tab_active' : ''"
          @click="changeTab(1)"
        >
          <span class="bottom_tab_span">设置</span>
        </div> -->
      <!-- </div> -->
    </div>
    <van-popup :overlay="false" v-model="showPopupInters" round position="bottom" :style="{ height: '70%', backgroundColor: 'rgba(0, 0, 0, 0.8)' }">
      <div style="position: relative;height: 100%;">
        <div class="popup-inters-content">
          <div class="popup-inters-head">
            <div>
              <img src="../../assets/images/heji.png" alt="">
              <span>勇哥牛牛, 不怕困难</span>
            </div>
            <div>
              <span @click="showPopupInters = false">
                <van-icon color="#fff" name="cross" size="15" />
              </span>
            </div>
          </div>
          <div class="popup-inters-list">
            <div class="list-item">
              <div class="item-img"></div>
              <div class="item-info">
                <div class="title">勇敢阿牛不怕困难1111111111111111</div>
                <div>
                  <span>01:30:28</span>
                  <span style="margin-left: 10px;">
                    <van-icon name="star" size="15" />
                    <span>111</span>
                  </span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </van-popup>
    <van-popup :overlay="false" v-model="showPopup" round position="bottom" :style="{ height: popupHeight + '%' }">
      <div style="position: relative;height: 100%;">
        <div class="popup-content">
          <div class="popup-head">
            <div>
              <span>400条评论</span>
            </div>
            <div>
              <span @click="onCommentfullScreen(!isFullScreen)">
                <van-icon color="#999" name="enlarge" size="15" />
              </span>
              <span @click="showPopup = false">
                <van-icon color="#999" name="cross" size="15" />
              </span>
            </div>
          </div>
          <div class="popup-conment" :style="`maxHeight: ${popupConment}px; overflow: auto`">
            <!-- 循环盒子 -->
            <div>
              <div class="comment-item">
                <div class="head">
                  <img src="../../assets/images/1.jpg" alt="">
                </div>
                <div class="info">
                  <div>wiken</div>
                  <div class="conment-content">你在干啥子哟~哎哟,你干嘛哟,你干嘛哟你干嘛哟你干嘛哟你干嘛哟</div>
                  <div class="date-box">
                    <div>
                      <span>2023-12-11 10:26:31</span>
                      <span style="margin-left: 5px;">回复</span>
                    </div>
                    <div>
                      <van-icon name="good-job" size="18" />
                      <span>2021</span>
                    </div>
                  </div>
                </div>
              </div>
              <!-- <div class="unfold">
                <span>——</span>
                <span>展开35条回复</span>
                <span>
                  <van-icon name="arrow-down" size="15"/>
                </span>
              </div> -->
              <div class="more-comment">
                <div class="comment-item">
                  <div class="head">
                    <img src="../../assets/images/1.jpg" alt="">
                  </div>
                  <div class="info">
                    <div>wiken</div>
                    <div class="conment-content">你在干啥子哟~哎哟,你干嘛哟,你干嘛哟你干嘛哟你干嘛哟你干嘛哟-靓仔</div>
                    <div class="date-box">
                      <div>
                        <span>2023-12-11 10:26:31</span>
                        <span style="margin-left: 5px;">回复</span>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="comment-input" @click="openInputComment">
          <div>欢迎发表您的观点</div>
        </div>
      </div>
    </van-popup>
    <van-popup  v-model="showCommentPopup" round position="bottom" :style="{ height: '15%' }">
      <div class="comment-popup-head">
        <div>
          <span @click="showCommentPopup = false">取消</span>
          <span @click="showCommentPopup = false">发布</span>
        </div>
        <div >
          <van-field v-model="commentValue"  placeholder="请输入内容"  style="background: #eee;"/>
        </div>
      </div>
    </van-popup>
  </div>
</template>
<script>
// import XgPlayer from '@/components/player/xgplayer'
import { Swipe, SwipeItem, Icon, Popup, Field, Slider } from 'vant'
export default {
  components: {
    vanSwipe: Swipe,
    vanSwipeItem: SwipeItem,
    vanIcon: Icon,
    vanPopup: Popup,
    vanField: Field,
    vanSlider: Slider
    // XgPlayer
  },
  name: 'videoChild',
  data () {
    const u = navigator.userAgent
    return {
      showPopupInters: false,
      popupConment: 320,
      dragging: null, // 拖拽时存储当前拖拽的视频索引
      dragOffsetX: 0, // 拖拽时鼠标相对于进度条的偏移量
      popupHeight: 60,
      commentValue: '',
      showPopup: false,
      showCommentPopup: false,
      current: 0,
      videoConfig: { // 当前视频信息
        title: '',
        videoUrl: '', // 播放地址
        lastPlayTime: 0, // 上次播放时间
        isComplete: false // 是否完成
      },
      videoList: [
        {
          url: 'https://video.pearvideo.com/mp4/third/20201114/cont-1707004-15488237-105621-hd.mp4',
          cover: 'https://image-cn2.tvcbook.com/daq/2020/11/12/de65881c-24b0-11eb-84ef-02420a0008fb.png!cover-780-439',
          follow: false,
          loveCount: 28,
          shareCount: 2,
          name: '用jio看世界,发现更多乐趣',
          buyShopList: [
            {
              ShopName: '淘宝',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '天猫',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '拼多多',
              ShopUrl: 'http://taobao.com'
            }
          ]
        },
        {
          url: 'https://video.pearvideo.com/mp4/third/20201117/cont-1707360-15126082-105138-hd.mp4',
          cover: 'https://image-cn2.tvcbook.com/v7/thumbs/17e6bd9a691e4066b94feb8c5e0c2e84-mp4-hd/snapshots/17e6bd9a691e4066b94feb8c5e0c2e84-00053.jpg!cover-780-439',
          follow: false,
          loveCount: 48,
          shareCount: 23,
          name: '三维',
          buyShopList: [
            {
              ShopName: '淘宝',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '天猫',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '苏宁',
              ShopUrl: 'http://taobao.com'
            }
          ]
        },
        {
          url: 'https://video.pearvideo.com/mp4/third/20201111/cont-1706407-15488237-112532-hd.mp4',
          cover: 'https://image-cn2.tvcbook.com/v7/image/2020/11/17/73fdf11d-ea43-4a5c-b864-e8082af3d8c0.JPG!cover-780-439?x-oss-process=image/crop,x_0,y_0,w_1920,h_1080,g_nw',
          follow: false,
          loveCount: 68,
          shareCount: 29,
          name: '世界关节炎日 MoveFree奶奶的约定',
          buyShopList: [
            {
              ShopName: '淘宝',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '天猫',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '苏宁',
              ShopUrl: 'http://taobao.com'
            }
          ]
        },
        {
          url: 'https://video.pearvideo.com/mp4/third/20201124/cont-1708555-15126082-104309-hd.mp4',
          cover: 'https://image-cn2.tvcbook.com/daq/2020/11/17/7c7b0cbc-2893-11eb-9c33-02420a0008fb.png!cover-780-439',
          follow: false,
          loveCount: 168,
          shareCount: 129,
          name: '黑无节,是他们的限定狂欢日',
          buyShopList: [
            {
              ShopName: '淘宝',
              ShopUrl: 'http://taobao.com'
            },
            {
              ShopName: '天猫',
              ShopUrl: 'http://taobao.com'
            }
          ]
        },
        {
          url: 'https://video.pearvideo.com/mp4/third/20201124/cont-1708555-15126082-104309-hd.mp4',
          cover: 'https://image-cn2.tvcbook.com/daq/2020/11/17/d73b7026-287d-11eb-9c33-02420a0008fb.png!cover-780-439',
          follow: false,
          loveCount: 18,
          shareCount: 1,
          name: '懂咖啡,也懂你的小心思',
          buyShopList: [
            {
              ShopName: '淘宝',
              ShopUrl: 'http://taobao.com'
            }
          ]
        }
      ],
      isVideoShow: true,
      playOrPause: true,
      video: null,
      iconPlayShow: true,
      isAndroid: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1,
      isiOS: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
      tabIndex: 0,
      showShareBox: false,
      loveCount: 0,
      isFullScreen: false,
      videoProgress: []
    }
  },
  mounted () {
    this.videoProgress = Array.from({ length: this.videoList.length }, () => 0)
  },
  methods: {
    openIntersPopup () {
      this.showPopupInters = true
    },
    onSliderChange (e, index) {
      const video = this.$refs[`video${index}`][0]
      video.currentTime = (e / 100) * video.duration
    },
    updateProgressBar (index) {
      const video = this.$refs[`video${index}`][0]
      if (video) {
        this.$set(this.videoProgress, index, (video.currentTime / video.duration) * 100)
      }
    },
    seekTo (index, e) {
      const video = this.$refs[`video${index}`][0]
      if (video) {
        const rect = e.target.getBoundingClientRect()
        const x = e.clientX - rect.left
        const percent = (x / rect.width) * 100
        video.currentTime = percent * (video.duration / 100)
        console.log(video.currentTime)
      }
    },
    onCommentfullScreen (is) {
      this.isFullScreen = is
      this.popupHeight = is ? 100 : 60
      this.popupConment = is ? 620 : 320
    },
    openInputComment () {
      this.showCommentPopup = true
    },
    openComments () {
      this.showPopup = true
    },
    onBack () {
      this.$router.back(1)
    },
    // 改变菜单
    changeTab (index) {
      this.tabIndex = index
      if (index === 1) {
        this.$router.push('/about')
      }
    },
    // 改变收藏状态
    changeFollow (item, index) {
      this.videoList[index].follow = !this.videoList[index].follow
    },
    // 展示分享弹窗
    changeShare () {
      this.showShareBox = true
    },
    // 取消分享
    cancelShare () {
      this.showShareBox = false
    },
    // 滑动改变播放的视频
    onChange (index) {
      // 改变的时候 暂停当前播放的视频
      const video = document.querySelectorAll('video')[this.current]
      video.pause()
      this.playOrPause = false
      this.current = index
      if (this.isiOS) {
        // ios切换直接自动播放下一个
        this.isVideoShow = false
        this.pauseVideo()
      } else {
        // 安卓播放时重置显示封面。图标等
        this.isVideoShow = true
        this.iconPlayShow = true
      }
    },
    loveCountRadom (count) {
      const arr = [12, 67, 34, 76.9, 12.9, 24, 1.9, 45, 4.6]
      return arr[count]
    },
    playvideo () {
      const video = document.querySelectorAll('video')[this.current]
      console.log(video.play())
      console.log('playvideo:' + this.current)
      this.isVideoShow = false
      this.iconPlayShow = false
      video.play()
      window.onresize = function () {
        video.style.width = window.innerWidth + 'px'
        video.style.height = window.innerHeight + 'px'
      }
    },
    pauseVideo () {
      // 暂停\播放
      const video = document.querySelectorAll('video')[this.current]
      console.log('pauseVideo' + this.current)
      this.loveCount = this.loveCountRadom(this.current)
      if (this.playOrPause) {
        video.pause()
        this.iconPlayShow = true
      } else {
        video.play()
        this.iconPlayShow = false
      }
      this.playOrPause = !this.playOrPause
    },
    onPlayerEnded () {
      // 视频结束
      this.isVideoShow = true
      this.current++
      this.$refs.swipe.next()
    }
  }
}
</script>
<style scoped lang="less">
.video-player {
  height: 100%;
  width: 100%;
}
.van_swipe {
  width: 100%;
  height: 100%;
}
.van-swipe {
  width: 100%;
  height: 100%;
}
.container_box {
  width: 100%;
  // height: 660px;
  height: 100%;
}
.video_box {
  // object-fit: fill !important;
  // z-index: 999;
  // width: 100% !important;
  // height: 100% !important;
  // position: absolute;
  // left: 0;
  // top: 0;
  // overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
video {
  object-position: 0 0;
}
.icon_play {
  display: flex;
  justify-content: center;
  position: absolute;
  top: 40%;
  right: 0;
  left: 0;
  height: 100px;
  /* bottom: auto; */
  z-index: 999;
  /* background: rgba(0, 0, 0, 0.5); */
  /* border-radius: 50%; */
  > img {
    margin: 0 auto;
  }
}
.play,
.platStart {
  position: absolute;
  margin: auto;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  height: 100%;
}
/* 点赞,转发 */
.tools_right {
  z-index: 1001;
  position: absolute;
  right: 10px;
  bottom: 200px;
}
.tools_r_li {
  margin-bottom: 20px;
  color: #fff;
  font-size: 16px;
}
.tools_r_li:last-child {
  margin-bottom: 0px;
}
.icon_right {
  margin-bottom: 5px;
  font-size: 42px;
  display: block;
  text-shadow: 0px 0px 10px #9d9d9d;
  /*transition: .5s;*/
}
.production_box {
  z-index: 999;
  position: absolute;
  /* right: 16px; */
  bottom: 60px;
  text-align: left;
  padding: 0 15px 15px 15px;
  color: #fff;
  width: 100%;
  left: 0;
  box-sizing: border-box;
  /* background: -webkit-linear-gradient(
    top,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0)
  );
  background: -o-linear-gradient(
    top,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0)
  );
  background: -moz-linear-gradient(
    top,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0)
  );
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.2),
    rgba(0, 0, 0, 0)
  );  */
}
.production_name {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
  color: #fff;
}
.production_des {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  /* min-height: 62px; */
}
.production_des_i {
  font-style: normal;
  font-weight: 700;
  color: #fff;
}
.container_bottom {
  /* position: fixed;
  bottom: 0; */
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  height: 60px;
  /* border-top: 1px solid rgba(255, 255, 255, 0.7); */
}
.production_top {
  display: inline-block;
  padding: 6px;
  margin-bottom: 5px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  margin-top: 5px;
}
.product_go {
  color: #fbdd21;
}
.production_title {
  margin-left: 4px;
}
.bottom_tab {
  width: 50%;
  text-align: center;
  float: left;
  color: #c9c9c9;
  padding: 10px 0;
}
.bottom_tab_span {
  line-height: 30px;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 16px;
  display: inline-block;
  /* padding: 0 4px; */
  transition: 0.5s all;
}
.tab_active .bottom_tab_span {
  border-bottom: 2px solid #fda085;
  color:#fda085;
}
.icon-shoucang {
  transition: 0.5s all;
}
.follow_active {
  color: #fda085;
  animation: showHeart 0.5s ease-in-out 0s;
}
@keyframes showHeart {
  0% {
    color: #f44;
    transform: scale(1);
  }
  25% {
    color: #fff;
    transform: scale(0);
  }
  80% {
    color: #f44;
    transform: scale(1.2);
  }
  100% {
    color: #f44;
    transform: scale(1);
  }
}
/*分享样式*/
.share_hover {
  position: fixed;
  display: none;
}
.share_box {
  position: fixed;
  bottom: -300px;
  width: 100%;
  z-index: 1002;
  background: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  transition: 0.5s;
}
.share_tips {
  text-align: center;
  line-height: 38px;
  color: #333;
}
.share_ul {
  box-sizing: border-box;
  padding: 0 25px 25px;
  border-bottom: 1px solid #e8e8e8;
}
.share_li {
  float: left;
  width: 33%;
  text-align: center;
}
.share_li i {
  font-size: 22px;
}
.share_cancel {
  text-align: center;
  line-height: 48px;
  color: #777;
  text-align: center;
}
.pengyouquan {
  color: #47d000;
}
.pengyouquan_li {
  animation: rotating 8s linear infinite;
}
@keyframes rotating {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}
.tools_r_num  {
  text-align: center;
}
.weixin {
  color: #20ca2e;
}
.lianjie {
  color: #cdcdcd;
}
.share_active {
  bottom: 0px;
}
video::-webkit-media-controls-fullscreen-button {
    display: none;
}
/* //播放按钮 */
video::-webkit-media-controls-play-button {
    display: none;
}
//进度条
video::-webkit-media-controls-timeline {
    display: none;
    // display: inline-block;
    // position: absolute;
    // bottom: -100px;
}
/* //观看的当前时间 */
video::-webkit-media-controls-current-time-display{
    display: none;
}
/* //剩余时间 */
video::-webkit-media-controls-time-remaining-display {
    display: none;
}
/* //音量按钮 */
video::-webkit-media-controls-mute-button {
    display: none;
}
video::-webkit-media-controls-toggle-closed-captions-button {
    display: none;
}
/* //音量的控制条 */
video::-webkit-media-controls-volume-slider {
    display: none;
}
/* 确保视频进度条始终可见 */
video::-webkit-media-controls-timeline {
  display: inline-box;
}
video::-moz-media-controls-timeline {
  display: inline-box;
}
.icon_left {
  position: absolute;
  top: 30px;
  right: 0;
  left: 20px;
  /* bottom: auto; */
  z-index: 999;
  /* background: rgba(0, 0, 0, 0.5); */
  /* border-radius: 50%; */
  > img {
    width: 35px;
    height: 35px;
  }
}
.popup-inters-content {
  padding: 10px;
  >.popup-inters-head {
    display: flex;
    height: 30px;
    justify-content: space-between;
    > :nth-child(1) {
      width: 80%;
      line-height: 30px;
      color: #999;
      margin-left: 20px;
      font-weight: bold;
      > span {
        display: inline-block;
        margin-left: 5px;
      }
      > img {
        width: 20px;
        height: 20px;
        transform: translateY(5px);
      }
    }
    >:nth-child(2) {
      width: 20%;
      display: flex;
      justify-content: end;
      > span {
        display: inline-block;
        width: 30px;
        background: #444;
        border-radius: 50%;
        text-align: center;
        line-height: 30px;
      }
    }
  }
  > .popup-inters-list {
    max-height: 450px;
    overflow: auto;
    padding: 0 20px;
    > .list-item {
      display: flex;
      margin-top: 20px;
      color: #999;
      >.item-img {
        width: 140px;
        border-radius: 5px;
        overflow: hidden;
        height: 90px;
        background: url(../../assets/images/1.jpg) no-repeat;
        background-size: 100% 100%;
      }
      >.item-info {
        >.title {
          width: 150px;
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-left: 15px;
      }
    }
  }
}
.popup-content {
  padding: 10px;
  >.popup-head {
    display: flex;
    height: 30px;
    >:nth-child(1) {
      width: 80%;
      line-height: 30px;
      text-align: center;
      > span {
        margin-left: 50px;
        letter-spacing: 1px;
        font-weight: bold;
        font-size: 15px;
      }
    }
    >:nth-child(2) {
      width: 20%;
      display: flex;
      justify-content: space-between;
      > span {
        display: inline-block;
        width: 30px;
        background: #eee;
        border-radius: 50%;
        text-align: center;
        line-height: 30px;
      }
    }
  }
}
.more-comment {
  margin-left: 40px;
  >.comment-item {
    width: 100%;
    margin-top: 10px;
    display: flex;
    > .head{
      width: 20px;
      height: 20px;
      border-radius: 50%;
      overflow: hidden;
      > img {
        width: 100%;
        height: 100%;
      }
    }
    >.info {
      margin-left: 5px;
      > :not(:nth-child(1)) {
        margin-top: 5px;
      }
      > .conment-content {
        max-width: 300px;
        word-break: break-all;
        // color: #999;
      }
      > .date-box {
        display: flex;
        justify-content: space-between;
        color: #999;
      }
    }
  }
}
.popup-conment {
  > div {
    > .comment-item {
    width: 100%;
    margin-top: 10px;
    display: flex;
    > .head{
      width: 40px;
      height: 40px;
      border-radius: 50%;
      overflow: hidden;
      > img {
        width: 100%;
        height: 100%;
      }
    }
    >.info {
      margin-left: 5px;
      > :not(:nth-child(1)) {
        margin-top: 5px;
      }
      > .conment-content {
        max-width: 300px;
        word-break: break-all;
        // color: #999;
      }
      > .date-box {
        min-width: 300px;
        display: flex;
        justify-content: space-between;
        color: #999;
      }
    }
    }
  }
}
.unfold {
  margin-left: 40px;
  margin-top: 20px;
  color: #999;
  > span {
    display: inline-block;
  }
  >:nth-child(2) {
    margin: 0 5px;
  }
}
.comment-input {
  height: 50px;
  width: 100%;
  border-top: 1px solid  #eee;
  border-bottom: 1px solid  #eee;
  position: absolute;
  bottom: 10px;
  padding: 5px 15px;
  > div {
    background: #eee;
    color: #999;
    height: 100%;
    line-height: 36px;
    border-radius: 30px;
    font-size: 16px;
    padding-left: 15px;
  }
}
.comment-popup-head {
  padding: 12px;
  > :nth-child(1) {
    display: flex;
    justify-content: space-between;
  }
  >:nth-child(2) {
    margin-top: 10px;
  }
}
.product_swiper {
  background: #000;
  display: flex;
  align-items: center
}
.custom-progress-bar {
  position: absolute;
  bottom: 50px;
  width: 100%;
  height: 5px; /* 或者你想要的高度 */
  background-color: #333;
  border-radius: 2px;
}
.custom-progress {
  height: 100%;
  background-color: #fff;
  cursor: pointer; /* 添加鼠标指针,表示可点击 */
}
.custom-progress-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background-color: #fff;
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  cursor: pointer;
}
.intersection {
  width: 100%;
  padding: 0 20px;
  position: absolute;
  bottom: 10px;
  z-index: 9999;
  > :nth-child(1) {
    background: #333;
    width: 100%;
    height: 30px;
    border-radius: 10px;
    line-height: 30px;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    > .left {
      > img {
        width: 20px;
        height: 20px;
        transform: translateY(5px);
      }
      > span {
        // display: inline-block;
        color: #999;
        font-weight: bold;
        margin-left: 5px;
      }
    }
  }
}
</style>

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值