feat: 门票组件封装

This commit is contained in:
duanshuwen
2025-07-15 16:48:32 +08:00
parent b31b04f2e2
commit 591287e757
40 changed files with 420 additions and 50 deletions

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["components/FormCard/index.vue","E:/Program Files/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RDovWUdDaGF0Q1MvY29tcG9uZW50cy9Gb3JtQ2FyZC9pbmRleC52dWU"],"sourcesContent":["<template>\r\n <view class=\"form-wrapper\">\r\n <view class=\"form-header\">\r\n <image class=\"form-icon\" src=\"./images/icon_minus.png\"></image>\r\n <text class=\"form-title\">游客1</text>\r\n </view>\r\n <view class=\"form-item\">\r\n <text class=\"form-label\">姓 名</text>\r\n <input class=\"form-input\" v-model=\"name\" placeholder=\"请输入姓名\" />\r\n </view>\r\n <view class=\"form-item\">\r\n <text class=\"form-label\">手机号</text>\r\n <input\r\n class=\"form-input\"\r\n v-model=\"phone\"\r\n placeholder=\"请输入手机号\"\r\n @blur=\"validatePhone\"\r\n />\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport { ref } from \"vue\";\r\n\r\n// Local state\r\nconst name = ref(\"\");\r\nconst phone = ref(\"\");\r\nconst phoneError = ref(\"\");\r\n\r\n// Methods\r\nconst validatePhone = () => {\r\n const phoneRegex = /^1[3-9]\\d{9}$/;\r\n if (!phone.value) {\r\n phoneError.value = \"手机号不能为空\";\r\n } else if (!phoneRegex.test(phone.value)) {\r\n phoneError.value = \"请输入正确的手机号\";\r\n } else {\r\n phoneError.value = \"\";\r\n }\r\n};\r\n</script>\r\n\r\n<style scoped lang=\"scss\">\r\n@import \"./styles/index.scss\";\r\n</style>\r\n","import Component from 'D:/YGChatCS/components/FormCard/index.vue'\nwx.createComponent(Component)"],"names":["ref"],"mappings":";;;;;;AA0BA,UAAM,OAAOA,cAAAA,IAAI,EAAE;AACnB,UAAM,QAAQA,cAAAA,IAAI,EAAE;AACpB,UAAM,aAAaA,cAAAA,IAAI,EAAE;AAGzB,UAAM,gBAAgB,MAAM;AAC1B,YAAM,aAAa;AACnB,UAAI,CAAC,MAAM,OAAO;AAChB,mBAAW,QAAQ;AAAA,MACpB,WAAU,CAAC,WAAW,KAAK,MAAM,KAAK,GAAG;AACxC,mBAAW,QAAQ;AAAA,MACvB,OAAS;AACL,mBAAW,QAAQ;AAAA,MACpB;AAAA,IACH;;;;;;;;;;;;;;ACvCA,GAAG,gBAAgB,SAAS;"}