Giter Site home page Giter Site logo

Comments (4)

vexos-io avatar vexos-io commented on April 30, 2024

我是伪造了一个请求,然后用adaptor改掉返回值。如下,希望对你有帮助:

export function loadSchema(page)
{
return {
url: '/null', //这是一个空返回的占位路径
adaptor: async (body, res, api) =>
{
const o = await import(page); //实际import目标文件
return {
status: 0,
data: o.default
};
}
};
}

from amis.

lpn666 avatar lpn666 commented on April 30, 2024

我是伪造了一个请求,然后用adaptor改掉返回值。如下,希望对你有帮助:

export function loadSchema(page) { return { url: '/null', //这是一个空返回的占位路径 adaptor: async (body, res, api) => { const o = await import(page); //实际import目标文件 return { status: 0, data: o.default }; } }; }

没看懂你这写的是啥,按照你这个写返回还是报错

from amis.

vexos-io avatar vexos-io commented on April 30, 2024

https://aisuda.bce.baidu.com/amis/zh-CN/docs/types/api#%E9%85%8D%E7%BD%AE%E6%8E%A5%E6%94%B6%E9%80%82%E9%85%8D%E5%99%A8

from amis.

lpn666 avatar lpn666 commented on April 30, 2024

https://aisuda.bce.baidu.com/amis/zh-CN/docs/types/api#%E9%85%8D%E7%BD%AE%E6%8E%A5%E6%94%B6%E9%80%82%E9%85%8D%E5%99%A8

我按照您说的写了,但是还是白屏,请问这是为啥呢
image
image

from amis.

Related Issues (20)

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.