給你個思路 在線查看
更改數(shù)據(jù)的時候,通過自己定義的echarts.setOption(更改的數(shù)據(jù))
step1:定義一個初始o(jì)ption數(shù)據(jù),以及mycharts
step2:在mounted生命周期,將option賦值給mycharts
step3:點(diǎn)擊按鈕后,觸發(fā)事件,在事件里定義臨時變量,將option賦值給臨時變量,同時更改臨時變量的數(shù)據(jù),然后將更改后的臨時變量賦值給mycharts
<div id="app">
<div id="main" style="width: 600px;height:400px;"></div>
<button @click="change">更改數(shù)據(jù)</button>
</div>
<script>
new Vue({
el: "#app",
data() {
return {
myChart:'',
option:{
title: {
text: 'ECharts 1'
},
tooltip: {},
legend: {
data:['銷量']
},
xAxis: {
data: ["襯衫","羊毛衫","雪紡衫","褲子","高跟鞋","襪子"]
},
yAxis: {},
series: [{
name: '銷量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
}
}
},
mounted:function(){
this.myChart = echarts.init(document.getElementById('main'));
this.myChart.setOption(this.option1);
},
methods:{
change:function(){
var temp = this.option;
temp.series[0].data=[10, 5, 3, 6, 10, 20];
this.myChart.setOption(temp);
}
}
})
</script>
position:fixed的問題,設(shè)置個padding或者margin,讓頁面出現(xiàn)滾動條。
border-image實(shí)現(xiàn),要圓角的話還要嵌套一層標(biāo)簽
button{
background: #ffffff;
outline: none;
width: 100px;
height: 36px;
border: none;
border-radius: 14px;
overflow: hidden;
cursor: pointer;
}
button span{
height: 100%;
width: 100%;
display: block;
border: 2px solid transparent;
border-image: linear-gradient(60deg, #16d5be , #18c8cc) 2;
box-sizing: border-box;
line-height: 32px;
color: #16d5be;
}
<button><span>了解更多</span></button>
以前的gist
收藏過
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
// 3040-309F : hiragana
// 30A0-30FF : katakana
// FF00-FFEF : Full-width roman + half-width katakana
// 4E00-9FAF : Common and uncommon kanji
//
// Non-Japanese punctuation/formatting characters commonly used in Japanese text
// 2605-2606 : Stars
// 2190-2195 : Arrows
// u203B : Weird asterisk thing
/[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B/g
\u
意思是unicode
符號,-
代表range
提示的很清楚。login.js
中有個對象的屬性是apply
,出現(xiàn)了這個對象為undefined
的情況。
判斷一下空undefined
的情況。
代碼好像一模一樣吧、只是代碼風(fēng)格不一樣、就像C# 和java一樣!一個在后面寫{
,一個換行寫{
c#
public static void main(String[] args)
{
System.out.println("Hello World");
}
java
public static void main(String[] args) {
System.out.println("Hello World");
}
這沒什么可爭的
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
li{
float: left;
line-break: 30px;
list-style-type: none;
margin-right: 5px;
cursor: pointer;
text-align: center;
color: lightcoral;
}
li:first-of-type{
border-right: none;
color: lightgreen;
}
li:last-of-type{
color: lightblue;
}
.bottomLine{
position: fixed;
height: 1px;
transition: 0.3s all ease-in-out;
pointer-events: none;
}
</style>
</head>
<body>
<div class="bottomLine"></div>
<head>
<ul>
<li class="current">news</li>
<li>product</li>
<li>service</li>
</ul>
</head>
<script type="text/javascript" src="jquery-1.10.2.min.js" ></script>
<script>
$(document).ready(function(){
change();
function change(bold){
if(bold){
$('.bottomLine').css("height","5px")
}
var oLeft=$(".current").offset().left;
var oTop=$(".current").offset().top;
var height=$(".current").height();
var width=$(".current").width();
var color=$(".current").css('color')
console.log(color)
$('.bottomLine').css({'background-color':color,'left':oLeft,'top':oTop+height,'width':width+'px'});
}
$('ul').mouseover(function(e){
console.log(e.target)
$('li').removeClass('current');
$(e.target).addClass('current');
change(true);
})
})
</script>
</body>
</html>
@kikong
top里加了一個填充的
SF上傳圖片功能掛了,試下唄,瀏覽器高度拉小一點(diǎn)
<div class="main">
<div class="top">
<div class="topL"></div>
</div>
<div class="bottom"></div>
</div>
.main {
position: absolute;
left: 0;
top: 0;
background-color: aquamarine;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
width: 100%;
height: 100%;
}
.top {
height: calc(100vh - 61px);
/**可以不要**/
width: 100%;
background-color: blue;
flex: 1;
/**占據(jù)所有剩余空間**/
}
.topL {
height: 800px;
width: 200px;
background-color: green;
}
.bottom {
width: 100%;
height: 61px;
background-color: red;
flex-shrink: 0;
/**不能縮放*/
flex-grow: 0;
/**不能縮放*/
}
---------------分割線-------------
知道怎么做了,我得給綠色一個Min-height,然后出現(xiàn)滾動條就行了
你好,最后是什么問題呢?怎么確定簽名正確呢
// 需要根據(jù)路由動態(tài)處理的文件
runtimeCaching: [
// 如果在staticFileGlobs中設(shè)置相同的緩存路徑,可能導(dǎo)致此處不起作用
{
urlPattern: /\/js\//,
handler: 'fastest',
options: {
cache: {
maxEntries: 10,
name: 'js-cache'
}
}
},
{
urlPattern: /\/fonts\/|\.ttf|\.eot|\.svg|\.woff/,
handler: 'fastest',
options: {
cache: {
maxEntries: 10,
name: 'fonts-cache'
}
}
},
{
urlPattern: /^https:\/\/example\.com\/api/,
handler: 'networkFirst',
options: {
cache: {
maxEntries: 1000,
name: 'api-cache'
}
}
},
]
參考:https://lavas.baidu.com/pwa/offline-and-cache-loading/service-worker/service-worker-lifecycle
rsync --delete-after -avz /home/test/dir1/ /home/test/dir2
這樣寫就對了
(function(){
}
少了個括號
(function(){
})
formatter 按照梯度格式化
云端還是原生?云端應(yīng)該不成問題,原生的估計要稍等一下各個框架的API適配。
麻煩的辦法是監(jiān)聽滾動距離,計算當(dāng)前滾動位置,獲得背景色,進(jìn)行計算
還有個取巧的辦法是利用 css backdrop-filter
執(zhí)行下面語句后再發(fā)布看看
git config --global http.postBuffer 524288000
執(zhí)行時機(jī)的問題,你在使用
oBtn.onclick = function() {
alert(n1+n2);
};
實(shí)際上n1和n2的賦值語句的執(zhí)行時機(jī)是window.onload
,那個時候input里面還沒有值,所以是NaN,
北大青鳥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)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(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)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。