mirror of
				https://github.com/nsnail/NetAdmin.git
				synced 2025-11-04 13:10:50 +08:00 
			
		
		
		
	fix: 🐛 在弹窗界面中引用的列表组件,点击重置搜索条件按钮时,会关闭弹窗的bug (#95)
This commit is contained in:
		@@ -119,7 +119,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <el-button-group>
 | 
					        <el-button-group>
 | 
				
			||||||
            <el-button @click="search" icon="el-icon-search" type="primary">查询</el-button>
 | 
					            <el-button @click="search" icon="el-icon-search" type="primary">查询</el-button>
 | 
				
			||||||
            <el-button @click="tool.refreshTab(vue)" icon="el-icon-refresh-left">重置</el-button>
 | 
					            <el-button @click="reset" icon="el-icon-refresh-left">重置</el-button>
 | 
				
			||||||
        </el-button-group>
 | 
					        </el-button-group>
 | 
				
			||||||
    </form>
 | 
					    </form>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -137,6 +137,7 @@ export default {
 | 
				
			|||||||
    data() {
 | 
					    data() {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            casLoaded: false,
 | 
					            casLoaded: false,
 | 
				
			||||||
 | 
					            keepKeywords: null,
 | 
				
			||||||
            form: {
 | 
					            form: {
 | 
				
			||||||
                root: {},
 | 
					                root: {},
 | 
				
			||||||
                filter: {},
 | 
					                filter: {},
 | 
				
			||||||
@@ -188,7 +189,9 @@ export default {
 | 
				
			|||||||
            Object.keys(this.form.dy).forEach((x) => {
 | 
					            Object.keys(this.form.dy).forEach((x) => {
 | 
				
			||||||
                delete this.form.dy[x]
 | 
					                delete this.form.dy[x]
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 | 
					            if (this.keepKeywords) {
 | 
				
			||||||
 | 
					                this.form.root.keywords = this.keepKeywords
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
            this.search()
 | 
					            this.search()
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -205,8 +205,7 @@ export default {
 | 
				
			|||||||
    margin: 5px;
 | 
					    margin: 5px;
 | 
				
			||||||
    color: #fff;
 | 
					    color: #fff;
 | 
				
			||||||
    vertical-align: top;
 | 
					    vertical-align: top;
 | 
				
			||||||
    padding: 4px;
 | 
					    padding: 1rem 4px 4px;
 | 
				
			||||||
    padding-top: 1rem;
 | 
					 | 
				
			||||||
    cursor: move;
 | 
					    cursor: move;
 | 
				
			||||||
    border-radius: 3px;
 | 
					    border-radius: 3px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,6 +111,7 @@ export default {
 | 
				
			|||||||
    mounted() {
 | 
					    mounted() {
 | 
				
			||||||
        if (this.keywords) {
 | 
					        if (this.keywords) {
 | 
				
			||||||
            this.$refs.search.form.root.keywords = this.keywords
 | 
					            this.$refs.search.form.root.keywords = this.keywords
 | 
				
			||||||
 | 
					            this.$refs.search.keepKeywords = this.keywords
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    created() {
 | 
					    created() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user