本文整理汇总了TypeScript中dojo/topic.publish函数的典型用法代码示例。如果您正苦于以下问题:TypeScript publish函数的具体用法?TypeScript publish怎么用?TypeScript publish使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了publish函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
.then((data)=>{
if(!data.state || data.state != stateCode.SUCCESS || !data.user) {
topic.publish('login/error', data.info);
} else {
topic.publish('login/error', lang.xhrRegSuccess);
}
}, (error)=>{
开发者ID:qinqin65,项目名称:QuickFinance,代码行数:7,代码来源:user.ts
示例2: if
.then((data)=>{
if(data.state === stateCode.SUCCESS && dojo.isArray(data.financePreviewData)) {
this.dataHandler(data.financePreviewData);
topic.publish('finance/financeDataChanged', false);
} else if(data.state === stateCode.Error) {
topic.publish('tipService/warning', data.info);
} else if(data.state === stateCode.NOTLOGGIN) {
topic.publish('tipService/warning', data.info);
user.logout();
} else {
topic.publish('tipService/warning', lang.xhrDataError);
}
}, (error)=>{
开发者ID:qinqin65,项目名称:QuickFinance,代码行数:13,代码来源:store.ts
示例3: setStore
setStore(data) {
if(dojo.isArray(data.accountBooks) && dojo.isArray(data.accounts)) {
this.store = data.accountBooks;
this.accountStore = data.accounts;
topic.publish('financeapp/accountBookData', this);
}
}
开发者ID:qinqin65,项目名称:QuickFinance,代码行数:7,代码来源:store.ts
示例4: function
_hasCompletedSetter: function (completed) {
var justCompleted = !this.hasCompleted && completed;
this.hasCompleted = completed;
if (justCompleted) {
topic.publish("hpcc/ecl_wu_completed", this);
}
},
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:7,代码来源:ESPWorkunit.ts
示例5: onFetchGraphXgmml
}).then(function (response) {
if (lang.exists("WUGetGraphResponse.Graphs.ECLGraphEx", response) && response.WUGetGraphResponse.Graphs.ECLGraphEx.length) {
if (subGraphId) {
if (!context.subgraphs) {
context.subgraphs = {};
}
if (!context.subgraphs[idx + "." + subGraphId]) {
context.subgraphs[idx + "." + subGraphId] = {};
}
context.subgraphs[idx + "." + subGraphId].xgmml = "<graph>" + response.WUGetGraphResponse.Graphs.ECLGraphEx[0].Graph + "</graph>";
onFetchGraphXgmml(context.subgraphs[idx + "." + subGraphId].xgmml, context.subgraphs[idx + "." + subGraphId].svg);
} else {
context.graphs[idx].xgmml = response.WUGetGraphResponse.Graphs.ECLGraphEx[0].Graph;
onFetchGraphXgmml(context.graphs[idx].xgmml, context.graphs[idx].svg);
}
} else {
topic.publish("hpcc/brToaster", {
Severity: "Error",
Source: "ESPWorkunit.fetchGraphXgmml",
Exceptions: [
{ Message: context.i18n.FetchingXGMMLFailed }
]
});
onFetchGraphXgmml("", "");
}
});
开发者ID:Michael-Gardner,项目名称:HPCC-Platform,代码行数:26,代码来源:ESPWorkunit.ts
示例6: function
this.topicHandler.push(topic.subscribe('validateCode/validate', function(callback) {
let validate = captchaObj.getValidate();
if (!validate) {
topic.publish('tipService/warning', lang.validateWarning);
return;
}
let option: any = {
handleAs: 'json',
data: {
geetest_challenge: validate.geetest_challenge,
geetest_validate: validate.geetest_validate,
geetest_seccode: validate.geetest_seccode
}
};
xhr.post(`${Config.requestHost}/validateCapthca`, option)
.then((data)=>{
if(!data.state || data.state != stateCode.SUCCESS) {
topic.publish('tipService/warning', data.info);
} else {
callback();
}
}, (error)=>{
});
}));
开发者ID:qinqin65,项目名称:QuickFinance,代码行数:25,代码来源:validateCode.ts
注:本文中的dojo/topic.publish函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论