ng-alain sf中使用this["sf"].setValue

colortheme: {
                type: "string",
                title: "颜色",
                ui: {
                    widget: "wrapper",
                    module: "color",
                    spanLabel: 10,
                    spanControl: 14,
                    grid: {
                        span: 8,
                    },

                    change: (colortheme: ColorSelectWidget) => {
                        if (colortheme['value']) {
                            this["sf"].setValue("/font", { value: 15, color: colortheme['headname'], checked: true });
                        } else {
                            return null
                        }
                    }

                },
            },
           font: {
                type: "string",
                default: {
                    value: 15,
                    color: '',
                    checked: true
                },
                ui: {
                    spanLabel: 6,
                    spanControl: 14,
                    widget: "wrapper",
                    module: "font-styles",
                    grid: {
                        span: 12,
                    },
                },
            },

在使用this["sf"].setValue改变font的值的时候,点击切换不能直接显示font的效果,需要刷新一下,这是为什么呀?font的值是module传回来的值
image.png

阅读 1.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题