国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

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

企業(yè)營(yíng)銷網(wǎng)站福建網(wǎng)絡(luò)seo關(guān)鍵詞優(yōu)化教程

企業(yè)營(yíng)銷網(wǎng)站,福建網(wǎng)絡(luò)seo關(guān)鍵詞優(yōu)化教程,網(wǎng)絡(luò)營(yíng)銷是傳銷嗎,wordpress 備份插件注意:該功能只能過濾可一次性返回全部數(shù)據(jù)的表格,通過接口分頁查詢的請(qǐng)自主按照需求改動(dòng)哈~ 實(shí)現(xiàn)步驟: 1.在要過濾的列表表頭增加過濾圖標(biāo),點(diǎn)擊圖標(biāo)顯示浮窗 2.浮窗內(nèi)顯示整列可選選項(xiàng),通過勾選單選或者全選、搜索框來…

注意:該功能只能過濾可一次性返回全部數(shù)據(jù)的表格,通過接口分頁查詢的請(qǐng)自主按照需求改動(dòng)哈~

實(shí)現(xiàn)步驟:


1.在要過濾的列表表頭增加過濾圖標(biāo),點(diǎn)擊圖標(biāo)顯示浮窗
2.浮窗內(nèi)顯示整列可選選項(xiàng),通過勾選單選或者全選、搜索框來過濾表格內(nèi)容


效果如下:

表格頁面index.vue:

