Element UI自从发布以来,我正在使用,情况发生了变化Vue.js 2.3
我dialog只有在满足以下条件时才应显示private.userCanManageUsers && private.pendingUsers.length > 0 && private.pendingDialogVisible
如果条件仅包含一个条件但不适用于多个条件,则该命令起作用。
<el-dialog
:visible.sync="private.pendingDialogVisible"
</el-dialog>
Run Code Online (Sandbox Code Playgroud)
<el-dialog
:visible.sync="private.userCanManageUsers && private.pendingUsers.length > 0 && private.pendingDialogVisible"
</el-dialog>
Run Code Online (Sandbox Code Playgroud)
el-dialogwith 的解决方案是什么visible.sync?我在使用时遇到了一个小问题Vuejs 2.3,Element UI 1.3.1 我希望能够通过单击来关闭对话框,X但该事件似乎没有被捕获。
<div id="app">
<el-dialog title="Shipping address" v-model="showDialog"
@close="closeDialog()">
<button @click='cond1 = false'>Close</button>
</el-dialog>
</div>
var Main = {
data() {
return {
cond1: true,
cond2: true,
cond3: true,
};
},
computed : {
showDialog() {
return this.cond1 && this.cond2 && this.cond3
}
},
methods: {
closeDialog() {
alert('close event')}
}
};
Run Code Online (Sandbox Code Playgroud)
https://jsfiddle.net/zuL0uqy2/
如果我点击button而不是在十字架上,它会起作用。你能向我解释为什么以及我应该怎么做吗?
我想知道如何处理dynamic components和events使用vue-js 2.3.
就说组件home $emit('eventFromHome')和组件archives $emit('eventFromArchives')
有什么方法可以抓住他们<component></component>?是否存在比临时解决方案更好/更好的方法?
var vm = new Vue({
el: '#example',
data: {
currentView: 'home'
},
components: {
home: { /* ... */ },
posts: { /* ... */ },
archive: { /* ... */ }
}
})
<component v-bind:is="currentView"></component>
Run Code Online (Sandbox Code Playgroud)
var vm = new Vue({
el: '#example',
data: {
currentView: 'home'
},
components: {
home: { /* ... */ },
posts: { /* ... …Run Code Online (Sandbox Code Playgroud) 我正在使用vue.js 2.3和element-ui input remote search组件。
文档在这里
我希望能够debounce使用lodash远程搜索,但我发现它很棘手,因为cb在querySearchAsync(queryString, cb)
https://jsfiddle.net/1tgqn7o8/
<div id="app">
Fetch suggestion counter : {{counter}}
<el-autocomplete v-model="state4" :fetch-suggestions="querySearchAsync" placeholder="Please input" @select="handleSelect"></el-autocomplete>
</div>
var Main = {
data() {
return {
links: [],
state4: '',
timeout: null,
counter: 0,
};
},
methods: {
loadAll() {
return [
{ "value": "vue", "link": "https://github.com/vuejs/vue" },
{ "value": "element", "link": "https://github.com/ElemeFE/element" },
{ "value": "cooking", "link": "https://github.com/ElemeFE/cooking" },
{ "value": "mint-ui", "link": …Run Code Online (Sandbox Code Playgroud) 我正在使用Laravel 5.4,Socialite因此我的用户可以使用Facebook.
我的网站使用子域newyork.example.com,paris.example.com example.com
Facebook URL回调登录的重定向必须absolute如此我设置http://example.com
public function redirectToProvider()
{
$_SESSION['originalURL'] ="http://paris.example.com";
return Socialite::driver('facebook')
->scopes(['rsvp_event', 'public_profile'])
->redirect();
}
Run Code Online (Sandbox Code Playgroud)
public function handleProviderCallback(SocialAccountService $service)
{
$user = $service->createOrGetUser(Socialite::driver('facebook')->user());
// $user->token;
Auth::login($user, true);
$originalURL = $_SESSION['originalURL'];
return redirect()->to($originalURL);
}
Run Code Online (Sandbox Code Playgroud)
当我在route登录/ FACEBOOK我可以看到原始URLparis.example.com与HTTP_POST
当我在路由login/facebook/callback的HTTP_POST是example.com,因为重定向的URL是example.com。我尝试将 URL 保存在 asession var但$_SESSION为空。
在 facebook 登录回调重定向后如何获取原始 …
我正在使用 Vue.js 2 和 vue-awesome-swiper。
我想在刷卡器的回调中至少做这两件事之一onSlideChangeEnd(swiper)
onSwipe()this.private.privateData我认为根本问题是我不知道如何访问代表this不是 swiper 或对象 touchEventsTarget 而是我的App.vue.
当我尝试这样做时,this.private.privateData我发现Uncaught TypeError: Cannot read property 'orderFilter' of undefined这是有道理的。
我应该怎么办 ?谢谢。
<template>
<swiper :options="swiperOption" ref="mySwiper">
<!-- slides -->
<swiper-slide>I'm Slide 1</swiper-slide>
<swiper-slide>I'm Slide 2</swiper-slide>
</swiper>
</template>
<script>
export default {
name: 'carrousel',
data() {
return {
private: {
privateData : 'private'
},
swiperOption: {
notNextTick: true,
setWrapperSize :true,
autoHeight: true,
onSlideChangeEnd(swiper) {
***** DO SOMETHING HERE …Run Code Online (Sandbox Code Playgroud) 我使用Laravel 5.4,我想向用户发送通知上thursdays的8pm
假设我有
我应该如何设置 CRON JOB 以便他们都8pm在本地时间收到通知?。
我的服务器在纽约市
$schedule->command('sendNotifications')->dailyAt('20:00')->thursdays()
vuejs2 ×5
javascript ×3
vue.js ×3
laravel-5.4 ×2
php ×2
callback ×1
cron ×1
laravel ×1
redirect ×1
swiper.js ×1