dolphin-weex-ui 2.2.6 → 2.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.web.js
CHANGED
|
@@ -664,6 +664,11 @@ var Utils = {
|
|
|
664
664
|
|
|
665
665
|
return (typeof window === 'undefined' ? 'undefined' : _typeof2(window)) === 'object' && platform.toLowerCase() === 'web';
|
|
666
666
|
},
|
|
667
|
+
isHarmony: function isHarmony() {
|
|
668
|
+
var platform = weex.config.env.platform;
|
|
669
|
+
|
|
670
|
+
return platform.toLowerCase() === 'harmony';
|
|
671
|
+
},
|
|
667
672
|
isIOS: function isIOS() {
|
|
668
673
|
var platform = weex.config.env.platform;
|
|
669
674
|
|
|
@@ -9605,7 +9610,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9605
9610
|
|
|
9606
9611
|
|
|
9607
9612
|
// module
|
|
9608
|
-
exports.push([module.i, "\n.bottom-border[data-v-f607d5d2] {\n border-bottom-width: 1px;\n border-color: #e5e5e8;\n}\n.dof-minibar[data-v-f607d5d2] {\n width: 10rem;\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: inline-flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n}\n.isFixed[data-v-f607d5d2] {\n position: fixed;\n top: 0;\n left: 0;\n}\n.left[data-v-f607d5d2] {\n width: 2.13333rem;\n /* width: 64px; */\n height: 1.17333rem;\n padding-left: 0.42667rem;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n /* margin-right: 12px; */\n}\n.middle-title-wrapper[data-v-f607d5d2] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.middle-title[data-v-f607d5d2] {\n font-family: PingFangSC-Medium;\n /* width: 390px; */\n lines: 1;\n text-overflow: ellipsis;\n font-size: 0.42667rem;\n text-align: center;\n letter-spacing: 0;\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.middle-sub-title[data-v-f607d5d2] {\n font-family: PingFangSC-Medium;\n width: 5.2rem;\n lines: 1;\n text-overflow: ellipsis;\n font-size: 0.26667rem;\n text-align: center;\n letter-spacing: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.right[data-v-f607d5d2] {\n width: 2.13333rem;\n /* width: 84px; */\n min-width: 1.12rem;\n height: 1.17333rem;\n padding-right: 0.42667rem;\n -webkit-box-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.left-button[data-v-f607d5d2] {\n width: 0.77333rem;\n height: 0.77333rem;\n}\n.right-button[data-v-f607d5d2] {\n width: 0.77333rem;\n height: 0.77333rem;\n}\n.icon-text[data-v-f607d5d2] {\n font-size: 0.37333rem;\n color: #111111;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-minibar/index.vue?5d738ae9","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-minibar/<no source>"],"names":[],"mappings":";AAgEA;EACA,yBAAA;EACA,sBAAA;CACA;AACA;EACA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,qBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,uCAAA;UAAA,+BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;CACA;AACA;EACA,gBAAA;EACA,OAAA;EACA,QAAA;CACA;AAEA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,yBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,yBAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AACA;EACA,+BAAA;EACA,mBAAA;EACA,SAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;ECxGA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDyGA;AACA;EACA,+BAAA;EACA,cAAA;EACA,SAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;ECjHA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDkHA;AAEA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EAAA,8BAAA;UAAA,sBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,sBAAA;EACA,eAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div\n :class=\"['minibar-wrapper', hasBottomBorder && 'bottom-border', isFixed && 'isFixed']\"\n :style=\"{ 'background-color': backgroundColor_ }\"\n :key=\"_isColmo + 'minibar'\"\n >\n <div class=\"dof-minibar\" :style=\"newBarStyle\">\n <div class=\"left\" @click=\"leftButtonClicked\" :aria-label=\"leftButtonBlindHelp\" :accessible=\"true\">\n <slot name=\"left\">\n <image :src=\"leftButton_\" v-if=\"leftButton_ && !leftText\" class=\"left-button\"></image>\n <dof-iconfont\n style=\"width: 58px;\"\n v-if=\"!leftButton_ && !leftText && _isColmo\"\n :code=\"'\\u4717'\"\n :size=\"64\"\n :color=\"'rgba(255,255,255,0.80)'\"\n @dofIconFontClicked=\"leftButtonClicked\"\n ></dof-iconfont>\n <text v-if=\"leftText\" class=\"icon-text\" :style=\"newTextStyle\">{{ leftText }}</text>\n </slot>\n </div>\n <slot name=\"middle\">\n <div class=\"middle-title-wrapper\">\n <text class=\"middle-title\" :style=\"newTextWrapStyle\" :aria-label=\"title ? title + '。文本。' : ''\">{{\n title\n }}</text>\n <text\n v-if=\"subTitle\"\n class=\"middle-sub-title\"\n :aria-label=\"subTitle ? subTitle + '。文本。' : ''\"\n :style=\"newTextWrapStyleSubTitle\"\n >{{ subTitle }}</text\n >\n </div>\n </slot>\n <div class=\"right\" @click=\"rightButtonClicked\">\n <slot name=\"right\">\n <image\n v-if=\"rightButton_ && rightButton_ !== 'default' && !rightText\"\n class=\"right-button\"\n :src=\"rightButton_\"\n :aria-hidden=\"true\"\n ></image>\n <dof-iconfont\n class=\"right-button\"\n v-if=\"rightButton_ === 'default' && _isColmo && !rightText\"\n :code=\"'\\u4807'\"\n :size=\"64\"\n @dofIconFontClicked=\"rightButtonClicked\"\n ></dof-iconfont>\n <text\n v-if=\"rightText\"\n class=\"icon-text\"\n :aria-label=\"rightText ? rightText + '。按钮。' : ''\"\n :style=\"newTextStyle\"\n >{{ rightText }}</text\n >\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.bottom-border {\n border-bottom-width: 1px;\n border-color: #e5e5e8;\n}\n.dof-minibar {\n width: 750px;\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: stretch;\n}\n.isFixed {\n position: fixed;\n top: 0;\n left: 0;\n}\n\n.left {\n width: 160px;\n /* width: 64px; */\n height: 88px;\n padding-left: 32px;\n justify-content: center;\n /* margin-right: 12px; */\n}\n\n.middle-title-wrapper {\n flex: 1;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.middle-title {\n font-family: PingFangSC-Medium;\n /* width: 390px; */\n lines: 1;\n text-overflow: ellipsis;\n font-size: 32px;\n text-align: center;\n letter-spacing: 0;\n font-weight: 600;\n}\n.middle-sub-title {\n font-family: PingFangSC-Medium;\n width: 390px;\n lines: 1;\n text-overflow: ellipsis;\n font-size: 20px;\n text-align: center;\n letter-spacing: 0;\n}\n\n.right {\n width: 160px;\n /* width: 84px; */\n min-width: 84px;\n height: 88px;\n padding-right: 32px;\n align-items: flex-end;\n justify-content: center;\n}\n\n.left-button {\n width: 58px;\n height: 58px;\n}\n\n.right-button {\n width: 58px;\n height: 58px;\n}\n\n.icon-text {\n font-size: 28px;\n color: #111111;\n}\n</style>\n<style src=\"./colmo.css\"></style>\n\n<script>\nconst Navigator = weex.requireModule('navigator')\nconst platform = weex.config.env.platform.toLowerCase()\nimport Utils from '../utils'\nimport { back_black as backBlack, back_white as backWhite, icon_more as iconMore } from '../setting/icon.base64'\nimport { STYLE_MAP } from './style'\nimport DofIconfont from '../dof-iconfont'\nimport ColmoMixin from '../../mixins/colmo'\nexport default {\n components: { DofIconfont },\n mixins: [ColmoMixin],\n props: {\n isFixed: {\n type: Boolean,\n default: false\n },\n isImmersion: {\n type: Boolean,\n default: true\n },\n backgroundColor: {\n type: String,\n default: ''\n },\n hasBottomBorder: {\n type: Boolean,\n default: false\n },\n leftButton: {\n type: String,\n default: ''\n },\n textColor: {\n type: String,\n default: ''\n },\n rightButton: {\n type: String,\n default: ''\n },\n title: {\n type: String,\n default: '标题'\n },\n subTitle: {\n type: String,\n default: ''\n },\n leftText: {\n type: String,\n default: ''\n },\n rightText: {\n type: String,\n default: ''\n },\n useDefaultReturn: {\n type: Boolean,\n default: true\n },\n show: {\n type: Boolean,\n default: true\n },\n barStyle: {\n type: Object\n },\n middleTextStyle: {\n type: Object\n }\n },\n created() {\n this.isIPhoneX = Utils.env.isIPhoneX()\n },\n computed: {\n themeStyle() {\n const _theme = this._theme || 'default'\n return STYLE_MAP[_theme] || {}\n },\n backgroundColor_() {\n return this.backgroundColor ? this.backgroundColor : this.themeStyle.backgroundColor\n },\n leftButton_() {\n return this.leftButton ? this.leftButton : !this._isColmo ? backBlack : ''\n },\n rightButton_() {\n if (this.rightButton === 'default') {\n return this._isColmo ? 'default' : iconMore\n }\n return this.rightButton ? this.rightButton : ''\n },\n leftButtonBlindHelp() {\n return `${this.leftText || '返回'}。按钮。`\n },\n statusBarHeight: function() {\n let result = '20'\n if (weex.config.env.statusBarHeight) {\n if (weex.config.env.platform === 'iOS') {\n // iOS使用pt为单位\n result = weex.config.env.statusBarHeight\n } else {\n // 安卓使用px为单位\n result = weex.config.env.statusBarHeight / weex.config.env.scale\n }\n }\n return result\n },\n newBarStyle() {\n let result\n const { barStyle, backgroundColor_ } = this\n const backgroundColor = backgroundColor_\n let isIPhoneSE = weex.config.env.deviceModel.substr(6) === '12,8'\n // harmony\n if (Utils.env.isWeb())\n return {\n backgroundColor,\n height: '44wx',\n 'padding-top': '20wx',\n ...barStyle\n }\n\n if (this.isImmersion) {\n // 全屏显示,weex自行处理状态栏高度\n result = {\n backgroundColor,\n paddingTop: (isIPhoneSE ? 20 : this.statusBarHeight) + 'wx',\n // height: +this.statusBarHeight + 44 + 'wx',\n ...barStyle\n }\n } else {\n // 非全屏显示,app已处理状态栏高度\n result = {\n backgroundColor,\n height: '44wx',\n ...barStyle\n }\n }\n return result\n },\n newTextWrapStyle() {\n if (this.textColor) {\n return {\n color: this.textColor,\n ...this.middleTextStyle\n }\n } else {\n return {\n color: this.themeStyle.middleTitleColor,\n ...this.middleTextStyle\n }\n }\n },\n newTextWrapStyleSubTitle() {\n if (this.textColor) {\n return {\n color: this.textColor\n }\n } else {\n return {\n color: this.themeStyle.middleSubTitleColor,\n ...this.middleTextStyle\n }\n }\n },\n newTextStyle() {\n if (this.textColor) {\n return {\n color: this.textColor,\n marginLeft: '0px'\n }\n }\n return {}\n }\n },\n methods: {\n leftButtonClicked() {\n if (this.useDefaultReturn) {\n Navigator.pop({}, e => {})\n }\n this.$emit('dofMinibarLeftButtonClicked', {})\n },\n rightButtonClicked() {\n const hasRightContent = this.rightText || this.rightButton || (this.$slots && this.$slots.right)\n hasRightContent && this.$emit('dofMinibarRightButtonClicked', {})\n }\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9613
|
+
exports.push([module.i, "\n.bottom-border[data-v-f607d5d2] {\n border-bottom-width: 1px;\n border-color: #e5e5e8;\n}\n.dof-minibar[data-v-f607d5d2] {\n width: 10rem;\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: inline-flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n -webkit-box-align: stretch;\n -webkit-align-items: stretch;\n align-items: stretch;\n}\n.isFixed[data-v-f607d5d2] {\n position: fixed;\n top: 0;\n left: 0;\n}\n.left[data-v-f607d5d2] {\n width: 2.13333rem;\n /* width: 64px; */\n height: 1.17333rem;\n padding-left: 0.42667rem;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n /* margin-right: 12px; */\n}\n.middle-title-wrapper[data-v-f607d5d2] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.middle-title[data-v-f607d5d2] {\n font-family: PingFangSC-Medium;\n /* width: 390px; */\n lines: 1;\n text-overflow: ellipsis;\n font-size: 0.42667rem;\n text-align: center;\n letter-spacing: 0;\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.middle-sub-title[data-v-f607d5d2] {\n font-family: PingFangSC-Medium;\n width: 5.2rem;\n lines: 1;\n text-overflow: ellipsis;\n font-size: 0.26667rem;\n text-align: center;\n letter-spacing: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.right[data-v-f607d5d2] {\n width: 2.13333rem;\n /* width: 84px; */\n min-width: 1.12rem;\n height: 1.17333rem;\n padding-right: 0.42667rem;\n -webkit-box-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.left-button[data-v-f607d5d2] {\n width: 0.77333rem;\n height: 0.77333rem;\n}\n.right-button[data-v-f607d5d2] {\n width: 0.77333rem;\n height: 0.77333rem;\n}\n.icon-text[data-v-f607d5d2] {\n font-size: 0.37333rem;\n color: #111111;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-minibar/index.vue?8ec503ca","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-minibar/<no source>"],"names":[],"mappings":";AAgEA;EACA,yBAAA;EACA,sBAAA;CACA;AACA;EACA,aAAA;EACA,4BAAA;EAAA,6BAAA;EAAA,qBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,uCAAA;UAAA,+BAAA;EACA,2BAAA;EAAA,6BAAA;UAAA,qBAAA;CACA;AACA;EACA,gBAAA;EACA,OAAA;EACA,QAAA;CACA;AAEA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,yBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,yBAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AACA;EACA,+BAAA;EACA,mBAAA;EACA,SAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;ECxGA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDyGA;AACA;EACA,+BAAA;EACA,cAAA;EACA,SAAA;EACA,wBAAA;EACA,sBAAA;EACA,mBAAA;EACA,kBAAA;ECjHA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDkHA;AAEA;EACA,kBAAA;EACA,kBAAA;EACA,mBAAA;EACA,mBAAA;EACA,0BAAA;EACA,uBAAA;EAAA,8BAAA;UAAA,sBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,sBAAA;EACA,eAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div\n :class=\"['minibar-wrapper', hasBottomBorder && 'bottom-border', isFixed && 'isFixed']\"\n :style=\"{ 'background-color': backgroundColor_ }\"\n :key=\"_isColmo + 'minibar'\"\n >\n <div class=\"dof-minibar\" :style=\"newBarStyle\">\n <div class=\"left\" @click=\"leftButtonClicked\" :aria-label=\"leftButtonBlindHelp\" :accessible=\"true\">\n <slot name=\"left\">\n <image :src=\"leftButton_\" v-if=\"leftButton_ && !leftText\" class=\"left-button\"></image>\n <dof-iconfont\n style=\"width: 58px;\"\n v-if=\"!leftButton_ && !leftText && _isColmo\"\n :code=\"'\\u4717'\"\n :size=\"64\"\n :color=\"'rgba(255,255,255,0.80)'\"\n @dofIconFontClicked=\"leftButtonClicked\"\n ></dof-iconfont>\n <text v-if=\"leftText\" class=\"icon-text\" :style=\"newTextStyle\">{{ leftText }}</text>\n </slot>\n </div>\n <slot name=\"middle\">\n <div class=\"middle-title-wrapper\">\n <text class=\"middle-title\" :style=\"newTextWrapStyle\" :aria-label=\"title ? title + '。文本。' : ''\">{{\n title\n }}</text>\n <text\n v-if=\"subTitle\"\n class=\"middle-sub-title\"\n :aria-label=\"subTitle ? subTitle + '。文本。' : ''\"\n :style=\"newTextWrapStyleSubTitle\"\n >{{ subTitle }}</text\n >\n </div>\n </slot>\n <div class=\"right\" @click=\"rightButtonClicked\">\n <slot name=\"right\">\n <image\n v-if=\"rightButton_ && rightButton_ !== 'default' && !rightText\"\n class=\"right-button\"\n :src=\"rightButton_\"\n :aria-hidden=\"true\"\n ></image>\n <dof-iconfont\n class=\"right-button\"\n v-if=\"rightButton_ === 'default' && _isColmo && !rightText\"\n :code=\"'\\u4807'\"\n :size=\"64\"\n @dofIconFontClicked=\"rightButtonClicked\"\n ></dof-iconfont>\n <text\n v-if=\"rightText\"\n class=\"icon-text\"\n :aria-label=\"rightText ? rightText + '。按钮。' : ''\"\n :style=\"newTextStyle\"\n >{{ rightText }}</text\n >\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.bottom-border {\n border-bottom-width: 1px;\n border-color: #e5e5e8;\n}\n.dof-minibar {\n width: 750px;\n display: inline-flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: stretch;\n}\n.isFixed {\n position: fixed;\n top: 0;\n left: 0;\n}\n\n.left {\n width: 160px;\n /* width: 64px; */\n height: 88px;\n padding-left: 32px;\n justify-content: center;\n /* margin-right: 12px; */\n}\n\n.middle-title-wrapper {\n flex: 1;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n.middle-title {\n font-family: PingFangSC-Medium;\n /* width: 390px; */\n lines: 1;\n text-overflow: ellipsis;\n font-size: 32px;\n text-align: center;\n letter-spacing: 0;\n font-weight: 600;\n}\n.middle-sub-title {\n font-family: PingFangSC-Medium;\n width: 390px;\n lines: 1;\n text-overflow: ellipsis;\n font-size: 20px;\n text-align: center;\n letter-spacing: 0;\n}\n\n.right {\n width: 160px;\n /* width: 84px; */\n min-width: 84px;\n height: 88px;\n padding-right: 32px;\n align-items: flex-end;\n justify-content: center;\n}\n\n.left-button {\n width: 58px;\n height: 58px;\n}\n\n.right-button {\n width: 58px;\n height: 58px;\n}\n\n.icon-text {\n font-size: 28px;\n color: #111111;\n}\n</style>\n<style src=\"./colmo.css\"></style>\n\n<script>\nconst Navigator = weex.requireModule('navigator')\nconst platform = weex.config.env.platform.toLowerCase()\nimport Utils from '../utils'\nimport { back_black as backBlack, back_white as backWhite, icon_more as iconMore } from '../setting/icon.base64'\nimport { STYLE_MAP } from './style'\nimport DofIconfont from '../dof-iconfont'\nimport ColmoMixin from '../../mixins/colmo'\nexport default {\n components: { DofIconfont },\n mixins: [ColmoMixin],\n props: {\n isFixed: {\n type: Boolean,\n default: false\n },\n isImmersion: {\n type: Boolean,\n default: true\n },\n backgroundColor: {\n type: String,\n default: ''\n },\n hasBottomBorder: {\n type: Boolean,\n default: false\n },\n leftButton: {\n type: String,\n default: ''\n },\n textColor: {\n type: String,\n default: ''\n },\n rightButton: {\n type: String,\n default: ''\n },\n title: {\n type: String,\n default: '标题'\n },\n subTitle: {\n type: String,\n default: ''\n },\n leftText: {\n type: String,\n default: ''\n },\n rightText: {\n type: String,\n default: ''\n },\n useDefaultReturn: {\n type: Boolean,\n default: true\n },\n show: {\n type: Boolean,\n default: true\n },\n barStyle: {\n type: Object\n },\n middleTextStyle: {\n type: Object\n }\n },\n created() {\n this.isIPhoneX = Utils.env.isIPhoneX()\n },\n computed: {\n themeStyle() {\n const _theme = this._theme || 'default'\n return STYLE_MAP[_theme] || {}\n },\n backgroundColor_() {\n return this.backgroundColor ? this.backgroundColor : this.themeStyle.backgroundColor\n },\n leftButton_() {\n return this.leftButton ? this.leftButton : !this._isColmo ? backBlack : ''\n },\n rightButton_() {\n if (this.rightButton === 'default') {\n return this._isColmo ? 'default' : iconMore\n }\n return this.rightButton ? this.rightButton : ''\n },\n leftButtonBlindHelp() {\n return `${this.leftText || '返回'}。按钮。`\n },\n statusBarHeight: function() {\n let result = '20'\n if (weex.config.env.statusBarHeight) {\n if (weex.config.env.platform === 'iOS') {\n // iOS使用pt为单位\n result = weex.config.env.statusBarHeight\n } else {\n // 安卓使用px为单位\n result = weex.config.env.statusBarHeight / weex.config.env.scale\n }\n }\n return result\n },\n newBarStyle() {\n let result\n const { barStyle, backgroundColor_ } = this\n const backgroundColor = backgroundColor_\n let isIPhoneSE = weex.config.env.deviceModel.substr(6) === '12,8'\n // harmony\n if (Utils.env.isHarmony())\n return {\n backgroundColor,\n height: '44wx',\n 'padding-top': '20wx',\n ...barStyle\n }\n\n if (this.isImmersion) {\n // 全屏显示,weex自行处理状态栏高度\n result = {\n backgroundColor,\n paddingTop: (isIPhoneSE ? 20 : this.statusBarHeight) + 'wx',\n // height: +this.statusBarHeight + 44 + 'wx',\n ...barStyle\n }\n } else {\n // 非全屏显示,app已处理状态栏高度\n result = {\n backgroundColor,\n height: '44wx',\n ...barStyle\n }\n }\n return result\n },\n newTextWrapStyle() {\n if (this.textColor) {\n return {\n color: this.textColor,\n ...this.middleTextStyle\n }\n } else {\n return {\n color: this.themeStyle.middleTitleColor,\n ...this.middleTextStyle\n }\n }\n },\n newTextWrapStyleSubTitle() {\n if (this.textColor) {\n return {\n color: this.textColor\n }\n } else {\n return {\n color: this.themeStyle.middleSubTitleColor,\n ...this.middleTextStyle\n }\n }\n },\n newTextStyle() {\n if (this.textColor) {\n return {\n color: this.textColor,\n marginLeft: '0px'\n }\n }\n return {}\n }\n },\n methods: {\n leftButtonClicked() {\n if (this.useDefaultReturn) {\n Navigator.pop({}, e => {})\n }\n this.$emit('dofMinibarLeftButtonClicked', {})\n },\n rightButtonClicked() {\n const hasRightContent = this.rightText || this.rightButton || (this.$slots && this.$slots.right)\n hasRightContent && this.$emit('dofMinibarRightButtonClicked', {})\n }\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9609
9614
|
|
|
9610
9615
|
// exports
|
|
9611
9616
|
|
|
@@ -19950,7 +19955,7 @@ exports.default = {
|
|
|
19950
19955
|
var backgroundColor = backgroundColor_;
|
|
19951
19956
|
var isIPhoneSE = weex.config.env.deviceModel.substr(6) === '12,8';
|
|
19952
19957
|
// harmony
|
|
19953
|
-
if (_utils2.default.env.
|
|
19958
|
+
if (_utils2.default.env.isHarmony()) return _extends({
|
|
19954
19959
|
backgroundColor: backgroundColor,
|
|
19955
19960
|
height: '44wx',
|
|
19956
19961
|
'padding-top': '20wx'
|