鍍金池/ 問(wèn)答
孤毒 回答

因?yàn)檫€在加班所以大致提個(gè)思路,當(dāng)然不一定對(duì)啊..
0、先寫(xiě)個(gè)div,border為1px,隱藏
1、在上面的點(diǎn)點(diǎn)擊時(shí),修改一個(gè)狀態(tài)表示flag = true,并記下點(diǎn)擊坐標(biāo)
2、在hover到下面的點(diǎn)的時(shí)候,如果flag == true,那讓div顯示出來(lái),然后獲得移入坐標(biāo)
3、給div做變換,scale跟rotate用起點(diǎn)跟終點(diǎn)的坐標(biāo)算
4、顯示div
5、flag = false

我甘愿 回答

jq插件事件不在angular變化監(jiān)測(cè)范圍內(nèi)。請(qǐng)?jiān)诒O(jiān)聽(tīng)jq事件后手動(dòng)調(diào)用檢測(cè)器事件。

import { ..., ChangeDetectorRef } from '@angular/core';
...
constructor(
   ...,
   private changeDetectorRef:ChangeDetectorRef
) { }

ngAfterViewInit() {
   ...
   this.edit.on('summernote.change', () =>  {
       this._setTest();
       this.changeDetectorRef.detectChanges()
   });
}
假灑脫 回答

vue的keep-alive跟瀏覽器的緩存是不一樣的,keep-alive是組件狀態(tài)持久化,你并不能把keep-alive的頁(yè)面跟網(wǎng)頁(yè)緩存一樣保存,但是可以通過(guò)數(shù)據(jù)緩存的方式去實(shí)現(xiàn)保存頁(yè)面狀態(tài),將keep-alive中的數(shù)據(jù)、變量值都存在storage,然后在頁(yè)面的created事件判斷有storage中如果有緩存數(shù)據(jù),就可以直接還原出來(lái),如果頁(yè)面沒(méi)有被刷新,下次進(jìn)入keep-alive的頁(yè)面也是不會(huì)執(zhí)行created事件的,然后可以在activated事件做頁(yè)面未被刷新時(shí)重新進(jìn)入頁(yè)面需要的處理,但是這樣做并不是真正緩存頁(yè)面文件。

笨笨噠 回答

1.你應(yīng)該在當(dāng)前頁(yè)面吧setInterval返回的id存到store里面
2.在另外一個(gè)頁(yè)面里通過(guò)store拿到這個(gè)id,然后直接在這個(gè)頁(yè)面里調(diào)用clearInterval,同時(shí)把store里的id清空

心悲涼 回答

function encodeChineseOnly(str){

        return encodeURI(str).replace(/([^\u0000-\u00FF])/g,escape)
    }
薄荷綠 回答

我也有這樣的問(wèn)題存在,你解決了嗎?

單眼皮 回答

解決了,是因?yàn)樵谙鄳?yīng)地方要引用相應(yīng)的上下文

爛人 回答

似乎無(wú)需用json再次解析, 直接將數(shù)據(jù)賦予一個(gè)字典變量, 即可使用.

data={'forward_from_chat': None, 'migrate_to_chat_id': None, 'invoice': None, 'text': u'1', 'sticker': None, 'from_user': {'username': u'bamboo_lee', 'first_name': u'bamboo', 'last_name': u'lee', 'is_bot': False, 'language_code': u'en', 'id': 471214291}, 'caption_entities': None, 'delete_chat_photo': None, 'migrate_from_chat_id': None, 'new_chat_members': None, 'video': None, 'left_chat_member': None, 'chat': {'username': None, 'first_name': None, 'last_name': None, 'description': None, 'title': u'123', 'photo': None, 'pinned_message': None, 'sticker_set_name': None, 'all_members_are_administrators': True, 'invite_link': None, 'type': u'group', 'id': -264835065, 'can_set_sticker_set': None}, 'group_chat_created': None, 'new_chat_photo': None, 'forward_date': None, 'entities': None, 'location': None, 'photo': None, 'author_signature': None, 'document': None, 'forward_from': None, 'supergroup_chat_created': None, 'edit_date': None, 'pinned_message': None, 'content_type': 'text', 'successful_payment': None, 'date': 1514370687, 'new_chat_member': None, 'voice': None, 'reply_to_message': None, 'venue': None, 'message_id': 159, 'caption': None, 'contact': None, 'channel_chat_created': None, 'video_note': None, 'audio': None, 'new_chat_title': None}

print data['from_user']['is_bot']

output

False
笨尐豬 回答

臨時(shí)解決方法 :usleep(1000); 睡眠1毫秒解決了問(wèn)題
但是又遇到新的問(wèn)題了 不知道哪里是不是內(nèi)存溢出了

安若晴 回答

Alt-b 向前一個(gè)單詞
Alt-f 向后一個(gè)單詞

慢半拍 回答

它是自動(dòng)去github上下載已創(chuàng)建的Demo到本地的,你可以自己創(chuàng)建新項(xiàng)目,他的demo環(huán)境有點(diǎn)過(guò)時(shí)~
iOS:https://github.com/weexteam/w...
Android:https://github.com/weexteam/w...

任何程序 只要權(quán)限 寫(xiě)絕對(duì)路徑即可。

澐染 回答

1、直接cdn引入,或者npm 安裝
2、可以直接在本地設(shè)置代理

配置項(xiàng):config/index.js
dev: {

proxyTable: {
'/api': {

     target: 'https://api.douban.com/v2',
     changeOrigin: true,
     pathRewrite: {
     '^/api': ''
   }

}
},

調(diào)用:
this.axios.get('/api/book/1220562').then(res => {

 console.log(res)

}).catch(err => {
console.log(err)
})

使勁操 回答

一般沒(méi)有這種做法,請(qǐng)?jiān)诜?wù)器上反代80(8000代理至80)

巫婆 回答

問(wèn)題解決了,啟動(dòng)腳本sh文件沒(méi)有配置新加入的jar包信息,更新后即可正常運(yùn)行

情已空 回答

自定義button 的type,然后再設(shè)置顏色
比如el-button--black{
background :red;
}

奧特蛋 回答

思路大概這樣:

// 父組件
<button @click="update"></button>
<v-tree-dialog :is-show="isShow" ref="treeUpdate" ></v-tree-dialog> 

update() {
  this.isShow= true
  this.$nextTick(() => {
    this.$refs.treeUpdate.init()
  })
}
// 子組件
<el-tree
  :data="treeData"
  show-checkbox
  node-key="id"
  ref="tree"
>
</el-tree>

init() {
 this.$refs.tree.setCheckedKeys([1])
},
挽歌 回答

設(shè)置這個(gè)組件的屬性:
value-format="timestamp"
然后從綁定的v-model中獲取到開(kāi)始、結(jié)束的時(shí)間戳[start, end]
天數(shù)=(end-start)/(606024*1000)