Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
01c4c8cb
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看板
提交
01c4c8cb
编写于
11月 22, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): compiler
上级
1173fa10
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
11 addition
and
7 deletion
+11
-7
packages/playground/uts/uni_modules/test-uniplugin/utssdk/app-ios/index.uts
...d/uts/uni_modules/test-uniplugin/utssdk/app-ios/index.uts
+2
-1
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
...uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
+1
-1
packages/playground/uts/unpackage/dist/dev/app-plus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
...lus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
+8
-5
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-win32-ia32-msvc/uts.win32-ia32-msvc.node
packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node
+0
-0
packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node
packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node
+0
-0
未找到文件。
packages/playground/uts/uni_modules/test-uniplugin/utssdk/app-ios/index.uts
浏览文件 @
01c4c8cb
...
...
@@ -29,6 +29,7 @@ export default function getBatteryInfo(options: GetBatteryInfoOptions) {
}
export
function
test1
(
callback
:
()
=>
void
):
string
{
console
.
log
({
"a"
:
"b"
})
console
.
log
(
'test1'
)
//#ifdef APP-ANDROID
console
.
log
(
'def android'
)
...
...
@@ -52,7 +53,7 @@ export function test1(callback: () => void): string {
return
'test1'
}
class
Test1
{}
class
Test1
{
}
export
class
Test
{
constructor
()
{
new
Test1
()
...
...
packages/playground/uts/unpackage/dist/dev/.sourcemap/app/uni_modules/test-uniplugin/utssdk/app-ios/index.swift.map
浏览文件 @
01c4c8cb
{
"version"
:
3
,
"sources"
:
[
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n
import { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation'
\n\n
type GetBatteryInfoOptions = {\n name: string
\n
pwd: number
\n
success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default function getBatteryInfo(options: GetBatteryInfoOptions) {\n new UIAlertController(
\n
(title = title),
\n
(message = message),
\n
(preferredStyle = UIAlertController.Style.alert)
\n
)
\n
const res = {\n errMsg: 'getBatteryInfo:ok',
\n
level: UIDevice.current.batteryLevel * 100,
\n
isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,
\n
}
\n
if (options.success != null) {\n options.success!(res)
\n
}
\n
if (options.complete != null) {\n options.complete!(res)
\n
}
\n
}
\n\n
export function test1(callback: () => void): string {\n console.log('test1')
\n\n\n\n\n
console.log('def ios')
\n\n\n
console.log('ndef android')
\n\n\n\n\n\n
console.log('def android || def ios')
\n\n\n\n\n
console.log(CLLocationManager, CLAuthorizationStatus)
\n
return 'test1'
\n
}
\n\n
class Test1 {}
\n
export class Test {\n constructor() {\n new Test1()
\n
}
\n
test(): string | null {\n return null
\n
}
\n
}
\n\n
export async function testAsync() {\n return { a: 1 }
\n
}
\n
"
],
"names"
:
[],
"mappings"
:
";AAAA;AACA;AAE6B;;MAAxB;IACH,WAAA,MAAM,MAAM,EAAA;IACZ,WAAA,KAAK,QAAM,EAAA;IACX,WAAA,SAAQ,aAA8B;IACtC,WAAA,MAAK,aAA8B;IACnC,WAAA,UAAS,aAA8B;AACzC;AAEe,KAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACjE,kBACD,OAAQ,OACR,SAAU,SACV,gBAAiB,kBAAkB,KAAK,CAAC,KAAK;IAEjD,IAAM,MAAM;QACV,CAAA,SAAQ;QACR,CAAA,QAAO,SAAS,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,aAAY,SAAS,OAAO,CAAC,YAAY,IAAI,SAAS,YAAY,CAAC,QAAQ;MAC5E;IACD,IAAI,QAAQ,OAAO,IAAI,GAAI;QACzB,QAAQ,OAAO,EAAE;;IAEnB,IAAI,QAAQ,QAAQ,IAAI,GAAI;QAC1B,QAAQ,QAAQ,EAAE;;AAEtB;AAEO,KAAS,MAAM,EAAA,qBAAoB,KAAG,MAAM,CAAC;IAClD,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC;IAGZ,QAAQ,GAAG,CAAC;IAMZ,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC,mBAAmB;IAC/B,OAAO;AACT;AAEA,MAAM;AAAO;AACN;;MAAM;IACX,aAAc;QACR;IACN;IACA,YAAA,UAAQ,MAAM,EAAQ;QACpB,OAAO,GAAI;IACb;AACF;AAEO;KAAe,oCAAY;IAChC,OAAO;QAAE,CAAA,IAAG,CAAC;MAAE;AACjB;;;;wCAvDuC,EAAA,SAAS,qBAAqB;eAA7C,eAAe;;+BAmBjB,EAAA,qBAAoB,KAAG,MAAM;eAAnC,MAAM;;;;qBAkCA"
}
\ No newline at end of file
{
"version"
:
3
,
"sources"
:
[
"uni_modules/test-uniplugin/utssdk/app-ios/index.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n
import { CLLocationManager, CLAuthorizationStatus } from 'CoreLocation'
\n\n
type GetBatteryInfoOptions = {\n name: string
\n
pwd: number
\n
success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default function getBatteryInfo(options: GetBatteryInfoOptions) {\n new UIAlertController(
\n
(title = title),
\n
(message = message),
\n
(preferredStyle = UIAlertController.Style.alert)
\n
)
\n
const res = {\n errMsg: 'getBatteryInfo:ok',
\n
level: UIDevice.current.batteryLevel * 100,
\n
isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,
\n
}
\n
if (options.success != null) {\n options.success!(res)
\n
}
\n
if (options.complete != null) {\n options.complete!(res)
\n
}
\n
}
\n\n
export function test1(callback: () => void): string {\n console.log({
\"
a
\"
:
\"
b
\"
})
\n
console.log('test1')
\n\n\n\n\n
console.log('def ios')
\n\n\n
console.log('ndef android')
\n\n\n\n\n\n
console.log('def android || def ios')
\n\n\n\n\n
console.log(CLLocationManager, CLAuthorizationStatus)
\n
return 'test1'
\n
}
\n\n
class Test1 { }
\n
export class Test {\n constructor() {\n new Test1()
\n
}
\n
test(): string | null {\n return null
\n
}
\n
}
\n\n
export async function testAsync() {\n return { a: 1 }
\n
}
\n
"
],
"names"
:
[],
"mappings"
:
";AAAA;AACA;AAE6B;;MAAxB;IACH,WAAA,MAAM,MAAM,EAAA;IACZ,WAAA,KAAK,QAAM,EAAA;IACX,WAAA,SAAQ,aAA8B;IACtC,WAAA,MAAK,aAA8B;IACnC,WAAA,UAAS,aAA8B;AACzC;AAEe,KAAS,eAAe,EAAA,SAAS,qBAAqB,EAAE;IACjE,kBACD,OAAQ,OACR,SAAU,SACV,gBAAiB,kBAAkB,KAAK,CAAC,KAAK;IAEjD,IAAM,MAAM;QACV,CAAA,SAAQ;QACR,CAAA,QAAO,SAAS,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,aAAY,SAAS,OAAO,CAAC,YAAY,IAAI,SAAS,YAAY,CAAC,QAAQ;MAC5E;IACD,IAAI,QAAQ,OAAO,IAAI,GAAI;QACzB,QAAQ,OAAO,EAAE;;IAEnB,IAAI,QAAQ,QAAQ,IAAI,GAAI;QAC1B,QAAQ,QAAQ,EAAE;;AAEtB;AAEO,KAAS,MAAM,EAAA,qBAAoB,KAAG,MAAM,CAAC;IAClD,QAAQ,GAAG,CAAC;QAAE,CAAA,MAAK;MAAK;IACxB,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC;IAGZ,QAAQ,GAAG,CAAC;IAMZ,QAAQ,GAAG,CAAC;IAKZ,QAAQ,GAAG,CAAC,mBAAmB;IAC/B,OAAO;AACT;AAEA,MAAM;AAAQ;AACP;;MAAM;IACX,aAAc;QACR;IACN;IACA,YAAA,UAAQ,MAAM,EAAQ;QACpB,OAAO,GAAI;IACb;AACF;AAEO;KAAe,oCAAY;IAChC,OAAO;QAAE,CAAA,IAAG,CAAC;MAAE;AACjB;;;;wCAxDuC,EAAA,SAAS,qBAAqB;eAA7C,eAAe;;+BAmBjB,EAAA,qBAAoB,KAAG,MAAM;eAAnC,MAAM;;;;qBAmCA"
}
\ No newline at end of file
packages/playground/uts/unpackage/dist/dev/app-plus/uni_modules/test-uniplugin/utssdk/app-ios/index.swift
浏览文件 @
01c4c8cb
...
...
@@ -25,11 +25,14 @@ func getBatteryInfo(_ options: GetBatteryInfoOptions) {
}
}
func
test1
(
_
callback
:
UTSCallback
)
->
String
{
console
.
log
(
"test1"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:32"
);
console
.
log
(
"def ios"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:37"
);
console
.
log
(
"ndef android"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:40"
);
console
.
log
(
"def android || def ios"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:46"
);
console
.
log
(
CLLocationManager
,
CLAuthorizationStatus
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:51"
);
console
.
log
(
UTSJSONObject
([
""
a
""
:
"b"
]),
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:32"
);
console
.
log
(
"test1"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:33"
);
console
.
log
(
"def ios"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:38"
);
console
.
log
(
"ndef android"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:41"
);
console
.
log
(
"def android || def ios"
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:47"
);
console
.
log
(
CLLocationManager
,
CLAuthorizationStatus
,
" at uni_modules/test-uniplugin/utssdk/app-ios/index.uts:52"
);
return
"test1"
;
}
class
Test1
:
NSObject
{
...
...
packages/uts-darwin-arm64/uts.darwin-arm64.node
浏览文件 @
01c4c8cb
无法预览此类型文件
packages/uts-darwin-x64/uts.darwin-x64.node
浏览文件 @
01c4c8cb
无法预览此类型文件
packages/uts-win32-ia32-msvc/uts.win32-ia32-msvc.node
浏览文件 @
01c4c8cb
无法预览此类型文件
packages/uts-win32-x64-msvc/uts.win32-x64-msvc.node
浏览文件 @
01c4c8cb
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录