gpt4 book ai didi

javascript - 在 LightSwitch HTML5 客户端中为超链接加下划线

转载 作者:行者123 更新时间:2023-11-28 03:19:29 27 4
gpt4 key购买 nike

我正在尝试在我的表格中创建一些内联超链接,以允许人们编辑/删除所选元素(并在屏幕顶​​部提供面包屑样式的导航链接)。为此,我创建了一个 customscripts.js 文件,如下所示,其中包含以下函数定义:

FormatElement = function (element, contentItem, className) {
element.className = className;
element.textContent = contentItem.value;
}

这个函数基本上允许我通过在渲染或渲染后事件上调用一段代码来将自定义类应用于给定元素,如下所示(其中 BackLink 是一个变量数据项,其值在 create()屏幕的方法):

myapp.MyScreen.created = function (screen) {
// Write code here.
screen.DeleteLink = "delete"; /* Initializes delete link variable text */
screen.EditLink = "edit"; /* Initializes edit link variable text */
screen.BackLink = "Back to Manage Accounts";
};
myapp.MyScreen.BackLink_postRender = function (element, contentItem) {
// Write code here.
element = FormatElement(element, contentItem, "ui-breadcrumb")
};myapp.MyScreen.EditLink_render = function (element, contentItem) {
// Write code here.
element = FormatElement(element, contentItem, "ui-action-link");
};

在 user-customization.css 中,我添加了几个与 FormatElement 调用引用的类相对应的新样式。

.ui-action-link {
font-weight: normal;
text-decoration: dashed;
color: #0c2b90;
}

.ui-breadcrumb {
font-weight: normal;
text-decoration: dashed;
font-size: x-large;
color: #0c2b90;
}

但是,当我运行我的应用程序时,虚线文本装饰属性似乎已被默认值 none 覆盖。

任何人都可以就为什么会发生这种情况提供任何建议吗?

最佳答案

将以下内容添加到 user-customization.css 对我一直有效:

.msls-tap .msls-text {
color: #0000EE;
text-decoration: underline;
}

关于javascript - 在 LightSwitch HTML5 客户端中为超链接加下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25323114/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com