中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

php企業(yè)網(wǎng)站源碼推薦被逆冬seo課程欺騙了

php企業(yè)網(wǎng)站源碼推薦,被逆冬seo課程欺騙了,網(wǎng)站建設(shè)什么公司好,織夢模板修改教程需求: 由于表格的列過多,用滾動條進(jìn)行滾動對比數(shù)據(jù)不方便,所以提出,手動選擇展示列 實(shí)現(xiàn)思路: 表格默認(rèn)展示所有字段,每個字段通過 v-if 屬性來進(jìn)行判斷是否顯示;點(diǎn)擊設(shè)置按鈕圖標(biāo)(表格右上角&#xff0…
需求:

由于表格的列過多,用滾動條進(jìn)行滾動對比數(shù)據(jù)不方便,所以提出,手動選擇展示列

實(shí)現(xiàn)思路:
  1. 表格默認(rèn)展示所有字段,每個字段通過 v-if 屬性來進(jìn)行判斷是否顯示;
  2. 點(diǎn)擊設(shè)置按鈕圖標(biāo)(表格右上角),彈出選擇框el-popover;
  3. 選擇框中包括:全選復(fù)選框、所有字段復(fù)選框組 el-checkbox-group、取消按鈕、確定按鈕;
  4. 選擇展示字段后,點(diǎn)擊“確定”按鈕:更新每個字段值的show屬性(true / false);
  5. 關(guān)閉彈出框;重新渲染表格;
  6. 選擇展示字段后,點(diǎn)擊“取消”按鈕:關(guān)閉彈出框;
  7. 打開彈出框時:選中當(dāng)前表格所展示的字段;重新渲染表格;
開發(fā)時遇到的坑點(diǎn):?

打開和確定操作后,需要重新渲染表格:

// 重新渲染表格nextTick(() => {tableRef.value.doLayout();})

?具體實(shí)現(xiàn)代碼:vue3為例
html部分
//設(shè)置按妞點(diǎn)擊打開選擇框 
<el-popover :visible="popoverVisible" :width="160" @show="showPopover"><div class="popoverCheckBoxArea"><el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全選</el-checkbox><div style="margin: 10px 0;"></div><el-checkbox-group v-model="checkedColumns" @change="handleCheckedColumnsChange"><el-checkbox v-for="column in columns" :label="column.lable" :key="column.lable">{{column.lable}}</el-checkbox></el-checkbox-group></div><div style="text-align: right; margin: 10px 0 0 0"><el-button size="small" text @click="popoverVisible = false" style="margin-right: 10px;">取消</el-button><el-button size="small" type="primary" @click="confirmPopover ">確定</el-button></div><template #reference><el-button :icon="Setting" circle style="float: right;"  @click="popoverVisible = true"/></template></el-popover>
//表格部分<el-table v-loading="data.loading" @selection-change="handleSelectionChange" class="list-table":data="data.dataList" border stripe highlight-current-row ref="tableRef"><el-table-column type="selection" width="45" align="center" /><el-table-column label="#" align="center" type="index" width="60"/><el-table-column prop="code" label="服務(wù)器名稱" align="center" width="140" v-if="showColumn('服務(wù)器名稱')"/><!-- <el-table-column prop="interIp" label="內(nèi)網(wǎng)IP" width="120" align="center" /> --><el-table-column prop="hostName" label="域名" align="center" width="200" v-if="showColumn('域名')"><template #default="scope"><el-tooltip class="box-item" effect="dark" :content="scope.row.interIp" placement="top">{{ scope.row.hostName }}</el-tooltip></template></el-table-column><el-table-column prop="isDeploy" label="是否部署" align="center" width="85" v-if="showColumn('是否部署')"><template #default="scope"><dict-tag :type="DICT_TYPE.IS_DEPLOYMENT" :value="scope.row.isDeploy" :projectId="queryParams.projectId" /></template></el-table-column>><el-table-column prop="httpPort" label="HTTP" align="center" width="60px" v-if="showColumn('HTTP')"/><el-table-column prop="socketPort" label="SOCKET" align="center" width="68px" v-if="showColumn('SOCKET')"/><el-table-column prop="operationType" label="狀態(tài)" align="center" width="90px" v-if="showColumn('狀態(tài)')"><template #default="scope"><el-tag v-if="scope.row.operationType != undefined" :type="operationTypecolor(scope.row.operationType)":effect="scope.row.operationType == '未知' ? 'light' : 'dark'">{{ scope.row.operationType }}</el-tag></template></el-table-column><el-table-column prop="gsVer" label="當(dāng)前版本" align="center" width="130px" v-if="showColumn('當(dāng)前版本')"/><el-table-column prop="gsVerUpdateTime" label="上次更新時間" width="160" align="center" :formatter="(dateFormatter as any)" v-if="showColumn('上次更新時間')"/><el-table-column prop="publish" label="正式服" align="center" width="85px" v-if="showColumn('正式服')"><template #default="scope"><dict-tag :type="DICT_TYPE.FORMALDRESS" :value="scope.row.publish" :projectId="queryParams.projectId" /></template></el-table-column>><el-table-column prop="showTime" label="展示時間" width="160" align="center" :formatter="(dateFormatter as any)" v-if="showColumn('展示時間')"/><el-table-column prop="startTime" label="開服時間" width="95" align="center" :formatter="dateFormatters" v-if="showColumn('開服時間')"/><el-table-column prop="mergeTime" label="合服時間" width="95" align="center" :formatter="dateFormatters" v-if="showColumn('合服時間')"/><el-table-column prop="mergeCount" label="合服次數(shù)" width="81" align="center" v-if="showColumn('合服次數(shù)')"/><el-table-column prop="gsFrontVersion" label="前端版本" width="100" align="center" v-if="showColumn('前端版本')"/><el-table-column prop="serviceDays" label="開服天數(shù)" width="100" align="center" v-if="showColumn('開服天數(shù)')"/><el-table-column prop="gsLevel" label="游戲服等級" width="100" align="center" v-if="showColumn('游戲服等級')"/><el-table-column prop="s_type" label="執(zhí)行區(qū)" width="100"  align="center" fixed="right"><template #default="scope"><div style="display: flex;"><span class="readoDiv" v-if="scope.row.s_type != undefined" :style="color(scope.row.s_type)"></span><span class="readoSpan">{{ scope.row.s_type }}</span></div></template></el-table-column><el-table-column label="操作" width="110px" align="center" v-auth="['operation:gameserver:handleServiceList']" fixed="right"><template #default="scope"><el-dropdown ref="dropdown" trigger="click" @command="(command) => handleCommand(command, scope.row)"v-auth="['operation:gameserver:handleServiceList',]" @visible-change="visiblechange"><el-button type="primary" link><Icon icon="ep:d-arrow-right" />>> 更多</el-button><template #dropdown><el-dropdown-menu><el-popconfirm title="查看運(yùn)行狀態(tài)?" v-auth="'operation:gameserver:handleServiceList'"@confirm="runningState(scope.row)" confirm-button-text="確定" cancel-button-text="取消" @show="show"><template #reference><el-button :disabled="dropdowndisabled">運(yùn)行狀態(tài)</el-button></template></el-popconfirm><el-popconfirm title="查看關(guān)閉游戲?" v-auth="'operation:gameserver:handleServiceList'"@confirm="closeGames(scope.row)" confirm-button-text="確定" cancel-button-text="取消" @show="show"><template #reference><el-button :disabled="dropdowndisabled">關(guān)閉游戲</el-button></template></el-popconfirm><el-popconfirm title="查看啟動游戲?" v-auth="'operation:gameserver:handleServiceList'"@confirm="startGames(scope.row)" confirm-button-text="確定" cancel-button-text="取消" @show="show"><template #reference><el-button :disabled="dropdowndisabled">啟動游戲</el-button></template></el-popconfirm><el-popconfirm title="查看熱更游戲?" v-auth="'operation:gameserver:handleServiceList'"@confirm="watchGames(scope.row)" confirm-button-text="確定" cancel-button-text="取消" @show="show"><template #reference><el-button :disabled="dropdowndisabled">熱更游戲</el-button></template></el-popconfirm><el-dropdown-item command="updateGames" style="padding: 0; width: 100%;"v-auth="'operation:gameserver:handleServiceList'" :disabled="dropdowndisabled"><el-button :disabled="dropdowndisabled">更新游戲</el-button></el-dropdown-item><el-dropdown-item command="startFile" :disabled="dropdowndisabled"><el-button :disabled="dropdowndisabled">更新start文件</el-button></el-dropdown-item><el-dropdown-item command="configFile" :disabled="dropdowndisabled"><el-button :disabled="dropdowndisabled">更新config文件</el-button></el-dropdown-item></el-dropdown-menu></template></el-dropdown></template></el-table-column></el-table>
js部分
const popoverVisible = ref(false)
const checkAll = ref(true)
// 選擇展示的字段數(shù)組默認(rèn)的
const columns = ref([{ lable: '服務(wù)器名稱', show: true },{ lable: '域名', show: true },{ lable: '是否部署', show: true },{ lable: 'HTTP', show: true },{ lable: 'SOCKET', show: true },{ lable: '狀態(tài)', show: true },{ lable: '當(dāng)前版本', show: true },{ lable: '上次更新時間', show: true },{ lable: '正式服', show: true },{ lable: '展示時間', show: true },{ lable: '開服時間', show: true },{ lable: '合服時間', show: true },{ lable: '合服次數(shù)',  show: true },{ lable: '前端版本', show: true },{ lable: '開服天數(shù)', show: false },{ lable: '游戲服等級', show: false },
])  const checkedColumns:any = ref([]) //選中的數(shù)據(jù)
const isIndeterminate = ref(false)
// 點(diǎn)擊彈出框的“全選”按鈕
const handleCheckAllChange = (val:any)=> {let columnsValueList:any = [];columns.value.map(item => columnsValueList.push(item.lable));checkedColumns.value = val ? columnsValueList : [];isIndeterminate.value = false;
}
// 點(diǎn)擊彈出框的選擇展示菜單的復(fù)選框
const handleCheckedColumnsChange=(value:any) =>{let checkedCount = value.length;checkAll.value = checkedCount === columns.value.length;isIndeterminate.value = checkedCount > 0 && checkedCount < columns.value.length;
}
//表格實(shí)例
const tableRef:any = ref(null)
// 彈出框打開時觸發(fā)
const showPopover =()=> {// 選中目前已展示的字段值checkedColumns.value = [];columns.value.map((item:any) => {if(item.show) {checkedColumns.value.push(item.lable);}});// 如果目前展示的是全部字段,則需要勾選上“全選”按鈕if(columns.value.length == checkedColumns.value.length) {checkAll.value = true;isIndeterminate.value = false;}// 重新渲染表格nextTick(() => {tableRef.value.doLayout();})
}// 表格列是否顯示的方法
const showColumn = (currentColumn:string)=>{const column = columns.value.find((item: any) => item.lable === currentColumn);if (column) {return column.show;} else {console.error(`Column with label "${currentColumn}" not found.`);return undefined; // 或者您可以選擇拋出一個錯誤}
}
// 點(diǎn)擊彈出框的“確定”按鈕
const confirmPopover = ()=> {//選擇不能沒有,需要可放開注釋// if(checkedColumns.value.length == 0) {//   ElMessage.error('請選擇需要展示的表格字段')//     return;// }// 根據(jù)選擇結(jié)果,遍歷修改列是否展示的屬性值columns.value.forEach(item => {if(checkedColumns.value.some((el:any) => el == item.lable)) {item.show = true;} else {item.show = false;}})popoverVisible.value = false;// 重新渲染表格nextTick(() => {tableRef.value.doLayout();})
}
效果:?

http://www.risenshineclean.com/news/49338.html

相關(guān)文章:

  • 網(wǎng)站流量查詢平臺nba賽程排名
  • 網(wǎng)站制作用到什么技術(shù)seo怎么發(fā)文章 seo發(fā)布工具
  • 濟(jì)南網(wǎng)站開發(fā) blog網(wǎng)站源碼下載
  • 青島seo做的好的網(wǎng)站程序員培訓(xùn)班要多少錢
  • 幼兒園主題網(wǎng)絡(luò)圖設(shè)計(jì)感想seo優(yōu)化系統(tǒng)
  • 做網(wǎng)站有年費(fèi)嗎線上如何推廣自己的產(chǎn)品
  • 裝修公司做網(wǎng)站熱門關(guān)鍵詞網(wǎng)絡(luò)廣告的形式有哪些?
  • asp net做購物網(wǎng)站合肥疫情最新消息
  • 廣州智能建站模板百度推廣客戶端手機(jī)版
  • 浙江網(wǎng)站備案加急域名注冊商
  • h5網(wǎng)站怎么做api對接關(guān)鍵詞seo深圳
  • 有沒有美國做天然酵母的網(wǎng)站深圳純手工seo
  • 收費(fèi)視頻網(wǎng)站怎么做b2b免費(fèi)發(fā)布平臺
  • app網(wǎng)站建站系統(tǒng)下載關(guān)鍵詞批量調(diào)詞 軟件
  • 免費(fèi)源碼的商城網(wǎng)站seo技術(shù)自學(xué)
  • 做食品那些網(wǎng)站百度收錄提交入口地址
  • 百度景安空間網(wǎng)站四川seo推廣公司
  • 網(wǎng)絡(luò)安全等級保護(hù)百度熱搜seo
  • 深圳網(wǎng)站建設(shè)大公司好網(wǎng)絡(luò)營銷和傳統(tǒng)營銷有什么區(qū)別
  • 安徽富通建設(shè)集團(tuán)有限公司網(wǎng)站滄州網(wǎng)絡(luò)推廣外包公司
  • 網(wǎng)站建設(shè) 聯(lián)系我們教育培訓(xùn)機(jī)構(gòu)十大排名
  • 三級醫(yī)院網(wǎng)站建設(shè)方案百度平臺商家客服
  • 做購物網(wǎng)站寫數(shù)據(jù)庫的流程網(wǎng)絡(luò)營銷師證書
  • 網(wǎng)站怎么分類黃頁推廣
  • 沒有網(wǎng)站可以做cpc嗎西安網(wǎng)站建設(shè)排名
  • 現(xiàn)代農(nóng)業(yè)園網(wǎng)站建設(shè)方案windows優(yōu)化大師是自帶的嗎
  • 網(wǎng)站開發(fā)插入視頻代碼在線網(wǎng)站seo診斷
  • 成都 網(wǎng)站建設(shè)湖南seo優(yōu)化價格
  • 聯(lián)系客戶做網(wǎng)站搭建網(wǎng)站的五大步驟
  • 福田網(wǎng)站建設(shè)seo信科鄭州高端網(wǎng)站建設(shè)