Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MuGuiLin
uni-app
提交
8789ce4e
U
uni-app
项目概览
MuGuiLin
/
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
8789ce4e
编写于
8月 10, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): log filename
上级
db1e568a
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
30 addition
and
7 deletion
+30
-7
packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts
...ound/uts/uni_modules/test-uniplugin/app-android/login.uts
+1
-0
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index
...ist/app-plus/uni_modules/test-uniplugin/app-android/index
+1
-0
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt
.../app-plus/uni_modules/test-uniplugin/app-android/index.kt
+1
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+8
-2
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+13
-4
packages/uni-mp-weixin/dist/uni.compiler.js
packages/uni-mp-weixin/dist/uni.compiler.js
+2
-1
packages/uni-uts-vite/src/utils/compiler.ts
packages/uni-uts-vite/src/utils/compiler.ts
+1
-0
packages/uts-darwin-arm64/uts.darwin-arm64.node
packages/uts-darwin-arm64/uts.darwin-arm64.node
+0
-0
packages/uts-darwin-x64/uts.darwin-x64.node
packages/uts-darwin-x64/uts.darwin-x64.node
+0
-0
packages/uts/src/api.ts
packages/uts/src/api.ts
+1
-0
packages/uts/src/types.ts
packages/uts/src/types.ts
+1
-0
scripts/test.js
scripts/test.js
+1
-0
未找到文件。
packages/playground/uts/uni_modules/test-uniplugin/app-android/login.uts
浏览文件 @
8789ce4e
export function login(name: string, pwd: string) {
console.log('login')
return { name, pwd }
}
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index
浏览文件 @
8789ce4e
import android.util.Log;
fun login(name: String, pwd: String): UtsJSONObject {
console.log("login");
return object : UtsJSONObject() {
var name = name
var pwd = pwd
...
...
packages/playground/uts/unpackage/dist/app-plus/uni_modules/test-uniplugin/app-android/index.kt
浏览文件 @
8789ce4e
...
...
@@ -3,6 +3,7 @@ import kotlinx.coroutines.*;
import
io.dcloud.uts.runtime.*;
import
android.util.Log;
fun
login
(
name
:
String
,
pwd
:
String
):
UtsJSONObject
{
console
.
log
(
"login"
,
"at app-android/login.uts:2"
);
return
object
:
UtsJSONObject
()
{
var
name
=
name
var
pwd
=
pwd
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
8789ce4e
...
...
@@ -10274,6 +10274,7 @@ function updateDocumentTitle(title) {
ssrContext
[
uniShared
.
UNI_SSR_TITLE
]
=
title
;
}
}
UniServiceJSBridge
.
emit
(
uniShared
.
ON_NAVIGATION_BAR_CHANGE
,
{
titleText
:
title
});
}
function
useDocumentTitle
(
pageMeta
)
{
function
update
()
{
...
...
@@ -10730,6 +10731,7 @@ function useState() {
marginWidth
:
0
,
leftWindowWidth
:
0
,
rightWindowWidth
:
0
,
navigationBarTitleText
:
""
,
topWindowStyle
:
{},
leftWindowStyle
:
{},
rightWindowStyle
:
{}
...
...
@@ -10756,6 +10758,9 @@ function useState() {
vue
.
watch
(()
=>
layoutState
.
rightWindowWidth
+
layoutState
.
marginWidth
,
(
value
)
=>
updateCssVar
({
"
--window-right
"
:
value
+
"
px
"
}));
UniServiceJSBridge
.
on
(
uniShared
.
ON_NAVIGATION_BAR_CHANGE
,
(
navigationBar
)
=>
{
layoutState
.
navigationBarTitleText
=
navigationBar
.
titleText
;
});
const
windowState
=
vue
.
computed
(()
=>
({
matchTopWindow
:
layoutState
.
topWindowMediaQuery
,
showTopWindow
:
layoutState
.
showTopWindow
||
layoutState
.
apiShowTopWindow
,
...
...
@@ -10882,8 +10887,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) {
"
class
"
:
"
uni-top-window
"
,
"
style
"
:
layoutState
.
topWindowStyle
},
[
vue
.
createVNode
(
TopWindow
,
vue
.
mergeProps
({
"
ref
"
:
windowRef
},
windowState
),
null
,
16
)],
4
),
vue
.
createVNode
(
"
div
"
,
{
"
ref
"
:
windowRef
,
"
navigation-bar-title-text
"
:
layoutState
.
navigationBarTitleText
},
windowState
),
null
,
16
,
[
"
navigation-bar-title-text
"
])],
4
),
vue
.
createVNode
(
"
div
"
,
{
"
class
"
:
"
uni-top-window--placeholder
"
,
"
style
"
:
{
height
:
layoutState
.
topWindowHeight
+
"
px
"
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
8789ce4e
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, h, 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, removeLeadingSlash, 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, 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, sortObject, 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, removeLeadingSlash, 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, 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, sortObject, ON_BACK_PRESS, parseUrl, addFont,
ON_NAVIGATION_BAR_CHANGE,
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";
...
...
@@ -14004,10 +14004,13 @@ function updateCurPageCssVar(pageMeta) {
tabBar2.shown && (windowBottomValue = parseInt(tabBar2.height));
}
updatePageCssVar({
"--window-top": normalizeWindow
Bottom
(windowTopValue),
"--window-top": normalizeWindow
Top
(windowTopValue),
"--window-bottom": normalizeWindowBottom(windowBottomValue)
});
}
function normalizeWindowTop(windowTop) {
return envMethod ? `calc(${windowTop}px + ${envMethod}(safe-area-inset-top))` : `${windowTop}px`;
}
function normalizeWindowBottom(windowBottom) {
return envMethod ? `calc(${windowBottom}px + ${envMethod}(safe-area-inset-bottom))` : `${windowBottom}px`;
}
...
...
@@ -19607,6 +19610,7 @@ function updateDocumentTitle(title) {
{
document.title = title;
}
UniServiceJSBridge.emit(ON_NAVIGATION_BAR_CHANGE, { titleText: title });
}
function useDocumentTitle(pageMeta) {
function update() {
...
...
@@ -20182,6 +20186,7 @@ function useState() {
marginWidth: 0,
leftWindowWidth: 0,
rightWindowWidth: 0,
navigationBarTitleText: "",
topWindowStyle: {},
leftWindowStyle: {},
rightWindowStyle: {}
...
...
@@ -20212,6 +20217,9 @@ function useState() {
watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({
"--window-right": value + "px"
}));
UniServiceJSBridge.on(ON_NAVIGATION_BAR_CHANGE, (navigationBar) => {
layoutState.navigationBarTitleText = navigationBar.titleText;
});
const windowState = computed(() => ({
matchTopWindow: layoutState.topWindowMediaQuery,
showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow,
...
...
@@ -20344,8 +20352,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) {
"class": "uni-top-window",
"style": layoutState.topWindowStyle
}, [createVNode(TopWindow, mergeProps({
"ref": windowRef
}, windowState), null, 16)], 4), createVNode("div", {
"ref": windowRef,
"navigation-bar-title-text": layoutState.navigationBarTitleText
}, windowState), null, 16, ["navigation-bar-title-text"])], 4), createVNode("div", {
"class": "uni-top-window--placeholder",
"style": {
height: layoutState.topWindowHeight + "px"
...
...
packages/uni-mp-weixin/dist/uni.compiler.js
浏览文件 @
8789ce4e
...
...
@@ -72,7 +72,8 @@ var setting = {
es6
:
true
,
postcss
:
false
,
minified
:
false
,
newFeature
:
true
newFeature
:
true
,
bigPackageSizeSupport
:
true
};
var
compileType
=
"
miniprogram
"
;
var
libVersion
=
""
;
...
...
packages/uni-uts-vite/src/utils/compiler.ts
浏览文件 @
8789ce4e
...
...
@@ -35,6 +35,7 @@ export async function compile(filename: string) {
sourceMap
:
true
,
extname
:
'
kt
'
,
imports
:
[
'
kotlinx.coroutines.*
'
,
'
io.dcloud.uts.runtime.*
'
],
logFilename
:
true
,
},
})
console
.
log
(
'
uts compile time:
'
+
(
Date
.
now
()
-
time
)
+
'
ms
'
)
...
...
packages/uts-darwin-arm64/uts.darwin-arm64.node
浏览文件 @
8789ce4e
无法预览此类型文件
packages/uts-darwin-x64/uts.darwin-x64.node
浏览文件 @
8789ce4e
无法预览此类型文件
packages/uts/src/api.ts
浏览文件 @
8789ce4e
...
...
@@ -40,6 +40,7 @@ function resolveOptions(options: UtsOptions) {
input
.
filename
=
normalizePath
(
input
.
filename
)
output
.
outDir
=
normalizePath
(
output
.
outDir
)
output
.
sourceMap
=
normalizePath
(
output
.
sourceMap
)
output
.
logFilename
=
!!
output
.
logFilename
return
options
}
...
...
packages/uts/src/types.ts
浏览文件 @
8789ce4e
...
...
@@ -26,6 +26,7 @@ export type UtsOutputOptions = {
sourceMap
?:
boolean
|
string
inlineSourcesContent
?:
boolean
extname
:
string
logFilename
?:
boolean
}
export
interface
UtsOptions
{
input
:
UtsInputOptions
...
...
scripts/test.js
浏览文件 @
8789ce4e
...
...
@@ -34,6 +34,7 @@ bundle({
imports
:
[
'
kotlinx.coroutines.*
'
,
'
io.dcloud.uts.runtime.*
'
],
sourceMap
:
true
,
extname
:
'
kt
'
,
logFilename
:
true
,
},
}).
then
((
res
)
=>
{
console
.
log
(
'
bundle:
'
+
(
Date
.
now
()
-
start
)
+
'
ms
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录