diff --git "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/SDK\344\275\277\347\224\250\346\214\207\345\215\227.md" "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/SDK\344\275\277\347\224\250\346\214\207\345\215\227.md" new file mode 100644 index 0000000000000000000000000000000000000000..1624ce63765225fbabe363fc961fe8b677a599ca --- /dev/null +++ "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/SDK\344\275\277\347\224\250\346\214\207\345\215\227.md" @@ -0,0 +1,165 @@ +# SDK使用指南 + +本SDK提供自定义字体、属性动画等能力在Deveco Studio工具上的预览(Previewer)功能,以供SIG组成员和鸿蒙生态开发伙伴使用。具体更新参考:【https://gitee.com/cooperation-team-L0UI/doc/blob/master/%E8%BF%90%E5%8A%A8%E8%A1%A8%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91/%E7%BB%84%E4%BB%B6/%E9%80%9A%E7%94%A8/%E5%8A%A8%E7%94%BB%E6%A0%B7%E5%BC%8F.md】 + +SDK下载链接:https://pan.baidu.com/s/1qPtn4UgJQGd84CrSNDZgxw 提取码: ohos + +## 1、full-SDK 替换 + +打开Deveco Studio本地安装目录,将下载的全量SDK替换至本地: + +![alt text](shot_image/image.png) + +*注意:由于Deveco Studio工具实际调用的previewer工具为openharmony同级的hms目录下的二进制程序,需要将previewer文件夹拷贝后替换至hms下* + +![alt text](shot_image/image-1.png) + +**替换完成后重启IDE工具!** + +## 2、Demo Test + +简单动效使用预览用例: + +* index.js + +```javascript +export default { + data: { + title: '', + height: 50, + scaleX: 100, + scaleY: 100, + translateX: 0, + translateY: 0, + rotate: 20, + transformStr: 'rotate(20) translate(0,0)' + }, + changeHeight() { + this.transformStr = 'rotate(40) translate(30,40)' + this.scaleX = 100 + this.scaleY = 100 + this.rotate = 10 + this.translateX = 40 + this.translateY = 60 + }, + rotateAdd() { + this.rotate += 10 + }, + rotateSub() { + this.rotate -= 10 + }, + transXAdd() { + this.translateX += 20 + }, + transXSub() { + this.translateX -= 20 + }, + scaleXAdd() { + this.scaleX += 20 + }, + scaleXSub() { + this.scaleX -= 20 + } +}; +``` + +* index.hml + +```html +
+ + rotate translateX translateY scaleX + + + + + + 字体 title3 + +
+
+ + + +
+
+ + + +
+
+ +
+``` + +* index.css + +```css +.container { + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + flex-direction: column; +} +.title { + width: 200px; + font-size: 30px; + text-align: center; + font-family: fangzheng-italic; + border-color: darkturquoise; + border-width: 1px; +} +.title2 { + width: 200px; + font-size: 30px; + text-align: center; +/* transform: translate(10,10) rotate(20) translateX(50) translateY(40) scale(40, 50) scaleX(60) scaleY(70);*/ + transition-property: transform; + transition-duration: 1000; + transition-timing-function: ease-out; + border-color: blueviolet; + border-width: 1px; +} +.title3 { + width: 200px; + font-size: 30px; + text-align: center; + transform: translate(10,10) rotate(20) translateX(50) translateY(40) scale(40, 50) scaleX(60) scaleY(70); + font-family: fangzheng-italic; + border-color: red; + border-width: 1px; +} +.btnGroup { + width: 200px; + height: 200px; + justify-content: center; + align-items: center; + margin-top: 50px; +} +.addGroup { + width: 100px; + height: 200px; + justify-content: center; + align-items: center; + flex-direction: column; +} +.subGroup { + width: 100px; + height: 200px; + justify-content: center; + align-items: center; + flex-direction: column; +} +.btn { + width: 100px; +} +``` + + + +预览效果: + +![alt text](shot_image/68ca2e68_10864578-1.gif) + diff --git "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/68ca2e68_10864578-1.gif" "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/68ca2e68_10864578-1.gif" new file mode 100644 index 0000000000000000000000000000000000000000..4a09333cba7e3073000ed11ae1291086ad7e729b Binary files /dev/null and "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/68ca2e68_10864578-1.gif" differ diff --git "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image-1.png" "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image-1.png" new file mode 100644 index 0000000000000000000000000000000000000000..c231e67c33317d2f4c00c0da3be2601aba1408c4 Binary files /dev/null and "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image-1.png" differ diff --git "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image.png" "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image.png" new file mode 100644 index 0000000000000000000000000000000000000000..2cb42ac88621b544b78fa1ad92e7e1e7a264d2b8 Binary files /dev/null and "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/SDK/shot_image/image.png" differ diff --git "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/readme.md" "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/readme.md" index 28e08abfebf366bb4503af6823fd43487e9470a7..75a7f9e37015a13051defd94befa3e6cc5fd4165 100644 --- "a/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/readme.md" +++ "b/\350\277\220\345\212\250\350\241\250\345\272\224\347\224\250\345\274\200\345\217\221/readme.md" @@ -67,5 +67,8 @@ - [recorder](接口/系统能力/recorder.md) - [表冠事件](接口/系统能力/表冠事件.md) +- ## OHOS-SDK + - [ohos-sdk](SDK/SDK使用指南.md) + - ## 其他 - #### [Watch应用多分辨率的适配](其他/watch应用多分辨率的适配.md)