.umirc.ts配置metas-viewport不生效 #8535
Unanswered
jiangjjiang
asked this question in
Q&A
Replies: 2 comments 2 replies
|
Create // plugin.ts
import { IApi } from 'umi';
export default (api: IApi) => {
api.modifyHTML(($) => {
$('meta[name=viewport]').attr('content', `width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no`)
return $;
});
}; |
2 replies
|
将在下个版本中修复,目前可以使用如上插件修改 html 的方式解决。 FYI: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
metas: [ { name: 'viewport', content: 'width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no', }, ],All reactions