@hap-toolkit/dsl-xvm 2.0.8-beta.1 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +51 -51
- package/device-json-template/config-tv.json +14 -14
- package/package.json +5 -5
- package/readme.md +3 -3
- package/templates/app/demo/.eslintignore +6 -6
- package/templates/app/demo/.eslintrc.json +66 -66
- package/templates/app/demo/.gitignore +25 -25
- package/templates/app/demo/.prettierignore +6 -6
- package/templates/app/demo/README.md +11 -11
- package/templates/app/demo/_gitignore +16 -16
- package/templates/app/demo/package.json +54 -54
- package/templates/app/demo/scripts/gen/index.js +92 -92
- package/templates/app/demo/scripts/gen/template.ux +32 -32
- package/templates/app/demo/scripts/selfCloseInputTag.js +41 -41
- package/templates/app/demo/src/app.ux +22 -22
- package/templates/app/demo/src/assets/styles/mixins.scss +5 -5
- package/templates/app/demo/src/assets/styles/style.scss +2 -2
- package/templates/app/demo/src/assets/styles/variables.scss +11 -11
- package/templates/app/demo/src/global.js +38 -38
- package/templates/app/demo/src/helper/ajax.js +67 -67
- package/templates/app/demo/src/helper/apis/example.js +25 -25
- package/templates/app/demo/src/helper/apis/index.js +16 -16
- package/templates/app/demo/src/helper/utils.js +31 -31
- package/templates/app/demo/src/manifest.json +70 -70
- package/templates/app/demo/src/pages/Demo/index.ux +72 -72
- package/templates/app/demo/src/pages/DemoDetail/index.ux +63 -63
- package/templates/app/demo/src/sitemap.json +3 -3
- package/templates/app/demo/src/widgets/CardDemo/assets/styles.scss +16 -16
- package/templates/app/demo/src/widgets/CardDemo/index.ux +83 -83
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
-
SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
-->
|
|
5
|
-
|
|
6
|
-
<!--
|
|
7
|
-
注意:快应用和卡片混合工程在编译时会将所有资源打包到一个rpk中,在发布时会将卡片资源拆分出来独立分发,
|
|
8
|
-
需要将卡片资源放置到卡片路径下,否则卡片无法加载对应资源。
|
|
9
|
-
-->
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<!-- template里只能有一个根节点 -->
|
|
13
|
-
<div class="card-wrapper">
|
|
14
|
-
<div class="title-wrapper">
|
|
15
|
-
<!-- 注意:本地图片资源需要存放到卡片路由路径下,否则发布时无法加载该图片,网络资源不受该限制 -->
|
|
16
|
-
<image class="title-logo" src="./assets/logo_card.png"></image>
|
|
17
|
-
<text class="title-txt">卡片标题</text>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="content-wrapper">
|
|
20
|
-
<text class="content-txt">{{ des }}</text>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<!-- 注意:卡片运行时不会加载app.ux,请不要在app.ux中添加卡片相关逻辑 -->
|
|
26
|
-
<script>
|
|
27
|
-
export default {
|
|
28
|
-
private: {
|
|
29
|
-
text: '欢迎使用快应用卡片',
|
|
30
|
-
des:
|
|
31
|
-
'卡片是一种轻量级的快应用,快应用卡片使快应用能够在其他app和系统里提供可扩展的app功能'
|
|
32
|
-
},
|
|
33
|
-
onInit() {
|
|
34
|
-
console.log('card onInit >>>>')
|
|
35
|
-
},
|
|
36
|
-
onShow() {
|
|
37
|
-
console.log('card onShow >>>>')
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<style lang="scss">
|
|
43
|
-
@import './assets/styles.scss';
|
|
44
|
-
|
|
45
|
-
.card-wrapper {
|
|
46
|
-
@include flex-box-mixins(column, flex-start, center);
|
|
47
|
-
flex: 1;
|
|
48
|
-
padding: 16dp;
|
|
49
|
-
|
|
50
|
-
.content-wrapper {
|
|
51
|
-
@include flex-box-mixins(column, center, center);
|
|
52
|
-
width: 100%;
|
|
53
|
-
flex: 1;
|
|
54
|
-
|
|
55
|
-
.content-txt {
|
|
56
|
-
width: 100%;
|
|
57
|
-
text-align: center;
|
|
58
|
-
font-size: 14 * $size-factor;
|
|
59
|
-
line-height: 20 * $size-factor;
|
|
60
|
-
color: $black;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.title-wrapper {
|
|
65
|
-
@include flex-box-mixins(row, flex-start, center);
|
|
66
|
-
width: 100%;
|
|
67
|
-
height: 16 * $size-factor;
|
|
68
|
-
|
|
69
|
-
.title-logo {
|
|
70
|
-
width: 16 * $size-factor;
|
|
71
|
-
height: 16 * $size-factor;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.title-txt {
|
|
75
|
-
line-height: 16 * $size-factor;
|
|
76
|
-
font-size: 16 * $size-factor;
|
|
77
|
-
margin-left: 4 * $size-factor;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) 2021-present, the hapjs-platform Project Contributors
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<!--
|
|
7
|
+
注意:快应用和卡片混合工程在编译时会将所有资源打包到一个rpk中,在发布时会将卡片资源拆分出来独立分发,
|
|
8
|
+
需要将卡片资源放置到卡片路径下,否则卡片无法加载对应资源。
|
|
9
|
+
-->
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<!-- template里只能有一个根节点 -->
|
|
13
|
+
<div class="card-wrapper">
|
|
14
|
+
<div class="title-wrapper">
|
|
15
|
+
<!-- 注意:本地图片资源需要存放到卡片路由路径下,否则发布时无法加载该图片,网络资源不受该限制 -->
|
|
16
|
+
<image class="title-logo" src="./assets/logo_card.png"></image>
|
|
17
|
+
<text class="title-txt">卡片标题</text>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="content-wrapper">
|
|
20
|
+
<text class="content-txt">{{ des }}</text>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<!-- 注意:卡片运行时不会加载app.ux,请不要在app.ux中添加卡片相关逻辑 -->
|
|
26
|
+
<script>
|
|
27
|
+
export default {
|
|
28
|
+
private: {
|
|
29
|
+
text: '欢迎使用快应用卡片',
|
|
30
|
+
des:
|
|
31
|
+
'卡片是一种轻量级的快应用,快应用卡片使快应用能够在其他app和系统里提供可扩展的app功能'
|
|
32
|
+
},
|
|
33
|
+
onInit() {
|
|
34
|
+
console.log('card onInit >>>>')
|
|
35
|
+
},
|
|
36
|
+
onShow() {
|
|
37
|
+
console.log('card onShow >>>>')
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss">
|
|
43
|
+
@import './assets/styles.scss';
|
|
44
|
+
|
|
45
|
+
.card-wrapper {
|
|
46
|
+
@include flex-box-mixins(column, flex-start, center);
|
|
47
|
+
flex: 1;
|
|
48
|
+
padding: 16dp;
|
|
49
|
+
|
|
50
|
+
.content-wrapper {
|
|
51
|
+
@include flex-box-mixins(column, center, center);
|
|
52
|
+
width: 100%;
|
|
53
|
+
flex: 1;
|
|
54
|
+
|
|
55
|
+
.content-txt {
|
|
56
|
+
width: 100%;
|
|
57
|
+
text-align: center;
|
|
58
|
+
font-size: 14 * $size-factor;
|
|
59
|
+
line-height: 20 * $size-factor;
|
|
60
|
+
color: $black;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.title-wrapper {
|
|
65
|
+
@include flex-box-mixins(row, flex-start, center);
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 16 * $size-factor;
|
|
68
|
+
|
|
69
|
+
.title-logo {
|
|
70
|
+
width: 16 * $size-factor;
|
|
71
|
+
height: 16 * $size-factor;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.title-txt {
|
|
75
|
+
line-height: 16 * $size-factor;
|
|
76
|
+
font-size: 16 * $size-factor;
|
|
77
|
+
margin-left: 4 * $size-factor;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
</style>
|