鍍金池/ 問答/ HTML問答
枕頭人 回答

應(yīng)該是你pageCount屬性前邊沒加:,加上就好了
沒加表示接受的是字符串,加上會解析為數(shù)字

圖片描述

忘了我 回答

你好,我最近也遇到了這個問題,應(yīng)該是spring的p標(biāo)簽的地址變了,我還沒找到新地址,我用傳統(tǒng)方法替代了,刪掉xmlns:p="http://www.springframework.org/schema/p"即可。比如:

<bean  
      class="org.springframework.web.servlet.view.InternalResourceViewResolver"
        p:viewClass="org.springframework.web.servlet.view.JstlView" 
        p:prefix="/WEB-INF/jsp/"
        p:suffix=".jsp" />

等價于

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
    <property name="prefix" value="/WEB-INF/jsp/" />
    <property name="suffix" value=".jsp" />
</bean>
墨沫 回答

你為什么糾結(jié)這個寫法呢?
其實就是

<App></App>

的簡寫。html標(biāo)簽</>意味著閉合,vue支持組件簡寫

焚音 回答

我的做法就是 v-if=false 延時一會 v-if=true

薄荷糖 回答

估計是 冒泡了,建議使用 mouseenter,mouseleave 替代

枕頭人 回答
上面兩個回答,答非所問啊,不覺得,呃。。。算了= =

這兩個例子vertical-align:middle的功勞。

第一個:表格垂直居中

看著什么垂直的樣式都沒設(shè)置,但仍然垂直居中了對吧?不過在chrome devtool里看看樣式就知道了。

tbody設(shè)置了vertical-align

而tr和td的vertical-align都是inherit,繼承了這個樣式。所以就垂直居中了。

第二個解釋比較復(fù)雜

原本before和after是基線對齊,但是設(shè)置height:100%并且將vertical-align設(shè)為middle后,其實已經(jīng)超出父元素的框了。但是父元素為了能包容它們,向下移動了基線(?),導(dǎo)致中線也下移,然后就讓child也垂直居中了。這個可能沒法理解,等會兒我畫個圖更新下答案吧。

更新

先看一個demo
我加了一個x看基線位置。
第一步中,僅設(shè)置了before屬性height:100%。x、before和child都是相對于基線對齊。
第二步中,給before設(shè)置了vertical-align:middle后,效果應(yīng)該是:

clipboard.png
這時,before的middle線要與父元素的middle線,也就是x的交叉處對齊,但這導(dǎo)致它超過了父元素的上邊界。這時我覺得CSS或者是HTML有一個智能的地方就是為了包裹子元素,自動將父元素的middle線下移到合適位置。于是就變成了demo中的第二步。也就實現(xiàn)垂直居中了。

脾氣硬 回答

document.querySelector("#id").style.float = "right"

這樣設(shè)置沒有問題啊

葬愛 回答

store被修改了?
給運行正常的代碼:
store.js

import {createStore, applyMiddleware, compose} from 'redux';
import thunkMiddleware from 'redux-thunk';
import createLogger from 'redux-logger';
import YourReducer from '../reducers/YourReducer.js'; //import your reducer
let createStoreWithMiddleware = null;

if(process.env.NODE_ENV === 'production') {
    createStoreWithMiddleware = compose(applyMiddleware(
        thunkMiddleware
    ))(createStore);
} else {
    createStoreWithMiddleware = compose(applyMiddleware(
        thunkMiddleware,
        createLogger()
    ), window.devToolsExtension ? window.devToolsExtension() : f => f)(createStore);
}

export default (initState) => {
    return createStoreWithMiddleware(YourReducer, initState);
}

index.js

import {Provider} from 'react-redux';
import store from './stores/store.js';
<Provider store={store()}>
//...
</Provider>
小眼睛 回答