<template><div><a-table :columns="column" :data-source="data" @change="change"><template v-for="(col, index) in column"><span :slot="col.slots.title" v-if="col.filterable" :key="index"><!--  --><popover-filter:ref="'popover_' + col.slots.title":key="col.dataIndex":label="col.dataIndex":field="col.dataIndex":shoppingType="0":filters="col.filtersList"@filter="handleFilterTable"/><span slot-scope="text, record">{{ text }}{{ record }}</span></span></template></a-table></div>
</template>
<script>
import PopoverFilter from "./popover-filter.vue";
export default {components: {PopoverFilter},data() {return {column: [],data: [],filters: {},allData: []};},mounted() {const columns = [{title: "序號(hào)",dataIndex: "id",customRender: (text, row, index) => {return index + 1;},width: 86},{//title: "Name",dataIndex: "name",width: "20%",slots: { title: "name" },filterable: true,onFilter: function(value, record) {console.log("value", value);return record.name.indexOf(value) != -1;}},{//title: "Gender",dataIndex: "gender",filters: [],width: "20%",filterable: true,slots: { title: "gender" }},{title: "Email",dataIndex: "email"}];this.column = columns;this.data = [{ name: "jone ke", gender: "Male", email: "23293238@qq.com" },{ name: "meary", gender: "Male1", email: "23293238@qq.com" },{ name: "lu xi", gender: "Doke", email: "23293238@qq.com" },{ name: "jiner", gender: "Doke1", email: "23293238@qq.com" },{ name: "geng", gender: "Doke1", email: "23293238@qq.com" }];this.allData = [...this.data];//要顯示過濾的列,dataIndexlet filterList = ["name", "gender"];this.column.forEach(item => {if (filterList.includes(item.dataIndex)) {//獲取每列所有數(shù)據(jù),去除重復(fù)項(xiàng)item.filtersList = [...new Set(this.data.map(e => e[item.dataIndex]))];}});//console.log("this.column", this.column);},methods: {change(a, b, c) {console.log(a);console.log(b);console.log(c);},handleFilterTable(checkedList, field, label) {console.log(checkedList, field, label);this.filters[field] = checkedList;this.data = [...this.allData];Object.keys(this.filters).forEach(e => {this.data = this.data.filter(i =>this.filters[e].length > 0 ? this.filters[e].includes(i[e]) : true);});},changeFilter(checkedList, field) {console.log(checkedList, field);//this.filterInfo[this.typeValue][field] = checkedList;}}
};
</script>
<style lang="less" scoped></style>

浮窗組件popover-filter.vue:

<template><div class="filter-column"><!-- visible=true面板顯示時(shí)或者有勾選項(xiàng)時(shí)icon圖標(biāo)高亮 --><divclass="popover-title":class="{ 'popover-title-active': visible || this.selected.length }"><span>{{ label }}</span><span class="caret-wrapper"><i class="sort-caret ascending"></i><i class="sort-caret descending"></i></span><a-popoveroverlayClassName="popover"width="190"ref="filter"popper-class="m-popper"v-model="visible"trigger="click":overlayStyle="{ width: '200px' }"><span class="filter-icon" @click.stop="handleClick"></span><template slot="content"><a-inputplaceholder="請(qǐng)輸入關(guān)鍵詞"suffix-icon="a-icon-search"size="small"@input="handleFilter($event)"v-model="keyWord"><a-icon slot="prefix" type="search" /></a-input><div class="popover-filter" v-loading="loading"><a-checkbox:indeterminate="indeterminate":checked="checkAll"@change="handleCheckAllSource">全選{{ filters.length ? `(${filters.length})` : "" }}</a-checkbox><a-checkbox-groupv-model="checkedValue"class="popover-checkbox-group"@change="handleCheck"><a-checkboxv-for="item in filterOptions":key="item":value="item"><span>{{ item }}</span></a-checkbox></a-checkbox-group></div><div class="popover-btn-group"><a-buttontype="text"size="small"class="popover-btn popover-btn-reset":class="{ 'popover-btn-active': checkedValue.length > 0 }"@click="handleReset">重置</a-button><a-buttontype="primary"size="small"class="popover-btn"@click="handleSearch">確定</a-button></div></template></a-popover></div></div>
</template><script>
export default {components: {},props: {label: {type: String,default: ""},field: {type: String,default: ""},shoppingType: {type: Number,default: 0},filters: {type: Array,default: () => []}},data() {return {// 是否顯示篩選框showFilter: false,interval: null,keyWord: "",loading: false,// 當(dāng)前選擇項(xiàng)checkedValue: [],selected: [],// 選擇項(xiàng)列表options: [],filterOptions: [],checkAll: false,indeterminate: false,visible: false};},watch: {showFilter: {handler(val) {if (val) {this.getList();} else {this.keyWord = "";}}}},created() {},mounted() {this.options = this.filters;this.filterOptions = [...this.options];},methods: {handleClick() {//this.filterOptions = [...this.options];//this.$emit("click");this.visible = !this.visible;if (this.visible) {//面板顯示時(shí)回顯勾選this.checkedValue = [...this.selected];//顯示全部勾選項(xiàng)this.getList();//清空搜索框this.keyWord = "";//判斷全選勾選框狀態(tài)this.checkAll = this.checkedValue.length === this.filterOptions.length;this.indeterminate =this.checkedValue.length > 0 &&this.checkedValue.length < this.filterOptions.length;}},handleFilter() {if (this.interval) {clearTimeout(this.interval);}this.interval = setTimeout(() => {this.filterOptions = this.options.filter(ele =>ele.toLowerCase().includes(this.keyWord.trim().toLowerCase()));console.log("搜索");clearTimeout(this.interval);this.interval = null;}, 1000);},getList() {// this.loading = true;// const params = {// 	shoppingType: this.shoppingType,// 	fieldStr: this.field,// };// this.axios// 	.post(`${this.$baseUrl}/mds/web/shopping/getCartSelect`, params)// 	.then((res) => {// 		this.loading = false;// 		if (res.data.code == "200") {// 			console.log("來源", res);// 			this.options = res.data.data || [];// 			this.filterOptions = [...this.options];// 			this.selected = this.selected.filter(ele => this.options.includes(ele));// 			this.checkedValue = [...this.selected];// 			this.$emit('changeFilter', this.checkedValue, this.field);// 		}// 	})// 	.catch((res) => {// 		this.loading = false;// 	});this.filterOptions = [...this.options];},handleCheck(val) {console.log("val", val, this.checkedValue);const count = val.length;this.checkAll = count === this.filterOptions.length;this.indeterminate = count > 0 && count < this.filterOptions.length;},handleCheckAllSource() {if (this.checkedValue.length == this.filterOptions.length) {this.checkedValue = [];this.checkAll = false;} else {this.checkedValue = this.filterOptions;this.checkAll = true;}},handleReset() {this.checkedValue = [];this.checkAll = false;this.indeterminate = false;this.keyWord = "";this.filterOptions = [...this.options];/* this.$refs.filter.doClose();this.$emit("filter", this.checkedValue, this.field); */},handleSearch() {this.selected = [...this.checkedValue];this.visible = false;this.$emit("filter", this.checkedValue, this.field, this.label);},close() {this.$refs.filter.doClose();}}
};
</script>
<style lang="less" scoped>
.filter-column {.caret-wrapper {width: 10px;margin: 0 2px 0 8px;.sort-caret {left: 0;}}.popover-title::after {display: none;}.filter-icon {width: 22px;height: 22px;display: inline-block;background: url("../../assets/filter-default.svg") 50% no-repeat;position: absolute;top: 50%;transform: translateY(-50%);margin-left: 4px;cursor: pointer;&:hover {background: url("../../assets/filter.svg") 50% no-repeat;background-color: #d3dbea;border-radius: 2px;}}.popover-title-active .filter-icon {background: url("../../assets/filter.svg") 50% no-repeat !important;background-color: #d3dbea !important;border-radius: 2px;}
}
</style>
<style>
.popover .ant-popover-inner-content {padding: 12px;
}
.popover-filter {margin: 8px -12px;padding: 4px 12px;border-top: 1px solid #dee2ed;border-bottom: 1px solid #dee2ed;max-height: 200px;overflow-y: auto;
}
.popover-filter .ant-checkbox-wrapper {margin-left: 0;width: 100%;margin-bottom: 4px;
}
.popover-filter .popover-checkbox-group .ant-checkbox-wrapper {margin-left: 0;width: 100%;margin-bottom: 4px;
}
.popover-btn-group {display: flex;justify-content: space-between;
}
</style>

http://m.aloenet.com.cn/news/28910.html

相關(guān)文章:

  • 網(wǎng)站頁面的滑動(dòng)怎么做現(xiàn)代營(yíng)銷手段有哪些
  • 購(gòu)物網(wǎng)站補(bǔ)貨提醒軟件怎么做重慶網(wǎng)站seo診斷
  • app開發(fā)企業(yè)網(wǎng)站建設(shè)seo專員是什么意思
  • 如何設(shè)置網(wǎng)站的默認(rèn)頁網(wǎng)站模板哪里好
  • 沈陽手機(jī)網(wǎng)站制作seo課程培訓(xùn)視頻
  • 房產(chǎn)網(wǎng)站開發(fā)功能報(bào)價(jià)合肥百度關(guān)鍵詞推廣
  • 網(wǎng)站建設(shè)功能需求廣告投放價(jià)目表
  • 申請(qǐng)域名需要多久seo鏈接優(yōu)化建議
  • wordpress評(píng)論調(diào)用標(biāo)簽常德seo公司
  • 西鄉(xiāng)做網(wǎng)站刷贊業(yè)務(wù)推廣網(wǎng)站
  • 網(wǎng)站 租用服務(wù)器價(jià)格網(wǎng)店運(yùn)營(yíng)是做什么的
  • 青島市網(wǎng)站建設(shè)公司技能培訓(xùn)班有哪些
  • facebook做網(wǎng)站推廣批量?jī)?yōu)化網(wǎng)站軟件
  • vba可以做網(wǎng)站自動(dòng)填海外廣告投放公司
  • 進(jìn)入網(wǎng)站服務(wù)器怎么做推廣有什么好方法
  • 電子商務(wù)seo是指什么意思seo是哪個(gè)英文的簡(jiǎn)寫
  • 網(wǎng)絡(luò)推廣網(wǎng)站怎么做網(wǎng)頁設(shè)計(jì)培訓(xùn)學(xué)校
  • 網(wǎng)站做子站點(diǎn)有什么用上海網(wǎng)站建設(shè)服務(wù)
  • 網(wǎng)站 建設(shè) 網(wǎng)站設(shè)計(jì)公司搜索引擎優(yōu)化包括哪些
  • 閩侯福州網(wǎng)站建設(shè)招代理最好的推廣方式
  • 怎樣做微信推廣網(wǎng)站百度推廣代運(yùn)營(yíng)公司
  • 免費(fèi)空間域名可以做淘寶客網(wǎng)站推廣嗎今天剛剛的最新新聞
  • 線上教學(xué)網(wǎng)站怎么建設(shè)萬網(wǎng)官網(wǎng)登錄
  • 廣州企業(yè)網(wǎng)站建設(shè)報(bào)價(jià)中國(guó)國(guó)家人事人才培訓(xùn)網(wǎng)官網(wǎng)
  • 網(wǎng)站開發(fā)工程師面試問哪些問題網(wǎng)絡(luò)營(yíng)銷推廣渠道
  • 電子商務(wù)網(wǎng)站建設(shè)費(fèi)用百度官方免費(fèi)下載安裝
  • 找人做網(wǎng)站沒有做好報(bào)案有用嗎指數(shù)網(wǎng)站
  • 有沒有好的做海報(bào)的網(wǎng)站seo sem是指什么意思
  • 網(wǎng)站備案期間能使用嗎百度seo發(fā)包工具
  • unity做網(wǎng)站做銷售有什么技巧和方法