Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wzj-java
uni-app
提交
15a2a2b9
U
uni-app
项目概览
wzj-java
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
15a2a2b9
编写于
5月 10, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: build
上级
97e8900d
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
121 addition
and
99 deletion
+121
-99
packages/shims-vue-runtime.d.ts
packages/shims-vue-runtime.d.ts
+2
-0
packages/uni-core/src/helpers/page.ts
packages/uni-core/src/helpers/page.ts
+10
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+5
-2
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+40
-7
packages/uni-mp-alipay/dist/uni.api.esm.js
packages/uni-mp-alipay/dist/uni.api.esm.js
+11
-3
packages/uni-mp-baidu/dist/uni.api.esm.js
packages/uni-mp-baidu/dist/uni.api.esm.js
+10
-2
packages/uni-mp-kuaishou/dist/uni.api.esm.js
packages/uni-mp-kuaishou/dist/uni.api.esm.js
+10
-2
packages/uni-mp-lark/dist/uni.api.esm.js
packages/uni-mp-lark/dist/uni.api.esm.js
+1
-1
packages/uni-mp-qq/dist/uni.api.esm.js
packages/uni-mp-qq/dist/uni.api.esm.js
+10
-2
packages/uni-mp-toutiao/dist/uni.api.esm.js
packages/uni-mp-toutiao/dist/uni.api.esm.js
+1
-1
packages/uni-mp-weixin/dist/uni.api.esm.js
packages/uni-mp-weixin/dist/uni.api.esm.js
+10
-2
packages/uni-quickapp-webview/dist/uni.api.esm.js
packages/uni-quickapp-webview/dist/uni.api.esm.js
+10
-2
packages/uni-shared/dist/uni-shared.cjs.js
packages/uni-shared/dist/uni-shared.cjs.js
+0
-36
packages/uni-shared/dist/uni-shared.d.ts
packages/uni-shared/dist/uni-shared.d.ts
+0
-4
packages/uni-shared/dist/uni-shared.es.js
packages/uni-shared/dist/uni-shared.es.js
+1
-35
未找到文件。
packages/shims-vue-runtime.d.ts
浏览文件 @
15a2a2b9
...
...
@@ -30,6 +30,8 @@ declare module '@vue/runtime-core' {
$scopedSlotsData
?:
{
path
:
string
;
index
:
number
;
data
:
Data
}[]
// h5 | app
$wxsModules
?:
string
[]
// 暂定 h5
$pageInstance
:
ComponentInternalInstance
}
export
const
onBeforeActivate
:
(
fn
:
()
=>
void
)
=>
void
...
...
packages/uni-core/src/helpers/page.ts
浏览文件 @
15a2a2b9
...
...
@@ -16,6 +16,11 @@ export function useCurrentPageId() {
// view 层
return
getCurrentPageId
()
}
// 暂时仅在 h5 平台实现 $pageInstance,避免影响过大
if
(
__PLATFORM__
===
'
h5
'
)
{
const
{
$pageInstance
}
=
getCurrentInstance
()
!
return
$pageInstance
&&
$pageInstance
.
proxy
!
.
$page
.
id
}
return
getCurrentInstance
()
!
.
root
.
proxy
!
.
$page
.
id
}
...
...
@@ -29,6 +34,11 @@ export function getPageIdByVm(
if
(
!
vm
.
$
)
{
return
}
// 暂时仅在 h5 平台实现 $pageInstance,避免影响过大
if
(
__PLATFORM__
===
'
h5
'
)
{
const
{
$pageInstance
}
=
vm
.
$
return
$pageInstance
&&
$pageInstance
.
proxy
!
.
$page
.
id
}
const
rootProxy
=
vm
.
$
.
root
.
proxy
if
(
rootProxy
&&
rootProxy
.
$page
)
{
return
rootProxy
.
$page
.
id
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
15a2a2b9
...
...
@@ -256,7 +256,10 @@ function createSvgIconVNode(path, color = "#000", size = 27) {
],
8
,
[
"
width
"
,
"
height
"
]);
}
function
useCurrentPageId
()
{
return
vue
.
getCurrentInstance
().
root
.
proxy
.
$page
.
id
;
{
const
{
$pageInstance
}
=
vue
.
getCurrentInstance
();
return
$pageInstance
&&
$pageInstance
.
proxy
.
$page
.
id
;
}
}
function
getCurrentPage
()
{
const
pages
=
getCurrentPages
();
...
...
@@ -7036,7 +7039,7 @@ function setupPage(comp) {
clone
:
true
,
init
:
initPage
,
setup
(
instance
)
{
instance
.
root
=
instance
;
instance
.
$pageInstance
=
instance
;
const
route
=
usePageRoute
();
const
query
=
uniShared
.
decodedQuery
(
route
.
query
);
instance
.
attrs
.
__pageQuery
=
query
;
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
15a2a2b9
import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, createTextVNode, onBeforeActivate, onBeforeDeactivate, createBlock, renderList, onDeactivated, createApp, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue";
import { isString, extend, isArray, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle,
IEVersion, getDeviceBrand,
ON_BACK_PRESS, parseUrl, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle, ON_BACK_PRESS, parseUrl, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
export { onCreateVueApp } from "@dcloudio/uni-shared";
import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n";
import { useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView } from "vue-router";
...
...
@@ -806,7 +806,10 @@ function createSvgIconVNode(path, color = "#000", size = 27) {
], 8, ["width", "height"]);
}
function useCurrentPageId() {
return getCurrentInstance().root.proxy.$page.id;
{
const { $pageInstance } = getCurrentInstance();
return $pageInstance && $pageInstance.proxy.$page.id;
}
}
function getPageIdByVm(instance2) {
const vm = resolveComponentInstance(instance2);
...
...
@@ -816,9 +819,9 @@ function getPageIdByVm(instance2) {
if (!vm.$) {
return;
}
const rootProxy = vm.$.root.proxy;
if (rootProxy && rootProxy.$page) {
return
rootP
roxy.$page.id;
{
const { $pageInstance } = vm.$;
return
$pageInstance && $pageInstance.p
roxy.$page.id;
}
}
function getCurrentPage() {
...
...
@@ -14261,7 +14264,7 @@ function setupPage(comp) {
clone: true,
init: initPage,
setup(instance2) {
instance2.
root
= instance2;
instance2.
$pageInstance
= instance2;
const route = usePageRoute();
const query = decodedQuery(route.query);
instance2.attrs.__pageQuery = query;
...
...
@@ -16284,6 +16287,36 @@ function deviceId$1() {
}
return deviceId;
}
function IEVersion() {
const userAgent = navigator.userAgent;
const isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
const isEdge = userAgent.indexOf("Edge") > -1 && !isIE;
const isIE11 = userAgent.indexOf("Trident") > -1 && userAgent.indexOf("rv:11.0") > -1;
if (isIE) {
const reIE = new RegExp("MSIE (\\d+\\.\\d+);");
reIE.test(userAgent);
const fIEVersion = parseFloat(RegExp.$1);
if (fIEVersion > 6) {
return fIEVersion;
} else {
return 6;
}
} else if (isEdge) {
return -1;
} else if (isIE11) {
return 11;
} else {
return -1;
}
}
function getDeviceBrand(model) {
if (/iphone/gi.test(model) || /ipad/gi.test(model) || /mac/gi.test(model)) {
return "apple";
}
if (/windows/gi.test(model)) {
return "microsoft";
}
}
const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", () => {
const pixelRatio2 = window.devicePixelRatio;
const screenFix = getScreenFix();
...
...
@@ -16471,7 +16504,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
browserName,
browseVersion,
osLanguage: language,
osName: osname,
osName: osname
.toLocaleLowerCase()
,
osVersion: osversion,
hostLanguage: language,
uniCompileVersion: __uniConfig.compilerVersion,
...
...
packages/uni-mp-alipay/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -854,6 +854,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
my
)
{
...
...
@@ -887,7 +895,7 @@ function populateParameters(fromRes, toRes) {
let
osName
=
''
;
let
osVersion
=
''
;
{
osName
=
platform
.
toLocaleLowerCase
()
;
osName
=
platform
;
osVersion
=
system
;
}
let
hostVersion
=
version
;
...
...
@@ -932,7 +940,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-baidu/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -854,6 +854,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
swan
)
{
...
...
@@ -920,7 +928,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-kuaishou/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -854,6 +854,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
ks
)
{
...
...
@@ -932,7 +940,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-lark/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
...
...
@@ -928,7 +928,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-qq/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -854,6 +854,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
qq
)
{
...
...
@@ -932,7 +940,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-toutiao/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
...
...
@@ -928,7 +928,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-mp-weixin/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
function
getBaseSystemInfo
()
{
return
wx
.
getSystemInfoSync
()
...
...
@@ -818,6 +818,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
wx
)
{
...
...
@@ -896,7 +904,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-quickapp-webview/dist/uni.api.esm.js
浏览文件 @
15a2a2b9
import
{
isArray
,
hasOwn
,
isString
,
isPlainObject
,
isObject
,
capitalize
,
toRawType
,
makeMap
,
isFunction
,
isPromise
,
remove
,
extend
}
from
'
@vue/shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
,
getDeviceBrand
}
from
'
@dcloudio/uni-shared
'
;
import
{
Emitter
,
onCreateVueApp
,
invokeCreateVueAppHook
}
from
'
@dcloudio/uni-shared
'
;
const
eventChannels
=
{};
const
eventChannelStack
=
[];
...
...
@@ -854,6 +854,14 @@ function initGetProvider(providers) {
};
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
const
UUID_KEY
=
'
__DC_STAT_UUID
'
;
let
deviceId
;
function
useDeviceId
(
global
=
qa
)
{
...
...
@@ -931,7 +939,7 @@ function populateParameters(fromRes, toRes) {
deviceBrand
,
deviceModel
:
model
,
deviceType
,
osName
,
osName
:
osName
.
toLocaleLowerCase
()
,
osVersion
,
osLanguage
:
language
,
osTheme
:
theme
,
...
...
packages/uni-shared/dist/uni-shared.cjs.js
浏览文件 @
15a2a2b9
...
...
@@ -406,40 +406,6 @@ function getValueByDataPath(obj, path) {
return
obj
[
key
];
}
return
getValueByDataPath
(
obj
[
key
],
parts
.
slice
(
1
).
join
(
'
.
'
));
}
function
IEVersion
()
{
const
userAgent
=
navigator
.
userAgent
;
const
isIE
=
userAgent
.
indexOf
(
'
compatible
'
)
>
-
1
&&
userAgent
.
indexOf
(
'
MSIE
'
)
>
-
1
;
const
isEdge
=
userAgent
.
indexOf
(
'
Edge
'
)
>
-
1
&&
!
isIE
;
const
isIE11
=
userAgent
.
indexOf
(
'
Trident
'
)
>
-
1
&&
userAgent
.
indexOf
(
'
rv:11.0
'
)
>
-
1
;
if
(
isIE
)
{
const
reIE
=
new
RegExp
(
'
MSIE (
\\
d+
\\
.
\\
d+);
'
);
reIE
.
test
(
userAgent
);
const
fIEVersion
=
parseFloat
(
RegExp
.
$1
);
if
(
fIEVersion
>
6
)
{
return
fIEVersion
;
}
else
{
return
6
;
}
}
else
if
(
isEdge
)
{
return
-
1
;
}
else
if
(
isIE11
)
{
return
11
;
}
else
{
return
-
1
;
}
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
function
formatKey
(
key
)
{
...
...
@@ -1476,7 +1442,6 @@ exports.Emitter = E$1;
exports
.
EventChannel
=
EventChannel
;
exports
.
EventModifierFlags
=
EventModifierFlags
;
exports
.
I18N_JSON_DELIMITERS
=
I18N_JSON_DELIMITERS
;
exports
.
IEVersion
=
IEVersion
;
exports
.
JSON_PROTOCOL
=
JSON_PROTOCOL
;
exports
.
LINEFEED
=
LINEFEED
;
exports
.
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
=
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
;
...
...
@@ -1568,7 +1533,6 @@ exports.formatDateTime = formatDateTime;
exports
.
formatH5Log
=
formatH5Log
;
exports
.
formatLog
=
formatLog
;
exports
.
getCustomDataset
=
getCustomDataset
;
exports
.
getDeviceBrand
=
getDeviceBrand
;
exports
.
getEnvLocale
=
getEnvLocale
;
exports
.
getLen
=
getLen
;
exports
.
getValueByDataPath
=
getValueByDataPath
;
...
...
packages/uni-shared/dist/uni-shared.d.ts
浏览文件 @
15a2a2b9
...
...
@@ -229,8 +229,6 @@ export declare function formatLog(module: string, ...args: any[]): string;
export
declare
function
getCustomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
):
DOMStringMap
&
Record
<
string
,
any
>
;
export
declare
function
getDeviceBrand
(
model
:
string
):
"
apple
"
|
"
microsoft
"
|
undefined
;
export
declare
function
getEnvLocale
():
string
;
export
declare
function
getLen
(
str
?:
string
):
number
;
...
...
@@ -243,8 +241,6 @@ declare interface HTMLElementWithDataset extends HTMLElement {
export
declare
const
I18N_JSON_DELIMITERS
:
[
string
,
string
];
export
declare
function
IEVersion
():
number
;
export
declare
const
initCustomDatasetOnce
:
()
=>
void
;
/**
...
...
packages/uni-shared/dist/uni-shared.es.js
浏览文件 @
15a2a2b9
...
...
@@ -402,40 +402,6 @@ function getValueByDataPath(obj, path) {
return
obj
[
key
];
}
return
getValueByDataPath
(
obj
[
key
],
parts
.
slice
(
1
).
join
(
'
.
'
));
}
function
IEVersion
()
{
const
userAgent
=
navigator
.
userAgent
;
const
isIE
=
userAgent
.
indexOf
(
'
compatible
'
)
>
-
1
&&
userAgent
.
indexOf
(
'
MSIE
'
)
>
-
1
;
const
isEdge
=
userAgent
.
indexOf
(
'
Edge
'
)
>
-
1
&&
!
isIE
;
const
isIE11
=
userAgent
.
indexOf
(
'
Trident
'
)
>
-
1
&&
userAgent
.
indexOf
(
'
rv:11.0
'
)
>
-
1
;
if
(
isIE
)
{
const
reIE
=
new
RegExp
(
'
MSIE (
\\
d+
\\
.
\\
d+);
'
);
reIE
.
test
(
userAgent
);
const
fIEVersion
=
parseFloat
(
RegExp
.
$1
);
if
(
fIEVersion
>
6
)
{
return
fIEVersion
;
}
else
{
return
6
;
}
}
else
if
(
isEdge
)
{
return
-
1
;
}
else
if
(
isIE11
)
{
return
11
;
}
else
{
return
-
1
;
}
}
function
getDeviceBrand
(
model
)
{
if
(
/iphone/gi
.
test
(
model
)
||
/ipad/gi
.
test
(
model
)
||
/mac/gi
.
test
(
model
))
{
return
'
apple
'
;
}
if
(
/windows/gi
.
test
(
model
))
{
return
'
microsoft
'
;
}
}
function
formatKey
(
key
)
{
...
...
@@ -1440,4 +1406,4 @@ function getEnvLocale() {
return
(
lang
&&
lang
.
replace
(
/
[
.:
]
.*/
,
''
))
||
'
en
'
;
}
export
{
ACTION_TYPE_ADD_EVENT
,
ACTION_TYPE_ADD_WXS_EVENT
,
ACTION_TYPE_CREATE
,
ACTION_TYPE_EVENT
,
ACTION_TYPE_INSERT
,
ACTION_TYPE_PAGE_CREATE
,
ACTION_TYPE_PAGE_CREATED
,
ACTION_TYPE_PAGE_SCROLL
,
ACTION_TYPE_REMOVE
,
ACTION_TYPE_REMOVE_ATTRIBUTE
,
ACTION_TYPE_REMOVE_EVENT
,
ACTION_TYPE_SET_ATTRIBUTE
,
ACTION_TYPE_SET_TEXT
,
ATTR_CHANGE_PREFIX
,
ATTR_CLASS
,
ATTR_INNER_HTML
,
ATTR_STYLE
,
ATTR_TEXT_CONTENT
,
ATTR_V_OWNER_ID
,
ATTR_V_RENDERJS
,
ATTR_V_SHOW
,
BACKGROUND_COLOR
,
BUILT_IN_TAGS
,
BUILT_IN_TAG_NAMES
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
DATA_RE
,
E$1
as
Emitter
,
EventChannel
,
EventModifierFlags
,
I18N_JSON_DELIMITERS
,
IEVersion
,
JSON_PROTOCOL
,
LINEFEED
,
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
,
NAVBAR_HEIGHT
,
NODE_TYPE_COMMENT
,
NODE_TYPE_ELEMENT
,
NODE_TYPE_PAGE
,
NODE_TYPE_TEXT
,
NVUE_BUILT_IN_TAGS
,
NVUE_U_BUILT_IN_TAGS
,
ON_ADD_TO_FAVORITES
,
ON_APP_ENTER_BACKGROUND
,
ON_APP_ENTER_FOREGROUND
,
ON_BACK_PRESS
,
ON_ERROR
,
ON_HIDE
,
ON_INIT
,
ON_KEYBOARD_HEIGHT_CHANGE
,
ON_LAUNCH
,
ON_LOAD
,
ON_NAVIGATION_BAR_BUTTON_TAP
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
,
ON_PAGE_NOT_FOUND
,
ON_PAGE_SCROLL
,
ON_PULL_DOWN_REFRESH
,
ON_REACH_BOTTOM
,
ON_REACH_BOTTOM_DISTANCE
,
ON_READY
,
ON_RESIZE
,
ON_SAVE_EXIT_STATE
,
ON_SHARE_APP_MESSAGE
,
ON_SHARE_TIMELINE
,
ON_SHOW
,
ON_TAB_ITEM_TAP
,
ON_THEME_CHANGE
,
ON_UNHANDLE_REJECTION
,
ON_UNLOAD
,
ON_WEB_INVOKE_APP_SERVICE
,
ON_WXS_INVOKE_CALL_METHOD
,
PLUS_RE
,
PRIMARY_COLOR
,
RENDERJS_MODULES
,
RESPONSIVE_MIN_WIDTH
,
SCHEME_RE
,
SELECTED_COLOR
,
SLOT_DEFAULT_NAME
,
TABBAR_HEIGHT
,
TAGS
,
UNI_SSR
,
UNI_SSR_DATA
,
UNI_SSR_GLOBAL_DATA
,
UNI_SSR_STORE
,
UNI_SSR_TITLE
,
UNI_STORAGE_LOCALE
,
UniBaseNode
,
UniCommentNode
,
UniElement
,
UniEvent
,
UniInputElement
,
UniLifecycleHooks
,
UniNode
,
UniTextAreaElement
,
UniTextNode
,
WEB_INVOKE_APPSERVICE
,
WXS_MODULES
,
WXS_PROTOCOL
,
addFont
,
addLeadingSlash
,
cache
,
cacheStringFunction
,
callOptions
,
createIsCustomElement
,
createRpx2Unit
,
createUniEvent
,
customizeEvent
,
debounce
,
decode
,
decodedQuery
,
defaultMiniProgramRpx2Unit
,
defaultNVueRpx2Unit
,
defaultRpx2Unit
,
dynamicSlotName
,
forcePatchProp
,
formatAppLog
,
formatDateTime
,
formatH5Log
,
formatLog
,
getCustomDataset
,
getDeviceBrand
,
getEnvLocale
,
getLen
,
getValueByDataPath
,
initCustomDatasetOnce
,
invokeArrayFns
,
invokeCreateVueAppHook
,
isAppNVueNativeTag
,
isAppNativeTag
,
isBuiltInComponent
,
isComponentInternalInstance
,
isComponentTag
,
isH5CustomElement
,
isH5NativeTag
,
isMiniProgramNativeTag
,
isRootHook
,
isRootImmediateHook
,
normalizeDataset
,
normalizeEventType
,
normalizeTarget
,
onCreateVueApp
,
once
,
parseEventName
,
parseNVueDataset
,
parseQuery
,
parseUrl
,
passive
,
plusReady
,
removeLeadingSlash
,
resolveComponentInstance
,
resolveOwnerEl
,
resolveOwnerVm
,
sanitise
,
scrollTo
,
stringifyQuery
,
updateElementStyle
};
export
{
ACTION_TYPE_ADD_EVENT
,
ACTION_TYPE_ADD_WXS_EVENT
,
ACTION_TYPE_CREATE
,
ACTION_TYPE_EVENT
,
ACTION_TYPE_INSERT
,
ACTION_TYPE_PAGE_CREATE
,
ACTION_TYPE_PAGE_CREATED
,
ACTION_TYPE_PAGE_SCROLL
,
ACTION_TYPE_REMOVE
,
ACTION_TYPE_REMOVE_ATTRIBUTE
,
ACTION_TYPE_REMOVE_EVENT
,
ACTION_TYPE_SET_ATTRIBUTE
,
ACTION_TYPE_SET_TEXT
,
ATTR_CHANGE_PREFIX
,
ATTR_CLASS
,
ATTR_INNER_HTML
,
ATTR_STYLE
,
ATTR_TEXT_CONTENT
,
ATTR_V_OWNER_ID
,
ATTR_V_RENDERJS
,
ATTR_V_SHOW
,
BACKGROUND_COLOR
,
BUILT_IN_TAGS
,
BUILT_IN_TAG_NAMES
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
DATA_RE
,
E$1
as
Emitter
,
EventChannel
,
EventModifierFlags
,
I18N_JSON_DELIMITERS
,
JSON_PROTOCOL
,
LINEFEED
,
MINI_PROGRAM_PAGE_RUNTIME_HOOKS
,
NAVBAR_HEIGHT
,
NODE_TYPE_COMMENT
,
NODE_TYPE_ELEMENT
,
NODE_TYPE_PAGE
,
NODE_TYPE_TEXT
,
NVUE_BUILT_IN_TAGS
,
NVUE_U_BUILT_IN_TAGS
,
ON_ADD_TO_FAVORITES
,
ON_APP_ENTER_BACKGROUND
,
ON_APP_ENTER_FOREGROUND
,
ON_BACK_PRESS
,
ON_ERROR
,
ON_HIDE
,
ON_INIT
,
ON_KEYBOARD_HEIGHT_CHANGE
,
ON_LAUNCH
,
ON_LOAD
,
ON_NAVIGATION_BAR_BUTTON_TAP
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED
,
ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED
,
ON_PAGE_NOT_FOUND
,
ON_PAGE_SCROLL
,
ON_PULL_DOWN_REFRESH
,
ON_REACH_BOTTOM
,
ON_REACH_BOTTOM_DISTANCE
,
ON_READY
,
ON_RESIZE
,
ON_SAVE_EXIT_STATE
,
ON_SHARE_APP_MESSAGE
,
ON_SHARE_TIMELINE
,
ON_SHOW
,
ON_TAB_ITEM_TAP
,
ON_THEME_CHANGE
,
ON_UNHANDLE_REJECTION
,
ON_UNLOAD
,
ON_WEB_INVOKE_APP_SERVICE
,
ON_WXS_INVOKE_CALL_METHOD
,
PLUS_RE
,
PRIMARY_COLOR
,
RENDERJS_MODULES
,
RESPONSIVE_MIN_WIDTH
,
SCHEME_RE
,
SELECTED_COLOR
,
SLOT_DEFAULT_NAME
,
TABBAR_HEIGHT
,
TAGS
,
UNI_SSR
,
UNI_SSR_DATA
,
UNI_SSR_GLOBAL_DATA
,
UNI_SSR_STORE
,
UNI_SSR_TITLE
,
UNI_STORAGE_LOCALE
,
UniBaseNode
,
UniCommentNode
,
UniElement
,
UniEvent
,
UniInputElement
,
UniLifecycleHooks
,
UniNode
,
UniTextAreaElement
,
UniTextNode
,
WEB_INVOKE_APPSERVICE
,
WXS_MODULES
,
WXS_PROTOCOL
,
addFont
,
addLeadingSlash
,
cache
,
cacheStringFunction
,
callOptions
,
createIsCustomElement
,
createRpx2Unit
,
createUniEvent
,
customizeEvent
,
debounce
,
decode
,
decodedQuery
,
defaultMiniProgramRpx2Unit
,
defaultNVueRpx2Unit
,
defaultRpx2Unit
,
dynamicSlotName
,
forcePatchProp
,
formatAppLog
,
formatDateTime
,
formatH5Log
,
formatLog
,
getCustomDataset
,
getEnvLocale
,
getLen
,
getValueByDataPath
,
initCustomDatasetOnce
,
invokeArrayFns
,
invokeCreateVueAppHook
,
isAppNVueNativeTag
,
isAppNativeTag
,
isBuiltInComponent
,
isComponentInternalInstance
,
isComponentTag
,
isH5CustomElement
,
isH5NativeTag
,
isMiniProgramNativeTag
,
isRootHook
,
isRootImmediateHook
,
normalizeDataset
,
normalizeEventType
,
normalizeTarget
,
onCreateVueApp
,
once
,
parseEventName
,
parseNVueDataset
,
parseQuery
,
parseUrl
,
passive
,
plusReady
,
removeLeadingSlash
,
resolveComponentInstance
,
resolveOwnerEl
,
resolveOwnerVm
,
sanitise
,
scrollTo
,
stringifyQuery
,
updateElementStyle
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录