本文整理匯總了TypeScript中dojo/dom-construct.create函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript create函數的具體用法?TypeScript create怎麽用?TypeScript create使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了create函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: DynamicDialogForm
export function DynamicDialogForm(object) {
var table = domConstruct.create("table", {});
for (var key in object) {
var tr = domConstruct.create("tr", {}, table);
if (object.hasOwnProperty(key)) {
var td = domConstruct.create("td", {
style: "width: 30%;"
}, tr);
domConstruct.create("label", {
innerHTML: object[key]['label']
}, td);
var td1 = domConstruct.create("td", {
style: "width: 100%;"
}, tr);
this.key = object[key]['widget'].placeAt(td1);
}
}
return table;
}
示例2: function
showDebugInfo: function (/*DOMNode|String*/ node, obj) {
var domNode = dom.byId(node);
if (!obj) {
obj = this;
}
var ulNode = domConstruct.create("ul", {}, domNode);
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
this.showDebugRow(ulNode, key, obj[key]);
}
}
}
示例3: function
injectJavascript: function (__cellContent, __row, __cell, __width) {
// Add paragraph so cells can valign ---
domConstruct.create("p", {
style: {
height: "1px"
},
innerHTML: " "
}, __cell);
try {
eval(__cellContent);
} catch (e) {
__cell.innerHTML = "<b>Error:</b> " + safeEncode(e.message) + "<br>" + safeEncode(__cellContent);
}
},
示例4:
prefixes.some(function(prefix){
let elmt:HTMLElement=dom_contruct.create('div');
// if(dom_style[prefix+cn] !== undefined){//for PC
// if(window.getComputedStyle(elmt,null)[prefix+cn] !== undefined){//for mobile
let isMobile=navigator.appVersion.indexOf('Android')>0 && navigator.platform.indexOf('Win')<0;
if((isMobile?window.getComputedStyle(elmt,null)[prefix+cn]:dom_style[prefix+cn])!== undefined){
if(hyphen){
n = "-" + prefix + "-" + p;
}else{
n = prefix + cn;
}
return true;
}
return false;
});