Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
b8d73c59
U
uni-app
项目概览
DCloud
/
uni-app
14 天 前同步成功
通知
751
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看板
提交
b8d73c59
编写于
9月 23, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(h5): tree shaking
上级
40e85ce7
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
39 addition
and
7 deletion
+39
-7
packages/global.d.ts
packages/global.d.ts
+1
-0
packages/uni-app-plus/dist/uni-app-service.es.js
packages/uni-app-plus/dist/uni-app-service.es.js
+3
-1
packages/uni-cli-shared/src/vite/features.ts
packages/uni-cli-shared/src/vite/features.ts
+12
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+5
-1
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+6
-2
packages/uni-h5/src/service/api/ui/popup/showToast.ts
packages/uni-h5/src/service/api/ui/popup/showToast.ts
+2
-1
packages/uni-mp-vue/dist/vue.runtime.esm.js
packages/uni-mp-vue/dist/vue.runtime.esm.js
+3
-1
packages/uni-vue/src/index.ts
packages/uni-vue/src/index.ts
+7
-1
未找到文件。
packages/global.d.ts
浏览文件 @
b8d73c59
...
...
@@ -37,6 +37,7 @@ declare var __UNI_FEATURE_NVUE__: boolean
declare
var
__UNI_FEATURE_PROMISE__
:
boolean
declare
var
__UNI_FEATURE_LONGPRESS__
:
boolean
declare
var
__UNI_FEATURE_ROUTER_MODE__
:
'
hash
'
|
'
history
'
declare
var
__UNI_FEATURE_UNI_CLOUD__
:
boolean
declare
var
__UNI_FEATURE_PAGES__
:
boolean
declare
var
__UNI_FEATURE_TABBAR__
:
boolean
...
...
packages/uni-app-plus/dist/uni-app-service.es.js
浏览文件 @
b8d73c59
...
...
@@ -9992,7 +9992,9 @@ var serviceContext = (function (vue) {
}
initOptionMergeStrategies(appConfig.optionMergeStrategies);
const globalProperties = appConfig.globalProperties;
uniIdMixin(globalProperties);
{
uniIdMixin(globalProperties);
}
{
globalProperties.$set = set;
globalProperties.$applyOptions = applyOptions;
...
...
packages/uni-cli-shared/src/vite/features.ts
浏览文件 @
b8d73c59
...
...
@@ -10,6 +10,7 @@ interface ProjectFeatures {
i18nFr
:
boolean
i18nZhHans
:
boolean
i18nZhHant
:
boolean
uniCloud
:
boolean
}
interface
PagesFeatures
{
nvue
:
boolean
...
...
@@ -44,6 +45,7 @@ function initProjectFeature({ inputDir }: InitFeaturesOptions) {
i18nFr
:
true
,
i18nZhHans
:
true
,
i18nZhHant
:
true
,
uniCloud
:
false
,
}
const
localesDir
=
path
.
resolve
(
inputDir
,
'
locale
'
)
if
(
fs
.
existsSync
(
localesDir
))
{
...
...
@@ -53,6 +55,14 @@ function initProjectFeature({ inputDir }: InitFeaturesOptions) {
features
.
i18nLocale
=
true
}
}
if
(
process
.
env
.
UNI_CLOUD_PROVIDER
)
{
try
{
const
providers
=
JSON
.
parse
(
process
.
env
.
UNI_CLOUD_PROVIDER
)
if
(
providers
.
length
)
{
features
.
uniCloud
=
true
}
}
catch
(
e
)
{}
}
return
features
}
...
...
@@ -207,6 +217,7 @@ export function initFeatures(options: InitFeaturesOptions) {
wxs
,
rpx
,
nvue
,
uniCloud
,
i18nEn
,
i18nEs
,
i18nFr
,
...
...
@@ -250,6 +261,7 @@ export function initFeatures(options: InitFeaturesOptions) {
__UNI_FEATURE_I18N_ZH_HANS__
:
i18nZhHans
,
// 是否启用zh_Hans
__UNI_FEATURE_I18N_ZH_HANT__
:
i18nZhHant
,
// 是否启用zh_Hant
// 以下特性,编译器已自动识别是否需要启用
__UNI_FEATURE_UNI_CLOUD__
:
uniCloud
,
// 是否启用uniCloud
__UNI_FEATURE_I18N_LOCALE__
:
i18nLocale
,
// 是否启用i18n
__UNI_FEATURE_NVUE__
:
nvue
,
// 是否启用nvue
__UNI_FEATURE_ROUTER_MODE__
:
routerMode
,
// 路由模式
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
b8d73c59
...
...
@@ -6565,7 +6565,11 @@ function initApp$1(app) {
}
initOptionMergeStrategies
(
appConfig
.
optionMergeStrategies
);
const
globalProperties
=
appConfig
.
globalProperties
;
uniIdMixin
(
globalProperties
);
{
if
(
__UNI_FEATURE_UNI_CLOUD__
)
{
uniIdMixin
(
globalProperties
);
}
}
{
globalProperties
.
$set
=
set
;
globalProperties
.
$applyOptions
=
applyOptions
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
b8d73c59
...
...
@@ -13283,7 +13283,11 @@ function initApp$1(app) {
}
initOptionMergeStrategies(appConfig.optionMergeStrategies);
const globalProperties = appConfig.globalProperties;
uniIdMixin(globalProperties);
{
if (__UNI_FEATURE_UNI_CLOUD__) {
uniIdMixin(globalProperties);
}
}
{
globalProperties.$set = set;
globalProperties.$applyOptions = applyOptions;
...
...
@@ -18042,7 +18046,7 @@ function useToastIcon(props2) {
let showToastState;
let showType = "";
let timeoutId;
const scope = effectScope();
const scope =
/* @__PURE__ */
effectScope();
function watchVisible() {
scope.run(() => {
watch([() => showToastState.visible, () => showToastState.duration], ([visible, duration]) => {
...
...
packages/uni-h5/src/service/api/ui/popup/showToast.ts
浏览文件 @
b8d73c59
...
...
@@ -30,7 +30,8 @@ let showToastState: ToastProps
let
showType
:
'
onShowToast
'
|
'
onShowLoading
'
|
''
=
''
let
timeoutId
:
number
const
scope
=
effectScope
()
const
scope
=
/*#__PURE__*/
effectScope
()
function
watchVisible
()
{
scope
.
run
(()
=>
{
watch
(
...
...
packages/uni-mp-vue/dist/vue.runtime.esm.js
浏览文件 @
b8d73c59
...
...
@@ -4555,7 +4555,9 @@ function initApp(app) {
}
initOptionMergeStrategies
(
appConfig
.
optionMergeStrategies
);
const
globalProperties
=
appConfig
.
globalProperties
;
uniIdMixin
(
globalProperties
);
{
uniIdMixin
(
globalProperties
);
}
if
(
__VUE_OPTIONS_API__
)
{
globalProperties
.
$set
=
set
;
globalProperties
.
$applyOptions
=
applyOptions
;
...
...
packages/uni-vue/src/index.ts
浏览文件 @
b8d73c59
...
...
@@ -16,7 +16,13 @@ export function initApp(app: App) {
initOptionMergeStrategies
(
appConfig
.
optionMergeStrategies
)
const
globalProperties
=
appConfig
.
globalProperties
uniIdMixin
(
globalProperties
)
if
(
__PLATFORM__
===
'
h5
'
)
{
if
(
__UNI_FEATURE_UNI_CLOUD__
)
{
uniIdMixin
(
globalProperties
)
}
}
else
{
uniIdMixin
(
globalProperties
)
}
if
(
__VUE_OPTIONS_API__
)
{
globalProperties
.
$set
=
set
globalProperties
.
$applyOptions
=
applyOptions
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录