本文整理汇总了TypeScript中tinymce/themes/silver/ui/alien/FieldLabeller.renderLabel函数的典型用法代码示例。如果您正苦于以下问题:TypeScript renderLabel函数的具体用法?TypeScript renderLabel怎么用?TypeScript renderLabel使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了renderLabel函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: renderLabel
export const renderAutocomplete = (spec: AutocompleteGoo, backstage: UiFactoryBackstage): SketchSpec => {
const pLabel = renderLabel(spec.label.getOr('?'), backstage.shared.providers);
const pField = AlloyFormField.parts().field({
factory: Typeahead,
dismissOnBlur: false,
inputClasses: [ 'tox-textfield' ],
minChars: 1,
fetch: (input) => {
const value = Representing.getValue(input);
const items = spec.getItems(value);
const tdata = NestedMenus.build(items, ItemResponse.BUBBLE_TO_SANDBOX, backstage);
return Future.pure(tdata);
},
markers: {
// FIX:
openClass: 'dog'
},
lazySink: backstage.shared.getSink,
parts : {
menu: MenuParts.part(false, 1, 'normal')
}
});
return renderFormField(Option.some(pLabel), pField);
};
示例2: renderLabel
export const renderListbox = (spec: ListboxFoo, providersBackstage: UiFactoryBackstageProviders): SketchSpec => {
const pLabel = renderLabel(spec.label, providersBackstage);
const pField = AlloyFormField.parts().field({
factory: HtmlSelect,
dom: {
classes: [ 'mce-select-field' ]
},
selectBehaviours: Behaviour.derive([
Tabstopping.config({ })
]),
options: spec.values,
// FIX: Don't use undefined here.
data: spec.initialValue.getOr(undefined)
});
return renderFormField(Option.some(pLabel), pField);
};
示例3: renderLabel
const pLabel = spec.label.map((label) => renderLabel(label, providersBackstage));