modal-dialog 相关问题

指用于向用户显示重要信息的图形对话框。这些对话框显示在所有其他内容之上,阻止应用程序流,直到收到用户输入。

如何在Flutter中的showModalBottomSheet中显示全高视图?

感谢您的阅读。 我想做的是导航到 modalBottomSheet 内的全高度视图。 重点是我在showModalBottonsheet()时使用了onGenerateRoute,因为没有...

回答 1 投票 0

SwiftUI 底部工作表,如笔记应用程序的格式选项卡

目前,我必须实现底部工作表。我找到了我需要的例子。 这个组件系统组件是swift的还是swiftui的? 还是我需要自己实施? 一开始我执行...

回答 1 投票 0

WinUI 3 中的自定义内容对话框

在我的程序中,我有一个带有多个选项卡的 TabControl,每个选项卡中可能有一个用户可以随时打开的对话框。我使用对话框允许用户将内容输入数据库。 ...

回答 1 投票 0

模态背景 - 如何去除背景颜色

将 livewire 添加到我的 laravel 项目后,每个抽屉/模式弹出窗口都会创建一个背景,隐藏弹出窗口下的所有内容。我已经设法摆脱了抽屉背景......

回答 1 投票 0

在项目列表中,当单击列表中的位置图标时,只有相关的地址模式才会使用reactjs打开

在 REact Js 中,我有一个项目列表,列表中的每个项目都有一个位置图标链接,用于打开模式并需要显示相应的地址。 但对我来说,当我点击特定位置时......

回答 1 投票 0

如何控制daisyUI tailwind模态默认打开

我设置了daisyUI但不知道如何通过条件控制模态 我认为与 flowbite 或 bootstrap 类似 https://flowbite.com/docs/components/modal/ 但 daisyUI 还没有实现隐藏类,...

回答 4 投票 0

模态形式的未定义变量 $errors Laravel

