Code Monkey home page Code Monkey logo

doric-pub / doric Goto Github PK

View Code? Open in Web Editor NEW
212.0 11.0 27.0 41.76 MB

Doric is a cross-platform development framework for Android & iOS & Web & Qt

Home Page: https://doric.pub

License: Apache License 2.0

Shell 0.06% C++ 13.20% QMake 0.16% Java 21.63% TypeScript 18.97% JavaScript 26.77% Objective-C 17.46% Ruby 0.09% HTML 0.19% QML 1.18% C 0.06% Python 0.08% Objective-C++ 0.11% Swift 0.03%
cross-platform android ios typescript webcomponent qt mvvm

doric's Introduction

Doric

Doric是一套高性能的跨平台开发框架,使用TSX/TypeScript开发,一套代码可在不同平台展示出同样的页面.

OSCS

OSCS Status

Murphysec

Security Status

特色

跨平台统一

Doric目前已支持Android、iOS、Qt、Web,可通过一套代码在各平台展示一致的前端页面.

高性能渲染

Doric渲染视图时使用原生组件,在API上遵循原生接口,在架构上采用脏值检测、局部更新等多种机制实现JS与原生间的高效通信,Doric页面的渲染及运行性能可真正达到与原生媲美.

轻量化,易扩展

Doric中遵循轻量化的原则,SDK提供核心能力及通用的视图组件和平台的原生能力模块,可以满足常用的需求. 同时,Doric中也提供了完备的插件机制,您可以通过注册插件来向Doric中提供视图组件或原生能力.

易上手,丰富的工具链

Doric提供脚手架工具doric-cli及开发调试工具Devkit,提供热重载、断点调试、性能瀑布图、节点查看器等多种工具,帮助开发者更方便快捷地开发页面,并进行分析调试.

快速使用

项目文档: https://doric.pub

示例代码

您可以通过下方代码体验Doric中的编写风格

声明式UI

您可以根据喜好,使用TypeScript或TSX语法书写布局.

TypeScript TSX

跨平台统一

下图为代码在Android及iOS应用上的运行截图

Android iOS
!

常用插件库

提供平台中读写文件系统的能力(Android+iOS)

提供WebSocket能力支持(Android+iOS)

提供图片选择及拍照功能(Android+iOS)

提供扫码支持(Android+iOS)

提供SQLite数据库支持(Android+iOS)

License

Apache License 2.0

欢迎扫码加入Doric社区讨论交流

QQ 钉钉 微信

doric's People

Contributors

arkoosayao avatar awxy avatar csgsky avatar f-hang avatar insofan avatar jiangteng avatar jingpeng avatar penfeizhou avatar shawn-wangdapeng avatar shukaka avatar xcoder1011 avatar xuegao-tzx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doric's Issues

memory leak


image

when run 'onTearDown' fucntion, plugin hold context, context want to clear plugin, so can not clear

Text component rendering problem in the ListItem component

The ListItem component in the List component seems to have a bug. When the Text component is nested in the ListItem component, it cannot display text normally if the color attribute of the Text component is not set.
For example, the following example will be probably not displayed on the Android side:

<ListItem
            height={100}
            layoutConfig={
                layoutConfig()
                    .most()
                    .configAlignment(gravity().center())
                    .configHeight(LayoutSpec.JUST)
            }
        >
            <Stack
                layoutConfig={
                    layoutConfig()
                        .most()
                }
            >
                <HLayout
                    layoutConfig={
                        layoutConfig()
                            .most()
                    }
                >
                    <Stack
                        width={70}
                        height={70}
                        layoutConfig={
                            layoutConfig()
                                .just()
                                .configAlignment(Gravity.Right.centerY())
                        }
                    >
                        <Text
                            hidden={status}
                            width={45}
                            height={20}
                            backgroundColor={Color.GRAY}
                            //textColor={Color.WHITE}//If this attribute is not set, the probability will not be rendered
                            text={"Test"}
                            layoutConfig={
                                layoutConfig()
                                    .just()
                                    .configAlignment(Gravity.Bottom.center())
                            }
                            textSize={15}
                        />
                    </Stack>
                    <Text
                        backgroundColor={Color.GRAY}
                        text={Hello}
                        //textColor={Color.BLACK}//If this attribute is not set, the probability will not be rendered
                        layoutConfig={
                            layoutConfig()
                                .fit()
                                .configAlignment(Gravity.Left.centerY())
                        }
                        textSize={20}
                    />
                </HLayout>
            </Stack>
        </ListItem>

使用RotationAnimation 两端不一致情况

rotation(setpIndex: number) {
let chevron = this.getChevronBySetp(setpIndex)
let rotation = new RotationAnimation()
rotation.duration = 0
rotation.fromRotation = 0
rotation.toRotation = -0.5
rotation.fillMode = FillMode.Forward
this.getView().doAnimation(context, rotation)
}

这段代码第二次执行的时候,android上view没有再次旋转,在ios上又旋转了一次。实际情况我不想让他再旋转一次,我把duration设置为0.0000001来解决这个问题。

Lialingcase sensitive configuration

In the case -oriented non -sensitive system, such as MAC. Sometimes VSCODE's guide packages can sometimes run normally, and sometimes errors are reported on other computers. The solution is: add "forceConsistentCasingInFileNames": false,/* In order to avoid case-sensitive system display error */ to the tsconfig.json file, it is recommended to refer to repair

关于如何开启调试模式?

你好, 新年快乐!
不知道js代码是否可以在浏览器远程调试, 我查阅了文档没找到类似于webView.setWebContentsDebuggingEnabled(true);这样的开关设置。
谢谢~

可以断点调试js吗?

请教一个问题,在Android里面,如何在js里面进行断点调试,有类似chrome dev tool那样的调试功能吗?

优化

你好,最近在了解Doric框架,想知道 在绘制效率方面,想对比RN,我们的优化主要是哪些方向。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.