getCurrentPage()
returns a value, the promise returned by then gets resolved with the returned value as its value;
throws an error, the promise returned by then gets rejected with the thrown error as its value;
returns an already resolved promise, the promise returned by then gets resolved with that promise's value as its value;
returns an already rejected promise, the promise returned by then gets rejected with that promise's value as its value.
returns another pending promise object, the resolution/rejection of the promise returned by then will be subsequent to the resolution/rejection of the promise returned by the handler. Also, the value of the promise returned by then will be the same as the value of the promise returned by the handler.
from here: https://developer.mozilla.org...
opacity是改變元素的透明度,并不能改顏色。
markPoint 這個(gè)是設(shè)置你框住的那個(gè)東西的,可以試一下;
series下的markPoint,也可以全局配置markPoint
就是一個(gè)選項(xiàng)卡功能
wxml
<view wx:for="{{banners}}" wx:for-item="banner" wx:for-index="idx" >
<image src="{{banner.img}}" />
<view>
<image wx:for="{{banner.imgs}}" data-idx="{{idx}}" data-index="{{index}}"class="thumbnail {{banner.index==index?'cur':''}}" src="{{item}}" catchtap="showBanner" />
<text> {{banner.index}}</text>
</view>
</view>
wxss
.thumbnail{
width: 100rpx;
height: 100rpx;
margin-right: 10rpx;
border: 2px solid transparent;
}
.cur{
border: 2px solid red;
}
js
Page({
data: {
banners: [
{
index: 0,
img: 'https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=a80e4a17ae014c080d3620f76b12696d/42166d224f4a20a40709fb7997529822720ed07d.jpg',
imgs: ['https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=a80e4a17ae014c080d3620f76b12696d/42166d224f4a20a40709fb7997529822720ed07d.jpg', 'https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=00c4cfe352fbb2fb202650402e234bc1/d62a6059252dd42a711ec615043b5bb5c9eab87d.jpg', 'https://gss0.bdstatic.com/-4o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=66342e1187d4b31ce4319ce9e6bf4c1a/54fbb2fb43166d22639320c64a2309f79152d2ff.jpg', 'https://gss2.bdstatic.com/9fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=9e8ac1c952df8db1a8237436684ab631/3ac79f3df8dcd100784b38707e8b4710b8122f88.jpg'],
},
{
index: 0,
img: 'https://gss1.bdstatic.com/-vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=005e5fcd9aef76c6c4dff379fc7f969f/9358d109b3de9c8234db74636681800a18d843a4.jpg',
imgs: ['https://gss1.bdstatic.com/-vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=005e5fcd9aef76c6c4dff379fc7f969f/9358d109b3de9c8234db74636681800a18d843a4.jpg', 'https://gss2.bdstatic.com/9fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=53d730f8daa20cf4529df68d17602053/8d5494eef01f3a2927a062b19325bc315c607c60.jpg', 'https://gss0.bdstatic.com/-4o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=d45d73693f7adab429dd1311eabdd879/562c11dfa9ec8a134f6397a1fe03918fa0ecc072.jpg', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=5354a1279925bc313f5009ca3fb6e6d4/7e3e6709c93d70cf4566dee4f8dcd100bba12bbe.jpg'],
},
{
index: 0,
img: 'https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=47772d4895510fb36c147fc5b85aa3f0/8326cffc1e178a8218bb1c51fd03738da877e8b8.jpg',
imgs: ['https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=47772d4895510fb36c147fc5b85aa3f0/8326cffc1e178a8218bb1c51fd03738da877e8b8.jpg', 'https://gss1.bdstatic.com/9vo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike116%2C5%2C5%2C116%2C38/sign=4ab22f86f91fbe090853cb460a096756/e850352ac65c1038623ade32b9119313b17e89fd.jpg', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=82905fe6e0f81a4c323fe49bb6430b3c/5882b2b7d0a20cf4bf0e134d7d094b36adaf9982.jpg', 'https://gss0.bdstatic.com/94o3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike180%2C5%2C5%2C180%2C60/sign=83659ab63212b31bd361c57be7715d1f/622762d0f703918f50043b3b5a3d269758eec46e.jpg', 'https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c2765b7686b1cb132a643441bc3d3d2b/b8014a90f603738d5fa93cbbb81bb051f919ec4c.jpg'],
},
],
},
showBanner:function(e){
let i = e.target.dataset.idx,
j = e.target.dataset.index,
banners = this.data.banners;
banners[i].index=j;
banners[i].img = banners[i].imgs[j]
this.setData({
banners: banners
})
}
})
沒圖,看不懂你說什么。貼出的代碼耦合太高無法重現(xiàn)
我猜想你是要這個(gè)效果
<template>
<ul>
<li class="tree-menu-list">
<a @click="toggle()">
<i v-if="isFolder" class="iconfont" :class="[open ? 'icon-jiantouarrow487': 'icon-iconfontjiantou']"></i>
<i v-if="!isFolder" class="iconfont"></i>
{{ model.menuName }}
</a>
<ul v-show="open" >
<li v-for="(item, index) in model.children" :model="item" :key="index" v-text="item" @click="sendParams(index)"></li>
<!--<tree-menu v-for="(item, index) in model.children" :model="item" :key="index"></tree-menu>-->
</ul>
</li>
</ul>
</template>
export default {
name: 'HelloWorld',
// props: ['model'],
data () {
return {
model:{
id:1314,
menuName:'一級菜單',
children:[
'二級菜單1',
'二級菜單2',
'二級菜單3',
'二級菜單4',
],
},
open: false,
currentTab: false,
isFolder: false,
// isFolder: this.model.children && this.model.children.length ? true : false
}
},
created(){
this.isFolder=this.model.children && this.model.children.length
},
methods: {
toggle: function () {
console.log(this.isFolder);
if (this.isFolder) {
this.open = !this.open
}
},
sendParams: function (i) {
console.log(this.model.children[i]);
// this.$router.push({
// path: '/info',
// name: 'info',
// query: {
// id: this.model.id,
// name: this.model.menuName
// }
// })
}
}
}
</script>
import amazeui/dist/xxx
看看是不是重定向的問題,404頁面放在異步路由里面的最后面!
node的環(huán)境變量配一下
首先這個(gè)列表線路這個(gè)數(shù)組里面每個(gè)選項(xiàng)增加一個(gè)屬性disabled,默認(rèn)都是true,然后循環(huán)的時(shí)候,線路名稱用input,disabled屬性為當(dāng)前選項(xiàng)的disabled,然后點(diǎn)擊對號的時(shí)候,把index傳入,把數(shù)組的這個(gè)index的disabled屬性修改為false,即可編輯,
-------希望能幫助你
23是最低要求,可能文檔沒有描述清楚,高于就行。
在webpack配置文件的rules數(shù)組中添加打包字體文件的loader,記得npm install --save -D url-loader,如下:
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
的確ES6的import
和export
一定是要在最外層,不能被包含在函數(shù)或是代碼塊中。
但是這里實(shí)際上并沒有使用imports-loader
吧,雖然在webpack中有配置,但是在js中并不是通過require+參數(shù)方式使用。
可以多研究下imports-loader
的文檔。
https://www.npmjs.com/package...
已經(jīng)解決了~~~~
使用connect
吧,如果對react
redux
不熟悉,可能會引起未知的異常。
以前學(xué)java的時(shí)候,碰到過很多類似這種后臺管理系統(tǒng)在開源中國上。
https://gitee.com/explore/sta...
盡量把代碼貼完整,沒有看到export
也沒有看到import
.
我也是找了半天沒找到 他在哪里注冊的$vux 郁悶了
1.建議封裝下
2.建議在api配置的時(shí)候加上參數(shù)用來決定是否在header中帶token
export const API = {
login:{
url: '////',
method: 'post',
token: true
},
...
}
我們對請求做了封裝,可以傳一個(gè)api接口對象,在攔截器里在對最終對傳參序列化
3.可以把token存在緩存,判斷沒有時(shí)再去storage中取
var operators = ['未登錄1','未登錄2','未登錄3','未登錄4','未登錄5'];
operators.map(function(value){
return { 'name': value }
})
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。