鍍金池/ 問(wèn)答/ HTML問(wèn)答
墻頭草 回答

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)
遲月 回答

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)后面

小曖昧 回答

看了幾遍發(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ò)的原因。
修改之前:

clipboard.png
修改之后:

clipboard.png

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')
淡墨 回答

bV74qi?w=1276&h=62

這個(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受限。