我打开模态时出错。这是我的代码: 添加新数据 我打开模态时出错。这是我的代码: <div> <x-button onclick="viewFormAdd()" data-bs-toggle="modal" type="button">Add New Data</x-button> </div> <script> function viewFormAdd() { $.get("{{ route('kategori.create') }}", {}, function(data, status) { $('.viewmodal').html(data).show(); $('#modalCreateKategori').modal('show'); } ); } </script> 创建Kategori.blade.php <x-modal modalId="modalCreateKategori" modalTitle="Tambah Kategori"> <form method="post" action="{{ route('kategori.store') }}" class="formtambah"> @csrf <div class="grid grid-rows-2"> <div> <x-label>Nama Kategori</x-label> <x-input type="text" name="nama_kategori" id="nama_kategori" /> @error('nama_kategori') <small>{{ $message }}</small> @enderror </div> <div class="justify-end items-center"> <x-button type="submit">Simpan</x-button> </div> </div> </form></x-modal> 阿贾克斯: <script> $(document).ready(function() { $('.formtambah').submit(function(e) { e.preventDefault(); $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); $.ajax({ type: "post", url: $(this).attr('action'), data: $(this).serialize(), dataType: "json", success: function(response) { if (response.tersimpan) { Swal.fire({ position: 'center', icon: 'success', title: 'Tersimpan!', text: response.tersimpan, showConfirmButton: false, timer: 1500 }) $('.btn-close').click(); dataKategori(); } }, error: function(xhr, thrownError) { alert(xhr.status + "\n" + xhr.responseText + "\n" + thrownError); } }); return false; }); });</script> 我的控制器: public function create() { return view('kategori.createKategori'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(KategoriRequest $request) { $kategori = new Kategoris; $kategori->namakat = $request->nama_kategori; $kategori->save(); $msg = [ 'tersimpan'=> 'Produk baru berhasil tersimpan!' ]; return response()->json($msg); } 我的类别请求: class KategoriRequest extends FormRequest{ public function authorize() { return true; } /** * Get the validation rules that apply to the request. * * @return array<string, mixed> */ public function rules() { return [ 'nama_kategori' => 'required' ]; } public function messages() { return[ 'nama_kategori.required' => 'Maaf, nama kategori harus diisi' ]; } } 当我打开模态时,模态不起作用并出现错误“未定义变量 $errors(查看:C:\xampp\htdocs ewsinartimur_laravel_9 资源视图\类别

回答 0 投票 0

C# OpenFileDialog 非模态可能

是否可以创建/拥有非模态 .net OpenFileDialog 我在主对话框中有一个 UI 元素,始终需要可供用户按下。

回答 5 投票 0

模式内的antd表单未在reactjs中提交

我正在尝试在模式表单内提交表单,但该表单未提交且未显示任何错误。 我的组件有两种形式。当用户单击按钮时,它会打开模式...

回答 1 投票 0

如何处理对话框(模态)上的“外部”点击?

单击框外时,我的框会关闭,使我丢失所有输入。 我希望仅在单击取消按钮时关闭我的框。 我不确定是什么让它在点击退出时关闭......

回答 11 投票 0

React-leaflet 在 Modal 中无法正确显示

大家!我尝试在我的 React 项目中使用 Materialise 风格的 React-leaflet。当我打开模态组件时,我看不到地图。我安装了npm install react-leaflet,也在index.html中添加了 大家!我尝试在我的 React 项目中使用 Materialise 风格的 React-leaflet。当我打开模态组件时,我看不到地图。我安装了 npm install react-leaflet,还在index.html [email protected]/dist/leaflet.css 中添加了“ 完整性=“sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=” 跨域=“”/> import React, { useEffect, useRef } from "react"; import PropTypes from "prop-types"; import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet"; export const MapModal = ({ lnglat }) => { const mapRef = useRef(null); useEffect(() => { // Clean up the map instance when the modal is closed return () => { if (mapRef.current) { mapRef.current.remove(); } }; }, []); return ( <div id='MapModal' className='modal'> <div className='modal-content'> <MapContainer center={[48.0196, 66.9237]} zoom={5} style={{ height: "50vh", width: "100%" }} ref={mapRef} > <TileLayer attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' url='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' /> <Marker position={lnglat}> <Popup> A pretty CSS3 popup. <br /> Easily customizable. </Popup> </Marker> </MapContainer> </div> </div> ); }; MapModal.propTypes = { lnglat: PropTypes.array, }; 请帮我解决这个问题吗? 将此添加到导入中import 'leaflet/dist/leaflet.css';我遇到了同样的问题,这解决了它。 你需要添加一个中间组件来等待引导模态完成初始化,即从你的主组件中添加一个中间组件,在中间组件中你必须设置一个设置的超时时间,例如: useEffect(() => { setTimeout(function() { setShowMap(true); }, 2000); }, [isShowMap]); //In the return: { showMap ? < CustomMap lat = { lat } lng = { lng } setlat = { setlat } setlng = { setlng } />: < div > < /div> }

回答 2 投票 0

Angular 6 - 将组件显示为来自组件的模式对话框。ts

在从组件执行提交操作后,我尝试显示模式确认弹出窗口。 我的 home.component.ts 中的 onSubmit() 方法: onSubmit() { var 响应 = 新响应...

回答 1 投票 0

脚本中使用的html对话框的返回值

我在 HTML 对话框中有一个填充了工作表名称的下拉列表。 我需要返回在下拉列表中选择的值并在后面的脚本中使用它。 如何返回从 HTML 数据中选择的值...

回答 1 投票 0

在 HTMLDialogElement.showModal() 上添加 jquery-ui 日期选择器(绕过伪背景)

问题 输入元素位于 HTML 的 标签中,showModal 用于以模式方式打开对话框。有没有办法在对话框顶部打开 jquery-ui-datepicker。现在,它隐藏着......

回答 1 投票 0

对模态元素进行动画处理<dialog>:整个身体会移动

的想法是让一个 元素作为模式对话框打开,并在打开时从右侧滑入。以下是我想出的最小示例: 这个想法是让一个 <dialog> 元素作为模式对话框打开,并在打开时从右侧滑入。以下是我想出的最小示例: <button type="button" onclick="document.querySelector('.slide-in').show()">open</button> <dialog class="slide-in"> <form method="dialog"><button>close</button></form> </dialog> <style> .slide-in { left: auto; right: -200px; } .slide-in[open] { animation-name: slide-in; animation-duration: .5s; animation-iteration-count: 1; right: 0; } @keyframes slide-in { from { right: -200px; } to { right: 0; } } </style> 但是由于某种原因,当对话框打开时,它保持在屏幕的右侧,而整个主体从左侧移入。 演示:https://jsbin.com/sominizona/edit?html,css,output 我认为这与顶层概念有关,但我对如何更改以使对话框移动而不是文档的整个其余部分有点不知所措。 您不需要任何初始定位样式,只需使用 translateX @keyframes slide-in { 0%{ transform: translateX(100%) } } .slide-in { margin-right: 0; position: fixed; inset: 0; } .slide-in[open] { animation-name: slide-in; animation-duration: .5s; animation-iteration-count: 1; } @keyframes slide-in { 0%{ transform: translateX(100%) } } /*@keyframes slide-in { from { right: -200px; } to { right: 0; } }*/ <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>JS Bin</title> </head> <body> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tempor, erat vel pharetra vulputate, neque justo euismod justo, vel tristique nibh sapien a felis. Sed laoreet, lorem quis gravida sollicitudin, enim est pharetra enim, ut accumsan metus lacus a quam. Morbi faucibus quam et metus sagittis malesuada. Vivamus consectetur odio sed suscipit malesuada. Duis urna quam, pharetra id eleifend in, rhoncus id nisi. Donec sit amet porta velit. Donec pellentesque purus eget libero tincidunt, sit amet aliquet purus sagittis. Quisque in leo at leo lacinia bibendum a semper ligula.</p> <p>Click the button below. A modal dialog opens. It should slide in from the right. Instead the body slides in from the left, while the dialog stays put.</p> <div class="container"> <button type="button" onclick="document.querySelector('.slide-in').show()">open</button> <dialog class="slide-in"> <form class="inner" method="dialog"><button>close</button></form> </dialog> </div> </body> </html>

回答 1 投票 0

第二个模态关闭时第一个模态滚动隐藏

使用两个模态时,在第二个模态关闭时,第一个模态的滚动将隐藏。 可以在这里看到一个示例(这不是我的代码,我只是用它来展示我的问题是什么)。我的第一个模组...

回答 3 投票 0

将数据插入数据库后如何加载模态作为警报?

将数据插入数据库后弹出模式时遇到问题。因此,在 tambahnotis.php 中,我有一个表单供用户输入要插入数据库的数据。在 tambahnotis.php 的头部,我有...

回答 1 投票 0

(Vue.js) 模态关闭事件

当我点击模态框的外部区域时,我想要与模态框的关闭按钮相同的事件。 (点击模态外部区域时关闭模态的事件) 目前的进展是

回答 2 投票 0

有没有办法在单个控制器中使用 $uibModal 和 $uibModalInstance 来使用 Angular 和 TypeScript 实现模式弹出?

由于我是 Angular 打字稿的新手,我在实现 Angular 模态弹出窗口时遇到了问题。问题是我有一个下拉菜单,我必须打开一个模式弹出窗口,然后才能更改该模式......

回答 2 投票 0

为什么单击模态对话框中嵌入的表单内的选择下拉列表只会在 Firefox 中关闭模态?

平台:Windows 10.Firefox 119。 我在一个更复杂的项目中构建了一个模式对话框并遇到了这个错误。 我正在测试的其他浏览器是 Chrome 和 Edge。这些都没有这个bug

回答 1 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.