ASTRO轻应用 ASTROZERO-list:配置示例

时间:2024-04-28 16:09:18

配置示例

  • 配置示例一,配置后效果如图1所示。
    {
        type: "list",
        name: "commProps.rowCusBg",
        displayMode: "simple",
        showLabel: false,
        labelOnce: true,
        allowNone: true,
        label: { zh_CN: "背景色", en_US: "Background Color" },
        helpLink:
        "https://***.html",
        showFunc: function (vm) {
            return vm.commProps.rowBgType === "custom";
        },
        events: {
            addItemFunc: function () {
                return { color: "rgba(11,129,246,1)", row: "" };
            },
        },
        childItems: [
            {
                type: "colorpicker",
                name: "color",
                originFrom: "advanceEditvm",
                value: "",
                width: 26,
                showInput: false,
            },
            {
                type: "string",
                name: "row",
                originFrom: "advanceEditvm",
                label: { zh_CN: "序列号", en_US: "Serial Number" },
                value: "",
                width: 74,
            },
        ],
    },
    图1 示例一配置效果
  • 配置示例二,配置后效果如图2所示。
    {
        type: "list",
        name: "options.topSerialBg",
        displayMode: "simple",
        showLabel: false,
        labelOnce: true,
        allowNone: true,
        label: { zh_CN: "背景色", en_US: "Background Color" },
        helpLink:
        "https://***.html",
        showFunc: function (vm) {
            return (
                vm.commProps.showSerialNumber &&
                vm.options.showTopSerialNumber &&
                vm.options.topSerialStyle === "color"
            );
        },
    }
    图2 示例二配置效果
support.huaweicloud.com/usermanualcanvas-astrozero/astrozero_05_7146.html