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

chore(mp): reduce bundle size

上级 ea98576c
......@@ -35,6 +35,11 @@
"__PLATFORM__": "\"mp-alipay\"",
"__PLATFORM_TITLE__": "支付宝小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return my.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, hasOwn, isArray, capitalize, isFunction, extend, isString } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, customizeEvent, addLeadingSlash, stringifyQuery, ON_BACK_PRESS } from '@dcloudio/uni-shared';
import { hasOwn, isArray, capitalize, isFunction, extend, isPlainObject, isString } from '@vue/shared';
import { ref, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, EMPTY_OBJ, isRef, setTemplateRef, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_BACK_PRESS = 'onBackPress';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -25,6 +25,7 @@
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33"
}
......
......@@ -36,6 +36,11 @@
"__PLATFORM__": "\"mp-baidu\"",
"__PLATFORM_TITLE__": "百度小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return swan.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, ON_INIT, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject } from '@vue/shared';
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
// 百度特有
const ON_INIT = 'onInit';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -31,6 +31,8 @@
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33"
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33"
}
}
......@@ -36,6 +36,11 @@
"__PLATFORM__": "\"mp-kuaishou\"",
"__PLATFORM_TITLE__": "快手小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return ks.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject } from '@vue/shared';
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -27,6 +27,8 @@
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33"
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33"
}
}
......@@ -36,6 +36,11 @@
"__PLATFORM__": "\"mp-lark\"",
"__PLATFORM_TITLE__": "飞书小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return tt.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend, isObject } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -27,6 +27,8 @@
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33"
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/compiler-core": "3.2.33",
"@vue/shared": "3.2.33"
}
}
......@@ -37,6 +37,11 @@
"__PLATFORM__": "\"mp-qq\"",
"__PLATFORM_TITLE__": "QQ小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return qq.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject } from '@vue/shared';
import { ref, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -30,6 +30,8 @@
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/shared": "3.2.33",
"fs-extra": "^10.0.0"
}
}
......@@ -36,6 +36,11 @@
"__PLATFORM__": "\"mp-toutiao\"",
"__PLATFORM_TITLE__": "字节跳动小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return tt.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend, isObject } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -26,6 +26,8 @@
"@dcloudio/uni-mp-compiler": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/shared": "3.2.33",
"@vue/compiler-core": "3.2.33"
}
}
......@@ -18,6 +18,10 @@
"url": "https://github.com/dcloudio/uni-app/issues"
},
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
"dependencies": {
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/shared": "3.2.33"
},
"devDependencies": {
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003"
}
......
......@@ -36,6 +36,6 @@
"__PLATFORM__": "\"mp-weixin\"",
"__PLATFORM_TITLE__": "微信小程序"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": ["@dcloudio/uni-i18n", "@dcloudio/uni-shared", "@vue/shared", "vue"]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
function getBaseSystemInfo() {
return wx.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -547,7 +480,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend } from '@vue/shared';
import { SLOT_DEFAULT_NAME, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject } from '@vue/shared';
import { ref, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......
......@@ -31,6 +31,8 @@
"dependencies": {
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vite": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003"
"@dcloudio/uni-mp-vue": "3.0.0-alpha-3040620220415003",
"@dcloudio/uni-shared": "3.0.0-alpha-3040620220415003",
"@vue/shared": "3.2.33"
}
}
......@@ -37,6 +37,11 @@
"__PLATFORM__": "\"quickapp-webview\"",
"__PLATFORM_TITLE__": "快应用(Webview)版"
},
"external": ["@dcloudio/uni-i18n", "@vue/shared", "vue"]
"external": [
"@dcloudio/uni-i18n",
"@dcloudio/uni-shared",
"@vue/shared",
"vue"
]
}
]
import { isArray, hasOwn, isString, isPlainObject, isObject, capitalize, toRawType, makeMap, isFunction, isPromise, remove, extend } from '@vue/shared';
let vueApp;
const createVueAppHooks = [];
/**
* 提供 createApp 的回调事件,方便三方插件接收 App 对象,处理挂靠全局 mixin 之类的逻辑
*/
function onCreateVueApp(hook) {
// TODO 每个 nvue 页面都会触发
if (vueApp) {
return hook(vueApp);
}
createVueAppHooks.push(hook);
}
function invokeCreateVueAppHook(app) {
vueApp = app;
createVueAppHooks.forEach((hook) => hook(app));
}
import { Emitter, onCreateVueApp, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
const eventChannels = {};
const eventChannelStack = [];
......@@ -57,57 +41,6 @@ function getBaseSystemInfo() {
return qa.getSystemInfoSync()
}
const E = function () {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
};
E.prototype = {
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
fn: callback,
ctx: ctx,
});
return this;
},
once: function (name, callback, ctx) {
var self = this;
function listener() {
self.off(name, listener);
callback.apply(ctx, arguments);
}
listener._ = callback;
return this.on(name, listener, ctx);
},
emit: function (name) {
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
var i = 0;
var len = evtArr.length;
for (i; i < len; i++) {
evtArr[i].fn.apply(evtArr[i].ctx, data);
}
return this;
},
off: function (name, callback) {
var e = this.e || (this.e = {});
var evts = e[name];
var liveEvents = [];
if (evts && callback) {
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
}
}
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
liveEvents.length ? (e[name] = liveEvents) : delete e[name];
return this;
},
};
var E$1 = E;
function validateProtocolFail(name, msg) {
console.warn(`${name}: ${msg}`);
}
......@@ -583,7 +516,7 @@ const EmitProtocol = [
},
];
const emitter = new E$1();
const emitter = new Emitter();
const $on = defineSyncApi(API_ON, (name, callback) => {
emitter.on(name, callback);
return () => emitter.off(name, callback);
......
import { camelize, isPlainObject, isArray, hasOwn, isFunction, extend, isObject } from '@vue/shared';
import { SLOT_DEFAULT_NAME, EventChannel, invokeArrayFns, ON_LOAD, ON_SHOW, ON_HIDE, ON_UNLOAD, ON_RESIZE, ON_TAB_ITEM_TAP, ON_REACH_BOTTOM, ON_PULL_DOWN_REFRESH, ON_ADD_TO_FAVORITES, MINI_PROGRAM_PAGE_RUNTIME_HOOKS, ON_READY, once, ON_LAUNCH, ON_ERROR, ON_THEME_CHANGE, ON_PAGE_NOT_FOUND, ON_UNHANDLE_REJECTION, addLeadingSlash, stringifyQuery, customizeEvent } from '@dcloudio/uni-shared';
import { isArray, hasOwn, isFunction, extend, isPlainObject, isObject } from '@vue/shared';
import { ref, nextTick, findComponentPropsData, toRaw, updateProps, invalidateJob, getExposeProxy, pruneComponentPropsCache } from 'vue';
const ON_READY$1 = 'onReady';
class EventChannel$1 {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
// quickapp-webview 不能使用 default 作为插槽名称
const SLOT_DEFAULT_NAME = 'd';
// lifecycle
// App and Page
const ON_SHOW = 'onShow';
const ON_HIDE = 'onHide';
//App
const ON_LAUNCH = 'onLaunch';
const ON_ERROR = 'onError';
const ON_THEME_CHANGE = 'onThemeChange';
const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const ON_UNHANDLE_REJECTION = 'onUnhandledRejection';
//Page
const ON_LOAD = 'onLoad';
const ON_READY = 'onReady';
const ON_UNLOAD = 'onUnload';
const ON_RESIZE = 'onResize';
const ON_TAB_ITEM_TAP = 'onTabItemTap';
const ON_REACH_BOTTOM = 'onReachBottom';
const ON_PULL_DOWN_REFRESH = 'onPullDownRefresh';
const ON_ADD_TO_FAVORITES = 'onAddToFavorites';
const customizeRE = /:/g;
function customizeEvent(str) {
return camelize(str.replace(customizeRE, '-'));
}
function hasLeadingSlash(str) {
return str.indexOf('/') === 0;
}
function addLeadingSlash(str) {
return hasLeadingSlash(str) ? str : '/' + str;
}
const invokeArrayFns = (fns, arg) => {
let ret;
for (let i = 0; i < fns.length; i++) {
ret = fns[i](arg);
}
return ret;
};
function once(fn, ctx = null) {
let res;
return ((...args) => {
if (fn) {
res = fn.apply(ctx, args);
fn = null;
}
return res;
});
}
const encode = encodeURIComponent;
function stringifyQuery(obj, encodeStr = encode) {
const res = obj
? Object.keys(obj)
.map((key) => {
let val = obj[key];
if (typeof val === undefined || val === null) {
val = '';
}
else if (isPlainObject(val)) {
val = JSON.stringify(val);
}
return encodeStr(key) + '=' + encodeStr(val);
})
.filter((x) => x.length > 0)
.join('&')
: null;
return res ? `?${res}` : '';
}
class EventChannel {
constructor(id, events) {
this.id = id;
this.listener = {};
this.emitCache = {};
if (events) {
Object.keys(events).forEach((name) => {
this.on(name, events[name]);
});
}
}
emit(eventName, ...args) {
const fns = this.listener[eventName];
if (!fns) {
return (this.emitCache[eventName] || (this.emitCache[eventName] = [])).push(args);
}
fns.forEach((opt) => {
opt.fn.apply(opt.fn, args);
});
this.listener[eventName] = fns.filter((opt) => opt.type !== 'once');
}
on(eventName, fn) {
this._addListener(eventName, 'on', fn);
this._clearCache(eventName);
}
once(eventName, fn) {
this._addListener(eventName, 'once', fn);
this._clearCache(eventName);
}
off(eventName, fn) {
const fns = this.listener[eventName];
if (!fns) {
return;
}
if (fn) {
for (let i = 0; i < fns.length;) {
if (fns[i].fn === fn) {
fns.splice(i, 1);
i--;
}
i++;
}
}
else {
delete this.listener[eventName];
}
}
_clearCache(eventName) {
const cacheArgs = this.emitCache[eventName];
if (cacheArgs) {
for (; cacheArgs.length > 0;) {
this.emit.apply(this, [eventName, ...cacheArgs.shift()]);
}
}
}
_addListener(eventName, type, fn) {
(this.listener[eventName] || (this.listener[eventName] = [])).push({
fn,
type,
});
}
}
const MINI_PROGRAM_PAGE_RUNTIME_HOOKS = /*#__PURE__*/ (() => {
return {
onPageScroll: 1,
onShareAppMessage: 1 << 1,
onShareTimeline: 1 << 2,
};
})();
const eventChannels = {};
const eventChannelStack = [];
function getEventChannel(id) {
......@@ -1126,7 +920,7 @@ function handleLink({ detail: { nodeId, webviewId }, }) {
delete vm._$childVues;
}
vm.$callHook('mounted');
vm.$callHook(ON_READY$1);
vm.$callHook(ON_READY);
};
// 当 parentVm 已经 mounted 时,直接触发,否则延迟
if (!parentVm || parentVm.$.isMounted) {
......@@ -1142,30 +936,30 @@ function handleLink({ detail: { nodeId, webviewId }, }) {
}
var parseComponentOptions = /*#__PURE__*/Object.freeze({
__proto__: null,
initRelation: initRelation,
handleLink: handleLink,
mocks: mocks,
isPage: isPage,
parse: parse,
initLifetimes: initLifetimes$1
__proto__: null,
initRelation: initRelation,
handleLink: handleLink,
mocks: mocks,
isPage: isPage,
parse: parse,
initLifetimes: initLifetimes$1
});
var parsePageOptions = /*#__PURE__*/Object.freeze({
__proto__: null,
mocks: mocks,
isPage: isPage,
initRelation: initRelation,
handleLink: handleLink,
parse: parse,
initLifetimes: initLifetimes
__proto__: null,
mocks: mocks,
isPage: isPage,
initRelation: initRelation,
handleLink: handleLink,
parse: parse,
initLifetimes: initLifetimes
});
const createApp = initCreateApp();
const createPage = initCreatePage(parsePageOptions);
const createComponent = initCreateComponent(parseComponentOptions);
const createSubpackageApp = initCreateSubpackageApp();
qa.EventChannel = EventChannel$1;
qa.EventChannel = EventChannel;
qa.createApp = global.createApp = createApp;
qa.createPage = createPage;
qa.createComponent = createComponent;
......
......@@ -503,6 +503,7 @@ importers:
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3040620220415003
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-compiler': link:../uni-mp-compiler
......@@ -510,6 +511,7 @@ importers:
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@dcloudio/uni-mp-weixin': link:../uni-mp-weixin
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
packages/uni-mp-compiler:
specifiers:
......@@ -549,6 +551,7 @@ importers:
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3040620220415003
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-compiler': link:../uni-mp-compiler
......@@ -556,6 +559,7 @@ importers:
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@dcloudio/uni-mp-weixin': link:../uni-mp-weixin
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
packages/uni-mp-lark:
specifiers:
......@@ -565,6 +569,7 @@ importers:
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-compiler': link:../uni-mp-compiler
......@@ -572,6 +577,7 @@ importers:
'@dcloudio/uni-mp-vite': link:../uni-mp-vite
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
packages/uni-mp-qq:
specifiers:
......@@ -581,11 +587,13 @@ importers:
'@dcloudio/uni-mp-weixin': 3.0.0-alpha-3040620220415003
'@types/fs-extra': ^9.0.13
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
fs-extra: ^10.0.0
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-vite': link:../uni-mp-vite
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@vue/shared': 3.2.33
fs-extra: 10.0.0
devDependencies:
'@dcloudio/uni-mp-weixin': link:../uni-mp-weixin
......@@ -599,12 +607,14 @@ importers:
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-compiler': link:../uni-mp-compiler
'@dcloudio/uni-mp-vite': link:../uni-mp-vite
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
packages/uni-mp-vite:
specifiers:
......@@ -634,6 +644,11 @@ importers:
packages/uni-mp-vue:
specifiers:
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-shared': 3.0.0-alpha-3040620220415003
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-shared': link:../uni-shared
'@vue/shared': 3.2.33
devDependencies:
'@dcloudio/uni-mp-vue': 'link:'
......@@ -643,10 +658,12 @@ importers:
'@dcloudio/uni-mp-vite': 3.0.0-alpha-3040620220415003
'@dcloudio/uni-mp-vue': 3.0.0-alpha-3040620220415003
'@vue/compiler-core': 3.2.33
'@vue/shared': 3.2.33
dependencies:
'@dcloudio/uni-cli-shared': link:../uni-cli-shared
'@dcloudio/uni-mp-vite': link:../uni-mp-vite
'@dcloudio/uni-mp-vue': link:../uni-mp-vue
'@vue/shared': 3.2.33
devDependencies:
'@vue/compiler-core': 3.2.33
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册