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

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

可用的國外ip地址怎么制作seo搜索優(yōu)化

可用的國外ip地址,怎么制作seo搜索優(yōu)化,網(wǎng)站建設(shè)太金手指六六二九,自己怎么做賣服裝的網(wǎng)站分享-2023年資深前端進階:前端登頂之巔-最全面的前端知識點梳理總結(jié),前端之巔 *分享一個使用比較久的🪜 技術(shù)框架公司的選型(老項目):vue2 iview-ui 方案的實現(xiàn)思路是共性的,展現(xiàn)UI樣式需要你們自定義進行更改&#…

分享-2023年資深前端進階:前端登頂之巔-最全面的前端知識點梳理總結(jié),前端之巔

*分享一個使用比較久的🪜

技術(shù)框架公司的選型(老項目):vue2 + iview-ui
方案的實現(xiàn)思路是共性的,展現(xiàn)UI樣式需要你們自定義進行更改;因為iview是全局注入,基本使用原先的類名進行二次創(chuàng)建公共組件,修改基礎(chǔ)js實現(xiàn)邏輯;

需求分析:實現(xiàn)遠程滾動加載數(shù)據(jù)的穿梭框
1、創(chuàng)建自定義穿梭框,分左側(cè)和右側(cè)數(shù)據(jù)
2、依賴后端接口,左側(cè)是左側(cè)數(shù)據(jù),右側(cè)是右側(cè)數(shù)據(jù)
3、定義好出入?yún)?shù),支持回顯內(nèi)容及選中內(nèi)容的去重處理
4、綁定對應(yīng)的v-model數(shù)據(jù)響應(yīng)
5、滾動加載數(shù)據(jù),區(qū)分左右區(qū)域;添加自定義指令進行監(jiān)聽
6、滾動加載數(shù)據(jù),不丟失已選中的數(shù)據(jù),或去重已選中數(shù)據(jù)
7、支持左右側(cè)的遠程搜索功能,左右互不影響,檢索數(shù)據(jù)放組件外部進行

在這里插入圖片描述

1、代碼信息

創(chuàng)建ivu-transfer.vue文件;依賴iviewUI請依據(jù)自己的樣式進行拷貝;

