Vue 학습의 6(전역 가져오기 패키지, 그림 게으름 불러오기, 제3자 jq 모듈 가져오기, 루트, 렌더링 프로젝트에 적용)
4297 단어 프런트엔드
new webpack.ProvidePlugin({$:"jquery",jQuery:"jquery","window.jQuery":"jquery"})axios.defaults.baseURL="" Vue.prototype.$axios=axiosvue-lazyload상품 상세 정보(template, style scoped,script=>export default{})
상품 리스트
{parth:'/site/goodsinfo:goodsID',component:..}상품 이미지, 확대 기능(jq22 상품 상세 검색)
v-show="isShowContent=!isShowContent"v-show 디스플레이:none 원리 이용:class="{selected:isShowContent}"//content is no defined;
// v-if="goodsInfo.goodsinfo"
// undefined.content , axios ;
<div v-if="goodsInfo.goodsinfo" v-show='isShowContent' class="tab-content entry" style="display: block;">
<div v-html="goodsInfo.goodsinfo.content">div>
div> import { Affix } from "iview";;export default{components:{Affix}} @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pageIndex"
:page-sizes="[1, 2, 5, 10]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="goodsComment.totalcount">
</el-pagination> ref="commentRef" this.$refs.commentRef.valuethis.commenttxt.trim().length == 0하고 요소-ui 알림 상자오늘 설치한 패키지