-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wip] refactor: refactor mobile site #2808
base: dev
Are you sure you want to change the base?
Changes from all commits
a67e83e
794839b
d9702e8
5f56cb1
c8a2bfb
2399502
f64bd8e
27e1845
ef2c059
5cea622
dafa0ba
392e598
a765414
19d78fa
855e782
a46ec22
e1ef5bb
7422717
1f42566
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export default { | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
apis: [ | ||
{ | ||
name: 'alert', | ||
|
@@ -13,9 +13,8 @@ export default { | |
'zh-CN': '文字是否居中', | ||
'en-US': 'Whether the text is centered' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'center', | ||
mobileDemo: 'center', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
@@ -26,9 +25,8 @@ export default { | |
'zh-CN': '警告是否可以关闭', | ||
'en-US': 'Set whether alarms can be disabled.' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'custom-close', | ||
mobileDemo: 'custom-close', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
@@ -39,9 +37,8 @@ export default { | |
'zh-CN': '关闭按钮自定义文本', | ||
'en-US': 'Customized text of the close button' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'custom-close', | ||
mobileDemo: 'custom-close', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
@@ -64,9 +61,8 @@ export default { | |
'zh-CN': '警告的提示内容', | ||
'en-US': 'Set the warning prompt content' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'basic-usage', | ||
mobileDemo: 'custom-close', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
@@ -78,14 +74,13 @@ export default { | |
'en-US': | ||
'The icon for the custom warning of the incoming icon component will be automatically used based on the type value by default' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'icon', | ||
mobileDemo: 'icon', | ||
mfDemo: '' | ||
}, | ||
{ | ||
name: 'scrolling', | ||
type: 'String', | ||
type: 'string', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix inconsistent type definitions. The following properties are defined with string type but their descriptions suggest they should be boolean:
Consider updating their types to Also applies to: 95-95, 132-132 |
||
defaultValue: '', | ||
desc: { | ||
'zh-CN': '是否开启描述文字在鼠标 hover 时滚动显示的动画。', | ||
|
@@ -97,7 +92,7 @@ export default { | |
}, | ||
{ | ||
name: 'show-foldable', | ||
type: 'String', | ||
type: 'string', | ||
defaultValue: '', | ||
desc: { | ||
'zh-CN': '展示带标题可折叠样式。', | ||
|
@@ -134,7 +129,7 @@ export default { | |
}, | ||
{ | ||
name: 'single-line', | ||
type: 'String', | ||
type: 'string', | ||
defaultValue: '', | ||
desc: { | ||
'zh-CN': '描述内容是否一行显示,超出显示...,默认值为 false。', | ||
|
@@ -151,23 +146,10 @@ export default { | |
'zh-CN': '警告的尺寸大小', | ||
'en-US': 'Set the size of the warning' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'size', | ||
mobileDemo: 'size', | ||
mfDemo: '' | ||
}, | ||
{ | ||
name: 'target', | ||
type: 'String', | ||
defaultValue: '', | ||
desc: { | ||
'zh-CN': '挂载容器的ref值,通过该属性可以让组件展示在对应容器的顶部', | ||
'en-US': | ||
'Mounted container reference, this property allows the component to be displayed at the top of the corresponding container.' | ||
}, | ||
mode: ['mobile'], | ||
mobileDemo: 'target' | ||
}, | ||
{ | ||
name: 'title', | ||
type: 'string', | ||
|
@@ -190,9 +172,8 @@ export default { | |
'zh-CN': '警告的类型', | ||
'en-US': 'Set the alarm type' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'basic-usage', | ||
mobileDemo: 'size', | ||
mfDemo: '' | ||
} | ||
], | ||
|
@@ -205,9 +186,8 @@ export default { | |
'zh-CN': '关闭 alert 时触发的事件', | ||
'en-US': 'Event triggered when the alert function is disabled' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'custom-close', | ||
mobileDemo: 'custom-close', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
@@ -265,9 +245,8 @@ export default { | |
'zh-CN': '组件默认插槽,当 size 设置为 large 时有效,显示在 <code>description</code>下方 ', | ||
'en-US': 'The default slot for the component is valid when size is set to large' | ||
}, | ||
mode: ['pc', 'mobile', 'mobile-first'], | ||
mode: ['pc', 'mobile-first'], | ||
pcDemo: 'slot-default', | ||
mobileDemo: 'slot-default', | ||
mfDemo: '' | ||
}, | ||
{ | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Migration to 'mobile-first' needs attention in sticky.js
The removal of 'mobile' mode is generally well-supported as most files already include both 'mobile' and 'mobile-first' modes. However,
sticky.js
only supports 'pc' and 'mobile' modes without 'mobile-first', which needs to be addressed as part of the mobile site refactoring.examples/sites/demos/apis/sticky.js
: Add 'mobile-first' mode support🔗 Analysis chain
Verify the impact of removing 'mobile' mode.
The removal of 'mobile' mode from the supported modes array aligns with the PR's mobile site refactoring objective. However, we should verify that all mobile-specific functionality has been properly migrated to 'mobile-first'.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1306
Script:
Length of output: 26286