chore: hide export range selector
This commit is contained in:
parent
75294ca8c7
commit
703a095c08
@ -3561,6 +3561,7 @@
|
||||
applyToolbarRootStyles(root);
|
||||
const exportRangeSelect = document2.createElement("select");
|
||||
exportRangeSelect.dataset.pluginExportRange = "select";
|
||||
exportRangeSelect.hidden = true;
|
||||
appendOption(exportRangeSelect, "current", "\u5F53\u524D\u9875");
|
||||
appendOption(exportRangeSelect, "first-5", "\u524D5\u9875");
|
||||
appendOption(exportRangeSelect, "first-10", "\u524D10\u9875");
|
||||
@ -3765,7 +3766,8 @@
|
||||
toolbar.exportStatusText.textContent = text;
|
||||
}
|
||||
function syncCustomPagesInputVisibility(toolbar) {
|
||||
toolbar.exportCustomPagesInput.hidden = toolbar.exportRangeSelect.value !== "custom";
|
||||
toolbar.exportRangeSelect.hidden = true;
|
||||
toolbar.exportCustomPagesInput.hidden = true;
|
||||
}
|
||||
function ensureToolbarMounted(root, document2) {
|
||||
const actionRow = findNativeActionRow(document2);
|
||||
|
||||
@ -190,7 +190,6 @@ https://xingtu.cn/ad/creator/market
|
||||
|
||||
在星图页面中,插件会新增一组自己的操作区,常见元素包括:
|
||||
|
||||
- 导出范围下拉框
|
||||
- `导出选中达人数据` 按钮
|
||||
- `提交批次` 按钮
|
||||
- 状态提示文字
|
||||
@ -216,7 +215,7 @@ https://xingtu.cn/ad/creator/market
|
||||
|
||||
- 如果你勾选了达人,再点击导出或提交,系统会优先处理你勾选的这些达人
|
||||
- 导出达人数据必须先勾选达人
|
||||
- 提交批次时,如果你没有勾选任何达人,则默认按当前导出范围处理全部达人
|
||||
- 提交批次时,如果你没有勾选任何达人,则默认处理当前列表范围内的达人
|
||||
|
||||
---
|
||||
|
||||
@ -233,19 +232,7 @@ https://xingtu.cn/ad/creator/market
|
||||
- 导出达人数据会额外读取达人详情页数据
|
||||
- 为了避免请求太多,只处理你勾选的达人
|
||||
|
||||
### 2. 选择导出范围
|
||||
|
||||
在插件工具栏中,你会看到导出范围下拉框,可选:
|
||||
|
||||
- `当前页`
|
||||
- `前5页`
|
||||
- `前10页`
|
||||
- `全部`
|
||||
- `自定义`
|
||||
|
||||
如果选择 `自定义`,需要再输入页数。
|
||||
|
||||
### 3. 可选:选择需要导出的字段
|
||||
### 2. 可选:选择需要导出的字段
|
||||
|
||||
如果只想导出一部分字段,点击:
|
||||
|
||||
@ -266,7 +253,7 @@ https://xingtu.cn/ad/creator/market
|
||||
|
||||
保存后,下次再导出 CSV,会自动沿用这次勾选结果,不需要重新勾选。
|
||||
|
||||
### 4. 点击导出
|
||||
### 3. 点击导出
|
||||
|
||||
点击:
|
||||
|
||||
@ -278,7 +265,7 @@ https://xingtu.cn/ad/creator/market
|
||||
|
||||
然后把达人 ID 粘贴进去,每行一个。
|
||||
|
||||
### 5. 导出内容
|
||||
### 4. 导出内容
|
||||
|
||||
CSV 会包含:
|
||||
|
||||
@ -287,7 +274,7 @@ CSV 会包含:
|
||||
- 画像
|
||||
- 秒思 api 数据
|
||||
|
||||
### 6. 等待导出完成
|
||||
### 5. 等待导出完成
|
||||
|
||||
页面上会显示状态,例如:
|
||||
|
||||
@ -308,27 +295,17 @@ CSV 会包含:
|
||||
|
||||
## 十一、提交批次的方法
|
||||
|
||||
### 1. 选择范围
|
||||
|
||||
和导出一样,先选择导出范围:
|
||||
|
||||
- 当前页
|
||||
- 前5页
|
||||
- 前10页
|
||||
- 全部
|
||||
- 自定义
|
||||
|
||||
### 2. 如果只想提交部分达人
|
||||
### 1. 如果只想提交部分达人
|
||||
|
||||
先勾选想提交的达人。
|
||||
|
||||
### 3. 点击提交
|
||||
### 2. 点击提交
|
||||
|
||||
点击:
|
||||
|
||||
- `提交批次`
|
||||
|
||||
### 4. 输入批次名称
|
||||
### 3. 输入批次名称
|
||||
|
||||
这时会弹出一个自定义输入框,不再是浏览器原生弹窗。
|
||||
|
||||
@ -345,7 +322,7 @@ CSV 会包含:
|
||||
- `食品饮料-KOL测试批次`
|
||||
- `5月女装达人候选`
|
||||
|
||||
### 5. 确认提交
|
||||
### 4. 确认提交
|
||||
|
||||
输入后点击:
|
||||
|
||||
@ -353,7 +330,7 @@ CSV 会包含:
|
||||
|
||||
也可以直接按回车提交。
|
||||
|
||||
### 6. 提交成功的提示
|
||||
### 5. 提交成功的提示
|
||||
|
||||
如果成功,页面状态会显示:
|
||||
|
||||
@ -507,7 +484,7 @@ CSV 会包含:
|
||||
3. 点击插件图标确认登录状态
|
||||
4. 打开星图达人市场页
|
||||
5. 等待页面数据加载完成
|
||||
6. 先勾选需要的人,或直接选择范围
|
||||
6. 先勾选需要的人
|
||||
7. 需要表格时点 `导出选中达人数据`
|
||||
8. 需要进入后续流程时点 `提交批次`
|
||||
|
||||
|
||||
@ -77,7 +77,6 @@ https://xingtu.cn/ad/creator/market
|
||||
当你需要导出达人的内容数据、效果预估、画像时使用:
|
||||
|
||||
- 先勾选你想导出数据的达人
|
||||
- 选择范围:当前页 / 前5页 / 全部
|
||||
- 点击 **"导出选中达人数据"**
|
||||
- 等待下载完成
|
||||
- 文件自动下载到电脑的"下载"文件夹
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -61,6 +61,7 @@ export function ensurePluginToolbar(
|
||||
|
||||
const exportRangeSelect = document.createElement("select");
|
||||
exportRangeSelect.dataset.pluginExportRange = "select";
|
||||
exportRangeSelect.hidden = true;
|
||||
appendOption(exportRangeSelect, "current", "当前页");
|
||||
appendOption(exportRangeSelect, "first-5", "前5页");
|
||||
appendOption(exportRangeSelect, "first-10", "前10页");
|
||||
@ -304,8 +305,8 @@ export function setToolbarExportStatus(
|
||||
}
|
||||
|
||||
function syncCustomPagesInputVisibility(toolbar: PluginToolbarDom): void {
|
||||
toolbar.exportCustomPagesInput.hidden =
|
||||
toolbar.exportRangeSelect.value !== "custom";
|
||||
toolbar.exportRangeSelect.hidden = true;
|
||||
toolbar.exportCustomPagesInput.hidden = true;
|
||||
}
|
||||
|
||||
function ensureToolbarMounted(root: HTMLElement, document: Document): void {
|
||||
|
||||
@ -324,7 +324,17 @@ describe("market-content-entry", () => {
|
||||
expect(document.querySelector('[data-plugin-sort-field="select"]')).toBeNull();
|
||||
|
||||
expect(document.body.firstElementChild).not.toBe(toolbar);
|
||||
expect(document.querySelector('[data-plugin-export-range="select"]')).not.toBeNull();
|
||||
expect(
|
||||
(document.querySelector('[data-plugin-export-range="select"]') as HTMLSelectElement | null)
|
||||
?.hidden
|
||||
).toBe(true);
|
||||
expect(
|
||||
(
|
||||
document.querySelector(
|
||||
'[data-plugin-export-custom-pages="input"]'
|
||||
) as HTMLInputElement | null
|
||||
)?.hidden
|
||||
).toBe(true);
|
||||
expect(
|
||||
(document.querySelector('[data-plugin-export="button"]') as HTMLButtonElement | null)
|
||||
?.hidden
|
||||
@ -1123,7 +1133,7 @@ describe("market-content-entry", () => {
|
||||
expect(readDivAuthorOrder()).toEqual(["达人 B", "达人 A"]);
|
||||
});
|
||||
|
||||
test("toolbar defaults export range to the first 5 pages and reveals custom input on demand", async () => {
|
||||
test("toolbar keeps export range controls hidden while retaining the internal default range", async () => {
|
||||
document.body.innerHTML = buildMarketFixture();
|
||||
|
||||
const { createMarketController } = await import("../src/content/market/index");
|
||||
@ -1146,6 +1156,7 @@ describe("market-content-entry", () => {
|
||||
) as HTMLInputElement | null;
|
||||
|
||||
expect(exportRangeSelect?.value).toBe("first-5");
|
||||
expect(exportRangeSelect?.hidden).toBe(true);
|
||||
expect(customPagesInput?.hidden).toBe(true);
|
||||
expect(
|
||||
document.querySelector('[data-plugin-batch-submit="button"]')
|
||||
@ -1154,7 +1165,8 @@ describe("market-content-entry", () => {
|
||||
setSelectValue('[data-plugin-export-range="select"]', "custom");
|
||||
dispatchChange('[data-plugin-export-range="select"]');
|
||||
|
||||
expect(customPagesInput?.hidden).toBe(false);
|
||||
expect(exportRangeSelect?.hidden).toBe(true);
|
||||
expect(customPagesInput?.hidden).toBe(true);
|
||||
});
|
||||
|
||||
test("export uses the current page ordering without triggering a full scan", async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user