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

Merge branch 'dev' of https://github.com/dcloudio/uni-app into alpha

const path = require('path')
const alias = require('rollup-plugin-alias')
const replace = require('rollup-plugin-replace')
module.exports = {
input: 'src/platforms/app-plus-nvue/services/index.legacy.old.js',
output: {
file: `packages/uni-app-plus-nvue/dist/service.legacy.js`,
format: 'es'
},
plugins: [
alias({
'uni-core': path.resolve(__dirname, '../src/core'),
'uni-shared': path.resolve(__dirname, '../src/shared/util.js'),
'uni-helpers': path.resolve(__dirname, '../src/core/helpers')
}),
replace({
__GLOBAL__: 'getGlobalUni()',
__PLATFORM_TITLE__: 'app-plus-nvue'
})
]
}
{ {
"name": "uniapp-js-framework", "name": "uniapp-js-framework",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"build:service:legacy": "npm run lint && rollup -c build/rollup.config.service.js",
"lint": "eslint --fix --config package.json --ext .js --ext .vue --ignore-path .eslintignore build src", "lint": "eslint --fix --config package.json --ext .js --ext .vue --ignore-path .eslintignore build src",
"lint:cli": "eslint --fix --config package.json --ignore-path .eslintignore packages/uni-cli-shared packages/uni-template-compiler \"packages/vue-cli-*/**/*.js\" \"packages/webpack-uni-*/**/*.js\"", "lint:cli": "eslint --fix --config package.json --ignore-path .eslintignore packages/uni-cli-shared packages/uni-template-compiler \"packages/vue-cli-*/**/*.js\" \"packages/webpack-uni-*/**/*.js\"",
"dev:h5": "npm run lint && cross-env NODE_ENV=production UNI_WATCH=true UNI_PLATFORM=h5 node build/build.js", "dev:h5": "npm run lint && cross-env NODE_ENV=production UNI_WATCH=true UNI_PLATFORM=h5 node build/build.js",
......
此差异已折叠。
module.exports = function(content) { module.exports = function(content) {
this.cacheable && this.cacheable() this.cacheable && this.cacheable()
if (content.indexOf('recycle-list') === -1) {
return `<scroll-view :scroll-y="true" :enableBackToTop="true" bubble="true" style="flex-direction:column">${content}</scroll-view>` return `<scroll-view :scroll-y="true" :enableBackToTop="true" bubble="true" style="flex-direction:column">${content}</scroll-view>`
}
return content
} }
...@@ -655,7 +655,7 @@ ...@@ -655,7 +655,7 @@
return cumulated return cumulated
}, {}) }, {})
};// fixed by xxxxxx };// fixed by xxxxxx
if (isSpecialTag(tag) && !isCustomBlock(currentBlock.attrs.lang || '')) { if (isSpecialTag(tag) && !isCustomBlock(String(currentBlock.attrs.lang || ''))) {
checkAttrs(currentBlock, attrs); checkAttrs(currentBlock, attrs);
if (tag === 'style') { if (tag === 'style') {
sfc.styles.push(currentBlock); sfc.styles.push(currentBlock);
...@@ -713,7 +713,7 @@ ...@@ -713,7 +713,7 @@
} else { } else {
var offset = content.slice(0, block.start).split(splitRE$1).length; var offset = content.slice(0, block.start).split(splitRE$1).length;
var lang = block.attrs && block.attrs.lang; // fixed by xxxxxx var lang = block.attrs && block.attrs.lang; // fixed by xxxxxx
var padChar = block.type === 'script' && !block.lang && !isCustomBlock(lang || '') var padChar = block.type === 'script' && !block.lang && !isCustomBlock(String(lang || ''))
? '//\n' ? '//\n'
: '\n'; : '\n';
return Array(offset).join(padChar) return Array(offset).join(padChar)
......
...@@ -613,7 +613,7 @@ function parseComponent ( ...@@ -613,7 +613,7 @@ function parseComponent (
return cumulated return cumulated
}, {}) }, {})
};// fixed by xxxxxx };// fixed by xxxxxx
if (isSpecialTag(tag) && !isCustomBlock(currentBlock.attrs.lang || '')) { if (isSpecialTag(tag) && !isCustomBlock(String(currentBlock.attrs.lang || ''))) {
checkAttrs(currentBlock, attrs); checkAttrs(currentBlock, attrs);
if (tag === 'style') { if (tag === 'style') {
sfc.styles.push(currentBlock); sfc.styles.push(currentBlock);
...@@ -671,7 +671,7 @@ function parseComponent ( ...@@ -671,7 +671,7 @@ function parseComponent (
} else { } else {
var offset = content.slice(0, block.start).split(splitRE).length; var offset = content.slice(0, block.start).split(splitRE).length;
var lang = block.attrs && block.attrs.lang; // fixed by xxxxxx var lang = block.attrs && block.attrs.lang; // fixed by xxxxxx
var padChar = block.type === 'script' && !block.lang && !isCustomBlock(lang || '') var padChar = block.type === 'script' && !block.lang && !isCustomBlock(String(lang || ''))
? '//\n' ? '//\n'
: '\n'; : '\n';
return Array(offset).join(padChar) return Array(offset).join(padChar)
......
...@@ -14,3 +14,4 @@ export { ...@@ -14,3 +14,4 @@ export {
export * from '../../../service/api/context/map' export * from '../../../service/api/context/map'
export * from '../../../service/api/context/video' export * from '../../../service/api/context/video'
export * from '../../../service/api/context/live-pusher' export * from '../../../service/api/context/live-pusher'
export * from 'uni-core/service/api/base/interceptor'
...@@ -47,7 +47,8 @@ export default function initUni (uni, nvue, plus, BroadcastChannel) { ...@@ -47,7 +47,8 @@ export default function initUni (uni, nvue, plus, BroadcastChannel) {
return promisify(name, uni[name]) return promisify(name, uni[name])
}, },
set (target, name, value) { set (target, name, value) {
target[name] = value target[name] = value
return true
} }
}) })
} }
......
import initUni from './api/legacy/index'
import initUpx2px from './api/upx2px'
import initEventBus from './api/event-bus'
let getGlobalUni
let getGlobalApp
let getGlobalUniEmitter
let getGlobalCurrentPages
export default {
create (id, env, config) {
return {
initUniApp ({
nvue,
getUni,
getApp,
getUniEmitter,
getCurrentPages
}) {
getGlobalUni = getUni
getGlobalApp = getApp
getGlobalUniEmitter = getUniEmitter
getGlobalCurrentPages = getCurrentPages
initUpx2px(nvue)
initEventBus(getUniEmitter)
},
instance: {
getUni (nvue, plus, BroadcastChannel) {
return initUni(getGlobalUni(), nvue, plus, BroadcastChannel)
},
getApp () {
return getGlobalApp()
},
getUniEmitter () {
return getGlobalUniEmitter()
},
getCurrentPages () {
return getGlobalCurrentPages()
}
}
}
},
refresh: function (id, env, config) {
},
destroy: function (id, env) {
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册