1.1 自定義滾動監(jiān)聽指令
/** 遠程滾動加載 */
import Vue from 'vue'Vue.directive("loadTransfer", {bind(el, binding) {const select_dom = el.querySelectorAll('.ivu-transfer-list .ivu-transfer-list-content');select_dom.forEach((item, index) => {item.addEventListener('scroll', function () {const height = this.scrollHeight - this.scrollTop - 1 <= this.clientHeight;if (height) {binding.value(index)}})})}
})
1.2 自定義穿梭框代碼
<template><div class="ivu-transfer"><divclass="ivu-transfer-list":style="{width: listStyle.width,height: listStyle.height}"><div class="ivu-transfer-list-header"><Checkbox:value="checkLeftAll"@on-change="handleAllLeftCheck"></Checkbox><span class="ivu-transfer-list-header-title">源列表</span><span class="ivu-transfer-list-header-count">{{ leftDataSource.length }}</span></div><div class="ivu-transfer-list-body"><div class="ivu-transfer-list-content"><CheckboxGroup v-model="checkLeftAllGroup"><Checkbox:key="index":label="item.value"class="ivu-transfer-list-content-item"v-for="(item, index) in leftDataSource">{{item.label +`${item.description ? ` - ${item.description}` : ""}`}}</Checkbox></CheckboxGroup><divv-if="!leftDataSource.length"class="ivu-transfer-list-content-not-found">列表為空</div></div></div></div><div class="ivu-transfer-operation"><Buttonsize="small"type="primary"icon="ios-arrow-back"@click="handleClickArrowBack":disabled="!checkRightAllGroup.length"></Button><Buttonsize="small"type="primary"icon="ios-arrow-forward"@click="handleClickArrowForward":disabled="!checkLeftAllGroup.length"></Button></div><divclass="ivu-transfer-list":style="{width: listStyle.width,height: listStyle.height}"><div class="ivu-transfer-list-header"><Checkbox:value="checkRightAll"@on-change="handleAllRightCheck"></Checkbox><span class="ivu-transfer-list-header-title">目的列表</span><span class="ivu-transfer-list-header-count">{{ rightDataSource.length }}</span></div><div class="ivu-transfer-list-body"><div class="ivu-transfer-list-content"><CheckboxGroup v-model="checkRightAllGroup"><Checkbox:key="index":label="item.value"class="ivu-transfer-list-content-item"v-for="(item, index) in rightDataSource">{{item.label +`${item.description ? ` - ${item.description}` : ""}`}}</Checkbox></CheckboxGroup><divv-if="!rightDataSource.length"class="ivu-transfer-list-content-not-found">列表為空</div></div></div></div></div>
</template><script>
const methods = {// 點擊左側(cè)全選handleAllLeftCheck() {this.checkLeftAll = !this.checkLeftAll;if (this.checkLeftAll) {this.checkLeftAllGroup = this.leftDataSource.map(item => item.value);} else {this.checkLeftAllGroup = [];}},// 點擊右側(cè)全選handleAllRightCheck() {this.checkRightAll = !this.checkRightAll;if (this.checkRightAll) {this.checkRightAllGroup = this.rightDataSource.map(item => item.value);} else {this.checkRightAllGroup = [];}},// 點擊向右數(shù)據(jù)handleClickArrowBack() {this.moveCheckedData("left");},// 點擊向左數(shù)據(jù)handleClickArrowForward() {this.moveCheckedData("right");},moveCheckedData(direction) {const newLeftDataSource = [];const newRightDataSource = [];const dataSource =direction === "left" ? this.rightDataSource : this.leftDataSource;dataSource.forEach(item => {const index =direction === "left"? this.checkRightAllGroup.indexOf(item.value): this.checkLeftAllGroup.indexOf(item.value);if (index !== -1) {direction === "left"? newLeftDataSource.push(item): newRightDataSource.push(item);} else {direction === "left"? newRightDataSource.push(item): newLeftDataSource.push(item);}});this.leftDataSource =direction === "left"? [...this.leftDataSource, ...newLeftDataSource]: newLeftDataSource;this.rightDataSource =direction === "left"? newRightDataSource: [...this.rightDataSource, ...newRightDataSource];this.checkLeftAll = false;this.checkRightAll = false;this.checkLeftAllGroup = [];this.checkRightAllGroup = [];this.$emit("on-change", this.leftDataSource, this.rightDataSource, direction);},filterDataMethods() {const rightValues = new Set(this.rightDataSource.map(opt => opt.value));this.leftDataSource = this.leftDataSource.filter(item => !rightValues.has(item.value));this.$nextTick(() => {const leftValues = new Set(this.leftDataSource.map(opt => opt.value));this.rightDataSource = this.rightDataSource.filter(opt => !leftValues.has(opt.value));});}
};export default {props: {listStyle: {type: Object,default: () => ({width: "250px",height: "380px"})},leftData: {type: Array,require: true,default: () => []},rightData: {type: Array,require: true,default: () => []}},data() {return {checkLeftAll: false,checkRightAll: false,checkRightAllGroup: [],checkLeftAllGroup: [],leftDataSource: [],rightDataSource: []};},watch: {leftData(newVal) {this.leftDataSource = newVal;this.filterDataMethods();},rightData(newVal) {this.rightDataSource = newVal || [];this.filterDataMethods();}},mounted() {this.$nextTick(() => {this.$emit("on-change", this.leftDataSource, this.rightDataSource);})},methods
};
</script><style lang="less" scoped>
.ivu-transfer-list-content-item {width: 100%;margin-left: -0.3em;
}.ivu-transfer-list-content-not-found {display: block;
}
</style>
2、內(nèi)容使用api介紹

1、樹形結(jié)構(gòu)入?yún)?#xff1a;dataSource=[{label: '測試',value: 1, description: '拼接內(nèi)容' }]
2、標簽引用:<IvuTransfer :leftData="dataSource" :rightData="targetKeys" @on-change="handleChange" v-loadTransfer="handleLoadMore" />
3、相關(guān)api說明文檔在文章底部

