Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
ad2c1f3f
U
uni-app
项目概览
genary
/
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,发现更多精彩内容 >>
提交
ad2c1f3f
编写于
5月 26, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style: rename word
上级
86e1d0a3
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
41 addition
and
41 deletion
+41
-41
packages/uni-api/src/helpers/requestComponentObserver.ts
packages/uni-api/src/helpers/requestComponentObserver.ts
+1
-1
packages/uni-core/src/view/plugin/index.ts
packages/uni-core/src/view/plugin/index.ts
+2
-2
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+20
-20
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
+2
-2
packages/uni-shared/dist/uni-shared.cjs.js
packages/uni-shared/dist/uni-shared.cjs.js
+5
-5
packages/uni-shared/dist/uni-shared.d.ts
packages/uni-shared/dist/uni-shared.d.ts
+2
-2
packages/uni-shared/dist/uni-shared.es.js
packages/uni-shared/dist/uni-shared.es.js
+4
-4
packages/uni-shared/src/dom/customDataset.ts
packages/uni-shared/src/dom/customDataset.ts
+2
-2
packages/uni-shared/src/dom/index.ts
packages/uni-shared/src/dom/index.ts
+3
-3
未找到文件。
packages/uni-api/src/helpers/requestComponentObserver.ts
浏览文件 @
ad2c1f3f
...
...
@@ -38,7 +38,7 @@ export function requestComponentObserver(
boundingClientRect
:
normalizeRect
(
entrie
.
boundingClientRect
),
relativeRect
:
normalizeRect
(
entrie
.
rootBounds
!
),
time
:
Date
.
now
(),
// dataset: getC
o
stomDataset(entrie.target),
// dataset: getC
u
stomDataset(entrie.target),
// id: entrie.target.id,
})
})
...
...
packages/uni-core/src/view/plugin/index.ts
浏览文件 @
ad2c1f3f
...
...
@@ -2,13 +2,13 @@ import { App } from 'vue'
import
{
initLongPress
}
from
'
./longPress
'
import
{
initAppConfig
}
from
'
./appConfig
'
import
{
initC
o
stomDataset
}
from
'
@dcloudio/uni-shared
'
import
{
initC
u
stomDataset
}
from
'
@dcloudio/uni-shared
'
export
function
initView
(
app
:
App
)
{
if
(
__NODE_JS__
)
{
return
}
initC
o
stomDataset
()
initC
u
stomDataset
()
if
(
__UNI_FEATURE_LONGPRESS__
)
{
initLongPress
()
}
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
ad2c1f3f
import {isFunction, extend, hyphenate, isPlainObject, isString, isArray, hasOwn, isObject, capitalize, toRawType, makeMap as makeMap$1, isPromise, invokeArrayFns as invokeArrayFns$1} from "@vue/shared";
import {injectHook, withModifiers, createVNode, getCurrentInstance, inject, provide, reactive, openBlock, createBlock, mergeProps, toDisplayString, defineComponent, ref, computed, watch, onUnmounted, onBeforeUnmount, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, createTextVNode, onBeforeActivate, onBeforeDeactivate, renderList, onDeactivated, Teleport, createApp, Transition, withCtx, KeepAlive, resolveDynamicComponent, resolveComponent, createCommentVNode, renderSlot} from "vue";
import {once, passive, normalizeTarget, isBuiltInComponent, initC
ostomDataset, invokeArrayFns, NAVBAR_HEIGHT, parseQuery, PRIMARY_COLOR, debounce, getCo
stomDataset, callOptions, removeLeadingSlash, getLen, ON_REACH_BOTTOM_DISTANCE, decodedQuery, updateElementStyle, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime} from "@dcloudio/uni-shared";
import {once, passive, normalizeTarget, isBuiltInComponent, initC
ustomDataset, invokeArrayFns, NAVBAR_HEIGHT, parseQuery, PRIMARY_COLOR, debounce, getCu
stomDataset, callOptions, removeLeadingSlash, getLen, ON_REACH_BOTTOM_DISTANCE, decodedQuery, updateElementStyle, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, formatDateTime} from "@dcloudio/uni-shared";
import {initVueI18n, 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";
function applyOptions(options, instance2, publicThis) {
...
...
@@ -485,7 +485,7 @@ var safeAreaInsets = {
onChange,
offChange
};
var
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out = safeAreaInsets;
var out = safeAreaInsets;
const onEventPrevent = /* @__PURE__ */ withModifiers(() => {
}, ["prevent"]);
const onEventStop = /* @__PURE__ */ withModifiers(() => {
...
...
@@ -497,10 +497,10 @@ function getWindowOffset() {
const left = parseInt(style.getPropertyValue("--window-left"));
const right = parseInt(style.getPropertyValue("--window-right"));
return {
top: top ? top +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top : 0,
bottom: bottom ? bottom +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom : 0,
left: left ? left +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left : 0,
right: right ? right +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right : 0
top: top ? top + out.top : 0,
bottom: bottom ? bottom + out.bottom : 0,
left: left ? left + out.left : 0,
right: right ? right + out.right : 0
};
}
function updateCssVar(cssVars) {
...
...
@@ -968,7 +968,7 @@ function initAppConfig$1(appConfig) {
}
}
function initView(app) {
initC
o
stomDataset();
initC
u
stomDataset();
if (__UNI_FEATURE_LONGPRESS__) {
initLongPress();
}
...
...
@@ -1194,7 +1194,7 @@ function normalizePageMeta(pageMeta) {
let offset = rpx2px(refreshOptions.offset);
const {type} = navigationBar;
if (type !== "transparent" && type !== "none") {
offset += NAVBAR_HEIGHT +
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top;
offset += NAVBAR_HEIGHT + out.top;
}
refreshOptions.offset = offset;
refreshOptions.height = rpx2px(refreshOptions.height);
...
...
@@ -9638,7 +9638,7 @@ function getNodeInfo(el, fields2) {
info.id = el.id;
}
if (fields2.dataset) {
info.dataset = getC
o
stomDataset(el);
info.dataset = getC
u
stomDataset(el);
}
if (fields2.rect || fields2.size) {
const rect = el.getBoundingClientRect();
...
...
@@ -15052,7 +15052,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const windowWidth = getWindowWidth(screenWidth);
let windowHeight = window.innerHeight;
const language = navigator.language;
const statusBarHeight =
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top;
const statusBarHeight = out.top;
let osname;
let osversion;
let model;
...
...
@@ -15165,12 +15165,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase();
const safeArea = {
left:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left,
right: windowWidth -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
top:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top,
bottom: windowHeight -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom,
width: windowWidth -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.left - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
height: windowHeight -
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_out.top - D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom
left: out.left,
right: windowWidth - out.right,
top: out.top,
bottom: windowHeight - out.bottom,
width: windowWidth -
out.left -
out.right,
height: windowHeight -
out.top -
out.bottom
};
const {top: windowTop, bottom: windowBottom} = getWindowOffset();
windowHeight -= windowTop;
...
...
@@ -15190,10 +15190,10 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
model,
safeArea,
safeAreaInsets: {
top:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.top,
right:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.right,
bottom:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.bottom,
left:
D__DCloud_local_git_uniAppNext_node_modules_safeAreaInsets_
out.left
top: out.top,
right: out.right,
bottom: out.bottom,
left: out.left
}
};
});
...
...
packages/uni-h5/src/service/api/ui/requestComponentInfo.ts
浏览文件 @
ad2c1f3f
import
{
ComponentPublicInstance
}
from
'
vue
'
import
{
getC
o
stomDataset
}
from
'
@dcloudio/uni-shared
'
import
{
getC
u
stomDataset
}
from
'
@dcloudio/uni-shared
'
import
{
getWindowOffset
}
from
'
@dcloudio/uni-core
'
import
{
getContextInfo
}
from
'
@dcloudio/uni-components
'
...
...
@@ -57,7 +57,7 @@ function getNodeInfo(el: HTMLElement, fields: NodeField): NodeInfo {
info
.
id
=
el
.
id
}
if
(
fields
.
dataset
)
{
info
.
dataset
=
getC
o
stomDataset
(
el
)
info
.
dataset
=
getC
u
stomDataset
(
el
)
}
if
(
fields
.
rect
||
fields
.
size
)
{
const
rect
=
el
.
getBoundingClientRect
()
...
...
packages/uni-shared/dist/uni-shared.cjs.js
浏览文件 @
ad2c1f3f
...
...
@@ -7,7 +7,7 @@ var shared = require('@vue/shared');
function
formatKey
(
key
)
{
return
shared
.
camelize
(
key
.
substring
(
5
));
}
function
initC
o
stomDataset
()
{
function
initC
u
stomDataset
()
{
const
prototype
=
HTMLElement
.
prototype
;
const
setAttribute
=
prototype
.
setAttribute
;
prototype
.
setAttribute
=
function
(
key
,
value
)
{
...
...
@@ -28,7 +28,7 @@ function initCostomDataset() {
removeAttribute
.
call
(
this
,
key
);
};
}
function
getC
o
stomDataset
(
el
)
{
function
getC
u
stomDataset
(
el
)
{
return
shared
.
extend
({},
el
.
dataset
,
el
.
__uniDataset
);
}
...
...
@@ -64,7 +64,7 @@ function normalizeTarget(el) {
const
{
id
,
offsetTop
,
offsetLeft
}
=
el
;
return
{
id
,
dataset
:
getC
o
stomDataset
(
el
),
dataset
:
getC
u
stomDataset
(
el
),
offsetTop
,
offsetLeft
,
};
...
...
@@ -414,10 +414,10 @@ exports.decode = decode;
exports
.
decodedQuery
=
decodedQuery
;
exports
.
defaultRpx2Unit
=
defaultRpx2Unit
;
exports
.
formatDateTime
=
formatDateTime
;
exports
.
getC
ostomDataset
=
getCo
stomDataset
;
exports
.
getC
ustomDataset
=
getCu
stomDataset
;
exports
.
getEnvLocale
=
getEnvLocale
;
exports
.
getLen
=
getLen
;
exports
.
initC
ostomDataset
=
initCo
stomDataset
;
exports
.
initC
ustomDataset
=
initCu
stomDataset
;
exports
.
invokeArrayFns
=
invokeArrayFns
;
exports
.
isBuiltInComponent
=
isBuiltInComponent
;
exports
.
isCustomElement
=
isCustomElement
;
...
...
packages/uni-shared/dist/uni-shared.d.ts
浏览文件 @
ad2c1f3f
...
...
@@ -46,7 +46,7 @@ export declare function formatDateTime({ date, mode }: {
mode
?:
string
|
undefined
;
}):
string
;
export
declare
function
getC
o
stomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
):
DOMStringMap
&
Record
<
string
,
any
>
;
export
declare
function
getC
u
stomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
):
DOMStringMap
&
Record
<
string
,
any
>
;
export
declare
function
getEnvLocale
():
string
;
...
...
@@ -56,7 +56,7 @@ declare interface HTMLElementWithDataset extends HTMLElement {
__uniDataset
?:
Record
<
string
,
any
>
;
}
export
declare
function
initC
o
stomDataset
():
void
;
export
declare
function
initC
u
stomDataset
():
void
;
export
declare
const
invokeArrayFns
:
(
fns
:
Function
[],
arg
?:
any
)
=>
any
;
...
...
packages/uni-shared/dist/uni-shared.es.js
浏览文件 @
ad2c1f3f
...
...
@@ -3,7 +3,7 @@ import { camelize, extend, isString, isHTMLTag, isSVGTag, isPlainObject, isArray
function
formatKey
(
key
)
{
return
camelize
(
key
.
substring
(
5
));
}
function
initC
o
stomDataset
()
{
function
initC
u
stomDataset
()
{
const
prototype
=
HTMLElement
.
prototype
;
const
setAttribute
=
prototype
.
setAttribute
;
prototype
.
setAttribute
=
function
(
key
,
value
)
{
...
...
@@ -24,7 +24,7 @@ function initCostomDataset() {
removeAttribute
.
call
(
this
,
key
);
};
}
function
getC
o
stomDataset
(
el
)
{
function
getC
u
stomDataset
(
el
)
{
return
extend
({},
el
.
dataset
,
el
.
__uniDataset
);
}
...
...
@@ -60,7 +60,7 @@ function normalizeTarget(el) {
const
{
id
,
offsetTop
,
offsetLeft
}
=
el
;
return
{
id
,
dataset
:
getC
o
stomDataset
(
el
),
dataset
:
getC
u
stomDataset
(
el
),
offsetTop
,
offsetLeft
,
};
...
...
@@ -387,4 +387,4 @@ function getEnvLocale() {
return
(
lang
&&
lang
.
replace
(
/
[
.:
]
.*/
,
''
))
||
'
en
'
;
}
export
{
BUILT_IN_TAGS
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
NAVBAR_HEIGHT
,
ON_REACH_BOTTOM_DISTANCE
,
PLUS_RE
,
PRIMARY_COLOR
,
RESPONSIVE_MIN_WIDTH
,
TABBAR_HEIGHT
,
TAGS
,
UNI_SSR
,
UNI_SSR_DATA
,
UNI_SSR_GLOBAL_DATA
,
UNI_SSR_STORE
,
addFont
,
callOptions
,
createRpx2Unit
,
debounce
,
decode
,
decodedQuery
,
defaultRpx2Unit
,
formatDateTime
,
getC
ostomDataset
,
getEnvLocale
,
getLen
,
initCo
stomDataset
,
invokeArrayFns
,
isBuiltInComponent
,
isCustomElement
,
isNativeTag
,
normalizeDataset
,
normalizeTarget
,
once
,
parseQuery
,
passive
,
plusReady
,
removeLeadingSlash
,
sanitise
,
scrollTo
,
stringifyQuery
,
updateElementStyle
};
export
{
BUILT_IN_TAGS
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
NAVBAR_HEIGHT
,
ON_REACH_BOTTOM_DISTANCE
,
PLUS_RE
,
PRIMARY_COLOR
,
RESPONSIVE_MIN_WIDTH
,
TABBAR_HEIGHT
,
TAGS
,
UNI_SSR
,
UNI_SSR_DATA
,
UNI_SSR_GLOBAL_DATA
,
UNI_SSR_STORE
,
addFont
,
callOptions
,
createRpx2Unit
,
debounce
,
decode
,
decodedQuery
,
defaultRpx2Unit
,
formatDateTime
,
getC
ustomDataset
,
getEnvLocale
,
getLen
,
initCu
stomDataset
,
invokeArrayFns
,
isBuiltInComponent
,
isCustomElement
,
isNativeTag
,
normalizeDataset
,
normalizeTarget
,
once
,
parseQuery
,
passive
,
plusReady
,
removeLeadingSlash
,
sanitise
,
scrollTo
,
stringifyQuery
,
updateElementStyle
};
packages/uni-shared/src/dom/c
o
stomDataset.ts
→
packages/uni-shared/src/dom/c
u
stomDataset.ts
浏览文件 @
ad2c1f3f
...
...
@@ -7,7 +7,7 @@ function formatKey(key: string) {
return
camelize
(
key
.
substring
(
5
))
}
export
function
initC
o
stomDataset
()
{
export
function
initC
u
stomDataset
()
{
const
prototype
=
HTMLElement
.
prototype
const
setAttribute
=
prototype
.
setAttribute
prototype
.
setAttribute
=
function
(
key
,
value
)
{
...
...
@@ -32,6 +32,6 @@ export function initCostomDataset() {
}
}
export
function
getC
o
stomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
)
{
export
function
getC
u
stomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
)
{
return
extend
({},
el
.
dataset
,
(
el
as
HTMLElementWithDataset
).
__uniDataset
)
}
packages/uni-shared/src/dom/index.ts
浏览文件 @
ad2c1f3f
import
{
FontFaceDescriptors
}
from
'
css-font-loading-module
'
import
{
isString
}
from
'
@vue/shared
'
import
{
getC
ostomDataset
}
from
'
./co
stomDataset
'
export
{
initC
ostomDataset
,
getCostomDataset
}
from
'
./co
stomDataset
'
import
{
getC
ustomDataset
}
from
'
./Cu
stomDataset
'
export
{
initC
ustomDataset
,
getCustomDataset
}
from
'
./Cu
stomDataset
'
export
*
from
'
./style
'
...
...
@@ -18,7 +18,7 @@ export function normalizeTarget(el: HTMLElement) {
const
{
id
,
offsetTop
,
offsetLeft
}
=
el
return
{
id
,
dataset
:
getC
o
stomDataset
(
el
),
dataset
:
getC
u
stomDataset
(
el
),
offsetTop
,
offsetLeft
,
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录