1
0
mirror of synced 2026-04-14 21:19:18 +08:00

fix(editor): 显示条件中选中的字段类型发生时,值对应做类型转换

This commit is contained in:
roymondchen
2026-01-07 14:41:25 +08:00
parent 3cfec95612
commit 5267381ebf
11 changed files with 388 additions and 67 deletions

View File

@@ -15,7 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, NODE_CONDS_KEY } from '@tmagic/core';
import { NODE_CONDS_KEY, removeDataSourceFieldPrefix } from '@tmagic/core';
import { defineFormConfig } from '@tmagic/form-schema';
export default defineFormConfig([
@@ -29,7 +29,7 @@ export default defineFormConfig([
onChange: (_vm: any, v: string[] = [], { setModel }: any) => {
if (Array.isArray(v) && v.length > 1) {
const [dsId, ...keys] = v;
setModel('dsField', [dsId.replace(DATA_SOURCE_FIELDS_SELECT_VALUE_PREFIX, ''), ...keys]);
setModel('dsField', [removeDataSourceFieldPrefix(dsId), ...keys]);
} else {
setModel('dsField', []);
}