Signed-off-by: zhanghongchuan33 <zhanghongchuan6@huawei.com>
This commit is contained in:
zhanghongchuan33 2022-06-06 16:44:27 +08:00
parent c821309717
commit 70c4e0819b
8 changed files with 31 additions and 22 deletions

View File

@ -149,7 +149,7 @@ export struct NoteContentComp {
.height('70%')
.width('100%')
}
.margin({ left: 12, right: 24 })
.margin({ left: 24, right: 24 })
.width(StyleConstants.PERCENTAGE_100)
.enabled(this.selectedNoteData && this.selectedNoteData.is_deleted == Delete.Yes ? false : true)
.onClick(() => {

View File

@ -115,7 +115,7 @@ export struct NoteContentCompPortrait {
})
})
.zoomAccess(false)
.height('70%')
.height('100%')
.width('100%')
}
.flexShrink(1)
@ -127,7 +127,7 @@ export struct NoteContentCompPortrait {
LogUtil.info(TAG, "setInterval time_id : " + time_id)
this.editModel = true
})
.margin({ top: 16 })
.margin({ top: 0 })
.width(StyleConstants.PERCENTAGE_100)
}
.flexShrink(1)

View File

@ -668,7 +668,7 @@ export struct SearchComp {
})
Flex({ justifyContent: FlexAlign.Start }) {
Image($r('app.media.search')).width(18).height(18)
Image($r('app.media.search')).width(20).height(20)
TextInput({ placeholder: $r('app.string.searchNote') })
.backgroundColor(this.longpress ? $r("app.color.search_longpress_bgcolor_f7f8f9") : $r("app.color.color_ffffff"))
.caretColor($r("app.color.search_note_caret_color"))

View File

@ -30,7 +30,7 @@ body {
}
#editorjs {
padding-left: 24px;
padding-left: 0px;
padding-right: 24px;
width: 100%;
display: table-cell;
@ -38,7 +38,8 @@ body {
background-repeat: no-repeat;
background-position: center;
background-size: cover;
color: #333333;
color: #182431;
opacity: 0.9;
font-size: 16px;
}

View File

@ -356,6 +356,7 @@ function saveHtmlContent() {
function scheduledSaveContent() {
console.info('scheduledSaveContent');
var htmlString = RICH_EDITOR.getHtml();
htmlString = window.btoa(unescape(encodeURIComponent(htmlString)));
var str = callBackToApp.callbackScheduledSave(htmlString);
console.info('scheduledSaveContent end');
}

View File

@ -13,6 +13,7 @@
* limitations under the License.
*/
import {atob} from 'js-base64'
import ohosDataRdb from '@ohos.data.rdb'
import fileio from '@ohos.fileio'
import {LogUtil} from './LogUtil'
@ -292,7 +293,7 @@ export default {
getImgNameFromHtml(noteData: NoteData): any{
let newModuleName = "file://" + globalThis.noteContext.filesDir
let imgNameArray = []
let html = noteData.content_text
let html = atob(noteData.content_text)
if (html == undefined || html == null || html == "") {
return imgNameArray
}

5
package-lock.json generated
View File

@ -849,6 +849,11 @@
"resolved": "https://repo.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"js-base64": {
"version": "3.7.2",
"resolved": "https://repo.huaweicloud.com/repository/npm/js-base64/-/js-base64-3.7.2.tgz",
"integrity": "sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ=="
},
"json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",

View File

@ -1,18 +1,19 @@
{
"license":"ISC",
"devDependencies":{},
"name":"ohos_note",
"ohos":{
"org":"huawei",
"directoryLevel":"project",
"buildTool":"hvigor"
"license": "ISC",
"devDependencies": {},
"name": "ohos_note",
"ohos": {
"org": "huawei",
"directoryLevel": "project",
"buildTool": "hvigor"
},
"description":"example description",
"repository":{},
"version":"1.0.0",
"dependencies":{
"@ohos/hvigor-ohos-plugin":"1.0.6",
"hypium":"^1.0.0",
"@ohos/hvigor":"1.0.6"
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {
"@ohos/hvigor": "1.0.6",
"@ohos/hvigor-ohos-plugin": "1.0.6",
"hypium": "^1.0.0",
"js-base64": "^3.7.2"
}
}
}