Er til einhver listi yfir þau attribute/parameters sem veva býður upp á?

Asked at: 04.11.2024 13:35 by:

Það er til hellingur af sniðugum vevu properties sem hægt er að nota í blazor einingar, t.d. IconProperty, AssetProperty, DataBindingKey o.s.frv.

En ég hef aldrei séð neitt documentation um þetta eða hvað er í boði.

Væri hægt að gera lista yfir þau helstu vevu attribute sem hægt er að nota í blazor einingum?

Edit

Answers

Veva Component Attributes og Property Types

Þetta skjal lýsir öllum attributes og property types sem hægt er að nota í Veva Blazor einingum.

Class Attributes

Þessi attributes eru sett á Blazor component klasann sjálfan.

VevaComponent

Skilgreinir component sem Veva component með einstöku GUID auðkenni.

[VevaComponent("12345678-1234-1234-1234-123456789abc")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Components


Icon

Ícón fyrir component í admin viðmótinu.

[Icon("fa fa-image")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


Description

Lýsing á component sem birtist í admin.

[Description("Myndaræma með fyrirsögn")]
public class MyComponent : ComponentBase { }

Namespace: System.ComponentModel


Category

Flokkur í component listanum í admin.

[Category("Grunneiningar")]
public class MyComponent : ComponentBase { }

Namespace: System.ComponentModel


Keywords

Leitarorð til að finna component auðveldlega.

[Keywords("mynd, banner, hero, forsíða")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


PreviewImage

Forskoðunarmynd fyrir component.

[PreviewImage("/images/components/hero-preview.png")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


RequiredScopes

Krafist réttinda til að nota component.

[RequiredScopes("admin,editor")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


Scope

Scope/svið einingar.

[Scope("page")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


Hjálparhlekkur með lýsingu.

[HelpLink("https://docs.example.com/component", "Leiðbeiningar um notkun", "Sjá nánar")]
public class MyComponent : ComponentBase { }

Namespace: Veva.Core.Domain.Attributes


Property Attributes

Þessi attributes eru sett á properties innan component.

EditorArgument

Sendir auka stillingu til property editor. Hægt að nota margsinnis.

[Parameter]
[EditorArgument("maxLength", 100)]
[EditorArgument("placeholder", "Sláðu inn texta...")]
public string Title { get; set; }

Namespace: Veva.Core.Domain.Attributes


DisplayName

Sýnilegt heiti á property í admin.

[Parameter]
[DisplayName("Fyrirsögn")]
public string Title { get; set; }

Namespace: System.ComponentModel


Description

Lýsing á property.

[Parameter]
[Description("Aðalfyrirsögn sem birtist efst á síðunni")]
public string Title { get; set; }

Namespace: System.ComponentModel


Category

Flokkur í property listanum.

[Parameter]
[Category("Útlit")]
public string CssClass { get; set; }

Namespace: System.ComponentModel


Grunngerðir (Basic Types)

Tegund property ákvarðar hvaða editor er notaður sjálfkrafa.

Type Editor Lýsing
string string-editor Textasvæði
int / int? number-editor Tölusvæði
bool / bool? boolean-editor Checkbox
DateTime / DateTime? date-editor Dagsetningarval
Guid? string-editor GUID innsláttur með validation
System.Drawing.Size? size-editor Stærð (width/height)
Dictionary<string, string> key-value-editor Lykilgildapör
enum select-editor Dropdown val
[Flags] enum bitmask-editor Multi-val (checkboxes)
interface extension-editor Velur implementation
IEnumerable<interface> multi-extension-editor Mörg implementation
record record-editor Record editor
IEnumerable<record> record-set-editor Margir records

Sérhæfðar Property Types

IconProperty

Ícón val með provider, identifier og markup.

[Parameter]
[DisplayName("Ícón")]
public IconProperty Icon { get; set; }

Namespace: Veva.Core.Domain.Model.Icons

Properties:

  • Provider - Nafn á ícón provider
  • Identifier - Auðkenni ícóns
  • Group - Flokkur
  • Markup - HTML markup
  • Name - Heiti

ColorProperty

Litaval með hex og HSL stuðningi.

[Parameter]
[DisplayName("Bakgrunnslitur")]
public ColorProperty BackgroundColor { get; set; }

Namespace: Veva.Core.Domain.Model

Aðferðir:

  • ColorProperty.FromHex("#FF5500") - Búa til úr hex
  • ColorProperty.FromColor(Color.Red) - Búa til úr System.Drawing.Color
  • ColorProperty.FromHSL(h, s, l, alpha) - Búa til úr HSL
  • ToHexaString() - Fá hex streng

DataBindingKey

Data binding lykill fyrir dynamic gögn.

[Parameter]
[DisplayName("Gagnalykill")]
public DataBindingKey DataKey { get; set; }

Namespace: Veva.Core.Domain.DataBinding


CssClass

CSS klasi val.

[Parameter]
[DisplayName("CSS Klasi")]
public CssClass CssClass { get; set; }

Namespace: Veva.Core.Domain.Pages

Properties:

  • Scope - Svið
  • ClassName - Nafn klasa
  • Description - Lýsing

BoxAlignment

Staðsetning/alignment val (flags enum).

[Parameter]
[DisplayName("Staðsetning")]
public BoxAlignment Alignment { get; set; }

Namespace: Veva.Core.Domain.Components.CSS

Gildi:

  • None, Left, HorizontalCenter, Right
  • Top, VerticalCenter, Bottom

Assets Module

AssetProperty

Asset/mynd val.

[Parameter]
[DisplayName("Mynd")]
public AssetProperty Image { get; set; }

// Eða margar myndir:
[Parameter]
[DisplayName("Myndir")]
public IEnumerable<AssetProperty> Images { get; set; }

Namespace: Veva.Modules.Assets.Domain.Model

Properties:

  • AssetId - GUID auðkenni assets
  • Description - Lýsing

CategoryProperty

Asset flokkur val.

[Parameter]
[DisplayName("Myndaflokkur")]
public CategoryProperty Category { get; set; }

Namespace: Veva.Modules.Assets.Domain.Model

Properties:

  • CategoryId - GUID auðkenni flokks

ProcProperty

Processing stillingar.

[Parameter]
[DisplayName("Myndvinnsla")]
public ProcProperty Processing { get; set; }

Namespace: Veva.Modules.Assets.Domain.Model

Properties:

  • Name - Nafn á processing

Documents Module

DocumentProperty

Skjala tengill.

[Parameter]
[DisplayName("Tengt skjal")]
public DocumentProperty Document { get; set; }

// Eða mörg skjöl:
[Parameter]
[DisplayName("Tengd skjöl")]
public IEnumerable<DocumentProperty> Documents { get; set; }

Namespace: Veva.Modules.Documents.Domain.Models


DocumentModelProperty

Skjala model val.

[Parameter]
[DisplayName("Skjala tegund")]
public DocumentModelProperty DocumentModel { get; set; }

Namespace: Veva.Modules.Documents.Domain.Models

Properties:

  • ModelId - GUID auðkenni models
  • DisplayField - Svæði til að birta

InlineDocumentModelProperty

Inline skjala model með orientation.

[Parameter]
[DisplayName("Inline skjöl")]
public InlineDocumentModelProperty InlineDocuments { get; set; }

Namespace: Veva.Modules.Documents.Domain.Models

Properties:

  • ModelId - GUID auðkenni models
  • DisplayField - Svæði til að birta
  • EditorOrientation - Vertical eða Horizontal

SimpleDocumentModelProperty

Einfaldur skjala model.

[Parameter]
[DisplayName("Skjal")]
public SimpleDocumentModelProperty SimpleDocument { get; set; }

Namespace: Veva.Modules.Documents.Domain.Models


DocumentFolderProperty

Skjala mappa val.

[Parameter]
[DisplayName("Skjala mappa")]
public DocumentFolderProperty Folder { get; set; }

Namespace: Veva.Modules.Documents.Domain.Models


Tags Module

TagProperty

Tag val.

[Parameter]
[DisplayName("Flokkar")]
public TagProperty Tags { get; set; }

Namespace: Veva.Modules.Tags.Domain.Model

Properties:

  • Tags - IEnumerable<string> af tag nöfnum

StandardViewComponents Module

TabProperty

Tabs stillingar.

[Parameter]
[DisplayName("Flipar")]
public List<TabProperty> Tabs { get; set; }

Namespace: Veva.Modules.StandardViewComponents.Model

Properties:

  • Id - GUID auðkenni
  • Title - Titill
  • Name - Nafn
  • CssClassTab - CSS klasi fyrir tab
  • CssClassContent - CSS klasi fyrir content

BreakPoint

Breakpoint val.

[Parameter]
[DisplayName("Breakpoint")]
public BreakPoint Breakpoint { get; set; }

Namespace: Veva.Modules.StandardViewComponents.Model

Properties:

  • Index - Index
  • Pixels - Pixlar

BreakPointRange

Breakpoint svið.

[Parameter]
[DisplayName("Breakpoint svið")]
public BreakPointRange BreakpointRange { get; set; }

Namespace: Veva.Modules.StandardViewComponents.Model

Properties:

  • From - Frá pixlum
  • To - Til pixla

Property Editors (handvirkt val)

Hægt er að nota PropertyEditors constant til að velja editor handvirkt með EditorArgument.

Constant Lýsing
PropertyEditors.IconClassSelector Ícón klasa val
PropertyEditors.DataBindingKeySelector Data binding lykla val
PropertyEditors.CssClassEditor CSS klasa val
PropertyEditors.TagPropertyEditor Tag val
PropertyEditors.PageSelectionEditor Síðu val
PropertyEditors.RoleSelectionEditor Hlutverk val
PropertyEditors.ColumnEditor Dálka val
PropertyEditors.FieldSelector Svæði val
PropertyEditors.TextEditor Texta editor
PropertyEditors.SortFieldSelector Röðunar svæði val
PropertyEditors.HtmlEditor HTML editor
PropertyEditors.SimpleLinkedDocumentsEditor Einföld tengd skjöl
PropertyEditors.LinkedDocumentsEditor Tengd skjöl
PropertyEditors.LanguageEditor Tungumála val
PropertyEditors.StringListEditor Strengjalisti
PropertyEditors.RangeEditor Svið val
PropertyEditors.MediaQueryBreakpointsEditor Media query breakpoints
PropertyEditors.EdgeEditor Edge/margin editor
PropertyEditors.PasswordEditor Lykilorða innsláttur

Namespace: Veva.Core.Domain.Components


Heildarr Dæmi

using System.ComponentModel;
using Veva.Core.Domain.Attributes;
using Veva.Core.Domain.Components;
using Veva.Core.Domain.DataBinding;
using Veva.Core.Domain.Model;
using Veva.Core.Domain.Model.Icons;
using Veva.Modules.Assets.Domain.Model;
using Veva.Modules.Documents.Domain.Models;
using Veva.Modules.Tags.Domain.Model;

namespace MyProject.Components;

[VevaComponent("12345678-1234-1234-1234-123456789abc")]
[Icon("fa fa-image")]
[Category("Grunneiningar")]
[Description("Myndaræma með fyrirsögn og tenglum")]
[Keywords("mynd, banner, hero, forsíða")]
[PreviewImage("/images/components/hero-preview.png")]
public class HeroBanner : ComponentBase
{
    [Parameter]
    [DisplayName("Fyrirsögn")]
    [Description("Aðalfyrirsögn sem birtist efst")]
    [Category("Texti")]
    [EditorArgument("maxLength", 100)]
    public string Title { get; set; }

    [Parameter]
    [DisplayName("Undirfyrirsögn")]
    [Category("Texti")]
    public string Subtitle { get; set; }

    [Parameter]
    [DisplayName("Bakgrunnsmynd")]
    [Category("Útlit")]
    public AssetProperty BackgroundImage { get; set; }

    [Parameter]
    [DisplayName("Bakgrunnslitur")]
    [Category("Útlit")]
    public ColorProperty BackgroundColor { get; set; }

    [Parameter]
    [DisplayName("Ícón")]
    [Category("Útlit")]
    public IconProperty Icon { get; set; }

    [Parameter]
    [DisplayName("Tengd skjöl")]
    [Category("Tenglar")]
    public IEnumerable<DocumentProperty> RelatedDocuments { get; set; }

    [Parameter]
    [DisplayName("Flokkar")]
    [Category("Metadata")]
    public TagProperty Tags { get; set; }

    [Parameter]
    [DisplayName("Sýna fyrirsögn")]
    [Category("Stillingar")]
    public bool ShowTitle { get; set; } = true;

    [Parameter]
    [DisplayName("Hámarksbreidd")]
    [Category("Stillingar")]
    public int? MaxWidth { get; set; }
}

Answered at: 14.01.2026 12:49 by: OpenIdConnect_dmyPrRbHd4e0f1NZwkviF1TDbYu3ZkieIblCkrWno6c

Your Answer