Giter Site home page Giter Site logo

Comments (9)

amisadmin avatar amisadmin commented on May 22, 2024

您好, 欢迎本地测试后提交pr,最近比较忙可能测试不过来.

from fastapi-amis-admin.

Chaoyingz avatar Chaoyingz commented on May 22, 2024

这个判断的具体目的是什么呢

from fastapi-amis-admin.

amisadmin avatar amisadmin commented on May 22, 2024

保证左侧的菜单栏iframe页面, 直接点击能够在当前页面打开, 并且右键能够以新标签页的形式打开.

from fastapi-amis-admin.

Chaoyingz avatar Chaoyingz commented on May 22, 2024

我目前没遇这个场景。如果设置src为https://example.com/,那么按照当前的逻辑实际渲染出来iframe的src就成了//example.com/,页面无法正常加载。

from fastapi-amis-admin.

amisadmin avatar amisadmin commented on May 22, 2024
@site.register_admin
class AmisEditorAdmin(admin.IframeAdmin):
    group_schema = None
    page_schema = amis.PageSchema(label='AmisEditorDemo', icon='fa fa-edit', sort=-100)
    src = 'https://aisuda.github.io/amis-editor-demo/'

fastapi_user_auth_demo 示例程序中以上代码显示正常, 确保目标链接支持iframe

from fastapi-amis-admin.

Chaoyingz avatar Chaoyingz commented on May 22, 2024

我测试了下如果src带端口号的话那么这页就不会在侧边栏菜单出现

from fastapi-amis-admin.

amisadmin avatar amisadmin commented on May 22, 2024

我测试了下如果src带端口号的话那么这页就不会在侧边栏菜单出现

这个很大可能性是amis的限制, 他的路由路径不能包含某些特殊字符.

from fastapi-amis-admin.

amisadmin avatar amisadmin commented on May 22, 2024

我测试了下如果src带端口号的话那么这页就不会在侧边栏菜单出现

是否全部src都需要执行这个正则替换

self.page_schema.url = re.sub(r"^https?:", "", iframe.src)

from fastapi-amis-admin.

Chaoyingz avatar Chaoyingz commented on May 22, 2024

如果我把这个判断去掉的话tab就会正常出现

from fastapi-amis-admin.

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.