feat: 视图选项改为右侧fixed弹窗(对齐+弹窗) 不再下方内联展开
This commit is contained in:
@@ -943,8 +943,9 @@ function WorktableSection(props: any) {
|
||||
</>
|
||||
)}
|
||||
|
||||
{viewOptionsOpen && <div className="dsh-wt_popBackdrop" onClick={() => setViewOptionsOpen(false)} />}
|
||||
{viewOptionsOpen && (
|
||||
<div className="dsh-wt_menu">
|
||||
<div className="dsh-wt_menu dsh-wt_pop" style={{ position: 'fixed', left: popLeft, top: popTop, width: 200, zIndex: 80 }}>
|
||||
<span className="dsh-wt_menuLabel">{t('sort.label')}</span>
|
||||
<button type="button" className="dsh-wt_menuItem" data-on={view.orderBy === 'manual'}
|
||||
onClick={() => { persistView({ orderBy: 'manual' }); setViewOptionsOpen(false) }}>{t('sort.manual')}</button>
|
||||
|
||||
@@ -538,3 +538,10 @@
|
||||
- 用户反馈:头部 3 按钮间距比官方小,左侧拖动抓手偏小。
|
||||
- 处理:.dsh-wt_actions gap 2px → 7px;.dsh-wt_handle 22×22/13px → 25×25/15px。
|
||||
- 验证:functional-diag 全 STEP 回归 PASS,ERRORS_COUNT: 0(纯 CSS 改动,F5 生效)。
|
||||
## 补记(视图选项改右侧弹窗)
|
||||
|
||||
- 用户反馈:视图选项(排序/管理菜单)不要下方内联展开,要和 + 新建一样从右侧弹出。
|
||||
- 处理:viewOptionsOpen 复用 popLeft/popTop(锚定侧栏右缘 + 区块顶部),
|
||||
dsh-wt_menu dsh-wt_pop fixed 定位 width 200 + 透明遮罩点击关闭;与 + 弹窗互斥不变。
|
||||
- 验证:functional-diag STEP8 menuPos=fixed、menuLeft=288(侧栏右缘+8)、
|
||||
遮罩点击关闭 PASS;全 STEP 回归 ERROR_COUNT: 0。纯客户端改动,F5 生效。
|
||||
|
||||
@@ -150,6 +150,23 @@ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||
})()`);
|
||||
console.log('STEP7:', JSON.stringify(step7));
|
||||
|
||||
// 视图选项:右侧 fixed 弹窗(对齐 + 弹窗),不再下方内联展开
|
||||
const step8 = await evaluate(`(async function(){
|
||||
var out={};
|
||||
var btn=document.querySelector('.dsh-wt_actions .dsh-wt_iconBtn:nth-child(2)');
|
||||
if(btn){ btn.click(); }
|
||||
await new Promise(function(r){setTimeout(r,250)});
|
||||
var menu=document.querySelector('.dsh-wt_menu.dsh-wt_pop');
|
||||
if(menu){ var cs=getComputedStyle(menu); out.menuPos=cs.position; out.menuLeft=menu.getBoundingClientRect().left; }
|
||||
out.backdrop=!!document.querySelector('.dsh-wt_popBackdrop');
|
||||
var bd=document.querySelector('.dsh-wt_popBackdrop');
|
||||
if(bd){ bd.click(); }
|
||||
await new Promise(function(r){setTimeout(r,200)});
|
||||
out.closedAfterBackdrop=!document.querySelector('.dsh-wt_menu.dsh-wt_pop');
|
||||
return JSON.stringify(out);
|
||||
})()`);
|
||||
console.log('STEP8:', JSON.stringify(step8));
|
||||
|
||||
const errors = events.filter((e) =>
|
||||
e.method === 'Runtime.exceptionThrown' ||
|
||||
(e.method === 'Log.entryAdded' && e.params.entry.level === 'error') ||
|
||||
|
||||
Reference in New Issue
Block a user