要素はポップアップ ウィンドウを閉じる前に何かを実行します。

ちょっとした方法を書きましたが、残念ながら役に立たないので削除する必要があるので記録しておきます。

html部分:

   <!-- 科目阶段弹窗 -->
    <el-dialog 
    :visible.sync="dialogShowTree" 
    :title="title"  
    width="40%"  
    :before-close="onBeforeClose"		//关闭前的回调,会暂停 Dialog 的关闭
    >          
        <el-tree
            ref="tree"
            :data="subjectOptions"
            show-checkbox
            node-key="click"
            :default-expand-all =true
            @check="(click, checked)=>{handleCheckChange(click, checked)}"
            :props="defaultProps">
        </el-tree>
        <div class="footerCenter">
            <el-button type="primary" @click="treeSubmit()">确认</el-button>
            <el-button @click="treeLast()">取消</el-button>
        </div>
    </el-dialog>

js部分:

       //关闭科目阶段弹窗前
       onBeforeClose(done){
    
    
           //...
           return done();//function(done),done 用于关闭 Dialog
       },

おすすめ

転載: blog.csdn.net/duruo0/article/details/120949751