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

医疗网站建设需要什么资质免费的网络营销方式有哪些

医疗网站建设需要什么资质,免费的网络营销方式有哪些,做那种网站受欢迎,企业网站建设专业的我的icepro参考地址,内有参考代码,有条件的割割点点star 实现要求: 基于vue3支持通过colors(更改颜色)支持点击事件…支持其他的自定义样式(例如圆角,size等等) 最基础的第一步: 父组件引入并使用: templatediv classbuttonLim我的按钮:ice-b…我的icepro参考地址,内有参考代码,有条件的割割点点star 实现要求: 基于vue3支持通过colors(更改颜色)支持点击事件…支持其他的自定义样式(例如圆角,size等等) 最基础的第一步: 父组件引入并使用: templatediv classbuttonLim我的按钮:ice-buttonprimary/ice-button/div /template script setup import IceButton from ../../components/other/ice-button.vue /script style scoped langless /style子组件中使用slot去展示: templatediv classice-buttonslot/slot/div /template script setup /script style scoped langless /stylerun: 那么,把它的样式改的好看一些: 父组件: templatediv classbuttonLim我的按钮:ice-buttonprimary/ice-button/div /templatescript setup import IceButton from ../../components/other/ice-button.vue/scriptstyle scoped langless .buttonLim {display: flex;justify-content: center;flex-direction: column;align-items: center; } /style子组件: templatediv classice-buttonslot/slot/div /templatescript setup/scriptstyle scoped langless .ice-button {border-radius: .3rem;border: rgba(0, 0, 0, .7) 1px solid;background: rgba(0, 0, 0, .2);width: fit-content;padding: .2rem .4rem;margin: .1rem .2rem;user-select: none; }/style 当然,此时他的颜色并不够好看,那么如果想通过props向子组件自定义颜色: 子组件: templatediv classice-buttonslot/slot/div /templatescript setup const props defineProps({color: {type: String,default: } }) /script这样你传过来了,但是想怎么用呢, 这里要求颜色有未hover时的颜色和hover时的颜色,hover时的颜色自动计算出来 而此时可以考虑使用到css的变量了,像是: 子组件: templatediv classice-button:class[color?hoverColor:defaultColor]:style{ --color: color,--hover-color: hoverColor(color) }slot/slot/div /templatescript setup const props defineProps({color: {type: String,default: } }) const hoverColor (rgb) {return rgb.replaceAll(), ,.5)) } /scriptstyle scoped langless .ice-button {border-radius: .3rem;width: fit-content;padding: .2rem .4rem;margin: .1rem .2rem;user-select: none;transition-duration: .3s; }.defaultColor {border: rgba(0, 0, 0, .7) 1px solid;background: rgba(0, 0, 0, .2); }.hoverColor {color: var(--color);border: var(--color) 1px solid;:hover {color: var(--hover-color);border: var(--hover-color) 1px solid;} } /style父组件的调用: templatediv classbuttonLim我的按钮:ice-button colorrgb(251, 139, 5)primary/ice-buttonice-button colorrgb(234, 137, 88)primary/ice-button/div /templatescript setup import IceButton from ../../components/other/ice-button.vue/scriptstyle scoped langless .buttonLim {display: flex;justify-content: center;flex-direction: column;align-items: center; } /stylerun: 解释一下: 子组件中,如果传入了color的值,那么子组件的类名hoverColor生效,反之defaultColor生效,这里是给class传入了一个数组,如果你查看elementui的源码,会发现他们也是这样实现组件的type的切换,用过了才知道这个技巧是如此好用 还有,这里只是传入了一个rgb的值,然后在子组件中自动计算出来另一个颜色值(直接改为rgba,opacity为0.5) 支持点击事件 如果你直接使用下面的方式来绑定: 父组件: templatediv classbuttonLim我的按钮:ice-button colorrgb(251, 139, 5)primary/ice-buttonice-button colorrgb(234, 137, 88)primary/ice-buttonice-button clickclickTrigger colorrgb(242, 72, 27) refbtnclick/ice-button/div /templatescript setup import IceButton from ../../components/other/ice-button.vue import { ref } from vueconst btn ref() const clickTrigger async () {console.log(clickTrigger---)const str 我即将要赋值的文字if (await copyText(str)) {console.log(success)} else {console.log(error)} }const copyText function (str) {return navigator.clipboard.writeText(str).then(() {return true}).catch(() {return false}) }/scriptstyle scoped langless .buttonLim {display: flex;justify-content: center;flex-direction: column;align-items: center; } /style 子组件: templatediv classice-button:class[color?hoverColor:defaultColor]:style{ --color: color,--hover-color: hoverColor(color) }slot/slot/div /templatescript setup const props defineProps({color: {type: String,default: } }) const hoverColor (rgb) {return rgb.replaceAll(), ,.5)) } /scriptstyle scoped langless .ice-button {border-radius: .3rem;width: fit-content;padding: .2rem .4rem;margin: .1rem .2rem;user-select: none;transition-duration: .3s; }.defaultColor {border: rgba(0, 0, 0, .7) 1px solid;background: rgba(0, 0, 0, .2); }.hoverColor {color: var(--color);border: var(--color) 1px solid;:hover {color: var(--hover-color);border: var(--hover-color) 1px solid;} } /style这样没问题可以,但是有时会报错,click不是原生事件,这里我没有复现,淡然,你也可以在复习bug的时候想起这篇文章 这里的逻辑是点击左侧的item,赋值文字,但是这里的子组件没有定义click的处理事件,上面的button也是,可能会报这种错, 如何解决: 在子组件中定义click事件: 子组件: templatediv classice-buttonclickclickCallBack:class[color?hoverColor:defaultColor]:style{ --color: color,--hover-color: hoverColor(color) }slot/slot/div /templatescript setup const props defineProps({color: {type: String,default: } }) const hoverColor (rgb) {return rgb.replaceAll(), ,.5)) }const emit defineEmits([click]) const clickCallBack (evt) {emit(click, evt) } /scriptstyle scoped langless .ice-button {border-radius: .3rem;width: fit-content;padding: .2rem .4rem;margin: .1rem .2rem;user-select: none;transition-duration: .3s; }.defaultColor {border: rgba(0, 0, 0, .7) 1px solid;background: rgba(0, 0, 0, .2); }.hoverColor {color: var(--color);border: var(--color) 1px solid;:hover {color: var(--hover-color);border: var(--hover-color) 1px solid;} } /style这里的clickCallBack接收并emit一下click事件 emit函数会触发父组件绑定的click事件。当用户点击按钮时父组件会接收到这个事件并执行相应的操作。 自定义圆角 这里其实还是使用props来自定义圆角,例如我实现下面几个(round和block)按钮: 父组件的调用: 自定义圆角:ice-button roundround/ice-buttonice-button blockblock/ice-button子组件: templatediv classice-buttonclickclickCallBack:class[color?hoverColor:defaultColor,round?round:,block?block:]:style{ --color: color,--hover-color: hoverColor(color) }slot/slot/div /templatescript setup const props defineProps({color: {type: String,default: },round: {type: Boolean,default: false},block: {type: Boolean,default: false} }) const hoverColor (rgb) {return rgb.replaceAll(), ,.5)) }const emit defineEmits([click]) const clickCallBack (evt) {emit(click, evt) } /scriptstyle scoped langless .ice-button {border-radius: .3rem;width: fit-content;padding: .2rem .4rem;margin: .1rem .2rem;user-select: none;transition-duration: .3s; }.defaultColor {border: rgba(0, 0, 0, .7) 1px solid;color: rgba(0, 0, 0, .7);transition-duration: .3s;:hover {color: rgba(0, 0, 0, .4);border: rgba(0, 0, 0, .4) 1px solid;} }.hoverColor {color: var(--color);border: var(--color) 1px solid;:hover {color: var(--hover-color);border: var(--hover-color) 1px solid;} }.round {border-radius: 2rem; }.block {border-radius: 0; } /style当然,也可以混合使用: ice-button block colorrgb(242, 72, 27)混合/ice-button以上说的功能能都实现了 注意这里的代码还有很多没有优化,颜色获取,其他自定义type之类的都没有处理,关于更多的细节优化,详见icepro
http://www.zqtcl.cn/news/662630/

