From 659d09ec24dab6c451220c8f3bb3943b0fdb3ba1 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 08 Jan 2024 16:16:12 +0800
Subject: [PATCH] fix:地图导航
---
uni_modules/uview-ui/components/u--form/u--form.vue | 78 +++++++++++++++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/uni_modules/uview-ui/components/u--form/u--form.vue b/uni_modules/uview-ui/components/u--form/u--form.vue
new file mode 100644
index 0000000..fdfc212
--- /dev/null
+++ b/uni_modules/uview-ui/components/u--form/u--form.vue
@@ -0,0 +1,78 @@
+<template>
+ <uvForm
+ ref="uForm"
+ :model="model"
+ :rules="rules"
+ :errorType="errorType"
+ :borderBottom="borderBottom"
+ :labelPosition="labelPosition"
+ :labelWidth="labelWidth"
+ :labelAlign="labelAlign"
+ :labelStyle="labelStyle"
+ :customStyle="customStyle"
+ >
+ <slot />
+ </uvForm>
+</template>
+
+<script>
+ /**
+ * ���������������������������������nvue������u-form���uni-app������������������u-form���nvue������������form������
+ * ���������nvue���������������u--form���������������������u-form.vue���������������������������
+ */
+ import uvForm from '../u-form/u-form.vue';
+ import props from '../u-form/props.js'
+ export default {
+ // #ifdef MP-WEIXIN
+ name: 'u-form',
+ // #endif
+ // #ifndef MP-WEIXIN
+ name: 'u--form',
+ // #endif
+ mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
+ components: {
+ uvForm
+ },
+ created() {
+ this.children = []
+ },
+ methods: {
+ // ������������������������������������������������������������������������������������������������������������������������������������
+ setRules(rules) {
+ this.$refs.uForm.setRules(rules)
+ },
+ validate() {
+ /**
+ * ������������������������������this.$parent���������������������u--form������������������������u-form
+ * ���������u-form������������������������������children������������������������������������������������������u-form������������
+ * ������������������������������������������������u--form���children���������u-form������children
+ */
+ // #ifdef MP-WEIXIN
+ this.setMpData()
+ // #endif
+ return this.$refs.uForm.validate()
+ },
+ validateField(value, callback) {
+ // #ifdef MP-WEIXIN
+ this.setMpData()
+ // #endif
+ return this.$refs.uForm.validateField(value, callback)
+ },
+ resetFields() {
+ // #ifdef MP-WEIXIN
+ this.setMpData()
+ // #endif
+ return this.$refs.uForm.resetFields()
+ },
+ clearValidate(props) {
+ // #ifdef MP-WEIXIN
+ this.setMpData()
+ // #endif
+ return this.$refs.uForm.clearValidate(props)
+ },
+ setMpData() {
+ this.$refs.uForm.children = this.children
+ }
+ },
+ }
+</script>
--
Gitblit v1.8.0