Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
84816c22
U
uni-app
项目概览
DCloud
/
uni-app
3 天 前同步成功
通知
815
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
84816c22
编写于
11月 12, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update deps
上级
2e990d30
变更
51
展开全部
隐藏空白更改
内联
并排
Showing
51 changed file
with
937 addition
and
2344 deletion
+937
-2344
packages/uni-app-plus/dist/style.css
packages/uni-app-plus/dist/style.css
+1
-1
packages/uni-app-vite/lib/require.js
packages/uni-app-vite/lib/require.js
+0
-1751
packages/uni-app-vite/package.json
packages/uni-app-vite/package.json
+1
-5
packages/uni-app/package.json
packages/uni-app/package.json
+2
-1
packages/uni-cli-nvue/package.json
packages/uni-cli-nvue/package.json
+1
-0
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+2
-0
packages/uni-h5-vite/package.json
packages/uni-h5-vite/package.json
+2
-0
packages/uni-h5-vite/src/plugin/config.ts
packages/uni-h5-vite/src/plugin/config.ts
+6
-2
packages/uni-h5-vite/src/plugin/configureServer/index.ts
packages/uni-h5-vite/src/plugin/configureServer/index.ts
+1
-1
packages/uni-h5-vite/src/plugin/configureServer/middlewares/timestamp.ts
...-vite/src/plugin/configureServer/middlewares/timestamp.ts
+1
-1
packages/uni-h5-vite/src/plugin/configureServer/ssr.ts
packages/uni-h5-vite/src/plugin/configureServer/ssr.ts
+1
-1
packages/uni-h5-vite/src/plugin/configureServer/static.ts
packages/uni-h5-vite/src/plugin/configureServer/static.ts
+1
-1
packages/uni-h5-vite/src/plugin/handleHotUpdate/index.ts
packages/uni-h5-vite/src/plugin/handleHotUpdate/index.ts
+1
-1
packages/uni-h5-vite/src/plugin/index.ts
packages/uni-h5-vite/src/plugin/index.ts
+1
-1
packages/uni-h5-vite/src/plugin/transformIndexHtml/index.ts
packages/uni-h5-vite/src/plugin/transformIndexHtml/index.ts
+1
-1
packages/uni-h5-vite/src/plugins/css.ts
packages/uni-h5-vite/src/plugins/css.ts
+1
-1
packages/uni-h5-vite/src/plugins/easycom.ts
packages/uni-h5-vite/src/plugins/easycom.ts
+1
-1
packages/uni-h5-vite/src/plugins/inject.ts
packages/uni-h5-vite/src/plugins/inject.ts
+1
-1
packages/uni-h5-vite/src/plugins/manifestJson.ts
packages/uni-h5-vite/src/plugins/manifestJson.ts
+1
-1
packages/uni-h5-vite/src/plugins/pagesJson.ts
packages/uni-h5-vite/src/plugins/pagesJson.ts
+1
-1
packages/uni-h5-vite/src/plugins/renderjs.ts
packages/uni-h5-vite/src/plugins/renderjs.ts
+1
-1
packages/uni-h5-vite/src/plugins/resolveId.ts
packages/uni-h5-vite/src/plugins/resolveId.ts
+1
-1
packages/uni-h5-vite/src/plugins/setup.ts
packages/uni-h5-vite/src/plugins/setup.ts
+1
-1
packages/uni-h5-vite/src/plugins/ssr.ts
packages/uni-h5-vite/src/plugins/ssr.ts
+1
-1
packages/uni-h5-vite/src/utils/features.ts
packages/uni-h5-vite/src/utils/features.ts
+1
-1
packages/uni-h5-vite/src/utils/ssr.ts
packages/uni-h5-vite/src/utils/ssr.ts
+1
-1
packages/uni-h5/package.json
packages/uni-h5/package.json
+2
-0
packages/uni-mp-alipay/package.json
packages/uni-mp-alipay/package.json
+2
-1
packages/uni-mp-baidu/dist/uni.mp.esm.js
packages/uni-mp-baidu/dist/uni.mp.esm.js
+94
-24
packages/uni-mp-baidu/package.json
packages/uni-mp-baidu/package.json
+2
-1
packages/uni-mp-compiler/package.json
packages/uni-mp-compiler/package.json
+4
-1
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
+73
-8
packages/uni-mp-kuaishou/package.json
packages/uni-mp-kuaishou/package.json
+2
-1
packages/uni-mp-lark/dist/uni.mp.esm.js
packages/uni-mp-lark/dist/uni.mp.esm.js
+83
-18
packages/uni-mp-lark/package.json
packages/uni-mp-lark/package.json
+1
-0
packages/uni-mp-qq/dist/uni.mp.esm.js
packages/uni-mp-qq/dist/uni.mp.esm.js
+73
-8
packages/uni-mp-qq/package.json
packages/uni-mp-qq/package.json
+1
-0
packages/uni-mp-toutiao/dist/uni.mp.esm.js
packages/uni-mp-toutiao/dist/uni.mp.esm.js
+83
-18
packages/uni-mp-toutiao/package.json
packages/uni-mp-toutiao/package.json
+1
-0
packages/uni-mp-vite/package.json
packages/uni-mp-vite/package.json
+1
-0
packages/uni-mp-weixin/dist/uni.mp.esm.js
packages/uni-mp-weixin/dist/uni.mp.esm.js
+4
-2
packages/uni-mp-weixin/package.json
packages/uni-mp-weixin/package.json
+2
-1
packages/uni-quickapp-webview/dist/uni.mp.esm.js
packages/uni-quickapp-webview/dist/uni.mp.esm.js
+82
-17
packages/uni-quickapp-webview/package.json
packages/uni-quickapp-webview/package.json
+3
-1
packages/uni-shared/package.json
packages/uni-shared/package.json
+3
-0
packages/uni-stat/lib/uni.plugin.js
packages/uni-stat/lib/uni.plugin.js
+64
-69
packages/vite-plugin-uni/package.json
packages/vite-plugin-uni/package.json
+8
-0
packages/vite-plugin-uni/src/cli/action.ts
packages/vite-plugin-uni/src/cli/action.ts
+1
-1
packages/vite-plugin-uni/src/cli/index.ts
packages/vite-plugin-uni/src/cli/index.ts
+1
-1
packages/vite-plugin-uni/src/index.ts
packages/vite-plugin-uni/src/index.ts
+1
-1
pnpm-lock.yaml
pnpm-lock.yaml
+313
-393
未找到文件。
packages/uni-app-plus/dist/style.css
浏览文件 @
84816c22
此差异已折叠。
点击以展开。
packages/uni-app-vite/lib/require.js
已删除
100644 → 0
浏览文件 @
2e990d30
此差异已折叠。
点击以展开。
packages/uni-app-vite/package.json
浏览文件 @
84816c22
...
...
@@ -24,12 +24,8 @@
"@dcloudio/uni-i18n"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@rollup/pluginutils"
:
"^4.1.1"
,
"clean-css"
:
"^5.1.3"
,
"debug"
:
"^4.3.2"
,
"fs-extra"
:
"^10.0.0"
,
"postcss-import"
:
"^14.0.2"
,
"postcss-load-config"
:
"^3.1.0"
,
"postcss-modules"
:
"^4.1.3"
"fs-extra"
:
"^10.0.0"
},
"devDependencies"
:
{
"@types/debug"
:
"^4.1.7"
,
...
...
packages/uni-app/package.json
浏览文件 @
84816c22
...
...
@@ -28,6 +28,7 @@
"@dcloudio/uni-components"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-i18n"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-stat"
:
"3.0.0-alpha-3021320211109003"
"@dcloudio/uni-stat"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/shared"
:
"3.2.21"
}
}
packages/uni-cli-nvue/package.json
浏览文件 @
84816c22
...
...
@@ -23,6 +23,7 @@
"@babel/preset-env"
:
"^7.15.5"
,
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/shared"
:
"3.2.21"
,
"acorn"
:
"^5.2.1"
,
"babel-loader"
:
"^8.2.2"
,
"consolidate"
:
"^0.15.1"
,
...
...
packages/uni-cli-shared/package.json
浏览文件 @
84816c22
...
...
@@ -25,6 +25,8 @@
"@rollup/pluginutils"
:
"^4.1.1"
,
"@vue/compiler-core"
:
"3.2.21"
,
"@vue/compiler-dom"
:
"3.2.21"
,
"@vue/shared"
:
"3.2.21"
,
"chalk"
:
"^4.1.1"
,
"chokidar"
:
"^3.5.2"
,
"compare-versions"
:
"^3.6.0"
,
"debug"
:
"^4.3.2"
,
...
...
packages/uni-h5-vite/package.json
浏览文件 @
84816c22
...
...
@@ -25,7 +25,9 @@
"@vue/compiler-dom"
:
"3.2.21"
,
"@vue/compiler-sfc"
:
"3.2.21"
,
"@vue/server-renderer"
:
"3.2.21"
,
"@vue/shared"
:
"3.2.21"
,
"debug"
:
"^4.3.2"
,
"fs-extra"
:
"^10.0.0"
,
"mime"
:
"^3.0.0"
,
"module-alias"
:
"^2.2.2"
},
...
...
packages/uni-h5-vite/src/plugin/config.ts
浏览文件 @
84816c22
import
fs
from
'
fs
'
import
path
from
'
path
'
import
{
normalizePath
,
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
isInHBuilderX
,
resolveMainPathOnce
}
from
'
@dcloudio/uni-cli-shared
'
import
type
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
isInHBuilderX
,
normalizePath
,
resolveMainPathOnce
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
createDefine
,
isSsr
}
from
'
../utils
'
import
{
esbuildPrePlugin
}
from
'
./esbuild/esbuildPrePlugin
'
import
{
external
}
from
'
./configureServer/ssr
'
...
...
packages/uni-h5-vite/src/plugin/configureServer/index.ts
浏览文件 @
84816c22
...
...
@@ -2,7 +2,7 @@ import {
getRouterOptions
,
parseManifestJsonOnce
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
uniTimestampMiddleware
}
from
'
./middlewares/timestamp
'
import
{
initSSR
}
from
'
./ssr
'
import
{
initStatic
}
from
'
./static
'
...
...
packages/uni-h5-vite/src/plugin/configureServer/middlewares/timestamp.ts
浏览文件 @
84816c22
import
{
parse
as
parseUrl
}
from
'
url
'
import
{
IncomingMessage
,
ServerResponse
}
from
'
http
'
import
{
ViteDevServer
}
from
'
vite
'
import
type
{
ViteDevServer
}
from
'
vite
'
import
{
NextHandler
}
from
'
./static
'
import
path
from
'
path
'
import
{
EXTNAME_VUE_RE
}
from
'
@dcloudio/uni-cli-shared
'
...
...
packages/uni-h5-vite/src/plugin/configureServer/ssr.ts
浏览文件 @
84816c22
import
{
ViteDevServer
}
from
'
vite
'
import
type
{
ViteDevServer
}
from
'
vite
'
export
const
external
=
[
'
@dcloudio/uni-app
'
,
...
...
packages/uni-h5-vite/src/plugin/configureServer/static.ts
浏览文件 @
84816c22
import
fs
from
'
fs
'
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
ViteDevServer
}
from
'
vite
'
import
type
{
ViteDevServer
}
from
'
vite
'
import
{
createFilter
}
from
'
@rollup/pluginutils
'
import
{
isImportRequest
,
...
...
packages/uni-h5-vite/src/plugin/handleHotUpdate/index.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
ModuleGraph
,
Plugin
}
from
'
vite
'
import
type
{
ModuleGraph
,
Plugin
}
from
'
vite
'
import
{
extend
}
from
'
@vue/shared
'
import
{
initEasycomsOnce
,
...
...
packages/uni-h5-vite/src/plugin/index.ts
浏览文件 @
84816c22
import
{
ResolvedConfig
}
from
'
vite
'
import
type
{
ResolvedConfig
}
from
'
vite
'
import
{
UniVitePlugin
}
from
'
@dcloudio/uni-cli-shared
'
import
{
createHandleHotUpdate
}
from
'
./handleHotUpdate
'
import
{
createTransformIndexHtml
}
from
'
./transformIndexHtml
'
...
...
packages/uni-h5-vite/src/plugin/transformIndexHtml/index.ts
浏览文件 @
84816c22
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
parseManifestJsonOnce
}
from
'
@dcloudio/uni-cli-shared
'
...
...
packages/uni-h5-vite/src/plugins/css.ts
浏览文件 @
84816c22
import
fs
from
'
fs
'
import
{
OutputAsset
,
OutputChunk
}
from
'
rollup
'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
type
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
buildInCssSet
,
resolveBuiltIn
}
from
'
@dcloudio/uni-cli-shared
'
...
...
packages/uni-h5-vite/src/plugins/easycom.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
createFilter
,
FilterPattern
}
from
'
@rollup/pluginutils
'
import
{
camelize
,
capitalize
}
from
'
@vue/shared
'
...
...
packages/uni-h5-vite/src/plugins/inject.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
type
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
extend
}
from
'
@vue/shared
'
...
...
packages/uni-h5-vite/src/plugins/manifestJson.ts
浏览文件 @
84816c22
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
defineUniManifestJsonPlugin
,
...
...
packages/uni-h5-vite/src/plugins/pagesJson.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
type
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
API_DEPS_CSS
,
FEATURE_DEFINES
,
...
...
packages/uni-h5-vite/src/plugins/renderjs.ts
浏览文件 @
84816c22
import
debug
from
'
debug
'
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
rewriteDefault
}
from
'
@vue/compiler-sfc
'
import
{
missingModuleName
,
parseRenderjs
}
from
'
@dcloudio/uni-cli-shared
'
...
...
packages/uni-h5-vite/src/plugins/resolveId.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
resolveBuiltIn
,
parseCompatConfigOnce
}
from
'
@dcloudio/uni-cli-shared
'
import
{
ownerModuleName
}
from
'
../utils
'
...
...
packages/uni-h5-vite/src/plugins/setup.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
Plugin
}
from
'
vite
'
import
type
{
Plugin
}
from
'
vite
'
import
{
EXTNAME_JS_RE
,
normalizePath
,
...
...
packages/uni-h5-vite/src/plugins/ssr.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
type
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
OutputChunk
}
from
'
rollup
'
...
...
packages/uni-h5-vite/src/utils/features.ts
浏览文件 @
84816c22
import
{
ConfigEnv
,
UserConfig
}
from
'
vite
'
import
type
{
ConfigEnv
,
UserConfig
}
from
'
vite
'
import
{
parsePagesJsonOnce
,
parseManifestJsonOnce
,
...
...
packages/uni-h5-vite/src/utils/ssr.ts
浏览文件 @
84816c22
...
...
@@ -12,7 +12,7 @@ import {
getBuiltInPaths
,
transformMatchMedia
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
ConfigEnv
,
ResolvedConfig
,
UserConfig
}
from
'
vite
'
import
type
{
ConfigEnv
,
ResolvedConfig
,
UserConfig
}
from
'
vite
'
import
resolve
from
'
resolve
'
import
{
resolveComponentType
}
from
'
@vue/compiler-dom
'
import
{
transformPageHead
}
from
'
../plugin/transforms/transformPageHead
'
...
...
packages/uni-h5/package.json
浏览文件 @
84816c22
...
...
@@ -34,9 +34,11 @@
"@dcloudio/uni-i18n"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/server-renderer"
:
"3.2.21"
,
"@vue/shared"
:
"3.2.21"
,
"localstorage-polyfill"
:
"^1.0.1"
,
"pako"
:
"^2.0.3"
,
"safe-area-insets"
:
"^1.4.1"
,
"vue-router"
:
"^4.0.12"
,
"xmlhttprequest"
:
"^1.8.0"
},
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
...
...
packages/uni-mp-alipay/package.json
浏览文件 @
84816c22
...
...
@@ -25,6 +25,7 @@
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/compiler-core"
:
"3.2.21"
"@vue/compiler-core"
:
"3.2.21"
,
"@vue/shared"
:
"3.2.21"
}
}
packages/uni-mp-baidu/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
}
from
'
vue
'
;
// lifecycle
// App and Page
const
ON_SHOW$1
=
'
onShow
'
;
//Page
const
ON_LOAD$1
=
'
onLoad
'
;
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
...
...
@@ -800,13 +870,13 @@ function parse$2(appOptions) {
if
(
!
this
.
$vm
)
{
this
.
onLaunch
(
args
);
}
this
.
$vm
.
$callHook
(
ON_SHOW
,
args
);
this
.
$vm
.
$callHook
(
ON_SHOW
$1
,
args
);
};
}
var
parseAppOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
parse
:
parse$2
__proto__
:
null
,
parse
:
parse$2
});
/**
...
...
@@ -881,7 +951,7 @@ function initLifetimes({ mocks, isPage, initRelation, vueOptions, }) {
// https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
if
(
this
.
$vm
)
{
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
},
detached
()
{
...
...
@@ -947,8 +1017,8 @@ function parse$1(componentOptions) {
const
pageInstance
=
this
.
pageinstance
;
pageInstance
.
$vm
=
this
.
$vm
;
if
(
hasOwn
(
pageInstance
,
'
_$args
'
))
{
this
.
$vm
.
$callHook
(
ON_LOAD
,
pageInstance
.
_$args
);
this
.
$vm
.
$callHook
(
ON_SHOW
);
this
.
$vm
.
$callHook
(
ON_LOAD
$1
,
pageInstance
.
_$args
);
this
.
$vm
.
$callHook
(
ON_SHOW
$1
);
delete
pageInstance
.
_$args
;
}
}
...
...
@@ -972,13 +1042,13 @@ function parse$1(componentOptions) {
}
var
parseComponentOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
parse
:
parse$1
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
parse
:
parse$1
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
});
function
parse
(
pageOptions
)
{
...
...
@@ -987,15 +1057,15 @@ function parse(pageOptions) {
// 纠正百度小程序生命周期methods:onShow在methods:onLoad之前触发的问题
methods
.
onShow
=
function
onShow
()
{
if
(
this
.
$vm
&&
this
.
_$loaded
)
{
this
.
$vm
.
$callHook
(
ON_SHOW
);
this
.
$vm
.
$callHook
(
ON_SHOW
$1
);
}
};
methods
.
onLoad
=
function
onLoad
(
args
)
{
// 百度 onLoad 在 attached 之前触发,先存储 args, 在 attached 里边触发 onLoad
if
(
this
.
$vm
)
{
this
.
_$loaded
=
true
;
this
.
$vm
.
$callHook
(
ON_LOAD
,
args
);
this
.
$vm
.
$callHook
(
ON_SHOW
);
this
.
$vm
.
$callHook
(
ON_LOAD
$1
,
args
);
this
.
$vm
.
$callHook
(
ON_SHOW
$1
);
}
else
{
this
.
pageinstance
.
_$args
=
args
;
...
...
@@ -1004,20 +1074,20 @@ function parse(pageOptions) {
}
var
parsePageOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
parse
:
parse
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
__proto__
:
null
,
parse
:
parse
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
});
const
createApp
=
initCreateApp
(
parseAppOptions
);
const
createPage
=
initCreatePage
(
parsePageOptions
);
const
createComponent
=
initCreateComponent
(
parseComponentOptions
);
const
createSubpackageApp
=
initCreateSubpackageApp
(
parseAppOptions
);
swan
.
EventChannel
=
EventChannel
;
swan
.
EventChannel
=
EventChannel
$1
;
swan
.
createApp
=
global
.
createApp
=
createApp
;
swan
.
createPage
=
createPage
;
swan
.
createComponent
=
createComponent
;
...
...
packages/uni-mp-baidu/package.json
浏览文件 @
84816c22
...
...
@@ -33,6 +33,7 @@
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-compiler"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
}
}
packages/uni-mp-compiler/package.json
浏览文件 @
84816c22
...
...
@@ -26,7 +26,10 @@
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/compiler-core"
:
"3.2.21"
,
"@vue/compiler-dom"
:
"3.2.21"
,
"@vue/
compiler-sfc
"
:
"3.2.21"
,
"@vue/
shared
"
:
"3.2.21"
,
"estree-walker"
:
"^2.0.2"
},
"devDependencies"
:
{
"@vue/compiler-sfc"
:
"3.2.21"
}
}
packages/uni-mp-kuaishou/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
}
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
...
...
@@ -813,7 +878,7 @@ function initLifetimes({ mocks, isPage, initRelation, vueOptions, }) {
// https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
if
(
this
.
$vm
)
{
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
},
detached
()
{
...
...
@@ -845,12 +910,12 @@ function handleLink(event) {
}
var
baseParseOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
});
function
parse$1
(
pageOptions
)
{
...
...
@@ -924,7 +989,7 @@ const createApp = initCreateApp();
const
createPage
=
initCreatePage
(
parsePageOptions
);
const
createComponent
=
initCreateComponent
(
parseComponentOptions
);
const
createSubpackageApp
=
initCreateSubpackageApp
();
ks
.
EventChannel
=
EventChannel
;
ks
.
EventChannel
=
EventChannel
$1
;
ks
.
createApp
=
global
.
createApp
=
createApp
;
ks
.
createPage
=
createPage
;
ks
.
createComponent
=
createComponent
;
...
...
packages/uni-mp-kuaishou/package.json
浏览文件 @
84816c22
...
...
@@ -29,6 +29,7 @@
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-compiler"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
}
}
packages/uni-mp-lark/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
,
isObject
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
,
onBeforeMount
}
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
...
...
@@ -939,21 +1004,21 @@ function handleLink({ detail: { vuePid, nodeId, webviewId }, }) {
}
vm
.
$callCreatedHook
();
vm
.
$callHook
(
'
mounted
'
);
vm
.
$callHook
(
ON_READY
);
vm
.
$callHook
(
ON_READY
$1
);
}
function
parse
(
componentOptions
,
{
handleLink
})
{
componentOptions
.
methods
.
__l
=
handleLink
;
}
var
parseComponentOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
instances
:
instances
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
parse
:
parse
,
initLifetimes
:
initLifetimes$1
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
instances
:
instances
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
parse
:
parse
,
initLifetimes
:
initLifetimes$1
});
function
initLifetimes
(
lifetimesOptions
)
{
...
...
@@ -965,7 +1030,7 @@ function initLifetimes(lifetimesOptions) {
}
this
.
$vm
.
$callCreatedHook
();
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
else
{
this
.
is
&&
console
.
warn
(
this
.
is
+
'
is not ready
'
);
...
...
@@ -986,20 +1051,20 @@ function initLifetimes(lifetimesOptions) {
}
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
();
tt
.
EventChannel
=
EventChannel
;
tt
.
EventChannel
=
EventChannel
$1
;
tt
.
createApp
=
global
.
createApp
=
createApp
;
tt
.
createPage
=
createPage
;
tt
.
createComponent
=
createComponent
;
...
...
packages/uni-mp-lark/package.json
浏览文件 @
84816c22
...
...
@@ -29,6 +29,7 @@
"@dcloudio/uni-mp-compiler"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/compiler-core"
:
"3.2.21"
}
}
packages/uni-mp-qq/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
}
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
...
...
@@ -775,7 +840,7 @@ function initLifetimes({ mocks, isPage, initRelation, vueOptions, }) {
// https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
if
(
this
.
$vm
)
{
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
},
detached
()
{
...
...
@@ -807,12 +872,12 @@ function handleLink(event) {
}
var
parseOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
initLifetimes
:
initLifetimes
});
const
createApp
=
initCreateApp
();
...
...
@@ -824,7 +889,7 @@ wx.createPage = createPage;
wx
.
createComponent
=
createComponent
;
wx
.
createSubpackageApp
=
createSubpackageApp
;
qq
.
EventChannel
=
EventChannel
;
qq
.
EventChannel
=
EventChannel
$1
;
qq
.
createApp
=
global
.
createApp
=
createApp
;
qq
.
createPage
=
createPage
;
qq
.
createComponent
=
createComponent
;
...
...
packages/uni-mp-qq/package.json
浏览文件 @
84816c22
...
...
@@ -29,6 +29,7 @@
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"fs-extra"
:
"^10.0.0"
}
}
packages/uni-mp-toutiao/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
,
isObject
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
}
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
...
...
@@ -955,21 +1020,21 @@ function handleLink({ detail: { vuePid, nodeId, webviewId }, }) {
}
vm
.
$callCreatedHook
();
vm
.
$callHook
(
'
mounted
'
);
vm
.
$callHook
(
ON_READY
);
vm
.
$callHook
(
ON_READY
$1
);
}
function
parse
(
componentOptions
,
{
handleLink
})
{
componentOptions
.
methods
.
__l
=
handleLink
;
}
var
parseComponentOptions
=
/*#__PURE__*/
Object
.
freeze
({
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
instances
:
instances
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
parse
:
parse
,
initLifetimes
:
initLifetimes$1
__proto__
:
null
,
mocks
:
mocks
,
isPage
:
isPage
,
instances
:
instances
,
initRelation
:
initRelation
,
handleLink
:
handleLink
,
parse
:
parse
,
initLifetimes
:
initLifetimes$1
});
function
initLifetimes
(
lifetimesOptions
)
{
...
...
@@ -981,7 +1046,7 @@ function initLifetimes(lifetimesOptions) {
}
this
.
$vm
.
$callCreatedHook
();
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
else
{
this
.
is
&&
console
.
warn
(
this
.
is
+
'
is not ready
'
);
...
...
@@ -1002,20 +1067,20 @@ function initLifetimes(lifetimesOptions) {
}
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
();
tt
.
EventChannel
=
EventChannel
;
tt
.
EventChannel
=
EventChannel
$1
;
tt
.
createApp
=
global
.
createApp
=
createApp
;
tt
.
createPage
=
createPage
;
tt
.
createComponent
=
createComponent
;
...
...
packages/uni-mp-toutiao/package.json
浏览文件 @
84816c22
...
...
@@ -26,6 +26,7 @@
"@dcloudio/uni-mp-compiler"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/compiler-core"
:
"3.2.21"
}
}
packages/uni-mp-vite/package.json
浏览文件 @
84816c22
...
...
@@ -22,6 +22,7 @@
"@dcloudio/uni-mp-compiler"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/shared"
:
"3.2.21"
,
"base64url"
:
"^3.0.1"
,
"debug"
:
"^4.3.2"
,
"magic-string"
:
"^0.25.7"
...
...
packages/uni-mp-weixin/dist/uni.mp.esm.js
浏览文件 @
84816c22
...
...
@@ -15,7 +15,7 @@ const ON_PAGE_NOT_FOUND = 'onPageNotFound';
const
ON_UNHANDLE_REJECTION
=
'
onUnhandledRejection
'
;
//Page
const
ON_LOAD
=
'
onLoad
'
;
const
ON_READY
=
'
onReady
'
;
const
ON_READY
$1
=
'
onReady
'
;
const
ON_UNLOAD
=
'
onUnload
'
;
const
ON_RESIZE
=
'
onResize
'
;
const
ON_TAB_ITEM_TAP
=
'
onTabItemTap
'
;
...
...
@@ -194,7 +194,7 @@ function initHook$1(mpOptions, hook, excludes) {
};
}
}
const
EXCLUDE_HOOKS
=
[
ON_READY
];
const
EXCLUDE_HOOKS
=
[
ON_READY
$1
];
function
initHooks
(
mpOptions
,
hooks
,
excludes
=
EXCLUDE_HOOKS
)
{
hooks
.
forEach
((
hook
)
=>
initHook$1
(
mpOptions
,
hook
,
excludes
));
}
...
...
@@ -647,6 +647,8 @@ function initCreatePage(parseOptions) {
};
}
const
ON_READY
=
'
onReady
'
;
const
MPPage
=
Page
;
const
MPComponent
=
Component
;
const
customizeRE
=
/:/g
;
...
...
packages/uni-mp-weixin/package.json
浏览文件 @
84816c22
...
...
@@ -31,6 +31,7 @@
"dependencies"
:
{
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
}
}
packages/uni-quickapp-webview/dist/uni.mp.esm.js
浏览文件 @
84816c22
import
{
isPlainObject
,
isArray
,
hasOwn
,
isFunction
,
extend
,
camelize
,
isObject
}
from
'
@vue/shared
'
;
import
{
injectHook
,
ref
}
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
...
...
@@ -875,7 +940,7 @@ function initLifetimes(lifetimesOptions) {
}
this
.
$vm
.
$callCreatedHook
();
this
.
$vm
.
$callHook
(
'
mounted
'
);
this
.
$vm
.
$callHook
(
ON_READY
);
this
.
$vm
.
$callHook
(
ON_READY
$1
);
}
else
{
this
.
is
&&
console
.
warn
(
this
.
is
+
'
is not ready
'
);
...
...
@@ -940,7 +1005,7 @@ function handleLink({ detail: { nodeId, webviewId }, }) {
delete
vm
.
_$childVues
;
}
vm
.
$callHook
(
'
mounted
'
);
vm
.
$callHook
(
ON_READY
);
vm
.
$callHook
(
ON_READY
$1
);
};
// 当 parentVm 已经 mounted 时,直接触发,否则延迟
if
(
!
parentVm
||
parentVm
.
$
.
isMounted
)
{
...
...
@@ -956,30 +1021,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
;
qa
.
EventChannel
=
EventChannel
$1
;
qa
.
createApp
=
global
.
createApp
=
createApp
;
qa
.
createPage
=
createPage
;
qa
.
createComponent
=
createComponent
;
...
...
packages/uni-quickapp-webview/package.json
浏览文件 @
84816c22
...
...
@@ -27,6 +27,8 @@
"dependencies"
:
{
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vite"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@vue/shared"
:
"3.2.21"
}
}
packages/uni-shared/package.json
浏览文件 @
84816c22
...
...
@@ -21,5 +21,8 @@
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
"devDependencies"
:
{
"@vue/runtime-core"
:
"3.2.21"
},
"dependencies"
:
{
"@vue/shared"
:
"3.2.21"
}
}
packages/uni-stat/lib/uni.plugin.js
浏览文件 @
84816c22
'
use strict
'
'
use strict
'
;
var
debug
=
require
(
'
debug
'
)
var
uniCliShared
=
require
(
'
@dcloudio/uni-cli-shared
'
)
var
debug
=
require
(
'
debug
'
)
;
var
uniCliShared
=
require
(
'
@dcloudio/uni-cli-shared
'
)
;
function
_interopDefaultLegacy
(
e
)
{
return
e
&&
typeof
e
===
'
object
'
&&
'
default
'
in
e
?
e
:
{
default
:
e
}
}
function
_interopDefaultLegacy
(
e
)
{
return
e
&&
typeof
e
===
'
object
'
&&
'
default
'
in
e
?
e
:
{
'
default
'
:
e
};
}
var
debug__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
debug
)
var
debug__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
debug
);
var
index
=
[
uniCliShared
.
defineUniMainJsPlugin
((
opts
)
=>
{
let
isEnable
=
false
return
{
name
:
'
vite:uni-stat
'
,
enforce
:
'
pre
'
,
config
(
config
,
env
)
{
if
(
isSsr
(
env
.
command
,
config
))
{
return
}
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
platform
=
process
.
env
.
UNI_PLATFORM
isEnable
=
uniCliShared
.
getUniStatistics
(
inputDir
,
platform
).
enable
===
true
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
const
manifestJson
=
uniCliShared
.
parseManifestJsonOnce
(
inputDir
)
if
(
!
manifestJson
.
appid
)
{
console
.
log
()
console
.
warn
(
uniCliShared
.
M
[
'
stat.warn.appid
'
])
console
.
log
()
isEnable
=
false
}
}
const
titlesJson
=
Object
.
create
(
null
)
if
(
isEnable
)
{
uniCliShared
.
parsePagesJsonOnce
(
inputDir
,
platform
)
.
pages
.
forEach
((
page
)
=>
{
const
titleText
=
page
.
style
.
navigationBar
.
titleText
||
''
if
(
titleText
)
{
titlesJson
[
page
.
path
]
=
titleText
}
})
}
debug__default
[
'
default
'
](
'
vite:uni:stat
'
)(
'
isEnable
'
,
isEnable
)
process
.
env
.
UNI_STAT_TITLE_JSON
=
JSON
.
stringify
(
titlesJson
)
return
{
define
:
{
'
process.env.UNI_STAT_TITLE_JSON
'
:
process
.
env
.
UNI_STAT_TITLE_JSON
,
},
}
},
transform
(
code
,
id
)
{
if
(
isEnable
&&
opts
.
filter
(
id
))
{
return
{
code
:
code
+
`;import '@dcloudio/uni-stat';`
,
map
:
null
,
}
}
},
}
}),
]
function
isSsr
(
command
,
config
)
{
if
(
command
===
'
serve
'
)
{
return
!!
(
config
.
server
&&
config
.
server
.
middlewareMode
)
}
if
(
command
===
'
build
'
)
{
return
!!
(
config
.
build
&&
config
.
build
.
ssr
)
}
return
false
var
index
=
[
uniCliShared
.
defineUniMainJsPlugin
((
opts
)
=>
{
let
isEnable
=
false
;
return
{
name
:
'
vite:uni-stat
'
,
enforce
:
'
pre
'
,
config
(
config
,
env
)
{
if
(
isSsr
(
env
.
command
,
config
))
{
return
;
}
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
;
const
platform
=
process
.
env
.
UNI_PLATFORM
;
isEnable
=
uniCliShared
.
getUniStatistics
(
inputDir
,
platform
).
enable
===
true
;
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
const
manifestJson
=
uniCliShared
.
parseManifestJsonOnce
(
inputDir
);
if
(
!
manifestJson
.
appid
)
{
console
.
log
();
console
.
warn
(
uniCliShared
.
M
[
'
stat.warn.appid
'
]);
console
.
log
();
isEnable
=
false
;
}
}
const
titlesJson
=
Object
.
create
(
null
);
if
(
isEnable
)
{
uniCliShared
.
parsePagesJsonOnce
(
inputDir
,
platform
).
pages
.
forEach
((
page
)
=>
{
const
titleText
=
page
.
style
.
navigationBar
.
titleText
||
''
;
if
(
titleText
)
{
titlesJson
[
page
.
path
]
=
titleText
;
}
});
}
debug__default
[
"
default
"
](
'
vite:uni:stat
'
)(
'
isEnable
'
,
isEnable
);
process
.
env
.
UNI_STAT_TITLE_JSON
=
JSON
.
stringify
(
titlesJson
);
return
{
define
:
{
'
process.env.UNI_STAT_TITLE_JSON
'
:
process
.
env
.
UNI_STAT_TITLE_JSON
,
},
};
},
transform
(
code
,
id
)
{
if
(
isEnable
&&
opts
.
filter
(
id
))
{
return
{
code
:
code
+
`;import '@dcloudio/uni-stat';`
,
map
:
null
,
};
}
},
};
}),
];
function
isSsr
(
command
,
config
)
{
if
(
command
===
'
serve
'
)
{
return
!!
(
config
.
server
&&
config
.
server
.
middlewareMode
);
}
if
(
command
===
'
build
'
)
{
return
!!
(
config
.
build
&&
config
.
build
.
ssr
);
}
return
false
;
}
module
.
exports
=
index
module
.
exports
=
index
;
packages/vite-plugin-uni/package.json
浏览文件 @
84816c22
...
...
@@ -22,6 +22,9 @@
},
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"@babel/core"
:
"^7.15.5"
,
"@babel/plugin-syntax-import-meta"
:
"^7.10.4"
,
"@babel/plugin-transform-typescript"
:
"^7.15.4"
,
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@rollup/pluginutils"
:
"^4.1.1"
,
...
...
@@ -30,12 +33,14 @@
"@vue/compiler-core"
:
"3.2.21"
,
"@vue/compiler-dom"
:
"3.2.21"
,
"@vue/compiler-sfc"
:
"3.2.21"
,
"@vue/shared"
:
"3.2.21"
,
"cac"
:
"^6.7.3"
,
"chalk"
:
"^4.1.1"
,
"debug"
:
"^4.3.2"
,
"estree-walker"
:
"^2.0.2"
,
"express"
:
"^4.17.1"
,
"fs-extra"
:
"^10.0.0"
,
"hash-sum"
:
"^2.0.0"
,
"jsonc-parser"
:
"^3.0.0"
},
"devDependencies"
:
{
...
...
@@ -45,6 +50,9 @@
"@vue/babel-plugin-jsx"
:
"^1.1.1"
,
"chokidar"
:
"^3.5.2"
},
"peerDependencies"
:
{
"vite"
:
"^2.6.14"
},
"uni-app"
:
{
"compilerVersion"
:
"3.2.10"
},
...
...
packages/vite-plugin-uni/src/cli/action.ts
浏览文件 @
84816c22
import
{
extend
}
from
'
@vue/shared
'
import
{
RollupWatcher
}
from
'
rollup
'
import
{
BuildOptions
,
ServerOptions
}
from
'
vite
'
import
type
{
BuildOptions
,
ServerOptions
}
from
'
vite
'
import
{
M
}
from
'
@dcloudio/uni-cli-shared
'
import
{
CliOptions
}
from
'
.
'
import
{
build
,
buildSSR
}
from
'
./build
'
...
...
packages/vite-plugin-uni/src/cli/index.ts
浏览文件 @
84816c22
import
{
cac
}
from
'
cac
'
import
{
LogLevel
}
from
'
vite
'
import
type
{
LogLevel
}
from
'
vite
'
import
{
PLATFORMS
}
from
'
./utils
'
import
{
runBuild
,
runDev
}
from
'
./action
'
...
...
packages/vite-plugin-uni/src/index.ts
浏览文件 @
84816c22
import
path
from
'
path
'
import
debug
from
'
debug
'
import
{
Plugin
,
ResolvedConfig
,
ViteDevServer
}
from
'
vite
'
import
type
{
Plugin
,
ResolvedConfig
,
ViteDevServer
}
from
'
vite
'
import
type
{
Options
as
VueOptions
}
from
'
@vitejs/plugin-vue
'
import
type
{
Options
as
ViteLegacyOptions
}
from
'
@vitejs/plugin-legacy
'
import
type
{
VueJSXPluginOptions
}
from
'
@vue/babel-plugin-jsx
'
...
...
pnpm-lock.yaml
浏览文件 @
84816c22
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录