网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
@using Dpz.Core.Service.RepositoryService
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model VmBookmark
@inject IBookmarkService BookmarkService

<form class="bookmark-create layui-form" asp-action="Update" style="padding:1em" data-update>
    <input type="hidden" asp-for="Id"/>
    <div class="layui-form-item">
        <label asp-for="Title" class="layui-form-label">标题</label>
        <div class="layui-input-block">
            <input asp-for="Title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label asp-for="Url" class="layui-form-label">书签地址</label>
        <div class="layui-input-block">
            <input asp-for="Url" required lay-verify="required" placeholder="请输入地址" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label asp-for="Icon" class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input asp-for="Icon" placeholder="请输入图标地址" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label asp-for="Image" class="layui-form-label">图片</label>
        <div class="layui-input-block">
            <input asp-for="Image" placeholder="请输入图片地址" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label asp-for="Categories" class="layui-form-label">分类</label>
        <div class="layui-input-block">
            @foreach (var item in await BookmarkService.GetCategoriesAsync())
            {
                if (Model.Categories.Contains(item))
                {
                    <input type="checkbox" name="Categories" title="@item" value="@item" checked="">
                }
                else
                {
                    <input type="checkbox" name="Categories" title="@item" value="@item">
                }
            }
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">补充分类</label>
        <div class="layui-input-block">
            <input type="text" name="category" placeholder="补充分类;分隔" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>立即提交</button>
            <button class="layui-btn" type="button" data-delete="@Model.Id">删除</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
loading