1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view :style="$getStyle(styles)">
- <u-notice-bar :list="list" :type="attrs['type']" :volume-icon="attrs['volume-icon']"
- :more-icon="attrs['more-icon']" :close-icon="attrs['close-icon']" :autoplay="attrs['autoplay']"
- :color="attrs['color']" :bg-color="attrs['bg-color']" :mode="attrs['mode']"
- :show="showNotice && attrs['show']" :volume-size="attrs['volume-size']" :font-size="attrs['font-size']"
- :duration="attrs['duration']" :speed="attrs['speed']" :is-circular="attrs['is-circular']"
- :play-state="attrs['play-state']" :border-radius="attrs['border-radius']"
- :no-list-hidden="attrs['no-list-hidden']" @close="onClose" @getMore="onMore" />
- </view>
- </template>
- <script>
- import Mixin from "../Mixin";
- const _this = this;
- export default {
- name: "SlyNoticeBar",
- mixins: [Mixin],
- data() {
- return {
- list: [],
- showNotice: true
- };
- },
- methods: {
- getList(arr) {
- this.list = arr.map(el => {
- return el.title
- });
- },
- onMore(e) {
- console.log('e = ', e)
- },
- onNetworkRequest() {
- }
- },
- watch: {
- dataLists: {
- handler: function(newList, oldList) {
- this.getList(newList || []);
- },
- deep: true,
- immediate: true
- }
- }
- }
- </script>
- <style lang="scss">
- </style>
|