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