This repository was archived by the owner on Aug 18, 2021. It is now read-only.
Open
Conversation
Member
|
能否增加全屏的状态事件回调(可选的),例如(伪代码): interface Options {
onExitFull?: () => void;
onFull?: () => void;
}
const [elRef, { setFull, exitFull, toggleFull }] = useFullscreen({
onExitFull: () => {
console.log('退出了全屏');
},
onFull: () => {
console.log('进入了全屏');
}
});
// template
<div ref="elRef">content</div>
<button @click="toggleFull ">全屏/退出全屏</button> |
5b8ba26 to
c59822c
Compare
Author
|
已增加全屏的状态回调(可选的),代码已提交
…------------------ 原始邮件 ------------------
发件人: "vueComponent/use" <notifications@github.com>;
发送时间: 2020年12月4日(星期五) 下午3:34
收件人: "vueComponent/use"<use@noreply.github.com>;
抄送: "陈庆耀"<383465843@qq.com>;"Author"<author@noreply.github.com>;
主题: Re: [vueComponent/use] feat:add useFullScreen (#28)
能否增加全屏的状态回调(可选的),例如(伪代码):
interface Options { onExitFull?: () => void; onFull?: () => void; } const [elRef, { setFull, exitFull, toggleFull }] = useFullscreen({ onExitFull: () => { console.log('退出了全屏'); }, onFull: () => { console.log('进入了全屏'); } }); // template <div ref="elRef">content</div> <button @click="toggleFull ">全屏/退出全屏</button>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
|
可能我描述上由于不清楚,导致有点误解,出现了一些偏差
有时候我们有这样的需求,在请求全屏,或者退出全屏时,做一些事情。比如弹个框,或者改变一下布局。 例如:
我的期望:
备注:也可以一起讨论更加好用的用法 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
issue#8:useFullscreen 一个用于处理 dom 全屏的 Hook