我想知道是否有办法禁用阴影/覆盖影响对话框?基本上,我可以在此图像的右侧看到一个对话框:
我对此的最佳尝试是使用包含我的自定义对话框的堆栈,然后将其切换为是否显示,但随后我无法滚动每个自定义对话框自己的 ListView 而不会弄乱另一个。我知道这违反了 Material Design 指南,但我正在尝试从 dribble.com 复制 UI。
谢谢!
编辑:
我已经通过编辑showGeneralDialog方法几乎达到了这种效果,但仍然有一个高程阴影:
await showGeneralDialog(
context: context,
pageBuilder: (BuildContext buildContext,
Animation<double> animation,
Animation<double> secondaryAnimation) {
return SafeArea(
child: Builder(builder: (context) {
return AlertDialog(
content: Container(
color: Colors.white,
width: 150.0,
height: 150.0,
child: Center(child: Text("Testing"))));
}),
);
},
barrierDismissible: true,
barrierLabel: MaterialLocalizations.of(context)
.modalBarrierDismissLabel,
barrierColor: null,
transitionDuration:
const Duration(milliseconds: 150));
Run Code Online (Sandbox Code Playgroud)
编辑 2:只是一张图片来说明上面代码的变化,显示我到目前为止已经能够禁用深色覆盖,但对话框上仍然存在我似乎无法摆脱的高程:
编辑 3:我想如果我能够更改'sAlertDialog中的showGeneralDialog'sBuilder那么我可以让它工作,但我无法放入一些Material但不占据整个屏幕的东西。
我想知道当项目已绑定到 v-select 并且它与 item-value 值分开时,如何轻松访问 v-select 的 item-text 值?我希望将 item-value 值保存到我的 v-model 中,然后还通过 on Change 事件传递 item-text 值,如下所示:
<v-select v-model="id" :items="items" item-value="id" item-text="name" v-on:change="getItemText(name)" />
Run Code Online (Sandbox Code Playgroud)
如果我添加对 v-select 的引用,然后通过以下方式访问它,我可以获得该值:
this.$refs.vselect.selectedItems[0].name;
Run Code Online (Sandbox Code Playgroud)
但是当数据位于 v-select 本身中时,这似乎有点啰嗦。如果有人知道更简单的方法,我很乐意听到它!
谢谢!
I'm trying to sort the MatTableDataSource programmatically so that I can sort the data via the use of a button rather than by the table column header when viewing the data in a specific mobile layout. However, I'm having trouble doing so.
I've followed this post's advice on how to do it but the data sort is not being reflected. The mobile layout design for using the same data as the table:
<mat-card matSort *ngFor="let item of dataSource.filteredData">
Run Code Online (Sandbox Code Playgroud)
The function …