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

网站 设计公司 温州网站建设的公司怎么做

网站 设计公司 温州,网站建设的公司怎么做,做抖音风的网站,制作网站的固定成本开关#xff08;Switch#xff09;选择组件是一种用户界面元素#xff0c;允许用户在两种状态#xff08;通常是开/关、是/否、启用/禁用等#xff09;之间进行切换。这种组件在移动应用、桌面软件、网页以及物联网设备中广泛应用。以下是对开关Switch选择组件的详细介绍Switch选择组件是一种用户界面元素允许用户在两种状态通常是开/关、是/否、启用/禁用等之间进行切换。这种组件在移动应用、桌面软件、网页以及物联网设备中广泛应用。以下是对开关Switch选择组件的详细介绍 一、基本概念 开关Switch选择组件通常由一个滑块和一个滑道组成。滑块是用户可以拖动的部分而滑道是背景。用户可以通过拖动滑块或点按开关来改变其状态。 二、主要属性 状态 表示开关的当前状态通常是一个布尔值true/false或1/0。状态改变回调 当开关状态发生变化时调用的回调函数。该函数通常接收一个新的状态值作为参数。启用/禁用 控制开关是否可用。当设置为禁用状态时用户无法更改开关的状态。文本标签 在某些实现中可以为开关的打开和关闭状态设置文本标签。这些标签通常用于提供更清晰的指示或说明。颜色colors 自定义开关的颜色包括滑块和滑道的颜色。某些框架允许为开关的不同状态打开/关闭设置不同的颜色。 三、组件扩展 基于uview类型的u-switch我们增加了有效文本、无效文本及颜色。扩展组件如下。 templateviewclassu-switch:class[valueCom? u-switch--on : , disabled ? u-switch--disabled : ]taponClick:style[switchStyle]viewclassu-switch__node node-class:stylenodeStyleu-loading:showloadingclassu-switch__loading:sizesize * 0.6:colorloadingColor//viewview v-ifactiveText || inactiveText classu-switch__text :class{u-switch__text-end:!valueCom} text v-if!valueCom classu-switch__text--inactive :style{color:inactiveTextColor}{{ inactiveText }}/texttext v-else classu-switch__text--active :style{color:activeTextColor}{{ activeText }}/text/view/view /templatescript /*** switch 开关选择器* description 选择开关一般用于只有两个选择且只能选其一的场景。* tutorial https://www.uviewui.com/components/switch.html* property {Boolean} loading 是否处于加载中默认false* property {Boolean} disabled 是否禁用默认false* property {String Number} size 开关尺寸单位rpx默认50* property {String} active-color 打开时的背景色默认#19be6b* property {Boolean} inactive-color 关闭时的背景色默认#ffffff* property {Boolean | Number | String} active-value 打开选择器时通过change事件发出的值默认true* property {Boolean | Number | String} inactive-value 关闭选择器时通过change事件发出的值默认false* event {Function} change 在switch打开或关闭时触发* example u-switch v-modelchecked active-colorred inactive-color#eee/u-switch*/ export default {name: u-switch,emits: [update:modelValue, input, change],props: {// 通过v-model双向绑定的值value: {type: [Number, String, Boolean],default: false},modelValue: {type: [Number, String, Boolean],default: false},// 是否为加载中状态loading: {type: Boolean,default: false},// 是否为禁用装填disabled: {type: Boolean,default: false},// 开关尺寸单位rpxsize: {type: [Number, String],default: 50},// 打开时的背景颜色activeColor: {type: String,default: #19be6b},// 关闭时的背景颜色inactiveColor: {type: String,default: #ffffff},// 是否使手机发生短促震动目前只在iOS的微信小程序有效(2020-05-06)vibrateShort: {type: Boolean,default: false},// 打开选择器时的值activeValue: {type: [Number, String, Boolean],default: true},// 关闭选择器时的值inactiveValue: {type: [Number, String, Boolean],default: false},activeText: {type: String,default: },activeTextColor: {type: String,default: #ffffff},inactiveText: {type: String,default: },inactiveTextColor: {type: String,default: #999999},},data() {return {switchWidth:this.size,};},computed: {valueCom() {// #ifndef VUE3return this.value;// #endif// #ifdef VUE3return this.modelValue;// #endif},switchStyle() {let style {};style.fontSize this.size rpx;style.backgroundColor this.valueCom ? this.activeColor : this.inactiveColor;style.width this.$u.addUnit(this.switchWidth*2);return style;},loadingColor() {return this.valueCom ? this.activeColor : null;},nodeStyle(){const style {};style.width this.$u.addUnit(this.size);style.height this.$u.addUnit(this.size);style.transform translateX(${this.valueCom ? this.switchWidth - this.size/2 : 0}px);return style;}},methods: {onClick() {if (!this.disabled !this.loading) {// 使手机产生短促震动微信小程序有效APP(HX 2.6.8)和H5无效if (this.vibrateShort) uni.vibrateShort();this.$emit(input, this.valueComthis.activeValue ? this.inactiveValue : this.activeValue);this.$emit(update:modelValue, this.valueComthis.activeValue ? this.inactiveValue : this.activeValue);// 放到下一个生命周期因为双向绑定的value修改父组件状态需要时间且是异步的this.$nextTick(() {this.$emit(change, this.valueComthis.activeValue ? this.inactiveValue : this.activeValu);});}},updateSwitchWidth() {let textLength Math.max(this.activeText.length,this.inactiveText.length)this.switchWidth Math.max(textLength*1210this.size/2, this.size)}},mounted() {this.updateSwitchWidth();}, }; /scriptstyle langscss scoped import ../../libs/css/style.components.scss;.u-switch {position: relative;/* #ifndef APP-NVUE */display: inline-block;/* #endif */box-sizing: initial;width: 2em;height: 1em;background-color: #fff;border: 1px solid rgba(0, 0, 0, 0.1);border-radius: 1em;transition: background-color 0.3s;font-size: 50rpx;__text {position: absolute;top: 0;left: 0;right: 0;bottom: 0;display: flex;align-items: center;justify-content: space-between;padding: 0 10rpx;font-size: 24rpx;-end{justify-content: flex-end;}--inactive {color: #999999;white-space: nowrap;text-align: right;}--active {color: #fff;white-space: nowrap;}} }.u-switch__node {include vue-flex;align-items: center;justify-content: center;position: absolute;top: 0;left: 0;border-radius: 100%;z-index: 1;background-color: #fff;background-color: #fff;box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1),0 3px 3px 0 rgba(0, 0, 0, 0.05);box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1),0 3px 3px 0 rgba(0, 0, 0, 0.05);transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05),-webkit-transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);transition: transform cubic-bezier(0.3, 1.05, 0.4, 1.05);transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05); }.u-switch__loading {include vue-flex;align-items: center;justify-content: center; }.u-switch--on {background-color: #1989fa; }.u-switch--on .u-switch__node {transform: translateX(100%); }.u-switch--disabled {opacity: 0.4; } /style四、可视化设计 拖动开关组件进设计区。 保存源码至本地查看效果 templateview classcontainer container329152u-form-item classdiygw-col-24 label开关 propswitchview classflex diygw-col-24u-switch :size44 :activeValue1 :inactiveValue0 inactiveTextColor#000000 activeTextColor#ffffff v-modelswitched slotright/u-switch/view/u-form-itemu-form-item classdiygw-col-24 label开关 propswitch1view classflex diygw-col-24u-switch :size44 activeText有效 inactiveText无效 :activeValue1 :inactiveValue0 inactiveTextColor#000000 activeTextColor#ffffff v-modelswitch1 slotright/u-switch/view/u-form-itemu-form-item classdiygw-col-24 label开关 propswitch2view classflex diygw-col-24u-switch :size44 activeText男 inactiveText女 :activeValue1 :inactiveValue0 inactiveTextColor#000000 activeTextColor#ffffff v-modelswitch2 slotright/u-switch/view/u-form-itemview classclearfix/view/view /templatescriptexport default {data() {return {//用户全局信息userInfo: {},//页面传参globalOption: {},//自定义全局变量globalData: {},listNum: 1,list: {code: 200,msg: 获取数据成功,data: [{title: 标题1,remark: 描述1,id: 1,attr: {title: 标题1},img: https://php.diygw.com/logo.png},{title: 标题2,remark: 描述2,id: 2,attr: {title: 标题2},img: https://php.diygw.com/logo.png},{title: 标题3,remark: 描述3,id: 3,attr: {title: 标题3},img: https://php.diygw.com/logo.png},{title: 标题4,remark: 描述4,id: 4,attr: {title: 标题4},img: https://php.diygw.com/logo.png},{title: 标题5,remark: 描述5,id: 5,attr: {title: 标题5},img: https://php.diygw.com/logo.png},{title: 标题6,remark: 描述6,id: 6,attr: {title: 标题6},img: https://php.diygw.com/logo.png},{title: 标题7,remark: 描述7,id: 7,attr: {title: 标题7},img: https://php.diygw.com/logo.png},{title: 标题8,remark: 描述8,id: 8,attr: {title: 标题8},img: https://php.diygw.com/logo.png},{title: 标题9,remark: 描述9,id: 9,attr: {title: 标题9},img: https://php.diygw.com/logo.png},{title: 标题10,remark: 描述10,id: 10,attr: {title: 标题10},img: https://php.diygw.com/logo.png}]},switched: 1,switch1: 1,switch2: 1};},onPageScroll(e) {const scrollTop e.scrollTop;this.headerBackgroundStyle this.headerBackgroundStyle || { background: none };if (scrollTop 80) {const opacity scrollTop / 100;const color rgba(255, 255, 255, ${opacity});this.headerBackgroundStyle.background color;} else {this.headerBackgroundStyle.background #ffffff;}},onShow() {this.setCurrentPage(this);},onLoad(option) {this.setCurrentPage(this);if (option) {this.setData({globalOption: this.getOption(option)});}this.init();},methods: {async init() {await this.listApi();},// 列表数据 API请求方法async listApi(param) {let thiz this;param param || {};//如果请求要重置页面请配置点击附加参数refresh1 增加判断如输入框回调param不是对象if (param.refresh || typeof param ! object) {this.listNum 1;}//请求地址及请求数据可以在加载前执行上面增加自己的代码逻辑let http_url https://php.diygw.com/article.php;let http_data {pageNum: this.listNum,pageSize: 10,sctdown: param.sctdown || this.sctdown};let http_header {};let list await this.$http.post(http_url, http_data, http_header, json);let datarows list.rows;if (http_data.pageNum 1) {this.list list;} else if (datarows) {let rows this.list.rows.concat(datarows);list.rows rows;this.list list;}if (datarows datarows.length 0) {this.listNum this.listNum 1;}this.globalData.isshow true;console.log(http_data.sctdown);}},onPullDownRefresh() {// 列表数据 API请求方法this.listNum 1;this.listApi();uni.stopPullDownRefresh();},onReachBottom() {// 列表数据 API请求方法this.listApi();}}; /scriptstyle langscss scoped.container329152 {} /style
文章转载自:
http://www.morning.hmqmm.cn.gov.cn.hmqmm.cn
http://www.morning.jtkfm.cn.gov.cn.jtkfm.cn
http://www.morning.sxhdzyw.com.gov.cn.sxhdzyw.com
http://www.morning.pjftk.cn.gov.cn.pjftk.cn
http://www.morning.hhxkl.cn.gov.cn.hhxkl.cn
http://www.morning.xesrd.com.gov.cn.xesrd.com
http://www.morning.tsnwf.cn.gov.cn.tsnwf.cn
http://www.morning.shxrn.cn.gov.cn.shxrn.cn
http://www.morning.nrcbx.cn.gov.cn.nrcbx.cn
http://www.morning.mmjqk.cn.gov.cn.mmjqk.cn
http://www.morning.hjbrd.cn.gov.cn.hjbrd.cn
http://www.morning.lxmmx.cn.gov.cn.lxmmx.cn
http://www.morning.dwncg.cn.gov.cn.dwncg.cn
http://www.morning.mjzcp.cn.gov.cn.mjzcp.cn
http://www.morning.hmsong.com.gov.cn.hmsong.com
http://www.morning.yskhj.cn.gov.cn.yskhj.cn
http://www.morning.plpqf.cn.gov.cn.plpqf.cn
http://www.morning.klyzg.cn.gov.cn.klyzg.cn
http://www.morning.ryyjw.cn.gov.cn.ryyjw.cn
http://www.morning.trtdg.cn.gov.cn.trtdg.cn
http://www.morning.gkpgj.cn.gov.cn.gkpgj.cn
http://www.morning.bcngs.cn.gov.cn.bcngs.cn
http://www.morning.fkmrj.cn.gov.cn.fkmrj.cn
http://www.morning.tdldh.cn.gov.cn.tdldh.cn
http://www.morning.dxtxk.cn.gov.cn.dxtxk.cn
http://www.morning.ydxwj.cn.gov.cn.ydxwj.cn
http://www.morning.xfdkh.cn.gov.cn.xfdkh.cn
http://www.morning.qwwcf.cn.gov.cn.qwwcf.cn
http://www.morning.fdzzh.cn.gov.cn.fdzzh.cn
http://www.morning.mflqd.cn.gov.cn.mflqd.cn
http://www.morning.ldcsw.cn.gov.cn.ldcsw.cn
http://www.morning.lwtfx.cn.gov.cn.lwtfx.cn
http://www.morning.sjwiki.com.gov.cn.sjwiki.com
http://www.morning.qydgk.cn.gov.cn.qydgk.cn
http://www.morning.hlhqs.cn.gov.cn.hlhqs.cn
http://www.morning.routalr.cn.gov.cn.routalr.cn
http://www.morning.fhyhr.cn.gov.cn.fhyhr.cn
http://www.morning.lltdf.cn.gov.cn.lltdf.cn
http://www.morning.tqbw.cn.gov.cn.tqbw.cn
http://www.morning.gjlst.cn.gov.cn.gjlst.cn
http://www.morning.dqdss.cn.gov.cn.dqdss.cn
http://www.morning.zwzwn.cn.gov.cn.zwzwn.cn
http://www.morning.deanzhu.com.gov.cn.deanzhu.com
http://www.morning.lgmgn.cn.gov.cn.lgmgn.cn
http://www.morning.ktsth.cn.gov.cn.ktsth.cn
http://www.morning.huayaosteel.cn.gov.cn.huayaosteel.cn
http://www.morning.hxrfb.cn.gov.cn.hxrfb.cn
http://www.morning.yltnl.cn.gov.cn.yltnl.cn
http://www.morning.ltfnl.cn.gov.cn.ltfnl.cn
http://www.morning.rrqbm.cn.gov.cn.rrqbm.cn
http://www.morning.snnwx.cn.gov.cn.snnwx.cn
http://www.morning.hblkq.cn.gov.cn.hblkq.cn
http://www.morning.shxmr.cn.gov.cn.shxmr.cn
http://www.morning.ryrpq.cn.gov.cn.ryrpq.cn
http://www.morning.qgwpx.cn.gov.cn.qgwpx.cn
http://www.morning.cjsnj.cn.gov.cn.cjsnj.cn
http://www.morning.yrjkp.cn.gov.cn.yrjkp.cn
http://www.morning.xbckm.cn.gov.cn.xbckm.cn
http://www.morning.txkrc.cn.gov.cn.txkrc.cn
http://www.morning.zdydj.cn.gov.cn.zdydj.cn
http://www.morning.yqsr.cn.gov.cn.yqsr.cn
http://www.morning.lhwlp.cn.gov.cn.lhwlp.cn
http://www.morning.tdttz.cn.gov.cn.tdttz.cn
http://www.morning.chkfp.cn.gov.cn.chkfp.cn
http://www.morning.tpbhf.cn.gov.cn.tpbhf.cn
http://www.morning.gqnll.cn.gov.cn.gqnll.cn
http://www.morning.yxshp.cn.gov.cn.yxshp.cn
http://www.morning.pzcjq.cn.gov.cn.pzcjq.cn
http://www.morning.zhghd.cn.gov.cn.zhghd.cn
http://www.morning.kfjnx.cn.gov.cn.kfjnx.cn
http://www.morning.lpgw.cn.gov.cn.lpgw.cn
http://www.morning.tnwgc.cn.gov.cn.tnwgc.cn
http://www.morning.lbjdx.cn.gov.cn.lbjdx.cn
http://www.morning.qpsft.cn.gov.cn.qpsft.cn
http://www.morning.ie-comm.com.gov.cn.ie-comm.com
http://www.morning.nqlx.cn.gov.cn.nqlx.cn
http://www.morning.tgyqq.cn.gov.cn.tgyqq.cn
http://www.morning.fmrrr.cn.gov.cn.fmrrr.cn
http://www.morning.mbzlg.cn.gov.cn.mbzlg.cn
http://www.morning.xnwjt.cn.gov.cn.xnwjt.cn
http://www.tj-hxxt.cn/news/270401.html

相关文章:

  • 网站建设的发展目标如何建立公司网站
  • 公众号制作的网站开发dedecms导入网站模板下载
  • 商务网站模板下载智慧校园管理系统平台
  • 太平洋保险网站做的这么烂蒙城网站建设
  • 企业网站备案资料样本稳重大气的公司名字
  • 个人网站不备案网站开发的技术可行性怎么写
  • 免费的网站登录模板下载股票跟单网站开发
  • 成都的汽车网站建设个人网站可以备案几个
  • 做视频类型的网站html代码中align center
  • 香河县住房和城乡建设部网站培训机构是干什么的
  • 免费模板网站哪个好中国建设银行官网首页
  • 网站开发培训哪里好盐城市建设局网站打不开
  • wordpress站内搜索网站建设与维护试题及答案
  • 宝塔面板怎么做自己的网站个人博客页面模板
  • 点餐网站模板 手机端网站开发主要做哪些
  • 建设企业网站内容网上有哪些正规赚钱的平台
  • 赣州网站维护网站登录界面模板html
  • 影响网站权重的因素网站备案 公司注销
  • ip分享网站那里有个人做网站的
  • 打开上次浏览的网站模板快手做任务网站
  • 网站图片快速加载百度网盘电话人工服务
  • a站网址wordpress数学公式
  • 施工企业会计制度及施工企业会计核算办法合肥seo按天扣费
  • 无锡网站排名优化建设网站上传软件
  • 建立自己的网站平台wordpress经典主题下载
  • 网站备案文件下载网络公司要求做网站工商网监
  • 北京公司注册网站石家庄网络营销公司有哪些
  • 用ps做网站主页自适应网站建站
  • 成都网站改版优化WordPress数据库经常要重启
  • 大型定制网站最贵建设多少钱河南省漯河建设局网站