AndServer icon indicating copy to clipboard operation
AndServer copied to clipboard

文档@WebSite在现已失效,请问如何使用AssetsWebsite

Open yuWorm opened this issue 5 years ago • 1 comments

文档@WebSite在现已失效,请问如何使用AssetsWebsite,看其他人的issue,有WebConfig的用法,但是PathUtils.getInternalAppFilesPath()方法在现版本已被删除

yuWorm avatar Dec 07 '20 15:12 yuWorm

可以添加一个WebConfig的实现类,在实现onConfig方法时,使用delegate.addWebsite()方法添加你需要的AssetsWebsite实例

@Override
public void onConfig(Context context, Delegate delegate) {
        delegate.addWebsite(new AssetsWebsite(context,"/web"));
 }

实现类上记得加上@Config注解

kingz8 avatar Feb 20 '21 09:02 kingz8