相关文章:

  • 黄山做网站公司山东省住房和城乡建设厅举报电话
  • 中医科网站建设素材上海文明城市建设网站
  • html课程教学网站模板手机微信小程序开发教程
  • 用电脑做兼职的网站比较好食品网站建设网站定制开发
  • 网站开发 加密保护小程序制作开发进度表
  • 深圳坪山站外贸展示型网站建设
  • 手机端自定义做链接网站济南网站制作方案
  • 软件网站是怎么做的帮别人做网站赚多少钱
  • 纯静态网站 搜索功能佛山网站建设 奇锐科技
  • 四川省建设厅官方网站联系电话自己网站做虚拟币违法吗
  • 同城招聘网站自助建站2014 网站建设
  • 个人网站空间大小江油官方网站建设
  • 怎样建网站做什么网站能吸引流量
  • 做vi设计的网站网络营销推广思路
  • 简述网站设计流程沁水做网站
  • 南京公司网站建设怎么收费获奖网页设计
  • 网站域名试用期水墨风格网站源码
  • 长沙网站开长沙手机网站建设哪些内容
  • 网站建设算固定资产吗做泵阀生意到哪个网站
  • 佛山网站建设定制杭州人防质监站网址
  • 什么网站可以做微官网定制小程序制作一个需要多少钱
  • 扒下来的网站怎么做修改什么样是权网站重高的
  • 淘宝客做网站链接潍坊网站建设wfzhy
  • 怎样做二维码链接到网站上做的比较好的美食网站有哪些
  • 自动化科技产品网站建设响应式博客wordpress
  • 个人建站如何赚钱男人的好看网
  • 门户网站建设管理工作作一手房用什么做网站
  • 网站建设优化服务案例三合一网站程序
  • 网站长尾词关于制作网站的方案
  • 做二手衣服的网站有哪些wordpress单本小说采集