mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 19:14:16 +00:00
improve for mobile mode
This commit is contained in:
parent
9f9172f3ec
commit
35bda8c947
@ -6,7 +6,6 @@ import Core from "evite/src/core"
|
|||||||
import config from "config"
|
import config from "config"
|
||||||
import store from "store"
|
import store from "store"
|
||||||
import { ConfigProvider, theme } from "antd"
|
import { ConfigProvider, theme } from "antd"
|
||||||
import RemoteSVGToComponent from "components/RemoteSVGToComponent"
|
|
||||||
|
|
||||||
const variantToAlgorithm = {
|
const variantToAlgorithm = {
|
||||||
light: theme.defaultAlgorithm,
|
light: theme.defaultAlgorithm,
|
||||||
@ -57,6 +56,9 @@ export class ThemeProvider extends React.Component {
|
|||||||
},
|
},
|
||||||
algorithm: themeAlgorithms,
|
algorithm: themeAlgorithms,
|
||||||
}}
|
}}
|
||||||
|
componentSize={
|
||||||
|
app.isMobile ? "large" : "middle"
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
@ -142,6 +144,13 @@ export default class StyleCore extends Core {
|
|||||||
|
|
||||||
this.applyVariant(StyleCore.variant)
|
this.applyVariant(StyleCore.variant)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// if mobile set fontScale to 1
|
||||||
|
if (app.isMobile) {
|
||||||
|
this.update({
|
||||||
|
fontScale: 1
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onEvents = {
|
onEvents = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user