957 Star 5.1K Fork 1.6K

GVPsmallwei / Avue

 / 详情

3.4.2版本,$DialogForm无法调用

已完成
创建于  
2024-05-14 17:24

输入图片说明
升级到最新版本,无法调用$dialogForm:
输入图片说明

评论 (14)

maizi 创建了任务

提示啥

什么也不提示,也不报错

输入图片说明
我是在saber3.x的基础上升级的avue

smallwei 任务状态待办的 修改为进行中
import {$DialogForm} form '@smallwei/avue'
setup(props,context){
    $DialogForm(context)(opts).then({
        
    })        
}

试试这个

输入图片说明
是这么写吗?会报错
输入图片说明

import { getCurrentInstance } from 'vue';
const instance = getCurrentInstance();
instance.$DialogForm(ops)


试试这个

试试这个

  import { getCurrentInstance } from 'vue';
      let instance = getCurrentInstance()
      const { appContext } = instance
      const ops = {
        option: {
          submitText: '完成',
          column: [
            {
              label: "姓名",
              prop: "name",
              span: 24,
              rules: [{
                required: true,
                message: "请输入姓名",
                trigger: "blur"
              }]
            }]
        }
      }
      appContext.config.globalProperties.$DialogForm(ops)
import { getCurrentInstance } from 'vue';
import { $DialogForm} from '@smallwei/avue'
  let instance = getCurrentInstance()
  const { appContext } = instance
  const ops = {
    option: {
      submitText: '完成',
      column: [
        {
          label: "姓名",
          prop: "name",
          span: 24,
          rules: [{
            required: true,
            message: "请输入姓名",
            trigger: "blur"
          }]
        }]
    }
  }
  $DialogForm({_content:appContext})(ops)

大佬文档里面体现一下,谢谢

smallwei 任务状态进行中 修改为已完成

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(3)
632261 smallweigit 1588214431 4918716 huyunning 1645335414
JavaScript
1
https://gitee.com/smallweigit/avue.git
git@gitee.com:smallweigit/avue.git
smallweigit
avue
Avue

搜索帮助