|
@@ -218,7 +218,23 @@ const getTypeMapApi = async () => {
|
|
|
|
|
|
//菜单被选择
|
|
|
const handleFormulaMenu = (index, path) => {
|
|
|
- console.log(index, path)
|
|
|
+ if (isResetFun.value) {
|
|
|
+ //重置函数
|
|
|
+ if (path[0] !== '基础运算') {
|
|
|
+ window?.$message.warning('当前只能使用基础运算')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ let index = Number(path[1].split('-')[1]) - 1
|
|
|
+ const item = formulaMenuList.value[path[0]][index]
|
|
|
+ const val = symbolReg.exec(item.name)[1]
|
|
|
+ resetFunOperator(val)
|
|
|
+ } catch (e) {
|
|
|
+ console.error(e)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ console.log(index, path)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//获取数据
|