자체 봉인된 vu 창 플러그인

18116 단어
  name='fade'>
    
class="alert">
class="wrap">
class="head">{{title}}
class="content"> {{message}}
class="foot">
class="btn">
class="btn-base" @click="sure">
class="btn-warn" @click="cancel">
</span><span style="color:#e8bf6a;"> </span><span style="color:#cc7832;"><strong>export default </strong></span>{ <span style="color:#9876aa;">name</span>: <span style="color:#6a8759;">'alert'</span><span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#ffc66d;">data</span>() { <span style="color:#cc7832;"><strong>return </strong></span>{ }<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#9876aa;">props</span>:[<span style="color:#6a8759;">'title'</span><span style="color:#cc7832;">,</span><span style="color:#6a8759;">'message'</span>]<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#9876aa;">methods</span>: { <span style="color:#ffc66d;">cancel</span>() { <span style="color:#cc7832;"><strong>if </strong></span>(<span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">cancelBtn</span>) { <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">cancelBtn</span>.<span style="color:#ffc66d;">apply</span>(<span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">context</span>)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#ffc66d;">close</span>()<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#ffc66d;">$emit</span>(<span style="color:#6a8759;">'cancel'</span>) }<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#ffc66d;">sure</span>() { <span style="color:#cc7832;"><strong>if </strong></span>(<span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">sureBtn</span>) { <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">sureBtn</span>.<span style="color:#ffc66d;">apply</span>(<span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">context</span>)<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>} <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#ffc66d;">close</span>()<span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span><span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#ffc66d;">$emit</span>(<span style="color:#6a8759;">'sure'</span>) }<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#ffc66d;">show</span>() { <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">showAlert </span>= <span style="color:#cc7832;"><strong>true</strong></span><span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span><span style="color:#ffc66d;">close</span>() { <span style="color:#cc7832;"><strong>this</strong></span>.<span style="color:#9876aa;">showAlert </span>= <span style="color:#cc7832;"><strong>false</strong></span><span style="color:#cc7832;">; </span><span style="color:#cc7832;"> </span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span>}<span style="color:#cc7832;">, </span><span style="color:#cc7832;"> </span>}<span style="color:#cc7832;">; </span><span style="color:#e8bf6a;">

좋은 웹페이지 즐겨찾기