oakDisablePulldownRefresh 注入

This commit is contained in:
Wang Kejun 2022-11-01 18:04:28 +08:00
parent 068bd9fed4
commit 4e68cb72a0
1 changed files with 6 additions and 6 deletions

View File

@ -259,7 +259,7 @@ function getRouter({ projectOrPath, path, namespace, disableAssemble, isFirst })
if (jsonFileExists) {
const {
navigationBarTitleText,
enablePullDownRefresh = true,
oakDisablePulldownRefresh = false,
} = require(`${relPath}.json`);
meta.push(
t.objectProperty(
@ -269,8 +269,8 @@ function getRouter({ projectOrPath, path, namespace, disableAssemble, isFirst })
);
meta.push(
t.objectProperty(
t.identifier('enablePullDownRefresh'),
t.booleanLiteral(enablePullDownRefresh) //默认启用下拉刷新
t.identifier('oakDisablePulldownRefresh'),
t.booleanLiteral(oakDisablePulldownRefresh) //默认启用下拉刷新
)
);
}
@ -330,7 +330,7 @@ function getNamespaceRouter({ namespaces, namespace, filename }) {
if (jsonFileExists) {
const {
navigationBarTitleText,
enablePullDownRefresh = false,
oakDisablePulldownRefresh = true,
} = require(`${relPath}.json`);
meta.push(
t.objectProperty(
@ -340,8 +340,8 @@ function getNamespaceRouter({ namespaces, namespace, filename }) {
);
meta.push(
t.objectProperty(
t.identifier('enablePullDownRefresh'),
t.booleanLiteral(enablePullDownRefresh) // 嵌套路由顶层默认不启用下拉刷新
t.identifier('oakDisablePulldownRefresh'),
t.booleanLiteral(oakDisablePulldownRefresh) // 嵌套路由顶层默认不启用下拉刷新
)
);
}