本文整理匯總了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));