Vue.filter('myDate', function (txData) {
const days = ['日', '一', '二', '三', '四', '五', '六'];
let dateT = txData ? new Date(txData) : new Date();
return `星期${days[dateT.getDay()]}`;
});
遇到同樣的問(wèn)題,需要導(dǎo)入iview以及table的樣式才能顯示正常,node_modules/iview/dist/styles/iview.css
我用的print.js 第三方
現(xiàn)在我在研究如何導(dǎo)入table的樣式,現(xiàn)在的想法是把table的less文件轉(zhuǎn)化為css文件,然后引入,不知道是否可行,如有進(jìn)展 及時(shí)聯(lián)系,謝謝
附上代碼
this.printLoading = true
setTimeout(() => {
PrintJS({
printable: this.pageId,
documentTitle: '詳情',
type: 'html',
targetStyle: ['*'],
ignoreElements: [this.actionId],
maxWidth: 1200,
css: ['../../../node_modules/iview/dist/styles/iview.css'],
style: '.main-head {font-size: 16px;font-weight: bold;color: #464c5b}',
onLoadingEnd: () => {
this.printLoading = false
}
})
}, 300)
375,按照iPhone x 的寬度來(lái)做設(shè)計(jì)稿
在service中直接改接口就好了。
extends是創(chuàng)建一個(gè)子類(lèi),最終返回一個(gè)vue實(shí)例。參考官網(wǎng)的詳細(xì)介紹。
一般在單獨(dú)用js書(shū)寫(xiě)組件的時(shí)候使用。
而mixins選項(xiàng)是指定要混入的代碼片段,vue代碼中的script部分。同名方法的混入規(guī)則參見(jiàn)官網(wǎng)。
混入則可認(rèn)為是vue版本的全局方法庫(kù),而且不怎么影響現(xiàn)有vue邏輯的一個(gè)特殊處理方式。通常用在業(yè)務(wù)邏輯相似但又不同的兄弟組件之間。
不可行。
退一萬(wàn)步說(shuō),即使js能做到,用戶(hù)可以選擇禁用JavaScript
$this.removeClass().addClass('loading');這句代碼不會(huì)報(bào)錯(cuò)么?
http://www.w3school.com.cn/jq...
toggleClass這個(gè)方法的使用,結(jié)合樓上說(shuō)的,用that選中這個(gè)元素之后,傳到success里面,這個(gè)元素調(diào)用toggleClass方法,切換兩種類(lèi)樣式
我知道問(wèn)題所在了,是eclipse本身的bug,輸入的時(shí)候要把光標(biāo)移動(dòng)到冒號(hào)后面
你可以使用Number.toFixed(2)
var a = 1;
a.toFixed(2) // a = 1.00
看了幾遍發(fā)現(xiàn)你要說(shuō)的應(yīng)該是無(wú)法正確驗(yàn)證驗(yàn)證碼吧
這是因?yàn)槟忝看握{(diào)用接口都會(huì)是一個(gè)新的sessionid導(dǎo)致的.
配置sessionid這個(gè)是可行的,但是并不是在后端配置死. 而是讓前端傳sessionid, 后端使用該sessionid
ps:你這排版看得心累...
事件委托,判斷當(dāng)前點(diǎn)擊的對(duì)象e.target
的值...或者你給標(biāo)簽綁定個(gè)標(biāo)識(shí)符的屬性,class
或者attribute
,通過(guò)這個(gè)來(lái)判斷。暫時(shí)想到這么多。li
放到ul
里會(huì)合適點(diǎn)吧?
https://reactjs.org/docs/reac...
setState() enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.
以上是官方文檔對(duì)批量setState的解釋?zhuān)徽f(shuō)了說(shuō)setState會(huì)排隊(duì),但實(shí)際上,在當(dāng)前版本中,在不同的地方批量執(zhí)行setState會(huì)有不同的表現(xiàn)。
以下是官方文檔中給的一個(gè)鏈接,說(shuō)明在什么時(shí)候setState會(huì)被批量處理
In depth: When and why are setState() calls batched?(深入了解:什么時(shí)候并且為什么setState()調(diào)用會(huì)被合并)
Currently (React 16 and earlier), only updates inside React event handlers are batched by default. There is an unstable API to force batching outside of event handlers for rare cases when you need it.
In future versions (probably React 17 and later), React will batch all updates by default so you won't have to think about this. As always, we will announce any changes about this on the React blog and in the release notes.
現(xiàn)在(React 16 和之前),在默認(rèn)情況下,只有直接在react生命周期React event handlers里寫(xiě)的setState會(huì)被合并處理
未來(lái)版本(大概從React 17 開(kāi)始),React會(huì)默認(rèn)合并所有的setState
下面官方文檔中給的另一個(gè)鏈接
In depth: Why isn’t this.state updated immediately?(深入了解:為什么this.state沒(méi)有被立刻更新?)
if ( isset($_GET['order']) ){
switch ($_GET['order']){
case 'view':
$orderby = 'meta_value_num';
$metaKey = 'views';
break;
default : $orderby = 'date';
}
global $wp_query;
$args= array(
'meta_key' => $metaKey,
'orderby' => $orderby,
'order' => 'DESC',
'paged' => $paged,
);
$arms = array_merge($args, $wp_query->query);
}
video設(shè)置封面使用 poster屬性
<video controls poster="/images/w3school.gif"></video>
后經(jīng)檢查,是由于相關(guān)jar包導(dǎo)錯(cuò)的原因。
修改之前:
修改之后:
css 布局問(wèn)題;把內(nèi)容寬度定一下
那就讓正則只匹配到第三個(gè)null
replace(/null(?=\);)/,'jsonCallBack')
`"<input type="radio" name="p_date_type_sl_sl_sl" value="id_id_id_D" onclick="ig.smartSubmit('ccbppt_form:id_id_id_D',null,null,'ccbppt_form:id_id_id_D,ccbppt_form:parasGrid,ccbppt_form:jsCodes',null);"><label for="p_date_type_sl_sl_sl">日</label>"`.replace(/null(?=\);)/,'jsonCallBack')
這個(gè)值是直接暴露出來(lái)的,在使用的時(shí)候直接調(diào)用就可以了,你調(diào)用的位置this所指的是所在組件的vm
跨域的問(wèn)題。
在fetch的時(shí)候,配置一下header中加入Access-Control-Allow-Origin
。
最好使用proxy將請(qǐng)求代理出去。
tips不是寫(xiě)著,或體驗(yàn):小程序/小游戲
;藍(lán)色字體可點(diǎn)擊。不過(guò)不填appID一些api受限。
北大青鳥(niǎo)APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國(guó)IT技能型緊缺人才,是大數(shù)據(jù)專(zhuān)業(yè)的國(guó)家
北大青鳥(niǎo)中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過(guò)二十年潛心發(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),是中國(guó)一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國(guó)成功上市,融資1
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_(kāi)發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開(kāi)發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
精通HTML5和CSS3;Javascript及主流js庫(kù),具有快速界面開(kāi)發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁(yè)制作和網(wǎng)頁(yè)游戲開(kāi)發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開(kāi)發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國(guó)Software AG 技術(shù)顧問(wèn),美國(guó)Dachieve 系統(tǒng)架構(gòu)師,美國(guó)AngelEngineers Inc. 系統(tǒng)架構(gòu)師。