我的脚本是这样的:
<template>
<v-container>
<v-dialog
v-for='foo in foos' :key='foo.id'
:close-on-content-click="false"
transition="scale-transition"
min-width="290px"
v-model="modalTest2"
width="290px"
>
<template v-slot:activator="{ on }">
<v-btn color="success" dark v-on="on">call date {{foo.id}}</v-btn>
</template>
<v-date-picker v-model="foo.date">
<div class="flex-grow-1"></div>
<v-btn text color="primary" @click="modalTest2 = false">Cancel</v-btn>
<v-btn text color="primary" @click="saveData2">OK</v-btn>
</v-date-picker>
</v-dialog>
</v-container>
</template>
<script>
export default {
data: () => ({
foos: [
{ id: 1, date: new Date().toISOString().substr(0, 10) },
{ id: 2, date: new Date().toISOString().substr(0, 10) },
],
modalTest2: false,
}),
methods: {
saveData2() {
console.log('test');
// this.$refs.dialogTest.save(this.foos)
}
}
}
</script>
演示是这样的:https://codepen.io/positivethinking639/pen/eYYpVqG
我想获取每个选定的日期并显示它
通常使用它。 $refs.dialogTest.save(....)
但是我很困惑要获取多个datepicker的日期
我该怎么办?
答案 0 :(得分:1)
检查此代码
public function update(ProfileUpdate $profileUpdate, $username)
{
$admin = Misc::getAdminArray();
if ($admin)
{
$profileUpdate->session()->flash('updated', 'Profile Updated!');
return redirect()->route('someRoute');
}
else
abort(403);
}