Comments (3)
@cic1988 呃,你这个示例代码不是单页应用啊,只是应用了Page组件,单页应用应该使用App组件(amis官网-组件- App),可参考源码示例:https://github.com/baidu/amis/blob/master/examples/app/index-vite.html,
from amis.
问题1:params
没有更新的原因是,这里url发生变化,当发现匹配的是相同的页面时,直接就退出了,没有更新到params
参数,这里能否提交一个PR处理一下。
packages/amis-core/src/store/app.ts
问题2:query
未获取到的原因是,App 组件的父组件高阶组件HocStoreFactory 在 componentDidUpdate生命周期中有更新 IRenderer.data 逻辑(更新query
数据),react组件的 componentDidUpdate 执行顺序是子组件 > 父组件,也就是说 location
发生变化时,App组件会先执行render函数,但是从store.PageData
中获取到的数据仍未更新。
from amis.
你好 @findreamer 。 请教一下, 我现在的情况和问题里的情况有点不一样。我使用的是单页应用。请问如何动态跳转到一个新页面,而这个新页面就想你在视频里面一样是显示在同一个内嵌页面里面呢?十分感谢。
<body>
<div class="amiss" id="amisId"></div>
<script type="text/javascript">
(function () {
let amis = amisRequire('amis/embed');
let current_time = "{{ current_time }}";
let amisInstance = amis.embed(
'#amisId',
{
"type": "page",
"title": "新页面",
"body": [
{
"type": 'button',
"actionType": 'link',
"link": "./simple.html/detail",
"label": 'jump to detail page',
"level": 'primary'
}
]
},
{ locale: "zh-CN" },
{ theme: "cxd" }
);
})();
</script>
</body>
from amis.
Related Issues (20)
- CRUD 局部刷新(仅刷新指定行)bug HOT 1
- input-time类型控件值来自字段value而不是上层作用域data中字段值时,会差8小时
- input-datetime类型控件编辑时,如果连续点选某个日期或某个小时分两次值会跳8小时
- 无法打印表格 HOT 1
- JSSDK乱码
- 表单数据缓存
- input-table配置合并单元格后,表格错行 HOT 1
- picker组件 开启标签收纳,已选隐藏项样式有问题
- 如何禁止提交initApi获取表单的数据,只提交当前表单填写的数据 HOT 3
- aside中badge 动态设置数据
- inputTable组件在行内编辑时存在延迟更新数据域的问题
- amis-editor,编辑器初始化改变schema,导致功能无法使用
- tpl js模版引擎会自动转义
- #10134 table2刷新页面改成crud2下发存在bug HOT 1
- amis-editor-demo本地安装运行错误
- 移动端nav组件样式问题
- select控件搜索功能,输入搜索条件后,如果搜索结果没有包含当前控件本身已选中值项的话,已选中项会显示为选项value,应该显示为选项label
- dynamic input-range
- image配置enlargeTitle、enlargeCaption文字超过一行时展示有问题
- 爱速搭模组件模版功能有开源计划吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amis.