本文整理汇总了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;
});