提交 d3480960 编写于 作者: fxy060608's avatar fxy060608

chore: build

上级 db9a83ca
......@@ -38,6 +38,7 @@ declare namespace UniApp {
router?: {
strict: boolean
base: string
assets: string
}
nvue?: {
'flex-direction': 'column' | 'row'
......
......@@ -219,7 +219,7 @@ function showPage({
animationType: "pop-in",
animationDuration: 200,
uniNView: {
path: `${typeof process === "object" && process.env && {}.VUE_APP_TEMPLATE_PATH || ""}/${url}.js`,
path: `/${url}.js`,
defaultFontSize: 16,
viewport: plus_.screen.resolutionWidth
}
......
......@@ -881,14 +881,17 @@ function addBase(filePath) {
return baseUrl + filePath;
}
function getRealPath(filePath) {
if (__uniConfig.router.base === "./") {
filePath = filePath.replace(/^\.\/static\//, "/static/");
const { base, assets } = __uniConfig.router;
if (base === "./") {
if (filePath.indexOf("./static/") === 0 || assets && filePath.indexOf("./" + assets + "/") === 0) {
filePath = filePath.slice(1);
}
}
if (filePath.indexOf("/") === 0) {
if (filePath.indexOf("//") === 0) {
filePath = "https:" + filePath;
} else {
return addBase(filePath.substr(1));
return addBase(filePath.slice(1));
}
}
if (uniShared.SCHEME_RE.test(filePath) || uniShared.DATA_RE.test(filePath) || filePath.indexOf("blob:") === 0) {
......
......@@ -1994,14 +1994,17 @@ function addBase(filePath) {
return baseUrl + filePath;
}
function getRealPath(filePath) {
if (__uniConfig.router.base === "./") {
filePath = filePath.replace(/^\.\/static\//, "/static/");
const { base, assets } = __uniConfig.router;
if (base === "./") {
if (filePath.indexOf("./static/") === 0 || assets && filePath.indexOf("./" + assets + "/") === 0) {
filePath = filePath.slice(1);
}
}
if (filePath.indexOf("/") === 0) {
if (filePath.indexOf("//") === 0) {
filePath = "https:" + filePath;
} else {
return addBase(filePath.substr(1));
return addBase(filePath.slice(1));
}
}
if (SCHEME_RE.test(filePath) || DATA_RE.test(filePath) || filePath.indexOf("blob:") === 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册