You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<template>
<a-button @click="countDown">
Open modal to close in 5s
</a-button>
</template>
<script>exportdefault { methods: {countDown() {let secondsToGo =5;constmodal=this.$success({ title:'This is a notification message', content:`This modal will be destroyed after ${secondsToGo} second.`, });constinterval=setInterval(() => { secondsToGo -=1;modal.update({ content:`This modal will be destroyed after ${secondsToGo} second.`, }); }, 1000);setTimeout(() => {clearInterval(interval);modal.destroy(); }, secondsToGo *1000); }, },};</script>
代码如下:
onItemClick() { this.$popup({ title: "明细信息详情", showHeader: true, showClose: false, position: "right", headerAlign: "start", showBack: true, content: <SrmForm style="padding: 0 15px;" customizeType="detail" formRefresh={this.formRefresh} columns={this.getColumns()} dataSet={this.dataSet}/>, }); },
环境:
"@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-jsx": "^7.12.13", "@babel/plugin-transform-classes": "^7.13.0", "@babel/plugin-transform-runtime": "^7.13.15", "@babel/preset-env": "^7.13.15", "@vue/babel-helper-vue-jsx-merge-props": "^1.2.1", "@vue/babel-preset-jsx": "^1.2.4",
在点击事件方法里面动态创建了一个弹窗,content参数是弹窗的默认插槽,SrmForm组件接收formRefresh参数(布尔值)并实例化后,外层改变this.formRefresh的值SrmForm组件无法感知,但是修改this.dataSet(对象)是可以的。有什么好的解决办法吗?
The text was updated successfully, but these errors were encountered: