当前位置: 首页 > news >正文

网站建设厘金手指下拉12做废钢那个网站好

网站建设厘金手指下拉12,做废钢那个网站好,如何设计一个网页里面有很多小工具,wordpress凡科核心原理 当 input 输入#xff0c;存在一个 view 元素容纳输入内容#xff0c;此时获取 view 元素的宽#xff0c;将其设置为 input 的宽 特殊情况#xff1a;回显的时候当前元素可能不存在#xff0c;此时需要借助一个永远显示的元素进行宽度计算#xff08;InputWidt…核心原理 当 input 输入存在一个 view 元素容纳输入内容此时获取 view 元素的宽将其设置为 input 的宽 特殊情况回显的时候当前元素可能不存在此时需要借助一个永远显示的元素进行宽度计算InputWidthHelper.vue adaption-input.vue templateview classadaption-input-wrapperview classadaption-inputinputtypetext:placeholder-styleplaceholderStyle:placeholderplaceholder:style{ width: inputWidth }inputchangeInputFn//viewview :idrandomID classa--input{{ modelValue || 请输入 }}/view/view /templatescriptexport default {inheritAttrs: false,props: {modelValue: {type: [String, Number],default: ,},placeholder: {type: String,default: 请输入,},placeholderStyle: {type: String,default: color: #9ea5bb,},},data() {return {randomID: adaption_ new Date().getTime(),inputWidth: ,}},watch: {modelValue: {handler() {this.$nextTick(() {this.changeInputFn()})},immediate: true,},},options: {virtualHost: true,},computed: {inputVal: {set(val) {this.$emit(update:modelValue, val)this.$emit(change, val)},get() {return this.modelValue},},},methods: {changeInputFn() {setTimeout(() {const query uni.createSelectorQuery().in(this)query.select(#${this.randomID}).boundingClientRect((rect) {if (rect) {// 处于不可见状态需要借助一个永远显示的 dom 进行处理if (rect.width 0) {uni.$emit(getInputWidth, this.inputVal)} else {let rectWidth rect.widthif (rectWidth 150) {rectWidth 150}if (this.inputVal) {this.inputWidth rectWidth 30 px} else {this.inputWidth rectWidth 5 px}}}}).exec()}, 0)},},mounted() {uni.$on(returnInputWidth, (width) {this.inputWidth width})},} /scriptstyle langscss scoped.adaption-input {font-size: 28rpx;}.a--input {font: inherit;opacity: 0;position: fixed;top: 0;z-index: -1;} /style InputWidthHelper.vue templateview :idrandomID classa--input{{ inputValue || 请输入 }}/view /templatescriptexport default {inheritAttrs: false,data() {return {randomID: adaption_ new Date().getTime(),inputValue: ,}},mounted() {uni.$on(getInputWidth, (text) {this.inputValue textthis.$nextTick(() {const query uni.createSelectorQuery().in(this)query.select(#${this.randomID}).boundingClientRect((rect) {if (rect) {let rectWidth rect.widthif (rectWidth 150) {rectWidth 150}if (text) {uni.$emit(returnInputWidth, rectWidth 30 px)} else {uni.$emit(returnInputWidth, rectWidth 5 px)}}}).exec()})})},} /scriptstyle langscss scoped.adaption-input {font-size: 28rpx;}.a--input {font: inherit;opacity: 0;position: fixed;top: 0;z-index: -1;} /style
http://www.pierceye.com/news/852479/

相关文章:

  • 国外的购物网站有哪些安徽省住房和城乡建设厅官方网站
  • 网站策划需要什么能力网页游戏平台软件
  • phpmysql网站开发网络结构
  • 微官网和移动网站区别论坛网站建设多少钱
  • 怎么做公司网站优化凡科h5登录入口
  • 做电影网站如何推广方案房产网络平台
  • 站长工具 seo查询python爬数据做网站
  • 网站 底部医院网站建设的要求
  • asp网站静态化seo关键词排名优化软件怎么选
  • wordpress apache版本北京seo招聘
  • 南京玄武网站建设信息服务公司的经营范围有哪些
  • 旅游网站建设与翻译wordpress 显示作者
  • 网站建设与维护报告总结国家外汇管理局网站怎么做报告
  • 南沙区网站建设网站开发人员薪酬
  • 设计外贸英文网站简述网站开发的流程
  • 电商网站设计是干什么的如何建设cpa影视网站
  • wordpress设置阅读全文什么是seo搜索引擎优化
  • 网站名重复网站建设的经验之谈
  • 网站优化软件排名器有含义的公司名
  • 像wordpress一样的网站吗老徐蜂了网站策划书
  • ps做网站首页效果特效wordpress无法修改密码
  • 蚌埠网站设计一句话宣传自己的产品
  • 织梦开发供需网站杭州互联网企业排名
  • 网站结构分析关键词林俊杰的寓意
  • 网站备案 超链接青岛胶南做网站的
  • 国内ui做的好的网站网站底部 图标
  • 网站开发维护人员天津微外卖网站建设
  • 保定网站建设推广公司怎么样雄安优秀网站建设
  • 上海集团网站建设做网站用asp好吗
  • h5网站建设价格wp-wordpress