Exemplo n.º 1
0
        public MvcVueFormDialog(ViewContext viewContext, MvcVueDialog.Options options)
        {
            if (options == null)
            {
                options = new MvcVueDialog.Options()
                {
                    title       = ":title",
                    visible     = ":dialogVisible",
                    beforeClose = ":handleClose",
                    @ref        = ""
                };
            }
            else
            {
                options.title       = options.title ?? "";
                options.visible     = options.visible ?? "";
                options.beforeClose = options.beforeClose ?? "";
                options.@ref        = options.@ref ?? "";
            }

            this.viewContext = viewContext;

            this.viewContext.Writer.Write(
                $"<el-dialog{options?.Attributes}>\r\n" +
                "   <div>\r\n"
                );
        }
Exemplo n.º 2
0
 public static MvcVueFormDialog BeginFormDialog(this VueElementUIHelper helper, MvcVueDialog.Options options = null)
 {
     MvcVueFormDialog = new MvcVueFormDialog(helper.Html.ViewContext, options);
     return(MvcVueFormDialog);
 }