mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-30 10:43:03 +00:00
!48512 新增text model ng create string类型方法
Merge pull request !48512 from gzwhdd/localgzw_revert1111
This commit is contained in:
commit
06469bfb07
@ -16,6 +16,7 @@
|
||||
#include "core/components_ng/pattern/text/text_model_ng.h"
|
||||
|
||||
#include "base/geometry/dimension.h"
|
||||
#include "base/utils/utf_helper.h"
|
||||
#include "core/components/common/properties/alignment.h"
|
||||
#include "core/components/common/properties/text_style.h"
|
||||
#include "core/components_ng/base/frame_node.h"
|
||||
@ -58,6 +59,11 @@ void TextModelNG::Create(const std::u16string& content)
|
||||
textPattern->ClearSelectionMenu();
|
||||
}
|
||||
|
||||
void TextModelNG::Create(const std::string& content)
|
||||
{
|
||||
Create(UtfUtils::Str8ToStr16(content));
|
||||
}
|
||||
|
||||
void TextModelNG::Create(const RefPtr<SpanStringBase>& spanBase)
|
||||
{
|
||||
TextModelNG::Create(u"");
|
||||
|
@ -29,6 +29,7 @@ namespace OHOS::Ace::NG {
|
||||
class ACE_EXPORT TextModelNG : public TextModel {
|
||||
public:
|
||||
void Create(const std::u16string& content) override;
|
||||
void Create(const std::string& content) override;
|
||||
void Create(const RefPtr<SpanStringBase>& spanString) override;
|
||||
void SetFont(const Font& value) override;
|
||||
void SetFontSize(const Dimension& value) override;
|
||||
|
Loading…
Reference in New Issue
Block a user