Add condition part

This commit is contained in:
2025-01-22 23:37:31 +08:00
parent 4062d85ea0
commit 58ad3571cd
13 changed files with 186 additions and 92 deletions

View File

@@ -33,7 +33,7 @@ const data: SavedData = reactive({
const cachedData: CachedData = reactive({
apps: [EMPTY_OPTION],
currentAppFields: { fields: [], layout: [] } as FieldsInfo,
currentAppFields: { fields: {}, layout: [] } as FieldsInfo,
});
provide('savedData', data);
@@ -45,6 +45,7 @@ const spinner = shallowRef<Spinner | null>(null);
onMounted(async () => {
spinner.value?.close(); // 修复不自动挂载到节点的 bug
const savedData = kintone.plugin.app.getConfig(props.pluginId);
// TODO
data.buttonName = savedData?.buttonName || '集約';
data.joinTables = savedData?.joinTables ? JSON.parse(savedData.joinTables) : [createEmptyJoinTable()];
nextTick(async () => {
@@ -62,7 +63,6 @@ watch(loading, (load) => {
watch(
() => data.joinTables.length,
(newLength) => {
console.log(data.joinTables);
if (newLength === 1) {
data.joinTables[0].onConditions = [getEmptyOnCondition()];
}