Coder Social home page Coder Social logo

kkapplication's Introduction

iOS

1 Podfile 增加引用库

pod "KKApplication" ,~> "1.0.6"

2 启动小应用

[[KKShell main]open:[NSURL URLWithString: @"https://kkserver.cn/kk/doc/app.json"  ]];

开发小应用

1 创建小应用 下载 kk-cli

kk-cli app init

2 修改 app.json

{
    "version":"1.0",    // 应用版本号, 每次启动应用会检测版本号,若本地不存在则下载, 下次启动自动更新
    "items":[]          // 下载的文件相对路径,可使用 kk-cli app update 自动生成  
}

3 主代码 main.js 详细文档

app.set(["action","open"], {    //打开小应用
    "type": "app",
    "url" :"<url>"
});

app.set(["action","open"], {    //打开界面
    "path" :"<path>",
    "query" : {},
    "target" : ""    不设置按默认方式打开界面; window 在主window上显示界面; root 作为根界面显示            
});

app.set(["action","open"], {    //打开界面
    "scheme" :"<url | scheme>"    // http URL使用WKWebView显示,其他使用系统调度规则           
});

app.set(["action","open"], { //打开界面
    "url" :"<url>" // 使用WKWebView显示     
});

4 页面

kk-cli app update    // 更新小应用,自动生成视图代码

kkapplication's People

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.