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

build(deps): bump vue from 3.0.9 to 3.2.11 #2818

上级 c6a1aac2
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"build": "node scripts/build.js", "build": "node scripts/build.js",
"build:h5": "node scripts/build.js uni-app uni-cli-shared uni-h5 uni-i18n uni-stat uni-shared uni-h5-vite vite-plugin-uni", "build:h5": "node scripts/build.js uni-app uni-cli-shared uni-h5 uni-i18n uni-stat uni-shared uni-h5-vite vite-plugin-uni",
"build:app": "node scripts/build.js uni-app-plus uni-app-vite uni-app-vue uni-cli-nvue", "build:app": "node scripts/build.js uni-app-plus uni-app-vite uni-app-vue uni-cli-nvue",
"build:mp": "node scripts/build.js uni-mp-alipay uni-mp-baidu uni-mp-qq uni-mp-toutiao uni-mp-weixin uni-mp-kuaishou uni-quickapp-webview", "build:mp": "node scripts/build.js uni-mp-vue uni-mp-alipay uni-mp-baidu uni-mp-qq uni-mp-toutiao uni-mp-weixin uni-mp-kuaishou uni-quickapp-webview",
"size": "npm run build size-check", "size": "npm run build size-check",
"lint": "eslint packages/*/src/**/*.ts", "lint": "eslint packages/*/src/**/*.ts",
"format": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"", "format": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -1766,8 +1766,11 @@ function useListeners(props2, Listeners, trigger) { ...@@ -1766,8 +1766,11 @@ function useListeners(props2, Listeners, trigger) {
function useMethods(canvasRef, actionsWaiting) { function useMethods(canvasRef, actionsWaiting) {
let _actionsDefer = []; let _actionsDefer = [];
let _images = {}; let _images = {};
function _resize() { function _resize(size) {
let canvas = canvasRef.value; let canvas = canvasRef.value;
var hasChanged = !size || canvas.width !== Math.floor(size.width * pixelRatio) || canvas.height !== Math.floor(size.height * pixelRatio);
if (!hasChanged)
return;
if (canvas.width > 0 && canvas.height > 0) { if (canvas.width > 0 && canvas.height > 0) {
let context = canvas.getContext("2d"); let context = canvas.getContext("2d");
let imageData = context.getImageData(0, 0, canvas.width, canvas.height); let imageData = context.getImageData(0, 0, canvas.width, canvas.height);
......
...@@ -6314,8 +6314,11 @@ function useListeners(props2, Listeners, trigger) { ...@@ -6314,8 +6314,11 @@ function useListeners(props2, Listeners, trigger) {
function useMethods(canvasRef, actionsWaiting) { function useMethods(canvasRef, actionsWaiting) {
let _actionsDefer = []; let _actionsDefer = [];
let _images = {}; let _images = {};
function _resize() { function _resize(size) {
let canvas = canvasRef.value; let canvas = canvasRef.value;
var hasChanged = !size || canvas.width !== Math.floor(size.width * pixelRatio) || canvas.height !== Math.floor(size.height * pixelRatio);
if (!hasChanged)
return;
if (canvas.width > 0 && canvas.height > 0) { if (canvas.width > 0 && canvas.height > 0) {
let context = canvas.getContext("2d"); let context = canvas.getContext("2d");
let imageData = context.getImageData(0, 0, canvas.width, canvas.height); let imageData = context.getImageData(0, 0, canvas.width, canvas.height);
......
...@@ -3,7 +3,7 @@ declare module '@vue/runtime-core' { ...@@ -3,7 +3,7 @@ declare module '@vue/runtime-core' {
$vm: ComponentPublicInstance $vm: ComponentPublicInstance
globalData: Record<string, any> globalData: Record<string, any>
$callHook: (hook: string, args?: unknown) => unknown $callHook: (hook: string, args?: unknown) => unknown
$callSyncHook: (hook: 'created') => void $callCreatedHook: () => void
} }
} }
......
...@@ -1333,7 +1333,7 @@ function handleLink({ detail: { vuePid, nodeId, webviewId }, }) { ...@@ -1333,7 +1333,7 @@ function handleLink({ detail: { vuePid, nodeId, webviewId }, }) {
initInjections(vm); initInjections(vm);
initProvide(vm); initProvide(vm);
} }
vm.$callSyncHook('created'); vm.$callCreatedHook();
vm.$callHook('mounted'); vm.$callHook('mounted');
vm.$callHook(ON_READY); vm.$callHook(ON_READY);
} }
...@@ -1356,7 +1356,7 @@ function initLifetimes(lifetimesOptions) { ...@@ -1356,7 +1356,7 @@ function initLifetimes(lifetimesOptions) {
return extend(initLifetimes$1(lifetimesOptions), { return extend(initLifetimes$1(lifetimesOptions), {
ready() { ready() {
if (this.$vm && lifetimesOptions.isPage(this)) { if (this.$vm && lifetimesOptions.isPage(this)) {
this.$vm.$callSyncHook('created'); this.$vm.$callCreatedHook();
this.$vm.$callHook('mounted'); this.$vm.$callHook('mounted');
this.$vm.$callHook(ON_READY); this.$vm.$callHook(ON_READY);
} }
......
...@@ -18,7 +18,7 @@ export function initLifetimes(lifetimesOptions: CreateLifetimesOptions) { ...@@ -18,7 +18,7 @@ export function initLifetimes(lifetimesOptions: CreateLifetimesOptions) {
if (__PLATFORM__ === 'quickapp-webview' && this.pageinstance) { if (__PLATFORM__ === 'quickapp-webview' && this.pageinstance) {
this.__webviewId__ = (this.pageinstance as any).__pageId__ this.__webviewId__ = (this.pageinstance as any).__pageId__
} }
this.$vm.$callSyncHook('created') this.$vm.$callCreatedHook()
this.$vm.$callHook('mounted') this.$vm.$callHook('mounted')
this.$vm.$callHook(ON_READY) this.$vm.$callHook(ON_READY)
} else { } else {
......
...@@ -77,7 +77,7 @@ export function handleLink( ...@@ -77,7 +77,7 @@ export function handleLink(
initProvide(vm) initProvide(vm)
} }
vm.$callSyncHook('created') vm.$callCreatedHook()
vm.$callHook('mounted') vm.$callHook('mounted')
vm.$callHook(ON_READY) vm.$callHook(ON_READY)
} }
......
...@@ -1222,7 +1222,7 @@ function initLifetimes(lifetimesOptions) { ...@@ -1222,7 +1222,7 @@ function initLifetimes(lifetimesOptions) {
if (this.pageinstance) { if (this.pageinstance) {
this.__webviewId__ = this.pageinstance.__pageId__; this.__webviewId__ = this.pageinstance.__pageId__;
} }
this.$vm.$callSyncHook('created'); this.$vm.$callCreatedHook();
this.$vm.$callHook('mounted'); this.$vm.$callHook('mounted');
this.$vm.$callHook(ON_READY); this.$vm.$callHook(ON_READY);
} }
...@@ -1279,7 +1279,7 @@ function handleLink({ detail: { nodeId, webviewId }, }) { ...@@ -1279,7 +1279,7 @@ function handleLink({ detail: { nodeId, webviewId }, }) {
initInjections(vm); initInjections(vm);
initProvide(vm); initProvide(vm);
} }
vm.$callSyncHook('created'); vm.$callCreatedHook();
}; };
const mountedVm = function () { const mountedVm = function () {
// 处理当前 vm 子 // 处理当前 vm 子
......
...@@ -59,7 +59,7 @@ export function handleLink( ...@@ -59,7 +59,7 @@ export function handleLink(
initInjections(vm) initInjections(vm)
initProvide(vm) initProvide(vm)
} }
vm.$callSyncHook('created') vm.$callCreatedHook()
} }
const mountedVm = function () { const mountedVm = function () {
// 处理当前 vm 子 // 处理当前 vm 子
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册