|
|
@ -2,20 +2,17 @@ |
|
|
|
import FormulaConfig from 'components/formula/FormulaConfig.vue' |
|
|
|
import FormulaTable from 'components/formula/FormulaTable.vue' |
|
|
|
import { ref } from 'vue' |
|
|
|
import { Plus } from '@element-plus/icons-vue' |
|
|
|
|
|
|
|
// 新增配方 修改为先填充默认配置 点击确定提交 |
|
|
|
const formRef = ref(null) |
|
|
|
const formRef = ref() |
|
|
|
const onAddFormula = () => { |
|
|
|
selectedIndexRest() |
|
|
|
if (formRef.value) { |
|
|
|
formRef.value.addFormula() // 调用子组件方法 |
|
|
|
formRef.value?.formRef.value.addFormula() |
|
|
|
} |
|
|
|
} |
|
|
|
const tableRef = ref(null) |
|
|
|
const tableRef = ref() |
|
|
|
const selectedIndexRest = () => { |
|
|
|
if (tableRef.value) { |
|
|
|
tableRef.value.selectedIndexRest() // 调用子组件方法 |
|
|
|
} |
|
|
|
tableRef.value?.tableRef.value.selectedIndexRest() // 调用子组件方法 |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
@ -43,7 +40,7 @@ const selectedIndexRest = () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="formula-right"> |
|
|
|
<FormulaConfig ref="formRef" type="formula" formula-name-visible="true" /> |
|
|
|
<FormulaConfig ref="formRef" type="formula" :formula-name-visible="true" /> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
</div> |
|
|
|