MCPcopy
hub / github.com/VisActor/VTable / applyStyles

Function applyStyles

packages/vtable-plugins/src/contextmenu/styles.ts:237–247  ·  view source on GitHub ↗
(
  element: HTMLElement,
  styles: { [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] }
)

Source from the content-addressed store, hash-verified

235 * 应用样式到元素
236 */
237export function applyStyles(
238 element: HTMLElement,
239 styles: { [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K] }
240): void {
241 for (const key in styles) {
242 const value = styles[key];
243 if (value !== undefined) {
244 element.style[key] = value;
245 }
246 }
247}
248
249/**
250 * 创建图标元素

Callers 6

showMenuMethod · 0.90
createMenuItemsMethod · 0.90
showSubmenuMethod · 0.90
createElementFunction · 0.70
createIconFunction · 0.70
createNumberInputItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected