|
@@ -1,20 +1,208 @@
|
|
|
<template>
|
|
|
- <div class="popup">
|
|
|
- <el-button type="primary" data-root="true" class="root222" @click="handleClick"
|
|
|
- >快来点我~~</el-button
|
|
|
- >
|
|
|
- <div>{{ counter }}</div>
|
|
|
+ <div class="zt-popup">
|
|
|
+ <div class="zt-content__header">
|
|
|
+ <div class="zt-content__title">
|
|
|
+ <img src="../assets/logo.png" />
|
|
|
+ <span>灵感库{{ version }}</span>
|
|
|
+ </div>
|
|
|
+ <el-button type="primary" @click="handleClick" link size="small">
|
|
|
+ 进入灵感库
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-tabs v-model="activeTab" class="zt-tabs" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="收集中" name="collect"></el-tab-pane>
|
|
|
+ <el-tab-pane label="收集失败" name="fail"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已完成" name="success"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <ul
|
|
|
+ v-infinite-scroll="loadMore"
|
|
|
+ class="zt-materia__list"
|
|
|
+ style="overflow: auto"
|
|
|
+ >
|
|
|
+ <li
|
|
|
+ v-for="item in dataList"
|
|
|
+ :key="item.id"
|
|
|
+ class="zt-materia__list-item"
|
|
|
+ >
|
|
|
+ <p class="zt-materia__title">{{ item.title }}</p>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ bg
|
|
|
+ @click="goLink(item.url)"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ {{ item.url }}
|
|
|
+ </el-button>
|
|
|
+ <div class="zt-materia__status">
|
|
|
+ <div class="zt-materia__left">
|
|
|
+ <template v-if="item.status == 'fail'">
|
|
|
+ <img src="../assets/img/error.png" />
|
|
|
+ <span
|
|
|
+ class="zt-materia__status-text"
|
|
|
+ :class="{ 'is-error': item.status == 'fail' }"
|
|
|
+ >采集错误</span
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-else-if="item.status == 'success'">
|
|
|
+ <img src="../assets/img/success.png" />
|
|
|
+ <span class="zt-materia__status-text">采集成功 </span>
|
|
|
+ </template>
|
|
|
+ <template v-esle>
|
|
|
+ <img src="../assets/img/wating.png" />
|
|
|
+ <span class="zt-materia__status-text"> 采集等待~ </span>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ <div class="zt-materia__right" v-if="item.status == 'fail'">
|
|
|
+ <img src="../assets/img/reload.png" />
|
|
|
+ 重试
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="zt-empty">
|
|
|
+ <el-empty :image-size="40" description="暂无数据" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref } from 'vue'
|
|
|
-const counter = ref(10086)
|
|
|
+import { ref } from "vue";
|
|
|
+
|
|
|
+const activeTab = ref("fail");
|
|
|
+const version = require("../../package.json").version;
|
|
|
+
|
|
|
+//
|
|
|
+const dataList = ref([
|
|
|
+ {
|
|
|
+ title: "灵感1-抖音1008232抖音1008232抖音1008232抖音1008232",
|
|
|
+ url: "http://www.baidu.com",
|
|
|
+ status: "fail",
|
|
|
+ id: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "灵感2",
|
|
|
+ url: "http://www.baidu.com",
|
|
|
+ status: "fail",
|
|
|
+ id: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "灵感3",
|
|
|
+ url: "http://www.baidu.com",
|
|
|
+ status: "fail",
|
|
|
+ id: 3,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "灵感4",
|
|
|
+ url: "http://www.douyin.com",
|
|
|
+ status: "success",
|
|
|
+ id: 4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "灵感5",
|
|
|
+ url: "http://www.bilibili.com",
|
|
|
+ status: "success",
|
|
|
+ id: 5,
|
|
|
+ },
|
|
|
+]);
|
|
|
+
|
|
|
+const handleClick = () => {
|
|
|
+ console.log("2222");
|
|
|
+};
|
|
|
+
|
|
|
+const goLink = (url) => {
|
|
|
+ window.open(url, "_blank");
|
|
|
+};
|
|
|
+
|
|
|
+//加在更多
|
|
|
+const loadMore = () => {};
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-.root222 {
|
|
|
- font-size: 20px;
|
|
|
+<style scoped lang="less">
|
|
|
+.zt-popup {
|
|
|
+ padding: 10px 12px;
|
|
|
+ width: 350px;
|
|
|
+ .zt-content__header {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ .zt-content__title {
|
|
|
+ display: inline-flex;
|
|
|
+ flex: 1;
|
|
|
+ align-items: center;
|
|
|
+ > img {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+ > span {
|
|
|
+ margin-left: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .zt-tabs {
|
|
|
+ margin-top: 10px;
|
|
|
+ .el-tabs__header .el-tabs__item:nth-child(2) {
|
|
|
+ padding-left: 15px;
|
|
|
+ }
|
|
|
+ .el-tabs__header {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.zt-materia {
|
|
|
+ &__list {
|
|
|
+ .zt-materia__list-item {
|
|
|
+ background: #e6e6fa;
|
|
|
+ padding: 7px 9px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ border-radius: 4px;
|
|
|
+ .zt-materia__title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 13px;
|
|
|
+ margin-bottom: 2px;
|
|
|
+ }
|
|
|
+ .zt-materia__status {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 3px;
|
|
|
+ .zt-materia__left,
|
|
|
+ .zt-materia__right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
+
|
|
|
+ img {
|
|
|
+ width: 13px;
|
|
|
+ height: 13px;
|
|
|
+ margin-right: 4px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .zt-materia__status-text {
|
|
|
+ color: #409eff;
|
|
|
+ }
|
|
|
|
|
|
+ .is-error {
|
|
|
+ color: #fd555d;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ > p {
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ &:last-child {
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|