1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
|
{"version":3,"file":"su-notice-bar.js","sources":["../../../../../../src/sheep/ui/su-notice-bar/su-notice-bar.vue"],"sourcesContent":["<!-- 公告栏组件 -->\r\n<template>\r\n <view\r\n v-if=\"show\"\r\n class=\"uni-noticebar\"\r\n :style=\"{ backgroundColor: backgroundColor }\"\r\n @click=\"onClick\"\r\n >\r\n <slot name=\"icon\">\r\n <uni-icons\r\n v-if=\"showIcon === true || showIcon === 'true'\"\r\n class=\"uni-noticebar-icon\"\r\n type=\"sound\"\r\n :color=\"color\"\r\n size=\"22\"\r\n />\r\n </slot>\r\n <view\r\n ref=\"textBox\"\r\n class=\"uni-noticebar__content-wrapper\"\r\n :class=\"{\r\n 'uni-noticebar__content-wrapper--scrollable': scrollable,\r\n 'uni-noticebar__content-wrapper--single': !scrollable && (single || moreText),\r\n }\"\r\n >\r\n <view\r\n :id=\"elIdBox\"\r\n class=\"uni-noticebar__content\"\r\n :class=\"{\r\n 'uni-noticebar__content--scrollable': scrollable,\r\n 'uni-noticebar__content--single': !scrollable && (single || moreText),\r\n }\"\r\n >\r\n <text\r\n :id=\"elId\"\r\n ref=\"animationEle\"\r\n class=\"uni-noticebar__content-text\"\r\n :class=\"{\r\n 'uni-noticebar__content-text--scrollable': scrollable,\r\n 'uni-noticebar__content-text--single': !scrollable && (single || showGetMore),\r\n }\"\r\n :style=\"{\r\n color: color,\r\n width: wrapWidth + 'px',\r\n animationDuration: animationDuration,\r\n '-webkit-animationDuration': animationDuration,\r\n animationPlayState: webviewHide ? 'paused' : animationPlayState,\r\n '-webkit-animationPlayState': webviewHide ? 'paused' : animationPlayState,\r\n animationDelay: animationDelay,\r\n '-webkit-animationDelay': animationDelay,\r\n }\"\r\n >\r\n {{ text }}\r\n </text>\r\n </view>\r\n </view>\r\n <view\r\n v-if=\"showGetMore === true || showGetMore === 'true'\"\r\n class=\"uni-noticebar__more uni-cursor-point\"\r\n @click=\"clickMore\"\r\n >\r\n <text\r\n v-if=\"moreText.length > 0\"\r\n :style=\"{ color: moreColor }\"\r\n class=\"uni-noticebar__more-text\"\r\n >\r\n {{ moreText }}\r\n </text>\r\n <uni-icons v-else type=\"right\" :color=\"moreColor\" size=\"16\" />\r\n </view>\r\n <view\r\n class=\"uni-noticebar-close uni-cursor-point\"\r\n v-if=\"\r\n (showClose === true || showClose === 'true') &&\r\n (showGetMore === false || showGetMore === 'false')\r\n \"\r\n >\r\n <view @click=\"close\">\r\n <slot name=\"close\">\r\n <uni-icons type=\"closeempty\" :color=\"color\" size=\"16\" />\r\n </slot>\r\n </view>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script>\r\nimport sheep from '@/sheep'\r\n// #ifdef APP-NVUE\r\nconst dom = weex.requireModule('dom')\r\nconst animation = weex.requireModule('animation')\r\n// #endif\r\n\r\n/**\r\n * NoticeBar 自定义导航栏\r\n * @description 通告栏组件\r\n * @tutorial https://ext.dcloud.net.cn/plugin?id=30\r\n * @property {Number} speed 文字滚动的速度,默认100px/秒\r\n * @property {String} text 显示文字\r\n * @property {String} backgroundColor 背景颜色\r\n * @property {String} color 文字颜色\r\n * @property {String} moreColor 查看更多文字的颜色\r\n * @property {String} moreText 设置“查看更多”的文本\r\n * @property {Boolean} single = [true|false] 是否单行\r\n * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行\r\n * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标\r\n * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮\r\n * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行\r\n * @even
|