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

wordpress全站迁移班级网站建设开题报告

wordpress全站迁移,班级网站建设开题报告,做网站中显示链接中内容,如何用ps做网站效果图1. 说明 在平时项目中,对于金额处理显示一般需要按千分符显示,通常实现会申明一个formater函数来进行转换,但是涉及的地方比较多试,使用起来比较繁琐,封装一个单独的组件比较合理 2. 实现组件代码 ElMoneyInput.vue …

1. 说明

在平时项目中,对于金额处理显示一般需要按千分符显示,通常实现会申明一个formater函数来进行转换,但是涉及的地方比较多试,使用起来比较繁琐,封装一个单独的组件比较合理

2. 实现组件代码

  1. ElMoneyInput.vue
<template><div :style="{'background-color': disabled ? 'transparent' : '#fff'}"><span class="money-input" v-if="!isInput" @click="focusHanle" :disabled="disabled" :value="viewValue">{{ viewValue }}</span><el-input ref="moneyInput" v-else v-bind="$attrs" :value="value" @input="handlerChange" @blur="handlerBlur" autofocus onkeypress="if(event.keyCode == 13) return false;"/></div>
</template>
<script>
export default {name: 'ElMoneyInput',inheritAttrs: false,model: {prop: "value",event: "input"},props: {value: {type: String,default: ""},disabled:{type:Boolean,default:false},rules: {type: Object,default: () => {}}},watch: {value(val, old) {if (val !== old) {this.init()}}},mounted() {this.init()},data() {return {isEdit: true,isInput: false,viewValue: ''};},methods: {init() {if (!this.isInput) {this.viewValue = this.formatMoney(this.value || 0)this.$emit('input', this.blurformat(this.value || 0))}},focusHanle() {if (this.disabled) returnthis.isInput = !this.isInputthis.$emit('input', this.blurformat(this.value || 0))this.$nextTick(() => {this.$refs.moneyInput.focus()})},formatMoney(cellValue, num = 2) {if (isNaN(cellValue)) {return ""}if (cellValue === 0) {return '0.00';}return this.$Utils.formatMoney(cellValue, num);},format(v) {return (`${v}`.match(/([\d\.]+)/) || "")[0];},blurformat(v) {return v ? Number.parseFloat(v).toFixed(2) : "";},handlerChange(v) {this.$emit('input', v)},handlerBlur() {this.isInput = false;this.$emit('input', this.blurformat(this.value))this.viewValue = this.formatMoney(this.value)},// handleFocus() {//   this.isInput = true;//   this.$emit('input', this.blurformat(this.value))// }}
};
</script>
<style lang="less">
.span-input{display: inline-block;width: 100%;height:28px;
}
.money-input {position: relative;font-size: 14px;display: inline-block;height: 32px;line-height: 32px;background: transparent !important;cursor: text !important;background-color: #FFF;background-image: none;border-radius: 4px;border: 1px solid #DCDFE6;-webkit-box-sizing: border-box;box-sizing: border-box;color: #606266;display: inline-block;font-size: inherit;outline: 0;padding: 0 15px;-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);transition: border-color .2s cubic-bezier(.645,.045,.355,1);width: 100%;.el-input__inner {background: transparent !important;cursor: text !important;background-color: #FFF;background-image: none;border-radius: 4px;border: 1px solid #DCDFE6;-webkit-box-sizing: border-box;box-sizing: border-box;color: #606266;display: inline-block;font-size: inherit;height: 40px;line-height: 40px;outline: 0;padding: 0 15px;-webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);transition: border-color .2s cubic-bezier(.645,.045,.355,1);width: 100%;}
}
</style>

3.实现效果

在这里插入图片描述

http://www.dtcms.com/wzjs/798524.html

相关文章:

  • 建一个网站需要购买域名 虚拟主机东海建设局网站
  • 网站开发 竞拍网站玻璃行业做的非常有设计感的网站
  • 网站建立的公司没有网站可以做京东联盟吗
  • 怎么让网站页面自适应asp网站背景
  • html5建站系统wordpress 打不开主题
  • 四川做网站的公司哪家好游戏网站建设系统介绍
  • 网站 子域名wordpress登入可见插件
  • 成都j网站制作电子商务网站建设与运营
  • 网页设计教学网站北滘做网站
  • 怎么学做电子商务网站网站空间购买费用
  • 广州电商网站开发公司网站设计内容包括
  • 网站建设仿站企业公司关键词优化搜索引擎
  • 南开网站建设公司跨境电商哪个平台比较好做
  • 网站开发在线教程wordpress媒体库一直加载
  • 中云建设集团网站网站搜索功能
  • 小程序网站开发怎么样中国建设教育协会的是假网站吗
  • 辽宁网站定制企业罗湖小学网站建设
  • wordpress建博客广州网站建设优化
  • 手机网站发展物联网技术是学什么的
  • 前端开发好学吗网站seo检测工具
  • 中网互联网站建设淮滨网站建设
  • 各类网站律师行业网站模板
  • 做视频网站wordpress在页面里写文章
  • 都用什么软件做网站网站栏目策划
  • 公司简介网站模板做网站需要报备什么条件
  • 徐州建设安全监督网站免费ppt模板下载大全网站
  • 网站建设的功能都需要有哪些自己做返利网站
  • ps模板素材网站空间设计培训
  • 荥阳市建设局网站建筑工程劳务信息平台
  • 电商运营网站大淘客网站是怎么做的