fix(table): 统一筛选交互并补齐移动视口覆盖
This commit is contained in:
@@ -13,9 +13,9 @@ const aliases = {
|
||||
'laptop-wxga': 'wxga',
|
||||
};
|
||||
export const browserChannel = config.browser.channel;
|
||||
export const defaultProjectViewports = ['desktop', 'mobile', 'mobile-393'];
|
||||
export const projectViewports = [
|
||||
'desktop',
|
||||
'mobile',
|
||||
...defaultProjectViewports,
|
||||
'tablet',
|
||||
'desktop-boundary',
|
||||
'laptop-hd',
|
||||
@@ -30,7 +30,9 @@ export function deviceOptions(name) {
|
||||
if (!size) throw new Error(`Unknown viewport: ${name}`);
|
||||
const descriptor =
|
||||
devices[
|
||||
config.browser[key === 'mobile' ? 'mobileDevice' : 'desktopDevice']
|
||||
config.browser[
|
||||
key.startsWith('mobile') ? 'mobileDevice' : 'desktopDevice'
|
||||
]
|
||||
];
|
||||
if (!descriptor) throw new Error(`Unknown device profile for ${name}`);
|
||||
const { defaultBrowserType, ...context } = descriptor;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
"viewports": {
|
||||
"desktop": [1920, 1080],
|
||||
"mobile": [360, 800],
|
||||
"mobile-393": [393, 851],
|
||||
"tablet": [768, 1024],
|
||||
"laptop": [1024, 768],
|
||||
"hd": [1366, 768],
|
||||
|
||||
Reference in New Issue
Block a user