和顺 / 知白 返回所属 Agent
ZB-03.03

成功条件

原能力

请当事人界定什么变化算有改善,将可观察的结果写进后续反馈问题。(细化版 p.2–3)

首选项目

SurveyJS Form Library(MIT(Form Library))。 SurveyJS Form Library

匹配范围

量表、条件显示和自由回答记录可观察目标。

源码

SurveyJS Form Library · public runCondition(

packages/survey-core/src/question.ts · 2258–2271 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
  public runCondition(properties: HashTable<any>): void {
    if (this.isDesignMode) return;
    if (!properties) properties = {};
    properties["question"] = this;
    this.runConditionCore(properties);
    if (this.canApplyDefaultValue() && (!this.isClearValueOnHidden || this.isVisibleInSurvey)) {
      if (!this.canSkipDefaultValueExpression()) {
        this.runDefaultValueExpression(properties);
      }
    }
  }
  // The inputs and the result of the last completed default value run of the conditions pass.
  // Copies, not references: a defaultValue or a value changed in place must count as changed.
  private lastDefaultValueRun: { expression: string, defaultValue: any, value: any };

实现与验收要点

生成与当事人认可的成功条件关联的核验计划。