支持 enablePullDownRefresh
This commit is contained in:
parent
b83785bca6
commit
41f3539d4d
|
|
@ -257,13 +257,22 @@ function getRouter({ projectOrPath, path, namespace, disableAssemble, isFirst })
|
|||
const jsonFileExists = fs.existsSync(`${relPath}.json`);
|
||||
let meta = [];
|
||||
if (jsonFileExists) {
|
||||
const { navigationBarTitleText } = require(`${relPath}.json`);
|
||||
const {
|
||||
navigationBarTitleText,
|
||||
enablePullDownRefresh,
|
||||
} = require(`${relPath}.json`);
|
||||
meta.push(
|
||||
t.objectProperty(
|
||||
t.identifier('title'),
|
||||
t.stringLiteral(navigationBarTitleText || '')
|
||||
)
|
||||
);
|
||||
meta.push(
|
||||
t.objectProperty(
|
||||
t.identifier('enablePullDownRefresh'),
|
||||
t.booleanLiteral(enablePullDownRefresh || true) //默认启用下拉刷新
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
const path2 =
|
||||
|
|
@ -319,13 +328,15 @@ function getNamespaceRouter({ namespaces, namespace, filename }) {
|
|||
const jsonFileExists = fs.existsSync(`${relPath}.json`);
|
||||
let meta = [];
|
||||
if (jsonFileExists) {
|
||||
const { navigationBarTitleText } = require(`${relPath}.json`);
|
||||
meta = [
|
||||
const {
|
||||
navigationBarTitleText,
|
||||
} = require(`${relPath}.json`);
|
||||
meta.push(
|
||||
t.objectProperty(
|
||||
t.identifier('title'),
|
||||
t.stringLiteral(navigationBarTitleText || '')
|
||||
),
|
||||
];
|
||||
)
|
||||
);
|
||||
}
|
||||
const properties = [
|
||||
t.objectProperty(t.identifier('path'), t.stringLiteral(namespace)),
|
||||
|
|
|
|||
|
|
@ -845,6 +845,7 @@ module.exports = function (webpackEnv) {
|
|||
},
|
||||
mode: 'write-references',
|
||||
// profile: true,
|
||||
memoryLimit: 4096,
|
||||
},
|
||||
issue: {
|
||||
// This one is specifically to match during CI tests,
|
||||
|
|
|
|||
Loading…
Reference in New Issue