@Meathill

    can2 = JSON.stringify(can2);
    can3 = JSON.stringify(can3);
    can4 = JSON.stringify(can4);
    layout_str = can2.substring(0, can2.length - 1) + ',' + can3.substring(1, can3.length - 1)+','+ can4.substring(1, can4.length);
   得到了想要的結(jié)果
   [{"type":2,"enabled":1,"channel_list":[{"channel_id":"","template":"15"},{"channel_id":"","template":"17"},{"channel_id":"","template":"14"},{"channel_id":"","template":"16"},{"channel_id":"","template":"14"}]},{"type":2,"enabled":1,"channel_list":[{"channel_id":"","template":"15"},{"channel_id":"","template":"17"},{"channel_id":"","template":"14"},{"channel_id":"","template":"16"},{"channel_id":"","template":"14"}]},{"type":3,"enabled":1,"channel_list":[{"channel_id":"1091991"},{"channel_id":"1091993"}]}]
   但是剛開始
   can2 = JSON.stringify(can2);
    can3 = JSON.stringify(can3);
    can4 = JSON.stringify(can4);
    console.log(can2+','+ can3+','+ can4);
    結(jié)果
    [{"type":2,"enabled":1,"channel_list":[{"channel_id":"","template":"15"},{"channel_id":"","template":"17"},{"channel_id":"","template":"14"},{"channel_id":"","template":"16"},{"channel_id":"","template":"14"}]}],[{"type":2,"enabled":1,"channel_list":[{"channel_id":"","template":"15"},{"channel_id":"","template":"17"},{"channel_id":"","template":"14"},{"channel_id":"","template":"16"},{"channel_id":"","template":"14"}]}],[{"type":3,"enabled":1,"channel_list":[{"channel_id":"1091991"},{"channel_id":"1091993"}]}]
    沒想到好辦法,然后就用截取字符串的辦法了
敢試 回答

clipboard.png

<template>
  <div>
    <ul class="list">
      <li class="item" v-for="(item,index) in data" :key="index">{{item.name}}</li>
    </ul>
    <div class="box">
      <input type="text" v-model="item">
      <button @click="click">確定</button>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      data: [],
      item: "",
    };
  },
  methods: {
    click() {
      this.data.push({
        name: this.item,
      });
      this.item = "";
    }
  }
};
</script>
<style lang="scss">
.list {
  clear: box;
  .item {
    padding: 10px;
    border: 1px solid #ccc;
    display: inline-block;
    margin: 5px;
    &:last-child {
      border-color: #f00;
    }
  }
}
</style>

大概就是上面的思路

終相守 回答

我之前開發(fā)的時候,Window 上默認(rèn)支持"復(fù)制粘貼等快捷鍵"的,而MacOS 不支持,所以需要對 MacOS 進行顯示添加。

所以當(dāng)時就對系統(tǒng)進行了判斷,https://github.com/o2team/xce...

現(xiàn)在我發(fā)現(xiàn) Electron 更新比較多。你可以看看官網(wǎng)下的 https://electronjs.org/ 的一個鏈接,關(guān)于主要的 API 案例和代碼實現(xiàn),你可以下載下來看看,https://electron-api-demos.gi...

另外,也可以開啟“開發(fā)者模式”,看看打包后時候有報錯的情況出現(xiàn)。

感謝邀請。

逗婦惱 回答

多多嘗試自查問題嘛...

  1. mongodb 是否正確安裝。 --- 檢查目錄
  2. mongodb 服務(wù)是否正確啟動。 --- lsof -i:27017 查看27017端口是否有東東
  3. 看看你配置文件里是否允許httpinterface
  4. 看看你是否已經(jīng)創(chuàng)建了用戶

都沒問題了...你在連接試試

任她鬧 回答

使用安卓手機,打開開發(fā)者選項,啟動USB調(diào)試,通過數(shù)據(jù)線連接至電腦。通過 ionic cordova run android 把APP打包安裝至手機,并打開,在Chrome瀏覽器中輸入:chrome://inspect 進入調(diào)試,第一次打開需要翻墻。然后就可以在瀏覽器中打斷點調(diào)試在手機上的APP了。

網(wǎng)妓 回答

服務(wù)端加上一個允許跨域的響應(yīng)頭就好了

你的index函數(shù)是render渲染的cmdb/index.html這個模板文件,但是你的url設(shè)置中,綁定的路由到這個視圖的的url是cmdb/,而且不是正則匹配,是完整匹配,訪問cmdb/index.html當(dāng)然會報404了。

另外不太清楚你的具體需求是什么,如果你要訪問cmdb/index.html打開首頁,完全可以把url改成cmdb/index.html

幼梔 回答

打印SessionListener...... 只能說明這個監(jiān)聽器被spring容器歸納,因為你這句是在構(gòu)造函數(shù)里。
除了寫一個@WebListener的類之后。還需要configuration配置這個監(jiān)控器