本文整理匯總了TypeScript中incremental-dom.patch函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript patch函數的具體用法?TypeScript patch怎麽用?TypeScript patch使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了patch函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
proxy_inst.$draw = function({key_id,is}:any){
//console.log(key_id,is,this);
patch(
document.getElementById(key_id),
this.$render.bind(this,{key_id, is, loaded:true}),
this
)
}
示例2: at
public at(domRender: HTMLElement, pmodule?: any): void {
//let key_id: string = domRender.getAttribute('id');
//if (!key_id) {
const key_id = `uid_${new Date().getTime()}`;
//domRender.setAttribute('id', key_id);
//}
const is = 'init-app-tag';
const proxyInst = componentFactory(pmodule.default,{z: 1000},{is, key_id}).content(function(){});
patch(domRender, proxyInst.$render.bind(proxyInst,{is, key_id}), proxyInst);
//patch(domRender, proxy_inst.$render.bind(proxy_inst,{key_id, is, loaded:true}), proxy_inst);
}
示例3: data
set data(data: TreeNode) { patch(this._rootEl, () => this._render(data)); }
示例4: data
set data(data: TableCell[][]) { patch(this._rootEl, () => this._render(data)); }