<template>
  <view class="dec-notice" :style="{ backgroundColor: arg.bgColor }">
    <view class="wrap" v-if="arg.leftIcon">
      <image
        class="image"
        :src="decImgDomain(arg.leftIcon, 'img-notice.png')"
        mode="heightFix"
      ></image>
    </view>
    <view v-else class="default"></view>
    <view class="list">
      <uni-notice-bar
        v-if="arg.title"
        :speed="50"
        :scrollable="arg.styleArg !== 'static'"
        single="true"
        :text="arg.title"
        :background-color="arg.bgColor"
        :color="arg.color"
      />
    </view>
  </view>
</template>

<script>
export default {
  inject: ["decImgDomain"],
  props: {
    tab: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      arg: null,
      titleChange: false,
      animation: "",
      paddingLeft: "0",
    };
  },
  created() {
    this.arg = this.tab.arg;
  },
};
</script>