<template><div class="customSearch"><Inputsearchclearablev-model="formLeftInput"placeholder="請輸入搜索內(nèi)容"@on-clear="handleOnLeftInput"@on-search="handleOnLeftInput"/><div style="width: 50px"></div><Inputsearchclearablev-model="formRightInput"placeholder="請輸入搜索內(nèi)容"@on-clear="handleOnRightInput"@on-search="handleOnRightInput"/></div><IvuTransfer:leftData="dataSource":rightData="targetKeys"@on-change="handleChange"v-loadTransfer="handleLoadMore"/></template>
// 遠程滾動加載handleLoadMore(index) {if (index === 0 && this.dataLeftHasMore && !this.isShowLoading) {this.curLeftPage++;this.getLeftMockData();}if (index === 1 && this.dataRightHasMore && !this.rightLoading) {this.curRightPage++;this.getRightTargetKeys();}},// 觸發(fā)選中移動handleChange(newLeftTargetData, newRightTargetKeys, direction) {this.dataSource = [...newLeftTargetData];this.targetKeys = [...newRightTargetKeys];if (direction === "right") {return this.remoteCheckPage();}if (direction === "left") {return this.remoteRightCheckPage();}},getLeftData() {},
getRightData() {}
參數(shù)說明類型默認值必填項
leftData[{}]-label,value結(jié)構(gòu)Array[][]
rightData[{}]-label,value結(jié)構(gòu)Array[][]
on-change數(shù)據(jù)變更觸發(fā)newLeft,newRight, direction
http://www.risenshineclean.com/news/7352.html

相關(guān)文章:

  • 做網(wǎng)站先做首頁百度搜索熱度
  • 網(wǎng)上做批發(fā)有哪些網(wǎng)站靠譜求職seo推薦
  • 哪里有做營銷型網(wǎng)站的公司免費學(xué)生網(wǎng)頁制作成品
  • 中山哪家建網(wǎng)站好網(wǎng)頁設(shè)計制作網(wǎng)站教程
  • 乳山網(wǎng)站備案上海網(wǎng)站seo快速排名
  • 網(wǎng)頁制作軟件ai真實有效的優(yōu)化排名
  • 美食網(wǎng)站建設(shè)的必要性搜索引擎的優(yōu)化和推廣
  • 做裝修網(wǎng)站多少錢互聯(lián)網(wǎng)運營自學(xué)課程
  • 怎么做一個電商網(wǎng)站網(wǎng)站流量指標有哪些
  • 懸賞做logo的網(wǎng)站網(wǎng)店怎么推廣和宣傳
  • 廣州網(wǎng)站(建設(shè)信科網(wǎng)絡(luò))怎么做推廣
  • 簡單做動畫的網(wǎng)站廈門seo排名外包
  • 免費網(wǎng)站模板 帶后臺常用搜索引擎有哪些
  • 西安網(wǎng)站制作一般多少錢深圳公司網(wǎng)絡(luò)推廣該怎么做
  • 網(wǎng)站遷移磁力王
  • vue.js做網(wǎng)站電子商務(wù)營銷策劃方案
  • 網(wǎng)站建設(shè)方案書0百度推廣優(yōu)化公司
  • 上線倒計時單頁網(wǎng)站模板小網(wǎng)站搜什么關(guān)鍵詞好
  • 牙膏的網(wǎng)站建設(shè)最新國內(nèi)你新聞
  • 單頁網(wǎng)站案例分析水果店推廣營銷方案
  • 珠寶行網(wǎng)站建設(shè)方案外貿(mào)網(wǎng)站建設(shè)優(yōu)化
  • 人大常委會網(wǎng)站建設(shè)意見全國疫情最新情況最新消息今天
  • 站酷網(wǎng)官方入口網(wǎng)頁版推廣方式怎么寫
  • 網(wǎng)站常用圖標素材百度網(wǎng)站鏈接提交入口
  • wordpress 不能換行亞馬遜關(guān)鍵詞優(yōu)化怎么做
  • 長壽做網(wǎng)站的電話seo關(guān)鍵詞優(yōu)化方法
  • 淄博網(wǎng)站長清區(qū)seo網(wǎng)絡(luò)優(yōu)化軟件
  • 我請網(wǎng)絡(luò)公司做的網(wǎng)站上的圖片被當(dāng)廣告攔截了_怎么回事百度搜索資源平臺官網(wǎng)
  • 視頻模板免費制作seo建站教程
  • 萬州做網(wǎng)站多少錢東莞seo公司