diff --git a/CHANGELOG.md b/CHANGELOG.md index 2df93e2eeb60bdce6f4b21f826da892cfba33593..a42dfb3935392189cacbc58c639fe9a7b3db9d39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -### 0.0.1-SNAPSHOT - 支持一些关键字可以用下划线单击文本视图 - 完整实现了源库全部API +## 0.0.1-SNAPSHOT + + ohos 第一个版本 + + * 实现了原库的全部 api + * 因为使用了jsUI开发,没有library文件 + diff --git a/README.md b/README.md index e35aab38a210b26fd1980c22e67912f50718fc26..bbb58f687aba96f45cb2f975152de54aa16c4152 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,25 @@ -#### AutoSpannableTextView +# AutoSpannableTextView -#### 项目介绍 +## 项目介绍 * 项目名称: AutoSpannableTextView * 所属系列:openharmony的第三方组件适配移植 * 功能:支持一些关键词可以用下划线文本视图单击 * 项目移植状态:主功能完成 -* 调用差异:JS +* 调用差异:新库使用jsUI框架开发实现,无library,调用请参考demo * 开发版本:sdk6,DevEco Studio 2.2 bate1 * 基线版本:Release v1.0.1 -#### 效果演示 +## 效果演示 +![cmd-markdown-logo](gif/1.gif) - +## 安装教程 +在sdk6,DevEco Studio 2.2 Beta1下项目可直接运行。 + 如无法运行,删除项目.gradle,.idea,build,gradle,build.gradle文件, + 并依据自己的版本创建新项目,将新项目的对应文件复制到根目录下 -#### 安装教程 -直接引入主界面即可使用 - -#### 使用说明 +## 使用说明 1. 在hml代码中,点击事件的目标元素添加自定义属性idx,绑定点击事件textClick ```
@@ -68,7 +69,7 @@ textClick(event){ } ``` -#### 测试信息 +## 测试信息 CodeCheck代码测试无异常 @@ -79,7 +80,7 @@ CloudTest代码测试无异常 当前版本demo功能与原组件基本无差异 -#### 版本迭代 +## 版本迭代 * 0.0.1-SNAPSHOT diff --git a/entry/build.gradle b/entry/build.gradle index 745190e7004e0d3919e73aa8d0dd4d15c249d830..90cf65991f2d360749bd804ce22ab43b70970787 100644 --- a/entry/build.gradle +++ b/entry/build.gradle @@ -2,17 +2,6 @@ apply plugin: 'com.huawei.ohos.hap' apply plugin: 'com.huawei.ohos.decctest' //For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#ZH-CN_TOPIC_0000001154985555__section1112183053510 ohos { - signingConfigs { - debug { - storeFile file('C:\\Users\\273341tianshuai\\.ohos\\config\\auto_debug_2850086000492781927.p12') - storePassword '000000185FFCA58CE3E0E9E125691AC897C3619BF77BA98A889ACE60FE95DB51FB40FC07ECFAFD45' - keyAlias = 'debugKey' - keyPassword '00000018318F1CC2D82A5C1BB6D84C5418DFE19CEB5F04215F1E71D1609BA415068B3D9DD7E47E36' - signAlg = 'SHA256withECDSA' - profile file('C:\\Users\\273341tianshuai\\.ohos\\config\\auto_debug_len_2850086000492781927.p7b') - certpath file('C:\\Users\\273341tianshuai\\.ohos\\config\\auto_debug_2850086000492781927.cer') - } - } compileSdkVersion 6 defaultConfig { compatibleSdkVersion 5 diff --git a/entry/src/main/js/default/pages/index/index.css b/entry/src/main/js/default/pages/index/index.css index 1a37a4bfdf92fc7293d9c42bd4b0aa052392fc2c..28b3fd964f897da62ebc39eb07146050ee5e734b 100644 --- a/entry/src/main/js/default/pages/index/index.css +++ b/entry/src/main/js/default/pages/index/index.css @@ -1,3 +1,17 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ .container { diff --git a/entry/src/main/js/default/pages/index/index.hml b/entry/src/main/js/default/pages/index/index.hml index 2606b3aa76cc6ac223abcb8619fb688777b6e8f2..4ee7131fe093d0859e46c6c03ac83d3bca15afa3 100644 --- a/entry/src/main/js/default/pages/index/index.hml +++ b/entry/src/main/js/default/pages/index/index.hml @@ -1,3 +1,16 @@ + +
AutoSpannableTextView @@ -11,9 +24,6 @@
- - - 活动介绍,开始以图片开头
diff --git a/entry/src/main/js/default/pages/index/index.js b/entry/src/main/js/default/pages/index/index.js index 39dbfd29354cf7aa78cc466cde2fbb8100afc8d3..e7fb80fa1d11411e3612e8ec0ddf4267119acfe1 100644 --- a/entry/src/main/js/default/pages/index/index.js +++ b/entry/src/main/js/default/pages/index/index.js @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import prompt from '@system.prompt'; export default { data: {