From 1e61215b48e59e94c1ed98e4ef956227d689d6bc Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Mon, 06 Nov 2023 08:48:39 +0800
Subject: [PATCH] fix:小程序订阅消息
---
uni_modules/uview-ui/components/u-steps/u-steps.vue | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 deletions(-)
diff --git a/uni_modules/uview-ui/components/u-steps/u-steps.vue b/uni_modules/uview-ui/components/u-steps/u-steps.vue
new file mode 100644
index 0000000..3ab7764
--- /dev/null
+++ b/uni_modules/uview-ui/components/u-steps/u-steps.vue
@@ -0,0 +1,80 @@
+<template>
+ <view
+ class="u-steps"
+ :class="[`u-steps--${direction}`]"
+ >
+ <slot></slot>
+ </view>
+</template>
+
+<script>
+ import props from './props.js';
+ /**
+ * Steps ���������
+ * @description ���������������������������������������������������������������������������������������������������
+ * @tutorial https://uviewui.com/components/steps.html
+ * @property {String} direction row-���������column-������ (������ 'row' )
+ * @property {String | Number} current ��������������������������� (������ 0 )
+ * @property {String} activeColor ������������������ (������ '#3c9cff' )
+ * @property {String} inactiveColor ��������������������� (������ '#969799' )
+ * @property {String} activeIcon ���������������������
+ * @property {String} inactiveIcon ���������������������
+ * @property {Boolean} dot ��������������������� (������ false )
+ * @example <u-steps current="0"><u-steps-item title="���������" desc="10:35" ></u-steps-item></u-steps>
+ */
+ export default {
+ name: 'u-steps',
+ mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
+ data() {
+ return {
+ }
+ },
+ watch: {
+ children() {
+ this.updateChildData()
+ },
+ parentData() {
+ this.updateChildData()
+ }
+ },
+ computed: {
+ // ������������������������������watch���������������������������������������������������������������������������
+ parentData() {
+ return [this.current, this.direction, this.activeColor, this.inactiveColor, this.activeIcon, this.inactiveIcon, this.dot]
+ }
+ },
+ methods: {
+ // ������������������������
+ updateChildData() {
+ this.children.map(child => {
+ // ���������������������������������������������
+ uni.$u.test.func((child || {}).updateFromParent()) && child.updateFromParent()
+ })
+ },
+ // ������������������������������������������������������������
+ updateFromChild() {
+ this.updateChildData()
+ }
+ },
+ created() {
+ this.children = []
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ @import "../../libs/css/components.scss";
+
+ .u-steps {
+ @include flex;
+
+ &--column {
+ flex-direction: column
+ }
+
+ &--row {
+ flex-direction: row;
+ flex: 1;
+ }
+ }
+</style>
--
Gitblit v1.8.0