Merge branch 'master' of https://gitee.com/TeaCodeNice/crawler-plugin
This commit is contained in:
@@ -719,3 +719,15 @@ Traceback (most recent call last):
|
|||||||
value = func(*args, **kwargs)
|
value = func(*args, **kwargs)
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
TypeError: WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
TypeError: WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
||||||
|
[pywebview] WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "C:\Users\杨杰\AppData\Local\Programs\Python\Python312\Lib\site-packages\webview\event.py", line 45, in execute
|
||||||
|
value = func(*args, **kwargs)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
TypeError: WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
||||||
|
[pywebview] WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "C:\Users\杨杰\AppData\Local\Programs\Python\Python312\Lib\site-packages\webview\event.py", line 45, in execute
|
||||||
|
value = func(*args, **kwargs)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
TypeError: WindowAPI.__init__.<locals>.<lambda>() missing 1 required positional argument: '_'
|
||||||
|
|||||||
@@ -56,47 +56,96 @@
|
|||||||
background: #2a2a2a;
|
background: #2a2a2a;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 顶部栏目导航(容器化,便于后续增加栏目) */
|
|
||||||
.nav-tabs {
|
.nav-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0;
|
gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab-group {
|
.nav-tab-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 12px;
|
||||||
background: rgba(77, 72, 72, 0.99);
|
}
|
||||||
|
|
||||||
|
.nav-dropdown {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-trigger {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 112px;
|
||||||
|
height: 38px;
|
||||||
|
padding: 0 16px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
border: 1px solid transparent;
|
||||||
|
|
||||||
.nav-tab-sep {
|
|
||||||
width: 1px;
|
|
||||||
height: 20px;
|
|
||||||
background: linear-gradient(to bottom, transparent, #444 15%, #444 85%, transparent);
|
|
||||||
margin: 0 10px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-tab {
|
|
||||||
padding: 8px 14px;
|
|
||||||
font-size: 13px;
|
|
||||||
color: #999;
|
color: #999;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
font-size: 13px;
|
||||||
border-radius: 6px;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab:hover {
|
.nav-dropdown:hover .nav-dropdown-trigger,
|
||||||
|
.nav-dropdown.active .nav-dropdown-trigger {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #2a2a2a;
|
background: #2a2a2a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab.active {
|
.nav-dropdown.active .nav-dropdown-trigger {
|
||||||
|
color: #3498db;
|
||||||
|
background: rgba(52, 152, 219, 0.2);
|
||||||
|
border-color: rgba(52, 152, 219, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-arrow {
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 8px);
|
||||||
|
left: 0;
|
||||||
|
min-width: 220px;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid #2a2a2a;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #171717;
|
||||||
|
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
|
||||||
|
display: none;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown:hover .nav-dropdown-menu {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 38px;
|
||||||
|
padding: 0 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #b8b8b8;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item:hover {
|
||||||
|
color: #fff;
|
||||||
|
background: #2a2a2a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item.active {
|
||||||
color: #3498db;
|
color: #3498db;
|
||||||
background: rgba(52, 152, 219, 0.2);
|
background: rgba(52, 152, 219, 0.2);
|
||||||
}
|
}
|
||||||
@@ -597,16 +646,29 @@
|
|||||||
<a href="/home" class="btn-home">返回首页</a>
|
<a href="/home" class="btn-home">返回首页</a>
|
||||||
</div>
|
</div>
|
||||||
<nav class="nav-tabs">
|
<nav class="nav-tabs">
|
||||||
<span class="nav-tab-group">
|
<div class="nav-tab-group">
|
||||||
<button type="button" class="nav-tab active" data-panel="brandCheck">品牌检测</button>
|
<div class="nav-dropdown active">
|
||||||
<button type="button" class="nav-tab"
|
<button type="button" class="nav-dropdown-trigger">
|
||||||
onclick="window.location='/new_web_source/dedupe.html'">总数据去重</button>
|
<span>前端工具</span>
|
||||||
<button type="button" class="nav-tab"
|
<span class="nav-dropdown-arrow">▾</span>
|
||||||
onclick="window.location='/new_web_source/convert.html'">格式转换</button>
|
</button>
|
||||||
<button type="button" class="nav-tab"
|
<div class="nav-dropdown-menu">
|
||||||
onclick="window.location='/new_web_source/split.html'">表格拆分</button>
|
<button type="button" class="nav-dropdown-item active" data-panel="brandCheck">品牌检测</button>
|
||||||
</span>
|
<a class="nav-dropdown-item" href="/new_web_source/dedupe.html">数据去重</a>
|
||||||
<!-- 多组栏目时可用分隔符:<span class="nav-tab-sep" aria-hidden="true"></span> -->
|
<a class="nav-dropdown-item" href="/new_web_source/split.html">数据拆分</a>
|
||||||
|
<a class="nav-dropdown-item" href="/new_web_source/convert.html">格式转换</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="nav-dropdown">
|
||||||
|
<button type="button" class="nav-dropdown-trigger">
|
||||||
|
<span>运营工具</span>
|
||||||
|
<span class="nav-dropdown-arrow">▾</span>
|
||||||
|
</button>
|
||||||
|
<div class="nav-dropdown-menu">
|
||||||
|
<a class="nav-dropdown-item" href="/new_web_source/delete-brand.html">删除指定ASIN和品牌</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="top-right"></div>
|
<div class="top-right"></div>
|
||||||
</header>
|
</header>
|
||||||
@@ -739,12 +801,12 @@
|
|||||||
var cachedTasks = [];
|
var cachedTasks = [];
|
||||||
var api = window.pywebview && window.pywebview.api;
|
var api = window.pywebview && window.pywebview.api;
|
||||||
|
|
||||||
// 顶部栏目切换:点击 nav-tab 时显示对应 data-panel 的 tab-panel
|
// 顶部栏目切换:点击当前页菜单项时显示对应 data-panel 的 tab-panel
|
||||||
document.querySelectorAll('.nav-tab').forEach(function (tab) {
|
document.querySelectorAll('.nav-dropdown-item[data-panel]').forEach(function (tab) {
|
||||||
tab.addEventListener('click', function () {
|
tab.addEventListener('click', function () {
|
||||||
var panelId = this.getAttribute('data-panel');
|
var panelId = this.getAttribute('data-panel');
|
||||||
if (!panelId) return;
|
if (!panelId) return;
|
||||||
document.querySelectorAll('.nav-tab').forEach(function (t) { t.classList.remove('active'); });
|
document.querySelectorAll('.nav-dropdown-item[data-panel]').forEach(function (t) { t.classList.remove('active'); });
|
||||||
document.querySelectorAll('.tab-panel').forEach(function (p) {
|
document.querySelectorAll('.tab-panel').forEach(function (p) {
|
||||||
p.classList.toggle('active', p.getAttribute('data-panel') === panelId);
|
p.classList.toggle('active', p.getAttribute('data-panel') === panelId);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,12 +6,30 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="nav-tabs">
|
<nav class="nav-tabs">
|
||||||
<span class="nav-tab-group">
|
<div class="nav-tab-group">
|
||||||
<a v-for="item in navItems" :key="item.key" :href="item.href" class="nav-tab"
|
<div
|
||||||
:class="{ active: active === item.key }">
|
v-for="group in navGroups"
|
||||||
{{ item.label }}
|
:key="group.label"
|
||||||
</a>
|
class="nav-dropdown"
|
||||||
</span>
|
:class="{ active: group.items.some(item => item.key === active) }"
|
||||||
|
>
|
||||||
|
<button type="button" class="nav-dropdown-trigger">
|
||||||
|
<span>{{ group.label }}</span>
|
||||||
|
<span class="nav-dropdown-arrow">▾</span>
|
||||||
|
</button>
|
||||||
|
<div class="nav-dropdown-menu">
|
||||||
|
<a
|
||||||
|
v-for="item in group.items"
|
||||||
|
:key="item.key"
|
||||||
|
:href="item.href"
|
||||||
|
class="nav-dropdown-item"
|
||||||
|
:class="{ active: active === item.key }"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="top-right"></div>
|
<div class="top-right"></div>
|
||||||
@@ -25,12 +43,22 @@ const props = defineProps<{
|
|||||||
|
|
||||||
const active = props.active
|
const active = props.active
|
||||||
|
|
||||||
const navItems = [
|
const navGroups = [
|
||||||
{ key: 'brand', label: '品牌检测', href: '/brand' },
|
{
|
||||||
{ key: 'dedupe', label: '数据去重', href: '/new_web_source/dedupe.html' },
|
label: '前端工具',
|
||||||
{ key: 'split', label: '数据拆分', href: '/new_web_source/split.html' },
|
items: [
|
||||||
{ key: 'convert', label: '格式转换', href: '/new_web_source/convert.html' },
|
{ key: 'brand', label: '品牌检测', href: '/brand' },
|
||||||
{ key: 'delete-brand', label: '删除品牌', href: '/new_web_source/delete-brand.html' },
|
{ key: 'dedupe', label: '数据去重', href: '/new_web_source/dedupe.html' },
|
||||||
|
{ key: 'split', label: '数据拆分', href: '/new_web_source/split.html' },
|
||||||
|
{ key: 'convert', label: '格式转换', href: '/new_web_source/convert.html' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '运营工具',
|
||||||
|
items: [
|
||||||
|
{ key: 'delete-brand', label: '删除指定ASIN和品牌', href: '/new_web_source/delete-brand.html' },
|
||||||
|
],
|
||||||
|
},
|
||||||
] as const
|
] as const
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -86,11 +114,16 @@ const navItems = [
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab {
|
.nav-dropdown {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-trigger {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 92px;
|
gap: 8px;
|
||||||
|
min-width: 112px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
@@ -99,21 +132,70 @@ const navItems = [
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-decoration: none;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab:hover {
|
.nav-dropdown:hover .nav-dropdown-trigger,
|
||||||
|
.nav-dropdown.active .nav-dropdown-trigger {
|
||||||
color: #b9d6ff;
|
color: #b9d6ff;
|
||||||
background: rgba(77, 126, 189, 0.14);
|
background: rgba(77, 126, 189, 0.14);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-tab.active {
|
.nav-dropdown.active .nav-dropdown-trigger {
|
||||||
background: rgba(77, 126, 189, 0.24);
|
background: rgba(77, 126, 189, 0.24);
|
||||||
border-color: rgba(91, 148, 219, 0.35);
|
border-color: rgba(91, 148, 219, 0.35);
|
||||||
color: #6caeff;
|
color: #6caeff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-arrow {
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 8px);
|
||||||
|
left: 0;
|
||||||
|
min-width: 220px;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid #2a2a2a;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #171717;
|
||||||
|
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
|
||||||
|
display: none;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown:hover .nav-dropdown-menu {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 38px;
|
||||||
|
padding: 0 12px;
|
||||||
|
border-radius: 8px;
|
||||||
|
color: #b8b8b8;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item:hover {
|
||||||
|
color: #e8f2ff;
|
||||||
|
background: rgba(77, 126, 189, 0.14);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-item.active {
|
||||||
|
color: #6caeff;
|
||||||
|
background: rgba(77, 126, 189, 0.24);
|
||||||
|
}
|
||||||
|
|
||||||
.top-right {
|
.top-right {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -132,6 +214,16 @@ const navItems = [
|
|||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tab-group {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-dropdown-menu {
|
||||||
|
left: 0;
|
||||||
|
right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.top-right {
|
.top-right {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user