-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
src/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue
@@ -5,6 +5,9 @@
      v-if="show"
   >
      <view
         class="u-toolbar__left"
      >
         <view
         class="u-toolbar__cancel__wrapper"
         hover-class="u-hover-class"
      >
@@ -16,11 +19,16 @@
            }"
         >{{ cancelText }}</text>
      </view>
      </view>
      <text
         class="u-toolbar__title u-line-1"
         v-if="title"
      >{{ title }}</text>
      <view
         class="u-toolbar__right"
      >
         <view
            v-if="!rightSlot"
         class="u-toolbar__confirm__wrapper"
         hover-class="u-hover-class"
      >
@@ -31,6 +39,11 @@
            color: confirmColor
         }"
         >{{ confirmText }}</text>
         </view>
         <template v-else>
            <slot name="right">
            </slot>
         </template>
      </view>
   </view>
</template>
@@ -56,6 +69,9 @@
      name: 'u-toolbar',
      mixins: [mpMixin, mixin, props],
      emits: ["confirm", "cancel"],
      created() {
         // console.log(this.$slots)
      },
      methods: {
         // 点击取消按钮
         cancel() {
@@ -95,6 +111,10 @@
      }
      &__wrapper {
         &__left,
         &__right {
            @include flex;
         }
         &__confirm {
            color: $u-primary;
            font-size: 15px;