fix: 修复方法不存在报错

This commit is contained in:
钱冠学
2024-11-22 16:06:44 +08:00
parent d509f30cbb
commit fe0f3ea93e

View File

@@ -57,6 +57,12 @@ export default defineComponent({
const { proxy } = getCurrentInstance();
provide('questionsData', questionsData);
function addEmptyArrayProp(obj, propName) {
obj[propName] = obj[propName] || { option_group: [] };
obj[propName].option_group.push({ groups: [] });
return obj[propName];
}
// 获取问卷
async function getQuetions(sn) {
try {