UNPKG

ed-frame-vue

Version:

easydata 基础组件

63 lines (58 loc) 1.43 kB
export default { data() { return { // 查询条件参数 formKeyInfo: {}, // form 表单高度 formHeight: "auto" } }, methods: { /** * @name bindFormProps * @return {Object} * @description 设置form组件参数 */ bindFormProps() { let baseProps= { inline: true, isSearchForm: true, height: this.formHeight, formData: this.formData, controlConfig: this.controlConfig, } return Object.assign({}, baseProps, this.formProps) }, /** * @name renderModalSlot * @description 组装form按钮区插槽 */ renderFormSlot() { const slots = ['resetBefore', 'queryBefore', 'exportBefore', 'addBefore', 'extra'] const scopedSlots = [] Object.keys(this.$scopedSlots).map(slot => { if (slots.includes(slot)) { scopedSlots.push(slot) } }) return scopedSlots }, /** * @name searchQuery * @description 搜索方法 */ async searchQuery() { let form = await this.$refs.EasyDataForm.getFormData(true) this.formKeyInfo = form.key await this.loadTableData(); }, /** * @name searchReset * @description 重写查询重置方法,默认显示值 */ async searchReset() { await this.$refs.EasyDataForm.watchFormData(); await this.searchQuery(); }, } }