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

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

...@@ -1112,7 +1112,11 @@ const hooks = [ ...@@ -1112,7 +1112,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "app-plus"; Vue.prototype.mpHost = "app-plus";
Vue.mixin({ Vue.mixin({
...@@ -1136,10 +1140,6 @@ function parseBaseApp (vm, { ...@@ -1136,10 +1140,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
...@@ -1513,7 +1513,11 @@ const hooks = [ ...@@ -1513,7 +1513,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "mp-alipay"; Vue.prototype.mpHost = "mp-alipay";
Vue.mixin({ Vue.mixin({
...@@ -1537,10 +1541,6 @@ function parseBaseApp (vm, { ...@@ -1537,10 +1541,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
...@@ -1258,7 +1258,11 @@ const hooks = [ ...@@ -1258,7 +1258,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "mp-baidu"; Vue.prototype.mpHost = "mp-baidu";
Vue.mixin({ Vue.mixin({
...@@ -1282,10 +1286,6 @@ function parseBaseApp (vm, { ...@@ -1282,10 +1286,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
...@@ -1176,7 +1176,11 @@ const hooks = [ ...@@ -1176,7 +1176,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "mp-qq"; Vue.prototype.mpHost = "mp-qq";
Vue.mixin({ Vue.mixin({
...@@ -1200,10 +1204,6 @@ function parseBaseApp (vm, { ...@@ -1200,10 +1204,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
...@@ -1268,7 +1268,11 @@ const hooks = [ ...@@ -1268,7 +1268,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "mp-toutiao"; Vue.prototype.mpHost = "mp-toutiao";
Vue.mixin({ Vue.mixin({
...@@ -1292,10 +1296,6 @@ function parseBaseApp (vm, { ...@@ -1292,10 +1296,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
...@@ -1116,7 +1116,11 @@ const hooks = [ ...@@ -1116,7 +1116,11 @@ const hooks = [
function parseBaseApp (vm, { function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store;
}
Vue.prototype.mpHost = "mp-weixin"; Vue.prototype.mpHost = "mp-weixin";
Vue.mixin({ Vue.mixin({
...@@ -1140,10 +1144,6 @@ function parseBaseApp (vm, { ...@@ -1140,10 +1144,6 @@ function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this); initRefs(this);
initMocks(this, mocks); initMocks(this, mocks);
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store;
}
} }
} }
}); });
......
module.exports = (api, options, rootOptions) => { module.exports = (api, options, rootOptions) => {
let version = '*' let version = '*'
if (require('./package.json').version.indexOf('alpha') !== -1) { const mainVersion = require('./package.json').version
version = '^2.0.0-alpha-22420190823001' if (mainVersion.indexOf('alpha') !== -1) {
version = '^' + mainVersion
} }
api.extendPackage(pkg => { api.extendPackage(pkg => {
delete pkg.postcss delete pkg.postcss
......
...@@ -15,7 +15,11 @@ const hooks = [ ...@@ -15,7 +15,11 @@ const hooks = [
export default function parseBaseApp (vm, { export default function parseBaseApp (vm, {
mocks, mocks,
initRefs initRefs
}) { }) {
if (vm.$options.store) {
Vue.prototype.$store = vm.$options.store
}
Vue.prototype.mpHost = __PLATFORM__ Vue.prototype.mpHost = __PLATFORM__
Vue.mixin({ Vue.mixin({
...@@ -39,10 +43,6 @@ export default function parseBaseApp (vm, { ...@@ -39,10 +43,6 @@ export default function parseBaseApp (vm, {
if (this.mpType !== 'app') { if (this.mpType !== 'app') {
initRefs(this) initRefs(this)
initMocks(this, mocks) initMocks(this, mocks)
} else {
if (this.$options.store) { // vuex store
Vue.prototype.$store = this.$options.store
}
} }
} }
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册