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

嘉兴网嘉兴网站建设新乡seo公司

嘉兴网嘉兴网站建设,新乡seo公司,服务专业的网页制作,销售型网站如何做推广文章目录 前言一、新增btn.vue组件二、使用总结如有启发#xff0c;可点赞收藏哟~ 前言 在后台管理系统一般都存在列表查询#xff0c;且可输入数据进行查询 基于element-plus定义表单配置化 新增按钮配置化 一、新增btn.vue组件 templatetemplate v-forbtn.vue组件二、使用总结如有启发可点赞收藏哟~ 前言 在后台管理系统一般都存在列表查询且可输入数据进行查询 基于element-plus定义表单配置化 新增按钮配置化 一、新增btn.vue组件 templatetemplate v-for(btn, index) in fieldProperty.btns :keybtn indexel-buttonclickbtn.fun:sizefieldProperty.size:namebtn.name:readonlybtn.readonly:disabledbtn.disabled:typebtn.type:colorbtn.color:darkbtn.dark:plainbtn.plain:roundbtn.round:circlebtn.circleSvgIcon v-ifbtn.icon :icon-classbtn.icon/{{ btn.name }}/el-button/template /template script langts import { computed, reactive } from vue; import SvgIcon from /components/svg-icon/index.vue; export default {components: { SvgIcon },name: Radio,props: {modelvalue: [Boolean],property: {type: Object,default() {return {};},},},setup(props, { emit }) {const fieldProperty reactive({size: default, // large | default | smallbtns: [{fun: () { console.log(Save) },name: Save,readonly: false,disabled: false,type: primary, // primary| success| warning| danger| info| text(delete)color: #334343,icon: save, // 图标dark: false, // dark 模式, 意味着自动设置 color 为 dark 模式的颜色 和color一起设置plain: false, // 是否为朴素按钮round: false, // 是否为圆角按钮circle: true, // 是否为圆形按钮// loading: false, // 是否为加载中状态// loading-icon: Loading, // 自定义加载中状态图标组件}],...props.property,});const val computed({get() {return props.modelvalue;},set(val) {emit(update:modelvalue, val); // 触发},});return {val,fieldProperty,};}, }; /script style langless scoped/style form.vue新增btn组件引入 import Btn from /components/form-configuration/btn.vue; export default {components: {...Btn}, }二、使用 entity.ts import { ObjectEntries } from /entity/objectentries; import enableStatus from /enum/enable-status; import type { Rules, DefaultFields, FormData } from /interface/form; import { useI18n } from vue-i18n; export class UserSearchFormEntity extends ObjectEntries {public formRules: Rules {};public formFields: DefaultFields {};public formData: FormData {};constructor() {const { t } useI18n()super()this.formFields {userName: ,nickName: ,phoneNumber: ,status: ,createDate: [],};this.formData {userName: {type: Input,colSize: 8,show: true,class: [],title: t(userName),field: userName,property: {type: text,placeholder: text,},},nickName: {type: Input,colSize: 8,show: true,class: [],title: t(nickName),field: nickName,property: {type: text,placeholder: text,},},phoneNumber: {type: Input,colSize: 8,show: true,class: [],title: t(phoneNumber),field: phoneNumber,property: {type: text,placeholder: text,},},status: {type: Select,colSize: 8,show: true,class: [],title: t(status),field: status,property: {data: UserSearchFormEntity.objectEntries(enableStatus),},},createDate: {type: Date,colSize: 8,show: true,class: [],title: t(createDate),field: createDate,property: {type: daterange,placeholder: text,},},btn: {type: Btn,colSize: 8,show: true,class: [noLabel],field: btn,property: {btns: []},},};} } page/index.ts import { defineComponent, reactive, ref } from vue import FormList from /components/form-configuration/form.vue; import { UserSearchFormEntity } from ./composables/entity; import { useI18n } from vue-i18n;export default defineComponent({components: {FormList},setup() {const { t } useI18n()const userSearchFormRef ref()const userSearchFormEntity reactive(new UserSearchFormEntity())userSearchFormEntity.formData.btn.property.btns [{fun: () {},name: t(search),type: primary,icon: search},{fun: () {},name: t(reset),icon: refresh,},]return {userSearchFormRef,userSearchFormEntity};}, }); page/index.vue script langts src./index.ts / templatedivFormListclassregister-info-formrefuserSearchFormRef:fieldsuserSearchFormEntity.formFields:formDatauserSearchFormEntity.formData:rulesuserSearchFormEntity.formRuleslabelWidth120px//div /templatestyle scoped langless/style 总结 如有启发可点赞收藏哟~
http://www.yutouwan.com/news/55980/

相关文章:

  • 档案网站建设的步骤百度风云榜排行榜
  • php网站开发软件是什么产品网站建设方案
  • wordpress 好吗知乎系统优化的意义
  • 响应式网站建设服务商打开备份的wordpress
  • 关于公司网站建设方案收集微商城网站制作
  • 网站建设提成北京外贸网站建设价格
  • 上海专业制作电子商务网站天津建设工程投标信息
  • 云南网站建设小程序开发织梦网站栏目如何做下拉
  • 开发微信微网站建设wordpress回复邮箱
  • 网站管理主要包括哪些内容女孩学电子商务专业好就业吗
  • 自己买个服务器做网站如何购买一个网站的域名
  • 什么是网站交互性30分钟网站建设教程视频
  • 给别人做网站打电话推销外贸流程实训报告
  • 网站建设功能要求有没有专门做中考卷子的网站
  • 网站建设业务开展方案中式风格装修效果图
  • 盘锦做网站电话网站开发自学时间
  • 上海网站建设设计制作横栏建设网站
  • 怎样创建企业网站网站头部导航样式
  • 网站建设需要提供功能目录吗软件前端开发
  • 网站开发需要那些技术人员大兴区制作网站的公司
  • 建设网站需要什么技术支持沈阳网站制作机构
  • 西红柿怎么做网站wordpress 安装中文字体
  • 电商企业网站建设方案网站建设网站制作价格
  • wordpress cms杭州seo公司服务
  • 网站 mssql 数据库app开发需求
  • 贵州住房和城乡建设部网站济南建设设备安装有限责任公司官网
  • wix做中文网站怎么样做网站需要提交
  • 星月网络公司做的网站深圳手机端网站建设设计公司
  • 建设网站需要哪些素材网站图片翻页怎么做
  • 友情链接地址电影网站如何优化