Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
fe9c0cc6
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
725
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fe9c0cc6
编写于
12月 15, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(h5): hot reload
上级
80e5bb3f
变更
20
展开全部
隐藏空白更改
内联
并排
Showing
20 changed file
with
103 addition
and
22 deletion
+103
-22
packages/shims-node.d.ts
packages/shims-node.d.ts
+1
-0
packages/uni-app-plus/dist/style.css
packages/uni-app-plus/dist/style.css
+1
-1
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-app-vite/src/index.ts
packages/uni-app-vite/src/index.ts
+2
-11
packages/uni-cli-shared/src/env/index.ts
packages/uni-cli-shared/src/env/index.ts
+1
-1
packages/uni-cli-shared/src/env/provide.ts
packages/uni-cli-shared/src/env/provide.ts
+8
-0
packages/uni-cli-shared/src/hbx/index.ts
packages/uni-cli-shared/src/hbx/index.ts
+16
-0
packages/uni-cli-shared/src/vite/plugins/console.ts
packages/uni-cli-shared/src/vite/plugins/console.ts
+1
-2
packages/uni-h5-vite/src/index.ts
packages/uni-h5-vite/src/index.ts
+6
-0
packages/uni-h5-vite/src/plugins/pagesJson.ts
packages/uni-h5-vite/src/plugins/pagesJson.ts
+1
-0
packages/uni-h5-vue/dist/vue.runtime.cjs.js
packages/uni-h5-vue/dist/vue.runtime.cjs.js
+6
-0
packages/uni-h5-vue/dist/vue.runtime.esm.js
packages/uni-h5-vue/dist/vue.runtime.esm.js
+6
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+14
-2
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+14
-2
packages/uni-h5/src/framework/setup/index.ts
packages/uni-h5/src/framework/setup/index.ts
+6
-0
packages/uni-shared/dist/uni-shared.cjs.js
packages/uni-shared/dist/uni-shared.cjs.js
+4
-0
packages/uni-shared/dist/uni-shared.d.ts
packages/uni-shared/dist/uni-shared.d.ts
+2
-0
packages/uni-shared/dist/uni-shared.es.js
packages/uni-shared/dist/uni-shared.es.js
+4
-1
packages/uni-shared/src/hbx/formatLog.ts
packages/uni-shared/src/hbx/formatLog.ts
+8
-0
packages/uni-shared/src/hbx/index.ts
packages/uni-shared/src/hbx/index.ts
+1
-1
未找到文件。
packages/shims-node.d.ts
浏览文件 @
fe9c0cc6
...
...
@@ -21,5 +21,6 @@ declare namespace NodeJS {
UNI_APP_CODE_SPLITING
?:
'
true
'
UNI_AUTOMATOR_WS_ENDPOINT
?:
string
UNI_H5_BASE
?:
string
UNI_H5_BROWSER
?:
'
builtin
'
}
}
packages/uni-app-plus/dist/style.css
浏览文件 @
fe9c0cc6
此差异已折叠。
点击以展开。
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
fe9c0cc6
此差异已折叠。
点击以展开。
packages/uni-app-vite/src/index.ts
浏览文件 @
fe9c0cc6
import
path
from
'
path
'
import
{
initAppProvide
,
uniViteInjectPlugin
,
uniCssScopedPlugin
,
getAppStyleIsolation
,
parseManifestJsonOnce
,
uniConsolePlugin
,
uni
HBuilderX
ConsolePlugin
,
UNI_EASYCOM_EXCLUDE
,
isVueSfcFile
,
isUniPageFile
,
...
...
@@ -43,15 +42,7 @@ function initUniCssScopedPluginFilter(
const
plugins
=
[
uniEasycomPlugin
({
exclude
:
UNI_EASYCOM_EXCLUDE
}),
// uniResolveIdPlugin(),
uniConsolePlugin
({
filename
(
filename
)
{
filename
=
path
.
relative
(
process
.
env
.
UNI_INPUT_DIR
,
filename
)
if
(
filename
.
startsWith
(
'
.
'
)
||
path
.
isAbsolute
(
filename
))
{
return
''
}
return
filename
},
}),
uniHBuilderXConsolePlugin
(),
uniMainJsPlugin
(),
uniManifestJsonPlugin
(),
uniPagesJsonPlugin
(),
...
...
packages/uni-cli-shared/src/env/index.ts
浏览文件 @
fe9c0cc6
export
{
initDefine
}
from
'
./define
'
export
{
initAppProvide
}
from
'
./provide
'
export
{
initAppProvide
,
initH5Provide
}
from
'
./provide
'
packages/uni-cli-shared/src/env/provide.ts
浏览文件 @
fe9c0cc6
import
path
from
'
path
'
const
libDir
=
path
.
resolve
(
__dirname
,
'
../../lib
'
)
export
function
initAppProvide
()
{
const
cryptoDefine
=
[
path
.
join
(
libDir
,
'
crypto.js
'
),
'
default
'
]
return
{
...
...
@@ -9,3 +11,9 @@ export function initAppProvide() {
'
global.crypto
'
:
cryptoDefine
,
}
}
export
function
initH5Provide
()
{
return
{
__f__
:
[
'
@dcloudio/uni-shared
'
,
'
formatH5Log
'
],
}
}
packages/uni-cli-shared/src/hbx/index.ts
浏览文件 @
fe9c0cc6
import
path
from
'
path
'
import
{
normalizePath
}
from
'
../utils
'
import
{
uniConsolePlugin
}
from
'
../vite/plugins/console
'
export
*
from
'
./env
'
export
{
initModuleAlias
,
installHBuilderXPlugin
,
formatInstallHBuilderXPluginTips
,
}
from
'
./alias
'
export
function
uniHBuilderXConsolePlugin
()
{
return
uniConsolePlugin
({
filename
(
filename
)
{
filename
=
path
.
relative
(
process
.
env
.
UNI_INPUT_DIR
,
filename
)
if
(
filename
.
startsWith
(
'
.
'
)
||
path
.
isAbsolute
(
filename
))
{
return
''
}
return
normalizePath
(
filename
)
},
})
}
packages/uni-cli-shared/src/vite/plugins/console.ts
浏览文件 @
fe9c0cc6
...
...
@@ -16,9 +16,8 @@ const debugConsole = debug('vite:uni:console')
export
function
uniConsolePlugin
(
options
:
ConsoleOptions
):
Plugin
{
const
filter
=
createFilter
(
options
.
include
,
options
.
exclude
)
return
{
name
:
'
vite:uni-
app-
console
'
,
name
:
'
vite:uni-console
'
,
enforce
:
'
pre
'
,
apply
:
'
build
'
,
transform
(
code
,
id
)
{
if
(
!
filter
(
id
))
return
null
if
(
!
isJsFile
(
id
))
return
null
...
...
packages/uni-h5-vite/src/index.ts
浏览文件 @
fe9c0cc6
import
{
initH5Provide
,
isVueSfcFile
,
uniCssScopedPlugin
,
uniHBuilderXConsolePlugin
,
uniViteInjectPlugin
,
UNI_EASYCOM_EXCLUDE
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
uniH5PLugin
}
from
'
./plugin
'
...
...
@@ -21,6 +24,9 @@ export default [
filter
:
(
id
)
=>
isVueSfcFile
(
id
)
&&
!
id
.
endsWith
(
'
App.vue
'
),
}),
uniResolveIdPlugin
(),
...(
process
.
env
.
UNI_H5_BROWSER
===
'
builtin
'
?
[
uniViteInjectPlugin
(
initH5Provide
()),
uniHBuilderXConsolePlugin
()]
:
[]),
uniMainJsPlugin
(),
uniManifestJsonPlugin
(),
uniPagesJsonPlugin
(),
...
...
packages/uni-h5-vite/src/plugins/pagesJson.ts
浏览文件 @
fe9c0cc6
...
...
@@ -105,6 +105,7 @@ ${name}.wx = uni
${
name
}
.uni = uni
${
name
}
.UniViewJSBridge = UniViewJSBridge
${
name
}
.UniServiceJSBridge = UniServiceJSBridge
${
name
}
.__setupPage = setupPage
`
}
...
...
packages/uni-h5-vue/dist/vue.runtime.cjs.js
浏览文件 @
fe9c0cc6
...
...
@@ -1172,6 +1172,12 @@ function reload(id, newComp) {
const
record
=
map
.
get
(
id
);
if
(
!
record
)
return
;
// fixed by xxxxxx 解决页面刷新 setupPage
if
(
typeof
window
!==
'
undefined
'
&&
window
.
__setupPage
&&
record
.
initialDef
.
__mpType
===
'
page
'
)
{
window
.
__setupPage
(
newComp
);
}
newComp
=
normalizeClassComponent
(
newComp
);
// update initial def (for not-yet-rendered components)
updateComponentDef
(
record
.
initialDef
,
newComp
);
...
...
packages/uni-h5-vue/dist/vue.runtime.esm.js
浏览文件 @
fe9c0cc6
...
...
@@ -1185,6 +1185,12 @@ function reload(id, newComp) {
const
record
=
map
.
get
(
id
);
if
(
!
record
)
return
;
// fixed by xxxxxx 解决页面刷新 setupPage
if
(
typeof
window
!==
'
undefined
'
&&
window
.
__setupPage
&&
record
.
initialDef
.
__mpType
===
'
page
'
)
{
window
.
__setupPage
(
newComp
);
}
newComp
=
normalizeClassComponent
(
newComp
);
// update initial def (for not-yet-rendered components)
updateComponentDef
(
record
.
initialDef
,
newComp
);
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
fe9c0cc6
...
...
@@ -2918,6 +2918,10 @@ const props$o = /* @__PURE__ */ shared.extend({}, {
confirmType
:
{
type
:
String
,
default
:
"
done
"
},
confirmHold
:
{
type
:
Boolean
,
default
:
false
}
},
props$r
);
const
emit
=
[
...
...
@@ -3197,10 +3201,12 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({
if
(
event
.
key
!==
"
Enter
"
)
{
return
;
}
const
input
=
event
.
target
;
event
.
stopPropagation
();
trigger
(
"
confirm
"
,
event
,
{
value
:
event
.
targe
t
.
value
value
:
inpu
t
.
value
});
!
props2
.
confirmHold
&&
input
.
blur
();
}
return
()
=>
{
let
inputNode
=
props2
.
disabled
&&
fixDisabledColor
?
vue
.
createVNode
(
"
input
"
,
{
...
...
@@ -6438,7 +6444,7 @@ var index$i = /* @__PURE__ */ defineBuiltInComponent({
if
(
isDone
.
value
)
{
confirm
(
event
);
const
textarea
=
event
.
target
;
textarea
.
blur
();
!
props2
.
confirmHold
&&
textarea
.
blur
();
}
}
return
()
=>
{
...
...
@@ -6935,6 +6941,9 @@ function setupWindow(comp, id) {
});
}
function
setupPage
(
comp
)
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
comp
.
__mpType
=
"
page
"
;
}
return
setupComponent
(
comp
,
{
init
:
initPage
,
setup
(
instance
)
{
...
...
@@ -6948,6 +6957,9 @@ function setupPage(comp) {
});
}
function
setupApp
(
comp
)
{
if
(
process
.
env
.
NODE_ENV
!==
"
production
"
)
{
comp
.
__mpType
=
"
app
"
;
}
return
setupComponent
(
comp
,
{
init
:
initApp
,
setup
(
instance
)
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
fe9c0cc6
...
...
@@ -8308,6 +8308,10 @@ const props$v = /* @__PURE__ */ extend({}, {
confirmType: {
type: String,
default: "done"
},
confirmHold: {
type: Boolean,
default: false
}
}, props$y);
const emit = [
...
...
@@ -8596,10 +8600,12 @@ var Input = /* @__PURE__ */ defineBuiltInComponent({
if (event.key !== "Enter") {
return;
}
const input = event.target;
event.stopPropagation();
trigger("confirm", event, {
value:
event.targe
t.value
value:
inpu
t.value
});
!props2.confirmHold && input.blur();
}
return () => {
let inputNode = props2.disabled && fixDisabledColor ? createVNode("input", {
...
...
@@ -13268,7 +13274,7 @@ var index$i = /* @__PURE__ */ defineBuiltInComponent({
if (isDone.value) {
confirm(event);
const textarea = event.target;
textarea.blur();
!props2.confirmHold &&
textarea.blur();
}
}
{
...
...
@@ -13989,6 +13995,9 @@ function setupWindow(comp, id2) {
});
}
function setupPage(comp) {
if (process.env.NODE_ENV !== "production") {
comp.__mpType = "page";
}
return setupComponent(comp, {
init: initPage,
setup(instance2) {
...
...
@@ -14028,6 +14037,9 @@ function setupPage(comp) {
});
}
function setupApp(comp) {
if (process.env.NODE_ENV !== "production") {
comp.__mpType = "app";
}
return setupComponent(comp, {
init: initApp,
setup(instance2) {
...
...
packages/uni-h5/src/framework/setup/index.ts
浏览文件 @
fe9c0cc6
...
...
@@ -75,6 +75,9 @@ export function setupWindow(comp: any, id: number) {
}
export
function
setupPage
(
comp
:
any
)
{
if
(
__DEV__
)
{
comp
.
__mpType
=
'
page
'
}
return
setupComponent
(
comp
,
{
init
:
initPage
,
setup
(
instance
)
{
...
...
@@ -121,6 +124,9 @@ export function setupPage(comp: any) {
}
export
function
setupApp
(
comp
:
any
)
{
if
(
__DEV__
)
{
comp
.
__mpType
=
'
app
'
}
return
setupComponent
(
comp
,
{
init
:
initApp
,
setup
(
instance
)
{
...
...
packages/uni-shared/dist/uni-shared.cjs.js
浏览文件 @
fe9c0cc6
...
...
@@ -482,6 +482,9 @@ function normalizeLog(type, filename, args) {
function
formatAppLog
(
type
,
filename
,
...
args
)
{
const
res
=
normalizeLog
(
type
,
filename
,
args
);
res
&&
console
[
type
](
res
);
}
function
formatH5Log
(
type
,
filename
,
...
args
)
{
console
[
type
].
apply
(
console
,
[...
args
,
filename
]);
}
let
latestNodeId
=
1
;
...
...
@@ -1309,6 +1312,7 @@ exports.dynamicSlotName = dynamicSlotName;
exports
.
forcePatchProp
=
forcePatchProp
;
exports
.
formatAppLog
=
formatAppLog
;
exports
.
formatDateTime
=
formatDateTime
;
exports
.
formatH5Log
=
formatH5Log
;
exports
.
formatLog
=
formatLog
;
exports
.
getCustomDataset
=
getCustomDataset
;
exports
.
getEnvLocale
=
getEnvLocale
;
...
...
packages/uni-shared/dist/uni-shared.d.ts
浏览文件 @
fe9c0cc6
...
...
@@ -189,6 +189,8 @@ export declare function formatDateTime({ date, mode }: {
mode
?:
string
|
undefined
;
}):
string
;
export
declare
function
formatH5Log
(
type
:
keyof
Console
,
filename
:
string
,
...
args
:
unknown
[]):
void
;
export
declare
function
formatLog
(
module
:
string
,
...
args
:
any
[]):
string
;
export
declare
function
getCustomDataset
(
el
:
HTMLElement
|
HTMLElementWithDataset
):
DOMStringMap
&
Record
<
string
,
any
>
;
...
...
packages/uni-shared/dist/uni-shared.es.js
浏览文件 @
fe9c0cc6
...
...
@@ -478,6 +478,9 @@ function normalizeLog(type, filename, args) {
function
formatAppLog
(
type
,
filename
,
...
args
)
{
const
res
=
normalizeLog
(
type
,
filename
,
args
);
res
&&
console
[
type
](
res
);
}
function
formatH5Log
(
type
,
filename
,
...
args
)
{
console
[
type
].
apply
(
console
,
[...
args
,
filename
]);
}
let
latestNodeId
=
1
;
...
...
@@ -1193,4 +1196,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
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
DATA_RE
,
EventChannel
,
EventModifierFlags
,
I18N_JSON_DELIMITERS
,
JSON_PROTOCOL
,
LINEFEED
,
NAVBAR_HEIGHT
,
NODE_TYPE_COMMENT
,
NODE_TYPE_ELEMENT
,
NODE_TYPE_PAGE
,
NODE_TYPE_TEXT
,
NVueTextNode
,
ON_ADD_TO_FAVORITES
,
ON_APP_ENTER_BACKGROUND
,
ON_APP_ENTER_FOREGROUND
,
ON_BACK_PRESS
,
ON_ERROR
,
ON_HIDE
,
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_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
,
debounce
,
decode
,
decodedQuery
,
defaultMiniProgramRpx2Unit
,
defaultRpx2Unit
,
dynamicSlotName
,
forcePatchProp
,
formatAppLog
,
formatDateTime
,
formatLog
,
getCustomDataset
,
getEnvLocale
,
getLen
,
getValueByDataPath
,
initCustomDataset
,
invokeArrayFns
,
isAppNativeTag
,
isBuiltInComponent
,
isComponentTag
,
isH5CustomElement
,
isH5NativeTag
,
isMiniProgramNativeTag
,
isRootHook
,
normalizeDataset
,
normalizeEventType
,
normalizeTarget
,
once
,
parseEventName
,
parseQuery
,
parseUrl
,
passive
,
plusReady
,
removeLeadingSlash
,
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
,
COMPONENT_NAME_PREFIX
,
COMPONENT_PREFIX
,
COMPONENT_SELECTOR_PREFIX
,
DATA_RE
,
EventChannel
,
EventModifierFlags
,
I18N_JSON_DELIMITERS
,
JSON_PROTOCOL
,
LINEFEED
,
NAVBAR_HEIGHT
,
NODE_TYPE_COMMENT
,
NODE_TYPE_ELEMENT
,
NODE_TYPE_PAGE
,
NODE_TYPE_TEXT
,
NVueTextNode
,
ON_ADD_TO_FAVORITES
,
ON_APP_ENTER_BACKGROUND
,
ON_APP_ENTER_FOREGROUND
,
ON_BACK_PRESS
,
ON_ERROR
,
ON_HIDE
,
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_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
,
debounce
,
decode
,
decodedQuery
,
defaultMiniProgramRpx2Unit
,
defaultRpx2Unit
,
dynamicSlotName
,
forcePatchProp
,
formatAppLog
,
formatDateTime
,
format
H5Log
,
format
Log
,
getCustomDataset
,
getEnvLocale
,
getLen
,
getValueByDataPath
,
initCustomDataset
,
invokeArrayFns
,
isAppNativeTag
,
isBuiltInComponent
,
isComponentTag
,
isH5CustomElement
,
isH5NativeTag
,
isMiniProgramNativeTag
,
isRootHook
,
normalizeDataset
,
normalizeEventType
,
normalizeTarget
,
once
,
parseEventName
,
parseQuery
,
parseUrl
,
passive
,
plusReady
,
removeLeadingSlash
,
resolveOwnerEl
,
resolveOwnerVm
,
sanitise
,
scrollTo
,
stringifyQuery
,
updateElementStyle
};
packages/uni-shared/src/hbx/formatLog.ts
浏览文件 @
fe9c0cc6
...
...
@@ -62,3 +62,11 @@ export function formatAppLog(
const
res
=
normalizeLog
(
type
,
filename
,
args
)
res
&&
console
[
type
](
res
)
}
export
function
formatH5Log
(
type
:
keyof
Console
,
filename
:
string
,
...
args
:
unknown
[]
)
{
;(
console
[
type
]
as
Function
).
apply
(
console
,
[...
args
,
filename
])
}
packages/uni-shared/src/hbx/index.ts
浏览文件 @
fe9c0cc6
export
{
formatAppLog
}
from
'
./formatLog
'
export
{
formatAppLog
,
formatH5Log
}
from
'
./formatLog
'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录