-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
37 lines (34 loc) · 878 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
let AppInstance
switch ($app.env) {
case $env.app:
case $env.action:
AppInstance = require("./scripts/app-main")
break
case $env.today:
case $env.keyboard:
case $env.siri:
AppInstance = require("./scripts/app-lite")
break
case $env.widget:
AppInstance = require("./scripts/widget")
break
default:
$intents.finish("不支持在此环境中运行")
$ui.render({
views: [
{
type: "label",
props: {
text: "不支持在此环境中运行",
align: $align.center
},
layout: $layout.fill
}
]
})
break
}
// AppInstance = require("./scripts/widget")
if (AppInstance) {
AppInstance.run()
}