@keyframes dialog-fade-in {
0% {
transform: translate3d(0, 100%, 0);
opacity: 0;
}
100% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes dialog-fade-out {
0% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
100% {
transform: translate3d(0, -100%, 0);
opacity: 0;
}
}
在你需要的地方復寫這兩個動畫就行了。
附上完整的代碼:
<template>
<div>
<el-dialog :visible.sync="isShown">
<div> 111111 </div>
</el-dialog>
<el-button type="primary" @click="changeStatus">顯示或隱藏</el-button>
</div>
</template>
<script>
export default {
data () {
return {
isShown: false
}
},
methods: {
changeStatus: function () {
if (this.isShown) {
this.isShown = false
} else {
this.isShown = true
}
}
}
}
</script>
<style>
@keyframes dialog-fade-in {
0% {
transform: translate3d(0, 100%, 0);
opacity: 0;
}
100% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes dialog-fade-out {
0% {
transform: translate3d(0, 0, 0);
opacity: 1;
}
100% {
transform: translate3d(0, -100%, 0);
opacity: 0;
}
}
</style>
參考源碼:https://github.com/ElemeFE/el...,由于dialog已經(jīng)使用了動畫效果,你只需要在這個基礎上去覆蓋源碼的動畫即可。這是我想出來的辦法,若其他人有其他辦法歡迎交流。
查一查權限。
el-upload
加個 ref="xx"
,隨后 this.$refs.xx.clearFiles()
你把數(shù)據(jù)貼出來啊,一般來說vue里面你要存在對應的數(shù)據(jù)才去v-for
解決方式就是三元表達式
<div v-for="list in item">
<span>{ list.user.name?list.user.name:''}</span>
</div>
你可以嘗試更改css,一般這個是靠css固定位置的,或者你給Notice組件加個class,你F12還好分析下,就可以改了
效果如下
加入下方css
.ivu-notice {
top: 100px !important;
}
你這個 booklist 數(shù)據(jù) 8成 是 ajax 或 fetch 獲取 的 數(shù)據(jù)。。。 你初始化 肯能 是空數(shù)組,所以才出現(xiàn) [], 當獲取完數(shù)據(jù), 父組件 更改 子組件的 props, 造成 組件件更新, 就顯示出字來。
最簡單的方法, 你在 render 里面 打印 數(shù)組。 看看是不是 出兩次。
方便拓展啊.
開源框架又不是一個人寫的.大都需要搭建一個平臺,提供拓展接口方便社區(qū)貢獻代碼.成功的項目這方面往往都做的很好.
hover之后將該區(qū)域塊顯示出來,然后加上animation,從左到右的滑動
舉個例子
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<style>
ul li{list-style:none; width:100px; position:relative; float:left; overflow:hidden;}
ul li img{width:100%;}
ul li .info{position:absolute; bottom:0; left:0; width:100%; height:40px; line-height:40px; background:-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,.2)), to(rgba(0,0,0,.2)));}
.hide{display:none;}
.slideleft{animation:left .5s 1; animation-fill-mode:forwards;}
.slideright{animation:right .5s 1; animation-fill-mode:forwards;}
.slidetop{animation:top .5s 1; animation-fill-mode:forwards;}
.slidebottom{animation:bottom .5s 1; animation-fill-mode:forwards;}
@keyframes left{
from{left:-100%;}
to{left:0;}
}
@keyframes top{
from{bottom:-100%; left:0;}
to{bottom:0; left:0;}
}
@keyframes bottom{
from{bottom:100%;}
to{bottom:0;}
}
@keyframes right{
from{left:100%;}
to{left:0;}
}
</style>
</head>
<body>
<ul>
<li>
<img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
<div class="info hide">
test
</div>
</li>
<li>
<img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
<div class="info hide">
test
</div>
</li>
<li>
<img src="https://img1.epetbar.com/2017-05/24/10/7982bafb75e8aba985e08de99780be52.jpg?x-oss-process=style/fill&$1=300&$2=300" alt="">
<div class="info hide">
test
</div>
</li>
</ul>
<script>
$("li").hover(function(e){
var mX = e.clientX;
var mY = e.clientY;
var liLeft = $(this).offset().left;
var liTop = $(this).offset().top;
var liW = $(this).width();
var liH = $(this).height();
x = (mX - liLeft - ( liW / 2 ) ) * ( liW > liH ? (liH / liW ) : 1 )
y = (mY - liTop - (liH / 2)) * (liH > liW ? (liW / liH) : 1),
// 上(0) 右(1) 下(2) 左(3)
direction = Math.round( ( ( ( Math.atan2( y, x ) * ( 180 / Math.PI ) ) + 180 ) / 90) + 3 ) % 4;
if(direction == 0){
$(this).find(".info").removeClass("hide").addClass("slidetop");
}else if(direction == 1){
$(this).find(".info").removeClass("hide").addClass("slideright");
}else if(direction == 2){
$(this).find(".info").removeClass("hide").addClass("slidebottom");
}else if(direction == 3){
$(this).find(".info").removeClass("hide").addClass("slideleft");
}
},function(){
$(this).find(".info").addClass("hide").removeClass("slideleft").removeClass("slidetop").removeClass("slideright").removeClass("slidebottom")
})
</script>
</body>
</html>
// 父組件
<ranting :stars='rade' :maxStars='maxd' :hasCounter.sync="has" />
// 子組件
computed: {
has() {
return this.hasCounter
}
}
chang() {
this.$emit('update:hasCounter', !this.hasCounter);
}
然后子組件的 watch 監(jiān)聽可以移除了 data 中的 has 也可以移除了,父組件中的 @on-result-change='onResultChange' 回調(diào)也可以移除了
PHP支持數(shù)據(jù)中的數(shù)據(jù)是多類型的嗎?
這個remote
是remote
組件里面綁定的那個值,因為你沒有傳數(shù)據(jù)進去,這是我修改你那個之后的代碼,直接復制粘貼你就知道哪里錯了,希望能幫助到你:
<!DOCTYPE html>
<html lang="cmn-hans">
<head>
<meta charset="utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<!-- 必選 響應式 -->
<script src="https://cdn.bootcss.com/vue/2.5.13/vue.min.js"></script>
<title>Vue component組件</title>
</head>
<body>
<h3>Vue component組件</h3>
<hr>
<div id="app">
<!-- <local :here="local"></local> -->
<local :here="local"></local>
<remote :remote="remote"></remote>
</div>
<script>
var app = new Vue({
el: "#app",
data: {
local: 'china',
remote: 'USA'
},
// <!-- 定義局部組件 -->
components: {
'remote': {
template: `<p>我是局部組件remote來自{{remote}}</p>`,
props: ['remote']
},
'local': {
template: `
<div style="color:green">
我是局部組件local,來自{{here}}
</div>
`,
//選項props 數(shù)值
props: ['here'],
},
}
});
</script>
</body>
</html>
android獲取wifi名稱的代碼
public String getWifiName(Context context) {
WifiManager manager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
if (manager.isWifiEnabled()) {
WifiInfo wifiInfo = manager.getConnectionInfo();
if (wifiInfo != null) {
DetailedState state = WifiInfo.getDetailedStateOf(wifiInfo.getSupplicantState());
if (state == DetailedState.CONNECTED || state == DetailedState.OBTAINING_IPADDR) {
return wifiInfo.getSSID();
}
}
}
return null;
}
iOS獲取wifi名稱的代碼
+ (NSString *)GetCurrentWifiHotSpotName {
NSString *wifiName = nil;
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
for (NSString *ifnam in ifs) {
NSDictionary *info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
if (info[@"SSID"]) {
wifiName = info[@"SSID"];
}
}
return wifiName;
}
看你貼 上來的代碼 .
有一半的機率是你做異步代碼分割的時候有問題..
你可以試著一行一行的注釋來檢查一下..有可能是分割的時候.js引用順序錯了
有些模塊 在index頁需要,
但代碼分割把他分到其他異步模塊去了..
從你發(fā)出來的代碼沒有看,只有ClassBasicModel
不知道從哪里來,或許你沒有貼出來定義的代碼。
其他的沒有發(fā)現(xiàn)有什么問題。而且報的warning
也無法與這段代碼對應上。
需要注意的是:modelExtend
中的namespace
會把原ClassBasicModel
的namespace
覆蓋掉,在引用這個model
時不要把namespace
引錯了就可以了。
zxing的識別率本來就不是特別高的,只能改源碼或是用其他庫吧。
借助path
即可
const path = require('path');
module.exports = function(options){
var rootPath = options.rootPath;
return {
alias: {
@: path.join(rootPath, "src")
}
}
}
代碼怎么寫的,都不知道你怎么用的
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構(gòu),發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網(wǎng)
達內(nèi)教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經(jīng)理職務負責iOS教學及管理工作。
浪潮集團項目經(jīng)理。精通Java與.NET 技術, 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。