dolphin-weex-ui 2.4.21 → 2.4.23
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/CHANGELOG.md +10 -0
- package/dist/index.native.js +105 -20
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.js +108 -26
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
- package/packages/dof-card/index.vue +14 -1
- package/packages/dof-checkbox/index.vue +12 -0
- package/packages/dof-collapse-item/index.vue +14 -0
- package/packages/dof-gear/index.vue +2 -1
- package/packages/dof-result/index.vue +21 -4
- package/packages/dof-slider-scale/index.vue +2 -1
- package/packages/utils/dom.js +4 -5
- package/packages/utils/index.js +15 -0
- package/packages/dof-actionsheet/dist/index.dev.js +0 -15
package/dist/index.web.js
CHANGED
|
@@ -904,6 +904,21 @@ var Utils = {
|
|
|
904
904
|
}
|
|
905
905
|
return false;
|
|
906
906
|
},
|
|
907
|
+
toNum: function toNum(a) {
|
|
908
|
+
a = a.toString();
|
|
909
|
+
var c = a.split('.');
|
|
910
|
+
var r = ['0000', '000', '00', '0', ''];
|
|
911
|
+
for (var i = 0; i < c.length; i++) {
|
|
912
|
+
var len = c[i].length;
|
|
913
|
+
c[i] = r[len] + c[i];
|
|
914
|
+
}
|
|
915
|
+
var res = c.join('');
|
|
916
|
+
return res;
|
|
917
|
+
},
|
|
918
|
+
compareVersionNew: function compareVersionNew(a) {
|
|
919
|
+
// 判断当前版本是否大于等于比较的版本
|
|
920
|
+
return this.toNum(weex.config.env.appVersion) >= this.toNum(a);
|
|
921
|
+
},
|
|
907
922
|
|
|
908
923
|
/**
|
|
909
924
|
* 分割数组
|
|
@@ -2669,21 +2684,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2669
2684
|
exports.getBoundingClientRectBase = getBoundingClientRectBase;
|
|
2670
2685
|
exports.getBoundingClientRect = getBoundingClientRect;
|
|
2671
2686
|
exports.getBoundingClientRectAsync = getBoundingClientRectAsync;
|
|
2672
|
-
var
|
|
2673
|
-
|
|
2674
|
-
function getBoundingClientRectBase(element, func) {
|
|
2687
|
+
var domModule = weex.requireModule('dom');
|
|
2688
|
+
function getBoundingClientRectBase(dom, element, func) {
|
|
2675
2689
|
dom && dom.getComponentRect(element, func);
|
|
2676
2690
|
}
|
|
2677
2691
|
|
|
2678
|
-
function getBoundingClientRect(element, func) {
|
|
2679
|
-
var delay = arguments.length >
|
|
2692
|
+
function getBoundingClientRect(dom, element, func) {
|
|
2693
|
+
var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 50;
|
|
2680
2694
|
|
|
2681
2695
|
setTimeout(function () {
|
|
2682
2696
|
return dom && dom.getComponentRect(element, func);
|
|
2683
2697
|
}, delay);
|
|
2684
2698
|
}
|
|
2685
2699
|
|
|
2686
|
-
function getBoundingClientRectAsync(element) {
|
|
2700
|
+
function getBoundingClientRectAsync(dom, element) {
|
|
2687
2701
|
return new Promise(function (resolve) {
|
|
2688
2702
|
setTimeout(function () {
|
|
2689
2703
|
return dom && dom.getComponentRect(element, function (res) {
|
|
@@ -8068,7 +8082,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8068
8082
|
|
|
8069
8083
|
|
|
8070
8084
|
// module
|
|
8071
|
-
exports.push([module.i, "\n.title[data-v-1425952e] {\n padding: 0 0.42667rem;\n}\n.dof-collapse-item-content[data-v-1425952e] {\n background-color: #fff;\n}\n/* .title:active {\n background-color: #fff;\n} */\n.title-box[data-v-1425952e] {\n display: -webkit-box;\n display: -webkit-flex;\n display: 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 /* padding-right: 16px; */\n height: 1.65333rem;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.bottom-line[data-v-1425952e] {\n border-bottom-color: #dddddd;\n border-bottom-style: solid;\n border-bottom-width: 0.02667rem;\n}\n.title-text[data-v-1425952e] {\n height: 1.38667rem;\n line-height: 1.38667rem;\n font-size: 0.42667rem;\n color: #1e2e37;\n}\n.dof-header-arrow-box[data-v-1425952e] {\n height: 1.38667rem;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.dof-header-arrow[data-v-1425952e] {\n width: 0.53333rem;\n height: 0.53333rem;\n margin-left: 0px;\n /* margin-right: 24px; */\n /* margin-top: 12px; */\n right: -0.10667rem;\n margin-bottom: 0.16rem;\n}\n.dof-item-body[data-v-1425952e] {\n position: relative;\n overflow: hidden;\n background-color: #f9f9f9;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-collapse-item/index.vue?
|
|
8085
|
+
exports.push([module.i, "\n.title[data-v-1425952e] {\n padding: 0 0.42667rem;\n}\n.dof-collapse-item-content[data-v-1425952e] {\n background-color: #fff;\n}\n/* .title:active {\n background-color: #fff;\n} */\n.title-box[data-v-1425952e] {\n display: -webkit-box;\n display: -webkit-flex;\n display: 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 /* padding-right: 16px; */\n height: 1.65333rem;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.bottom-line[data-v-1425952e] {\n border-bottom-color: #dddddd;\n border-bottom-style: solid;\n border-bottom-width: 0.02667rem;\n}\n.title-text[data-v-1425952e] {\n height: 1.38667rem;\n line-height: 1.38667rem;\n font-size: 0.42667rem;\n color: #1e2e37;\n}\n.dof-header-arrow-box[data-v-1425952e] {\n height: 1.38667rem;\n display: -webkit-box;\n display: -webkit-flex;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.dof-header-arrow[data-v-1425952e] {\n width: 0.53333rem;\n height: 0.53333rem;\n margin-left: 0px;\n /* margin-right: 24px; */\n /* margin-top: 12px; */\n right: -0.10667rem;\n margin-bottom: 0.16rem;\n}\n.dof-item-body[data-v-1425952e] {\n position: relative;\n overflow: hidden;\n background-color: #f9f9f9;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-collapse-item/index.vue?2dccc4d5"],"names":[],"mappings":";AAmLA;EACA,sBAAA;CACA;AACA;EACA,uBAAA;CACA;AACA;;IAEA;AAEA;EACA,qBAAA;EAAA,sBAAA;EAAA,cAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,uCAAA;UAAA,+BAAA;EACA,0BAAA;EACA,mBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AAEA;EACA,6BAAA;EACA,2BAAA;EACA,gCAAA;CACA;AAEA;EACA,mBAAA;EACA,wBAAA;EACA,sBAAA;EACA,eAAA;CACA;AAEA;EACA,mBAAA;EACA,qBAAA;EAAA,sBAAA;EAAA,cAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;EACA,iBAAA;EACA,yBAAA;EACA,uBAAA;EACA,mBAAA;EACA,uBAAA;CACA;AAEA;EACA,mBAAA;EACA,iBAAA;EACA,0BAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"dof-collapse-item\">\n <div class=\"dof-collapse-item-content\">\n <div\n class=\"title\"\n @click=\"onCollapseHandler\"\n :style=\"{\n 'backgroundColor:active': _isColmo ? 'rgba(255,255,255,0.14)' : _isDiablo ? '#1d1f21' : '#fff'\n }\"\n >\n <div :class=\"['title-box', collapsed_ ? 'bottom-line' : '']\">\n <slot name=\"title\"></slot>\n <div class=\"dof-header-arrow-box\">\n <slot name=\"desc\"></slot>\n <dof-iconfont\n v-if=\"_isColmo\"\n ref=\"arrow\"\n :code=\"'\\u4814'\"\n :size=\"48\"\n :color=\"'rgba(255,255,255,0.8)'\"\n @dofIconFontClicked=\"onCollapseHandler\"\n ></dof-iconfont>\n <image v-else ref=\"arrow\" class=\"dof-header-arrow\" :src=\"arrowUp\"></image>\n </div>\n </div>\n </div>\n </div>\n <div ref=\"slotBody\" class=\"dof-item-body\">\n <slot></slot>\n </div>\n </div>\n</template>\n\n<script>\nimport DofIconfont from '../dof-iconfont'\nimport { Transition } from '../utils/transition.js'\nimport { getBoundingClientRect } from '../utils/dom.js'\nimport arrowUp from './imgs/arrow_up'\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\n\nexport default {\n mixins: [ColmoMixin, DiabloMixin],\n components: { DofIconfont },\n inject: ['_activeData'],\n props: {\n collapsed: {\n type: Boolean,\n default: true\n },\n name: {\n type: Number,\n default: 1\n }\n },\n data() {\n return {\n collapsed_: this.collapsed,\n bodyHeight: 0,\n activeName: 0,\n arrowUp\n }\n },\n created() {},\n mounted() {\n this.$nextTick(() => {\n const dom = weex.requireModule('dom')\n getBoundingClientRect(\n dom,\n this.$refs.slotBody,\n res => {\n if (res.result) {\n this.bodyHeight = res.size.height\n }\n if (this.collapsed_) {\n this.collapseBody(0)\n }\n },\n 0\n )\n })\n if (this.collapsed_) {\n this.collapseArrow(0)\n }\n },\n computed: {\n accordion() {\n return this._activeData.accordion\n },\n isHarmony() {\n return weex.config.env.platform == 'harmony'\n }\n },\n watch: {\n _activeData: {\n handler(newValue, oldValue) {\n this.activeName = newValue._activeName\n if (newValue._activeName != -1) {\n //手风琴\n if (newValue._activeName == 0) {\n this.collapseBody()\n this.collapseArrow()\n this.collapsed_ = true\n } else {\n if (newValue._activeName != this.name) {\n this.collapseBody()\n this.collapseArrow()\n this.collapsed_ = true\n } else {\n if (this.collapsed_) {\n this.collapseBody()\n this.collapseArrow()\n } else {\n this.expandeBody()\n this.expandeArrow()\n }\n }\n }\n }\n },\n deep: true,\n immediate: true\n }\n },\n methods: {\n onCollapseHandler() {\n if (this.isHarmony) {\n if (this.clickLock) return\n this.clickLock = true\n }\n this.collapsed_ = !this.collapsed_\n //手风琴-发送通知\n this.$parent.collapseClick({ collapsed: this.collapsed_, name: this.name })\n if (!this.accordion) {\n if (this.collapsed_) {\n this.collapseBody()\n this.collapseArrow()\n } else {\n this.expandeBody()\n this.expandeArrow()\n }\n }\n if (this.isHarmony) {\n setTimeout(() => {\n this.clickLock = false\n }, 100)\n }\n },\n collapseBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(0)\n .needLayout(true)\n .run(this.$refs.slotBody)\n },\n collapseArrow() {\n Transition.Default()\n .rotateZ(-180)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n },\n expandeBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(this.bodyHeight)\n .needLayout(true)\n .run(this.$refs.slotBody)\n },\n expandeArrow() {\n Transition.Default()\n .rotateZ(0)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n }\n }\n}\n</script>\n\n<style scoped>\n.title {\n padding: 0 32px;\n}\n.dof-collapse-item-content {\n background-color: #fff;\n}\n/* .title:active {\n background-color: #fff;\n} */\n\n.title-box {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n /* padding-right: 16px; */\n height: 124px;\n align-items: center;\n}\n\n.bottom-line {\n border-bottom-color: #dddddd;\n border-bottom-style: solid;\n border-bottom-width: 2px;\n}\n\n.title-text {\n height: 104px;\n line-height: 104px;\n font-size: 32px;\n color: #1e2e37;\n}\n\n.dof-header-arrow-box {\n height: 104px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.dof-header-arrow {\n width: 40px;\n height: 40px;\n margin-left: 0px;\n /* margin-right: 24px; */\n /* margin-top: 12px; */\n right: -8px;\n margin-bottom: 12px;\n}\n\n.dof-item-body {\n position: relative;\n overflow: hidden;\n background-color: #f9f9f9;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n<style scoped src=\"./diablo.css\"></style>\n"],"sourceRoot":""}]);
|
|
8072
8086
|
|
|
8073
8087
|
// exports
|
|
8074
8088
|
|
|
@@ -8264,7 +8278,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8264
8278
|
|
|
8265
8279
|
|
|
8266
8280
|
// module
|
|
8267
|
-
exports.push([module.i, "\n.dof-gear[data-v-225d914a] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n}\n.dof-gear-gap[data-v-225d914a] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n height: 1px;\n}\n.dof-gear-item[data-v-225d914a] {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.dof-gear-item-anchor[data-v-225d914a] {\n width: 0.53333rem;\n height: 0.26667rem;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n overflow: hidden;\n border-top-left-radius: 0.05333rem;\n border-top-right-radius: 0.05333rem;\n}\n.dof-gear-item-anchor-angle[data-v-225d914a] {\n width: 0.37712rem;\n height: 0.37712rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: translateY(-0.18856rem) rotateZ(45deg);\n transform: translateY(-0.18856rem) rotateZ(45deg);\n}\n.dof-gear-item-track[data-v-225d914a] {\n position: relative;\n}\n.dof-gear-item-bar[data-v-225d914a] {\n position: absolute;\n bottom: 0;\n}\n.dof-gear-item-gear[data-v-225d914a] {\n margin-top: 0.21333rem;\n font-size: 0.32rem;\n font-family: Helvetica;\n max-lines: 1;\n text-overflow: ellipsis;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-gear/index.vue?
|
|
8281
|
+
exports.push([module.i, "\n.dof-gear[data-v-225d914a] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n}\n.dof-gear-gap[data-v-225d914a] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n height: 1px;\n}\n.dof-gear-item[data-v-225d914a] {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.dof-gear-item-anchor[data-v-225d914a] {\n width: 0.53333rem;\n height: 0.26667rem;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -webkit-flex-direction: column;\n flex-direction: column;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n overflow: hidden;\n border-top-left-radius: 0.05333rem;\n border-top-right-radius: 0.05333rem;\n}\n.dof-gear-item-anchor-angle[data-v-225d914a] {\n width: 0.37712rem;\n height: 0.37712rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: translateY(-0.18856rem) rotateZ(45deg);\n transform: translateY(-0.18856rem) rotateZ(45deg);\n}\n.dof-gear-item-track[data-v-225d914a] {\n position: relative;\n}\n.dof-gear-item-bar[data-v-225d914a] {\n position: absolute;\n bottom: 0;\n}\n.dof-gear-item-gear[data-v-225d914a] {\n margin-top: 0.21333rem;\n font-size: 0.32rem;\n font-family: Helvetica;\n max-lines: 1;\n text-overflow: ellipsis;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-gear/index.vue?da86ab76"],"names":[],"mappings":";AA0NA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;CACA;AACA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,YAAA;CACA;AACA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AACA;EACA,kBAAA;EACA,mBAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,iBAAA;EACA,mCAAA;EACA,oCAAA;CACA;AACA;EACA,kBAAA;EACA,mBAAA;EACA,iCAAA;UAAA,yBAAA;EACA,0DAAA;UAAA,kDAAA;CACA;AACA;EACA,mBAAA;CACA;AACA;EACA,mBAAA;EACA,UAAA;CACA;AACA;EACA,uBAAA;EACA,mBAAA;EACA,uBAAA;EACA,aAAA;EACA,wBAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"dof-gear\" ref=\"root\" @touchmove=\"onTouchMove\">\n <template v-for=\"(v, i) in ranges\">\n <div ref=\"bar\" :key=\"i\" class=\"dof-gear-item\" @click=\"() => onClick(v)\">\n <div v-if=\"!readonly\" class=\"dof-gear-item-anchor\">\n <div class=\"dof-gear-item-anchor-angle\" :style=\"getAngleStyle(v)\"></div>\n </div>\n <div class=\"dof-gear-item-track\" :style=\"trackStyle\">\n <div class=\"dof-gear-item-bar\" :style=\"getBarStyle(v)\"></div>\n </div>\n <text v-if=\"v.gear\" class=\"dof-gear-item-gear\" :style=\"gearStyle\">{{ v.gear }}</text>\n </div>\n <div v-if=\"!isLast(i)\" class=\"dof-gear-gap\" :key=\"`gap-${i}`\"></div>\n </template>\n </div>\n</template>\n\n<script>\nimport { Range } from './range.js'\nimport { getBoundingClientRectBase } from '../utils/dom.js'\nexport default {\n props: {\n barWidth: {\n type: Number,\n default: 16\n },\n height: {\n type: Number,\n default: 96\n },\n color: {\n type: String,\n default: '#F2F2F2'\n },\n fullColor: {\n type: String,\n default: '#1A4FB6'\n },\n setColor: {\n type: String,\n default: '#F56428'\n },\n ranges: {\n type: Array,\n default: () => Range.Default\n },\n value: {\n type: Number,\n default: 5\n },\n gear: {\n type: Number,\n default: 1\n },\n readonly: {\n type: Boolean,\n default: true\n },\n grow: {\n type: Number,\n default: 42\n },\n swipable: {\n type: Boolean,\n default: false\n },\n offset: {\n type: Number,\n default: 5\n },\n delay: {\n type: Number,\n default: 100\n }\n },\n model: {\n prop: 'gear',\n event: 'change'\n },\n data() {\n return {\n rects: []\n }\n },\n computed: {\n gearRanges() {\n return this.ranges.filter(x => x.gear)\n },\n minGearRange() {\n return this.gearRanges[0]\n },\n maxGearRange() {\n return this.gearRanges[this.gearRanges.length - 1]\n },\n gearRange() {\n return this.gearRanges.find(x => x.gear === this.gear)\n },\n trackStyle() {\n const style = {\n width: `${this.barWidth}px`,\n height: `${this.height}px`,\n borderRadius: `${this.barWidth / 2}px`\n }\n if (!this.readonly) {\n style.height = `${this.height + this.grow}px`\n }\n return style\n },\n gearStyle() {\n const style = {\n color: this.fullColor\n }\n return style\n }\n },\n mounted() {\n if (this.swipable && !this.readonly) {\n setTimeout(() => this.initRect(), this.delay)\n }\n },\n methods: {\n initRect() {\n const dom = weex.requireModule('dom')\n this.ranges.forEach((range, i) => {\n if (range.gear) {\n getBoundingClientRectBase(dom, this.$refs['bar'][i], res => {\n this.rects.push({\n ...range,\n left: res.size.left,\n dis: res.size.left + res.size.width\n })\n })\n }\n })\n },\n isLast(index) {\n return index >= this.ranges.length - 1\n },\n isSet(range) {\n return range.gear == this.gearRange.gear\n },\n isPreserve(range) {\n return range.min >= this.gearRange.max\n },\n isWaiting(range) {\n return range.min > this.value && range.max <= this.gearRange.min\n },\n isFull(range) {\n return range.min <= this.value\n },\n getBarStyle(range) {\n const style = {\n width: `${this.barWidth}px`,\n height: `${this.height}px`,\n borderRadius: `${this.barWidth / 2}px`,\n opacity: 1\n }\n if (!this.readonly && this.isSet(range)) {\n style.height = `${this.height + this.grow}px`\n }\n if (this.isFull(range)) {\n style.backgroundColor = this.fullColor\n }\n if (this.isWaiting(range)) {\n style.backgroundColor = this.fullColor\n style.opacity = 0.3\n }\n if (!this.isFull(range) && this.isSet(range)) {\n style.backgroundColor = this.setColor\n this.readonly && (style.opacity = 0.3)\n }\n if (this.isPreserve(range)) {\n style.backgroundColor = this.color\n }\n return style\n },\n getAngleStyle(range) {\n const style = {}\n if (this.isSet(range)) {\n style.backgroundColor = this.setColor\n }\n return style\n },\n onClick(range) {\n if (this.readonly || !range.gear || range.min <= this.value) {\n return\n }\n this.triggerChange(range.gear)\n },\n onTouchMove(e) {\n if (!this.swipable || this.readonly) {\n return\n }\n const touch = e.changedTouches[0]\n const gear = this.getGearByPosition(touch.screenX)\n if (gear) {\n this.triggerChange(gear)\n }\n },\n getGearByPosition(screenX) {\n this.sx = screenX\n for (const rect of this.rects) {\n const left = rect.left - this.offset\n const right = rect.dis + this.offset\n if (screenX >= left && screenX <= right && rect.min > this.value) {\n return rect.gear\n }\n }\n return NaN\n },\n triggerChange(gear) {\n this.$emit('change', gear)\n }\n }\n}\n</script>\n\n<style scoped>\n.dof-gear {\n flex-direction: row;\n align-items: flex-start;\n}\n.dof-gear-gap {\n flex: 1;\n height: 1px;\n}\n.dof-gear-item {\n flex-direction: column;\n align-items: center;\n}\n.dof-gear-item-anchor {\n width: 40px;\n height: 20px;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.dof-gear-item-anchor-angle {\n width: 28.2842712474619px;\n height: 28.2842712474619px;\n transform-origin: center;\n transform: translateY(-14.14213562373095px) rotateZ(45deg);\n}\n.dof-gear-item-track {\n position: relative;\n}\n.dof-gear-item-bar {\n position: absolute;\n bottom: 0;\n}\n.dof-gear-item-gear {\n margin-top: 16px;\n font-size: 24px;\n font-family: Helvetica;\n max-lines: 1;\n text-overflow: ellipsis;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
8268
8282
|
|
|
8269
8283
|
// exports
|
|
8270
8284
|
|
|
@@ -8558,7 +8572,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8558
8572
|
|
|
8559
8573
|
|
|
8560
8574
|
// module
|
|
8561
|
-
exports.push([module.i, "\n.dof-card[data-v-3f24858b] {\n /* border-radius: 32px; */\n overflow: hidden;\n position: relative;\n /* background-color: #ffffff; */\n}\n.dof-card--active[data-v-3f24858b] {\n background-color: #f2f2f2;\n}\n.dof-card-header[data-v-3f24858b] {\n position: relative;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n /* padding-left: 32px;\n padding-right: 32px;\n padding-top: 32px;\n padding-bottom: 32px; */\n overflow: hidden;\n}\n.dof-card-header-tag[data-v-3f24858b] {\n position: absolute;\n width: 1.2rem;\n height: 1.2rem;\n right: -0.6rem;\n top: -0.6rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(45deg);\n transform: rotateZ(45deg);\n}\n.dof-card-header-tag-confirm[data-v-3f24858b] {\n position: absolute;\n width: 0.88rem;\n height: 0.88rem;\n left: 0.14667rem;\n top: 0.77333rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(-45deg);\n transform: rotateZ(-45deg);\n}\n.dof-card-header-tag-confirm-colmo[data-v-3f24858b] {\n position: absolute;\n width: 0.24rem;\n height: 0.24rem;\n left: 0.46667rem;\n top: 0.88rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(-45deg);\n transform: rotateZ(-45deg);\n}\n.dof-card-header-stamp[data-v-3f24858b] {\n position: absolute;\n top: 0px;\n width: 0.64rem;\n height: 0.64rem;\n overflow: hidden;\n z-index: 100;\n}\n.dof-card-header-stamp--left[data-v-3f24858b] {\n left: 0px;\n border-top-left-radius: 0.42667rem;\n}\n.dof-card-header-stamp--right[data-v-3f24858b] {\n right: 0px;\n border-top-right-radius: 0.42667rem;\n}\n.dof-card-header-content[data-v-3f24858b] {\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}\n.dof-card-header-arrow-wrapper[data-v-3f24858b] {\n margin-right: 0.05333rem;\n}\n.dof-card-header-arrow[data-v-3f24858b] {\n width: 0.53333rem;\n height: 0.53333rem;\n /* margin-left: 12px;\n margin-right: 12px;\n margin-top: 12px;\n margin-bottom: 12px; */\n}\n.dof-card-body[data-v-3f24858b] {\n position: relative;\n overflow: hidden;\n}\n.dof-card-dot[data-v-3f24858b] {\n position: absolute;\n width: 0.21333rem;\n height: 0.21333rem;\n right: 0.21333rem;\n top: 0.21333rem;\n border-radius: 0.10667rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-card/index.vue?072ebb52"],"names":[],"mappings":";AAiNA;EACA,0BAAA;EACA,iBAAA;EACA,mBAAA;EACA,gCAAA;CACA;AAEA;EACA,0BAAA;CACA;AAEA;EACA,mBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA;;;0BAGA;EACA,iBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,eAAA;EACA,aAAA;EACA,iCAAA;UAAA,yBAAA;EACA,kCAAA;UAAA,0BAAA;CACA;AACA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iCAAA;UAAA,yBAAA;EACA,mCAAA;UAAA,2BAAA;CACA;AACA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,aAAA;EACA,iCAAA;UAAA,yBAAA;EACA,mCAAA;UAAA,2BAAA;CACA;AAEA;EACA,mBAAA;EACA,SAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,aAAA;CACA;AAEA;EACA,UAAA;EACA,mCAAA;CACA;AAEA;EACA,WAAA;EACA,oCAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;CACA;AAEA;EACA,yBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;EACA;;;yBAGA;CACA;AAEA;EACA,mBAAA;EACA,iBAAA;CACA;AACA;EACA,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"dof-card\" :style=\"_cardStyle\">\n <div class=\"dof-card-header\" @click=\"onSelect\" :style=\"_cardWrapperStyle\">\n <div v-if=\"isActive\" class=\"dof-card-header-tag\" :style=\"{ backgroundColor: _tagBg }\">\n <image :class=\"[_isColmo ? 'dof-card-header-tag-confirm-colmo' : 'dof-card-header-tag-confirm']\" :src=\"_isColmo ? confirm.colmo : confirm.default\"></image>\n </div>\n <div class=\"dof-card-header-content\">\n <slot></slot>\n </div>\n <div class=\"dof-card-header-arrow-wrapper\" v-if=\"collapsable\" @click=\"onCollapse\">\n <dof-switch v-if=\"_isColmo\" :checked=\"!collapsed_\" @dofChange=\"onCollapse\"> </dof-switch>\n <image v-else ref=\"arrow\" class=\"dof-card-header-arrow\" :src=\"arrowUp\"></image>\n </div>\n </div>\n <div v-if=\"collapsable\" ref=\"body\" class=\"dof-card-body\">\n <slot name=\"body\"></slot>\n </div>\n <div\n v-if=\"dotConfig.normalColor && dotConfig.clickedColor\"\n :style=\"{ backgroundColor: clicked_ ? dotConfig.clickedColor : dotConfig.normalColor }\"\n class=\"dof-card-dot\"\n ></div>\n </div>\n</template>\n\n<script>\nimport { mixSelectableChild } from '../utils/mix-selectable-child.js'\nimport { Transition } from '../utils/transition.js'\nimport { getBoundingClientRect } from '../utils/dom.js'\nimport arrowUp from './imgs/arrow_up'\nimport confirm from './imgs/confirm'\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\nimport { STYLE_MAP } from './style'\nimport DofSwitch from '../dof-switch/index'\nexport default {\n components: { DofSwitch },\n mixins: [mixSelectableChild('dof-card-group'), ColmoMixin, DiabloMixin],\n props: {\n collapsable: {\n type: Boolean,\n default: false\n },\n selectable: {\n type: Boolean,\n default: false\n },\n selected: {\n type: Boolean,\n default: false\n },\n collapsed: {\n type: Boolean,\n default: false\n },\n tag: {\n type: String,\n default: 'right'\n },\n // 标签背景色\n tagBg: {\n type: String,\n default: ''\n },\n // 卡片样式\n cardStyle: {\n type: Object,\n default: () => ({})\n },\n // 右上角标记配置,normalColor常态颜色,clickedColor选中态颜色\n dotConfig: {\n type: Object,\n default: () => ({})\n },\n // 是否选中态\n clicked: {\n type: Boolean,\n default: false\n },\n // 点击颜色\n touchColor: {\n type: String,\n required: false,\n default: ''\n },\n cardWrapperStyle: {\n type: Object,\n default: () => ({})\n }\n },\n model: {\n prop: 'selected',\n event: 'select'\n },\n data() {\n return {\n active_: false,\n collapsed_: this.collapsed,\n clicked_: this.clicked,\n bodyHeight: 0,\n arrowUp,\n confirm,\n isTouching: false\n }\n },\n computed: {\n themeStyle() {\n const _theme = this._theme || 'default'\n return STYLE_MAP[_theme] || STYLE_MAP['default']\n },\n isActive() {\n return (this.selectable && this.selected) || this.isSelected\n },\n _cardStyle() {\n let tmp = { borderRadius: this.themeStyle.borderRadius }\n let style = {\n backgroundColor: this._isColmo ? '#303237' : (this._isDiablo ? '#171c1f' : '#fff'),\n ...tmp,\n ...this.cardStyle\n }\n if (this.touchColor && this.isTouching) style.backgroundColor = this.touchColor\n return style\n },\n _cardWrapperStyle() {\n let style = {\n 'backgroundColor:active': this.touchColor ? this.touchColor : '',\n paddingLeft: '32px',\n paddingRight: '32px',\n paddingTop: '32px',\n paddingBottom: '32px',\n ...this.cardWrapperStyle\n }\n return style\n },\n _tagBg() {\n if (this.tagBg) return this.tagBg\n return this._isColmo ? '#B35336' : '#00A4F2'\n }\n },\n mounted() {\n this.initCollapsable()\n },\n methods: {\n initCollapsable() {\n if (!this.collapsable) {\n return\n }\n this.$nextTick(() => {\n getBoundingClientRect(this.$refs.body, res => {\n this.bodyHeight = res.size.height\n if (this.collapsed_) {\n this.collapseBody(0)\n } else {\n this.expandeBody()\n }\n })\n })\n if (this.collapsed_) {\n this.collapseArrow()\n }\n },\n onSelect() {\n this.$emit('select', !this.selected)\n this.triggerSelect()\n\n this.$emit('clicked', (this.clicked_ = !this.clicked_))\n },\n onCollapse() {\n this.collapsed_ = !this.collapsed_\n this.$emit('collapse', this.collapsed_)\n if (this.collapsed_) {\n this.collapseBody()\n this.collapseArrow()\n } else {\n this.expandeBody()\n this.expandeArrow()\n }\n },\n collapseBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(0)\n .needLayout(true)\n .run(this.$refs.body)\n },\n collapseArrow() {\n Transition.Default()\n .rotateZ(-180)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n },\n expandeBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(this.bodyHeight)\n .needLayout(true)\n .run(this.$refs.body)\n },\n expandeArrow() {\n Transition.Default()\n .rotateZ(0)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n }\n }\n}\n</script>\n\n<style scoped>\n.dof-card {\n /* border-radius: 32px; */\n overflow: hidden;\n position: relative;\n /* background-color: #ffffff; */\n}\n\n.dof-card--active {\n background-color: #f2f2f2;\n}\n\n.dof-card-header {\n position: relative;\n flex-direction: row;\n align-items: center;\n /* padding-left: 32px;\n padding-right: 32px;\n padding-top: 32px;\n padding-bottom: 32px; */\n overflow: hidden;\n}\n\n.dof-card-header-tag {\n position: absolute;\n width: 90px;\n height: 90px;\n right: -45px;\n top: -45px;\n transform-origin: center;\n transform: rotateZ(45deg);\n}\n.dof-card-header-tag-confirm {\n position: absolute;\n width: 66px;\n height: 66px;\n left: 11px;\n top: 58px;\n transform-origin: center;\n transform: rotateZ(-45deg);\n}\n.dof-card-header-tag-confirm-colmo {\n position: absolute;\n width: 18px;\n height: 18px;\n left: 35px;\n top: 66px;\n transform-origin: center;\n transform: rotateZ(-45deg);\n}\n\n.dof-card-header-stamp {\n position: absolute;\n top: 0px;\n width: 48px;\n height: 48px;\n overflow: hidden;\n z-index: 100;\n}\n\n.dof-card-header-stamp--left {\n left: 0px;\n border-top-left-radius: 32px;\n}\n\n.dof-card-header-stamp--right {\n right: 0px;\n border-top-right-radius: 32px;\n}\n\n.dof-card-header-content {\n flex: 1;\n flex-direction: column;\n}\n\n.dof-card-header-arrow-wrapper {\n margin-right: 4px;\n}\n\n.dof-card-header-arrow {\n width: 40px;\n height: 40px;\n /* margin-left: 12px;\n margin-right: 12px;\n margin-top: 12px;\n margin-bottom: 12px; */\n}\n\n.dof-card-body {\n position: relative;\n overflow: hidden;\n}\n.dof-card-dot {\n position: absolute;\n width: 16px;\n height: 16px;\n right: 16px;\n top: 16px;\n border-radius: 8px;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
8575
|
+
exports.push([module.i, "\n.dof-card[data-v-3f24858b] {\n /* border-radius: 32px; */\n overflow: hidden;\n position: relative;\n /* background-color: #ffffff; */\n}\n.dof-card--active[data-v-3f24858b] {\n background-color: #f2f2f2;\n}\n.dof-card-header[data-v-3f24858b] {\n position: relative;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n /* padding-left: 32px;\n padding-right: 32px;\n padding-top: 32px;\n padding-bottom: 32px; */\n overflow: hidden;\n}\n.dof-card-header-tag[data-v-3f24858b] {\n position: absolute;\n width: 1.2rem;\n height: 1.2rem;\n right: -0.6rem;\n top: -0.6rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(45deg);\n transform: rotateZ(45deg);\n}\n.dof-card-header-tag-confirm[data-v-3f24858b] {\n position: absolute;\n width: 0.88rem;\n height: 0.88rem;\n left: 0.14667rem;\n top: 0.77333rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(-45deg);\n transform: rotateZ(-45deg);\n}\n.dof-card-header-tag-confirm-colmo[data-v-3f24858b] {\n position: absolute;\n width: 0.24rem;\n height: 0.24rem;\n left: 0.46667rem;\n top: 0.88rem;\n -webkit-transform-origin: center;\n transform-origin: center;\n -webkit-transform: rotateZ(-45deg);\n transform: rotateZ(-45deg);\n}\n.dof-card-header-stamp[data-v-3f24858b] {\n position: absolute;\n top: 0px;\n width: 0.64rem;\n height: 0.64rem;\n overflow: hidden;\n z-index: 100;\n}\n.dof-card-header-stamp--left[data-v-3f24858b] {\n left: 0px;\n border-top-left-radius: 0.42667rem;\n}\n.dof-card-header-stamp--right[data-v-3f24858b] {\n right: 0px;\n border-top-right-radius: 0.42667rem;\n}\n.dof-card-header-content[data-v-3f24858b] {\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}\n.dof-card-header-arrow-wrapper[data-v-3f24858b] {\n margin-right: 0.05333rem;\n}\n.dof-card-header-arrow[data-v-3f24858b] {\n width: 0.53333rem;\n height: 0.53333rem;\n /* margin-left: 12px;\n margin-right: 12px;\n margin-top: 12px;\n margin-bottom: 12px; */\n}\n.dof-card-body[data-v-3f24858b] {\n position: relative;\n overflow: hidden;\n}\n.dof-card-dot[data-v-3f24858b] {\n position: absolute;\n width: 0.21333rem;\n height: 0.21333rem;\n right: 0.21333rem;\n top: 0.21333rem;\n border-radius: 0.10667rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-card/index.vue?0700c852"],"names":[],"mappings":";AA8NA;EACA,0BAAA;EACA,iBAAA;EACA,mBAAA;EACA,gCAAA;CACA;AAEA;EACA,0BAAA;CACA;AAEA;EACA,mBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA;;;0BAGA;EACA,iBAAA;CACA;AAEA;EACA,mBAAA;EACA,cAAA;EACA,eAAA;EACA,eAAA;EACA,aAAA;EACA,iCAAA;UAAA,yBAAA;EACA,kCAAA;UAAA,0BAAA;CACA;AACA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,gBAAA;EACA,iCAAA;UAAA,yBAAA;EACA,mCAAA;UAAA,2BAAA;CACA;AACA;EACA,mBAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,aAAA;EACA,iCAAA;UAAA,yBAAA;EACA,mCAAA;UAAA,2BAAA;CACA;AAEA;EACA,mBAAA;EACA,SAAA;EACA,eAAA;EACA,gBAAA;EACA,iBAAA;EACA,aAAA;CACA;AAEA;EACA,UAAA;EACA,mCAAA;CACA;AAEA;EACA,WAAA;EACA,oCAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;CACA;AAEA;EACA,yBAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;EACA;;;yBAGA;CACA;AAEA;EACA,mBAAA;EACA,iBAAA;CACA;AACA;EACA,mBAAA;EACA,kBAAA;EACA,mBAAA;EACA,kBAAA;EACA,gBAAA;EACA,0BAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"dof-card\" :style=\"_cardStyle\">\n <div class=\"dof-card-header\" @click=\"onSelect\" :style=\"_cardWrapperStyle\">\n <div v-if=\"isActive\" class=\"dof-card-header-tag\" :style=\"{ backgroundColor: _tagBg }\">\n <image :class=\"[_isColmo ? 'dof-card-header-tag-confirm-colmo' : 'dof-card-header-tag-confirm']\" :src=\"_isColmo ? confirm.colmo : confirm.default\"></image>\n </div>\n <div class=\"dof-card-header-content\">\n <slot></slot>\n </div>\n <div class=\"dof-card-header-arrow-wrapper\" v-if=\"collapsable\" @click=\"onCollapse\">\n <dof-switch v-if=\"_isColmo\" :checked=\"!collapsed_\" @dofChange=\"onCollapse\"> </dof-switch>\n <image v-else ref=\"arrow\" class=\"dof-card-header-arrow\" :src=\"arrowUp\"></image>\n </div>\n </div>\n <div v-if=\"collapsable\" ref=\"body\" class=\"dof-card-body\">\n <slot name=\"body\"></slot>\n </div>\n <div\n v-if=\"dotConfig.normalColor && dotConfig.clickedColor\"\n :style=\"{ backgroundColor: clicked_ ? dotConfig.clickedColor : dotConfig.normalColor }\"\n class=\"dof-card-dot\"\n ></div>\n </div>\n</template>\n\n<script>\nimport { mixSelectableChild } from '../utils/mix-selectable-child.js'\nimport { Transition } from '../utils/transition.js'\nimport { getBoundingClientRect } from '../utils/dom.js'\nimport arrowUp from './imgs/arrow_up'\nimport confirm from './imgs/confirm'\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\nimport { STYLE_MAP } from './style'\nimport DofSwitch from '../dof-switch/index'\nexport default {\n components: { DofSwitch },\n mixins: [mixSelectableChild('dof-card-group'), ColmoMixin, DiabloMixin],\n props: {\n collapsable: {\n type: Boolean,\n default: false\n },\n selectable: {\n type: Boolean,\n default: false\n },\n selected: {\n type: Boolean,\n default: false\n },\n collapsed: {\n type: Boolean,\n default: false\n },\n tag: {\n type: String,\n default: 'right'\n },\n // 标签背景色\n tagBg: {\n type: String,\n default: ''\n },\n // 卡片样式\n cardStyle: {\n type: Object,\n default: () => ({})\n },\n // 右上角标记配置,normalColor常态颜色,clickedColor选中态颜色\n dotConfig: {\n type: Object,\n default: () => ({})\n },\n // 是否选中态\n clicked: {\n type: Boolean,\n default: false\n },\n // 点击颜色\n touchColor: {\n type: String,\n required: false,\n default: ''\n },\n cardWrapperStyle: {\n type: Object,\n default: () => ({})\n }\n },\n model: {\n prop: 'selected',\n event: 'select'\n },\n data() {\n return {\n active_: false,\n collapsed_: this.collapsed,\n clicked_: this.clicked,\n bodyHeight: 0,\n arrowUp,\n confirm,\n isTouching: false\n }\n },\n computed: {\n themeStyle() {\n const _theme = this._theme || 'default'\n return STYLE_MAP[_theme] || STYLE_MAP['default']\n },\n isActive() {\n return (this.selectable && this.selected) || this.isSelected\n },\n _cardStyle() {\n let tmp = { borderRadius: this.themeStyle.borderRadius }\n let style = {\n backgroundColor: this._isColmo ? '#303237' : (this._isDiablo ? '#171c1f' : '#fff'),\n ...tmp,\n ...this.cardStyle\n }\n if (this.touchColor && this.isTouching) style.backgroundColor = this.touchColor\n return style\n },\n _cardWrapperStyle() {\n let style = {\n 'backgroundColor:active': this.touchColor ? this.touchColor : '',\n paddingLeft: '32px',\n paddingRight: '32px',\n paddingTop: '32px',\n paddingBottom: '32px',\n ...this.cardWrapperStyle\n }\n return style\n },\n _tagBg() {\n if (this.tagBg) return this.tagBg\n return this._isColmo ? '#B35336' : '#00A4F2'\n },\n isHarmony() {\n return weex.config.env.platform == 'harmony'\n }\n },\n mounted() {\n this.initCollapsable()\n },\n methods: {\n initCollapsable() {\n if (!this.collapsable) {\n return\n }\n this.$nextTick(() => {\n const dom = weex.requireModule('dom')\n getBoundingClientRect(dom, this.$refs.body, res => {\n this.bodyHeight = res.size.height\n if (this.collapsed_) {\n this.collapseBody(0)\n } else {\n this.expandeBody()\n }\n })\n })\n if (this.collapsed_) {\n this.collapseArrow()\n }\n },\n onSelect() {\n this.$emit('select', !this.selected)\n this.triggerSelect()\n\n this.$emit('clicked', (this.clicked_ = !this.clicked_))\n },\n onCollapse() {\n if (this.isHarmony) {\n if (this.clickLock) return\n this.clickLock = true\n }\n this.collapsed_ = !this.collapsed_\n this.$emit('collapse', this.collapsed_)\n if (this.collapsed_) {\n this.collapseBody()\n this.collapseArrow()\n } else {\n this.expandeBody()\n this.expandeArrow()\n }\n if (this.isHarmony) {\n setTimeout(() => {\n this.clickLock = false\n }, 100)\n }\n },\n collapseBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(0)\n .needLayout(true)\n .run(this.$refs.body)\n },\n collapseArrow() {\n Transition.Default()\n .rotateZ(-180)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n },\n expandeBody(duration = 360) {\n Transition.Default()\n .duration(duration)\n .height(this.bodyHeight)\n .needLayout(true)\n .run(this.$refs.body)\n },\n expandeArrow() {\n Transition.Default()\n .rotateZ(0)\n .transformOrigin('center')\n .run(this.$refs.arrow)\n }\n }\n}\n</script>\n\n<style scoped>\n.dof-card {\n /* border-radius: 32px; */\n overflow: hidden;\n position: relative;\n /* background-color: #ffffff; */\n}\n\n.dof-card--active {\n background-color: #f2f2f2;\n}\n\n.dof-card-header {\n position: relative;\n flex-direction: row;\n align-items: center;\n /* padding-left: 32px;\n padding-right: 32px;\n padding-top: 32px;\n padding-bottom: 32px; */\n overflow: hidden;\n}\n\n.dof-card-header-tag {\n position: absolute;\n width: 90px;\n height: 90px;\n right: -45px;\n top: -45px;\n transform-origin: center;\n transform: rotateZ(45deg);\n}\n.dof-card-header-tag-confirm {\n position: absolute;\n width: 66px;\n height: 66px;\n left: 11px;\n top: 58px;\n transform-origin: center;\n transform: rotateZ(-45deg);\n}\n.dof-card-header-tag-confirm-colmo {\n position: absolute;\n width: 18px;\n height: 18px;\n left: 35px;\n top: 66px;\n transform-origin: center;\n transform: rotateZ(-45deg);\n}\n\n.dof-card-header-stamp {\n position: absolute;\n top: 0px;\n width: 48px;\n height: 48px;\n overflow: hidden;\n z-index: 100;\n}\n\n.dof-card-header-stamp--left {\n left: 0px;\n border-top-left-radius: 32px;\n}\n\n.dof-card-header-stamp--right {\n right: 0px;\n border-top-right-radius: 32px;\n}\n\n.dof-card-header-content {\n flex: 1;\n flex-direction: column;\n}\n\n.dof-card-header-arrow-wrapper {\n margin-right: 4px;\n}\n\n.dof-card-header-arrow {\n width: 40px;\n height: 40px;\n /* margin-left: 12px;\n margin-right: 12px;\n margin-top: 12px;\n margin-bottom: 12px; */\n}\n\n.dof-card-body {\n position: relative;\n overflow: hidden;\n}\n.dof-card-dot {\n position: absolute;\n width: 16px;\n height: 16px;\n right: 16px;\n top: 16px;\n border-radius: 8px;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
8562
8576
|
|
|
8563
8577
|
// exports
|
|
8564
8578
|
|
|
@@ -8628,7 +8642,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8628
8642
|
|
|
8629
8643
|
|
|
8630
8644
|
// module
|
|
8631
|
-
exports.push([module.i, "\n.wrapper[data-v-44d44e58] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.dof-result[data-v-44d44e58] {\n /* width: 750px; */\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n /* background-color: #f9f9f9; */\n}\n.result-image[data-v-44d44e58] {\n width: 4.26667rem;\n height: 4.26667rem;\n}\n.result-content[data-v-44d44e58] {\n margin-top: 0px;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.content-text[data-v-44d44e58] {\n height: auto;\n font-family: PingFangSC-Regular;\n font-size: 0.37333rem;\n color: #616c73;\n letter-spacing: 0;\n text-align: center;\n line-height: 0.48rem;\n width: 8rem;\n}\n.content-desc[data-v-44d44e58] {\n margin-top: 0.10667rem;\n}\n.result-button[data-v-44d44e58] {\n margin-top: 0.64rem;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.btn-sub-text[data-v-44d44e58] {\n font-family: PingFangSC-Medium;\n font-size: 0.37333rem;\n color: #00a4f2;\n letter-spacing: 0;\n text-align: center;\n line-height: 0.37333rem;\n margin-top: 0.42667rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-result/index.vue?
|
|
8645
|
+
exports.push([module.i, "\n.wrapper[data-v-44d44e58] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.dof-result[data-v-44d44e58] {\n /* width: 750px; */\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n /* background-color: #f9f9f9; */\n}\n.result-image[data-v-44d44e58] {\n width: 4.26667rem;\n height: 4.26667rem;\n}\n.result-image-new[data-v-44d44e58] {\n width: 460x;\n height: 5.12rem;\n}\n.result-content[data-v-44d44e58] {\n margin-top: 0px;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.content-text[data-v-44d44e58] {\n height: auto;\n font-family: PingFangSC-Regular;\n font-size: 0.37333rem;\n color: #616c73;\n letter-spacing: 0;\n text-align: center;\n line-height: 0.48rem;\n width: 8rem;\n}\n.content-desc[data-v-44d44e58] {\n margin-top: 0.10667rem;\n}\n.result-button[data-v-44d44e58] {\n margin-top: 0.64rem;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n}\n.btn-sub-text[data-v-44d44e58] {\n font-family: PingFangSC-Medium;\n font-size: 0.37333rem;\n color: #00a4f2;\n letter-spacing: 0;\n text-align: center;\n line-height: 0.37333rem;\n margin-top: 0.42667rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-result/index.vue?9062430c"],"names":[],"mappings":";AAkCA;EACA,mBAAA;EACA,OAAA;EACA,QAAA;EACA,SAAA;EACA,UAAA;CACA;AAEA;EACA,mBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;EACA,gCAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,YAAA;EACA,gBAAA;CACA;AAEA;EACA,gBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;CACA;AAEA;EACA,aAAA;EACA,gCAAA;EACA,sBAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;EACA,qBAAA;EACA,YAAA;CACA;AAEA;EACA,uBAAA;CACA;AAEA;EACA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,yBAAA;EAAA,gCAAA;UAAA,wBAAA;CACA;AAEA;EACA,+BAAA;EACA,sBAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;EACA,wBAAA;EACA,uBAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div class=\"wrapper\" v-if=\"show\" :style=\"wrapStyle\">\n <div class=\"dof-result\" :style=\"{ top: setPaddingTop, backgroundColor: bgColor_ }\">\n <image\n :class=\"[isNewVersion ? 'result-image-new' : 'result-image']\"\n :aria-hidden=\"true\"\n :src=\"resultType.pic\"\n :style=\"imgStyle\"\n ></image>\n <slot name=\"text\">\n <div class=\"result-content\" v-if=\"resultType.content\">\n <text class=\"content-text\">{{ resultType.content }}</text>\n <text class=\"content-text content-desc\" v-if=\"resultType.desc\">{{ resultType.desc }}</text>\n </div>\n </slot>\n\n <div class=\"result-button\" @touchend=\"handleTouchEnd\">\n <slot name=\"button\">\n <dof-button\n v-if=\"resultType.button\"\n size=\"medium\"\n :btnStyle=\"{ width: 'auto', overflow: 'hidden', minWidth: '240px', maxWidth: '480px' }\"\n :textStyle=\"{ textOverflow: 'none', maxWidth: '418px', marginLeft: 0, textAlign: 'center' }\"\n :text=\"resultType.button\"\n @dofButtonClicked=\"onClick\"\n ></dof-button>\n </slot>\n <text class=\"btn-sub-text\" v-if=\"resultType.btnSubTitle\" @click=\"onSubClick\">{{ resultType.btnSubTitle }}</text>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.wrapper {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.dof-result {\n /* width: 750px; */\n flex: 1;\n align-items: center;\n justify-content: center;\n /* background-color: #f9f9f9; */\n}\n\n.result-image {\n width: 320px;\n height: 320px;\n}\n\n.result-image-new {\n width: 460x;\n height: 384px;\n}\n\n.result-content {\n margin-top: 0px;\n align-items: center;\n}\n\n.content-text {\n height: auto;\n font-family: PingFangSC-Regular;\n font-size: 28px;\n color: #616c73;\n letter-spacing: 0;\n text-align: center;\n line-height: 36px;\n width: 600px;\n}\n\n.content-desc {\n margin-top: 8px;\n}\n\n.result-button {\n margin-top: 48px;\n align-items: center;\n justify-content: center;\n}\n\n.btn-sub-text {\n font-family: PingFangSC-Medium;\n font-size: 28px;\n color: #00a4f2;\n letter-spacing: 0;\n text-align: center;\n line-height: 28px;\n margin-top: 32px;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n\n<script>\nimport DofButton from '../dof-button'\nimport imgs from './imgs'\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\nimport Utils from '../utils/index.js'\n\nconst defaultPicBaseUrl = imageName => `meiju://common/emptyImage?imageName=${imageName}`\nconst isNewVersion = Utils.compareVersionNew('11.4.15')\nconst Types = {\n noNetwork: {\n pic: isNewVersion ? defaultPicBaseUrl('img_empty_02_disconnection') : imgs['noNetwork'],\n content: '网络异常,请检查您的网络设置'\n // button: '刷新'\n },\n noUpdate: {\n pic: isNewVersion ? defaultPicBaseUrl('img_empty_03_update') : imgs['noUpdate'],\n content: '当前版本较低',\n desc: '请更新到最新版APP'\n },\n noPage: {\n pic: isNewVersion ? defaultPicBaseUrl('img_empty_04_content') : imgs['noPage'],\n content: '找不到页面'\n },\n colmo: {\n pic: imgs['colmo']\n }\n}\nexport default {\n mixins: [ColmoMixin, DiabloMixin],\n components: {\n DofButton\n },\n props: {\n type: {\n type: String,\n default: ''\n },\n configuration: {\n type: Object,\n default: () => ({})\n },\n show: {\n type: Boolean,\n default: true\n },\n wrapStyle: Object,\n paddingTop: {\n type: [Number, String],\n default: '-80'\n },\n bgColor: {\n type: String,\n default: ''\n },\n imgStyle: {\n type: Object,\n default: () => ({})\n }\n },\n computed: {\n isNewVersion() {\n return Utils.compareVersionNew('11.4.15')\n },\n type_() {\n if (this.type) return this.type\n return this._isColmo ? 'colmo' : 'noPage'\n },\n bgColor_() {\n if (this.bgColor) return this.bgColor\n return this._isColmo ? '#151617' : this._isDiablo ? '#101315' : '#ffffff'\n },\n resultType() {\n return {\n ...(Types[this.type_] ? Types[this.type_] : {}),\n ...this.configuration\n }\n },\n setPaddingTop() {\n const paddingTop = this.paddingTop\n return `${paddingTop}px`\n }\n },\n methods: {\n handleTouchEnd(e) {\n // web上面有点击穿透问题\n const { platform } = weex.config.env\n platform === 'Web' && e.preventDefault && e.preventDefault()\n },\n onClick() {\n this.$emit('dofResultButtonClicked', { ...this.configuration })\n },\n onSubClick() {\n this.$emit('dofResultSubButtonClicked', { ...this.configuration })\n }\n }\n}\n</script>\n"],"sourceRoot":""}]);
|
|
8632
8646
|
|
|
8633
8647
|
// exports
|
|
8634
8648
|
|
|
@@ -8768,7 +8782,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
8768
8782
|
|
|
8769
8783
|
|
|
8770
8784
|
// module
|
|
8771
|
-
exports.push([module.i, "\n.dof-slider-scale[data-v-4fd34a59] {\n position: absolute;\n white-space: nowrap;\n font-family: PingFangSC-Regular;\n font-size: 0.26667rem;\n /* color: #8e969b; */\n font-weight: 400;\n}\n.dof-slider-scale--mid[data-v-4fd34a59] {\n -webkit-transform: translate(-50%, 0px);\n transform: translate(-50%, 0px);\n}\n.dof-slider-scale--first[data-v-4fd34a59] {\n -webkit-transform: translate(-50%, 0px);\n transform: translate(-50%, 0px);\n}\n.dof-slider-scale--last[data-v-4fd34a59] {\n -webkit-transform: translate(50%, 0px);\n transform: translate(50%, 0px);\n}\n.colmoFont[data-v-4fd34a59] {\n font-family: COLMO-Mono-Regular;\n font-size: 0.32rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-slider-scale/index.vue?
|
|
8785
|
+
exports.push([module.i, "\n.dof-slider-scale[data-v-4fd34a59] {\n position: absolute;\n white-space: nowrap;\n font-family: PingFangSC-Regular;\n font-size: 0.26667rem;\n /* color: #8e969b; */\n font-weight: 400;\n}\n.dof-slider-scale--mid[data-v-4fd34a59] {\n -webkit-transform: translate(-50%, 0px);\n transform: translate(-50%, 0px);\n}\n.dof-slider-scale--first[data-v-4fd34a59] {\n -webkit-transform: translate(-50%, 0px);\n transform: translate(-50%, 0px);\n}\n.dof-slider-scale--last[data-v-4fd34a59] {\n -webkit-transform: translate(50%, 0px);\n transform: translate(50%, 0px);\n}\n.colmoFont[data-v-4fd34a59] {\n font-family: COLMO-Mono-Regular;\n font-size: 0.32rem;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-slider-scale/index.vue?7f0a3c9b"],"names":[],"mappings":";AAmGA;EACA,mBAAA;EACA,oBAAA;EACA,gCAAA;EACA,sBAAA;EACA,qBAAA;EACA,iBAAA;CACA;AAEA;EACA,wCAAA;UAAA,gCAAA;CACA;AACA;EACA,wCAAA;UAAA,gCAAA;CACA;AAEA;EACA,uCAAA;UAAA,+BAAA;CACA;AACA;EACA,gCAAA;EACA,mBAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <text\n :class=\"[\n 'dof-slider-scale',\n !isFirst && !isLast && 'dof-slider-scale--mid',\n isFirst && `dof-slider-scale--first`,\n isLast && `dof-slider-scale--last`,\n _isColmo && `colmoFont`\n ]\"\n ref=\"dof-slider-scale\"\n :style=\"style\"\n >\n <slot></slot>\n </text>\n</template>\n\n<script>\nimport { getBoundingClientRect } from '../utils/dom.js'\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\n\nexport default {\n mixins: [ColmoMixin, DiabloMixin],\n props: {\n value: {\n type: Number,\n required: true\n },\n color: {\n type: String,\n required: false,\n default: ''\n }\n },\n data() {\n return {\n isShow: false,\n elWidth: 0\n }\n },\n watch: {\n style() {\n this.isShow = true\n }\n },\n computed: {\n isLast() {\n return this.value >= this.$parent.max\n },\n isFirst() {\n return this.value <= this.$parent.min\n },\n style() {\n const style = {\n color: this.color || (this._isDiablo ? '#797c7e' : '#8E969B'),\n opacity: this.isShow ? 1 : 0\n }\n const p = this.$parent\n let left = ((this.value - p.min) / p.scope) * p.width + p._trackHeight / 2\n if (p.isGradientBar) left = left + 4.5 - this.elWidth / 2\n style.left = `${left}px`\n\n // 防止超出的情况\n if (this.isFirst) {\n delete style.left\n if (this.elWidth && p._trackHeight / 2 < this.elWidth / 2) {\n style.left = this.elWidth / 2 + 'px'\n } else {\n style.left = p._trackHeight / 2 + 'px'\n }\n }\n // 防止超出的情况\n if (this.isLast) {\n delete style.left\n if (this.elWidth && p._trackHeight / 2 < this.elWidth / 2) {\n style.right = this.elWidth / 2 + 'px'\n } else {\n style.right = p._trackHeight / 2 + 'px'\n }\n }\n return style\n }\n },\n mounted() {\n if (this.isFirst || this.isLast) this.initElWidth()\n },\n methods: {\n initElWidth() {\n const dom = weex.requireModule('dom')\n const el = this.$refs['dof-slider-scale']\n getBoundingClientRect(dom, el, res => {\n res.result && (this.elWidth = res.size.width)\n })\n }\n }\n}\n</script>\n\n<style scoped>\n.dof-slider-scale {\n position: absolute;\n white-space: nowrap;\n font-family: PingFangSC-Regular;\n font-size: 20px;\n /* color: #8e969b; */\n font-weight: 400;\n}\n\n.dof-slider-scale--mid {\n transform: translate(-50%, 0px);\n}\n.dof-slider-scale--first {\n transform: translate(-50%, 0px);\n}\n\n.dof-slider-scale--last {\n transform: translate(50%, 0px);\n}\n.colmoFont {\n font-family: COLMO-Mono-Regular;\n font-size: 24px;\n}\n</style>\n"],"sourceRoot":""}]);
|
|
8772
8786
|
|
|
8773
8787
|
// exports
|
|
8774
8788
|
|
|
@@ -9034,7 +9048,7 @@ exports = module.exports = __webpack_require__(0)(true);
|
|
|
9034
9048
|
|
|
9035
9049
|
|
|
9036
9050
|
// module
|
|
9037
|
-
exports.push([module.i, "\n.checkbox[data-v-60711b04] {\n width: 0.48rem;\n height: 0.48rem;\n}\n.avatar[data-v-60711b04] {\n width: 1.28rem;\n height: 1.28rem;\n margin-left: 0.42667rem;\n /* margin-right: 24px; */\n background-color: #f8f8f8;\n border-radius: 0.64rem;\n overflow: hidden;\n}\n.item-img[data-v-60711b04] {\n width: 1.28rem;\n height: 1.28rem;\n}\n.dof-cell[data-v-60711b04] {\n /* height: 160px; */\n position: relative;\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: center;\n -webkit-align-items: center;\n align-items: center;\n padding-left: 0.42667rem;\n /* padding-right: 32px; */\n background-color: inherit;\n}\n.checkBox-top-border[data-v-60711b04] {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n.checkBox-bottom-border[data-v-60711b04] {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n.fakeSubBorder[data-v-60711b04] {\n height: 1px;\n position: absolute;\n right: 0;\n bottom: 0;\n background-color: #dddddd;\n left: 1.14667rem;\n}\n.active-cell[data-v-60711b04]:active {\n background-color: #f5f5f5;\n}\n.main-wrapper[data-v-60711b04] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n padding-right: 0.42667rem;\n margin-left: 0.32rem;\n}\n.content-title[data-v-60711b04] {\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 /* align-items: flex-start; */\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n}\n.cell-title[data-v-60711b04] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n.title-text[data-v-60711b04] {\n font-family: PingFangSC-Regular;\n font-size: 0.42667rem;\n color: #1e2e37;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n /* max-width:398px; */\n /* flex:1; */\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.title-flex-expand[data-v-60711b04] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n.cell-title-btn[data-v-60711b04] {\n font-family: PingFangSC-Medium;\n font-size: 0.32rem;\n height: 0.64rem;\n line-height: 0.64rem;\n padding-left: 0.26667rem;\n padding-right: 0.26667rem;\n border-radius: 0.32rem;\n margin-left: 0.26667rem;\n color: #616c73;\n background-color: #f6f7f9;\n max-width: 4.66667rem;\n overflow: hidden;\n text-overflow: clip;\n}\n.sub-title[data-v-60711b04] {\n margin-top: 0.21333rem;\n /* flex-direction: row; */\n}\n.sub-text[data-v-60711b04] {\n font-family: 'PingFangSC-Regular';\n font-size: 0.32rem;\n color: #8e969b;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.cell-top-border[data-v-60711b04] {\n border-top-color: #dddddd;\n border-top-width: 1px;\n}\n.cell-bottom-border[data-v-60711b04] {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: #dddddd;\n}\n.cell-arrow-icon[data-v-60711b04] {\n width: 0.53333rem;\n height: 0.53333rem;\n}\n.checkbox-disabled[data-v-60711b04] {\n opacity: 0.3;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-checkbox/index.vue?3a4f2406","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-checkbox/<no source>"],"names":[],"mappings":";AA8DA;EACA,eAAA;EACA,gBAAA;CACA;AAEA;EACA,eAAA;EACA,gBAAA;EACA,wBAAA;EACA,yBAAA;EACA,0BAAA;EACA,uBAAA;EACA,iBAAA;CACA;AAEA;EACA,eAAA;EACA,gBAAA;CACA;AAEA;EACA,oBAAA;EACA,mBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,uCAAA;UAAA,+BAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,yBAAA;EACA,0BAAA;EACA,0BAAA;CACA;AAEA;EACA,6BAAA;EACA,yBAAA;CACA;AAEA;EACA,6BAAA;EACA,yBAAA;CACA;AAEA;EACA,YAAA;EACA,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,iBAAA;CACA;AAEA;EACA,0BAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EACA,qBAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,8BAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;CACA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA;AAEA;EACA,gCAAA;EACA,sBAAA;EACA,eAAA;EACA,SAAA;EACA,wBAAA;EACA,iBAAA;EACA,sBAAA;EACA,aAAA;EClJA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDmJA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA;AAEA;EACA,+BAAA;EACA,mBAAA;EACA,gBAAA;EACA,qBAAA;EACA,yBAAA;EACA,0BAAA;EACA,uBAAA;EACA,wBAAA;EACA,eAAA;EACA,0BAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;CACA;AAEA;EACA,uBAAA;EACA,0BAAA;CACA;AAEA;EACA,kCAAA;EACA,mBAAA;EACA,eAAA;EACA,SAAA;EACA,wBAAA;EACA,iBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;ECrLA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDsLA;AAEA;EACA,0BAAA;EACA,sBAAA;CACA;AAEA;EACA,yBAAA;EACA,2BAAA;EACA,6BAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,aAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div\n :key=\"_isColmo + 'checkbox'\"\n :class=\"[\n 'dof-cell',\n !disabled && 'active-cell',\n hasTopBorder && 'cell-top-border',\n hasBottomBorder && 'cell-bottom-border',\n disabled && 'checkbox-disabled'\n ]\"\n :style=\"cellDynamicHeight\"\n @click=\"dofCellClick\"\n >\n <image v-if=\"!_isColmo\" :src=\"checkIcon\" slot=\"value\" :class=\"['checkbox', disabled && 'checkbox-icon-disabled']\"></image>\n <div\n v-if=\"_isColmo\"\n slot=\"value\"\n class=\"circle\"\n :style=\"{\n backgroundColor: innerChecked ? '#b35336' : 'transparent',\n borderColor: innerChecked ? 'transparent' : '#797979'\n }\"\n >\n <dof-iconfont\n v-if=\"innerChecked\"\n style=\"width: 40px\"\n :code=\"'\\u4729'\"\n :size=\"40\"\n :color=\"'rgba(255, 255, 255, 0.8)'\"\n ></dof-iconfont>\n </div>\n <div class=\"avatar\" v-if=\"itemImg && itemImg != ''\">\n <image v-if=\"itemImg && itemImg != ''\" :src=\"itemImg\" class=\"item-img\"> </image>\n </div>\n\n <div\n :class=\"[\n 'main-wrapper',\n hasSubTopBorder && 'checkBox-top-border',\n itemImg && hasSubBottomBorder && 'checkBox-bottom-border'\n ]\"\n :style=\"dynamicSizeComp\"\n >\n <div class=\"content-title\" :style=\"titleDynamicHeight\">\n <div class=\"cell-title\">\n <text :class=\"['title-text', isOverflow && 'title-flex-expand']\" slot=\"title\" ref=\"titleBox\">{{\n title\n }}</text>\n <text v-if=\"tag\" class=\"cell-title-btn\" ref=\"tagBox\">{{ tag }}</text>\n </div>\n <div v-if=\"desc\" class=\"sub-title\">\n <text class=\"sub-text\" slot=\"sub-text\">{{ desc }}</text>\n </div>\n </div>\n <dof-image :src=\"ARROW_ICON\" class=\"cell-arrow-icon\" v-if=\"hasArrow\"></dof-image>\n </div>\n <div v-if=\"!itemImg && hasSubBottomBorder\" class=\"fakeSubBorder\"></div>\n <div v-if=\"_isDiablo && disabled\" class=\"disabledMask\"></div>\n </div>\n</template>\n\n<style scoped>\n.checkbox {\n width: 36px;\n height: 36px;\n}\n\n.avatar {\n width: 96px;\n height: 96px;\n margin-left: 32px;\n /* margin-right: 24px; */\n background-color: #f8f8f8;\n border-radius: 48px;\n overflow: hidden;\n}\n\n.item-img {\n width: 96px;\n height: 96px;\n}\n\n.dof-cell {\n /* height: 160px; */\n position: relative;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-left: 32px;\n /* padding-right: 32px; */\n background-color: inherit;\n}\n\n.checkBox-top-border {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n\n.checkBox-bottom-border {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n\n.fakeSubBorder {\n height: 1px;\n position: absolute;\n right: 0;\n bottom: 0;\n background-color: #dddddd;\n left: 86px;\n}\n\n.active-cell:active {\n background-color: #f5f5f5;\n}\n\n.main-wrapper {\n flex: 1;\n flex-direction: row;\n align-items: center;\n padding-right: 32px;\n margin-left: 24px;\n}\n\n.content-title {\n flex: 1;\n flex-direction: column;\n /* align-items: flex-start; */\n justify-content: flex-start;\n}\n\n.cell-title {\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n flex: 1;\n}\n\n.title-text {\n font-family: PingFangSC-Regular;\n font-size: 32px;\n color: #1e2e37;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n /* max-width:398px; */\n /* flex:1; */\n}\n\n.title-flex-expand {\n flex: 1;\n}\n\n.cell-title-btn {\n font-family: PingFangSC-Medium;\n font-size: 24px;\n height: 48px;\n line-height: 48px;\n padding-left: 20px;\n padding-right: 20px;\n border-radius: 24px;\n margin-left: 20px;\n color: #616c73;\n background-color: #f6f7f9;\n max-width: 350px;\n overflow: hidden;\n text-overflow: clip;\n}\n\n.sub-title {\n margin-top: 16px;\n /* flex-direction: row; */\n}\n\n.sub-text {\n font-family: 'PingFangSC-Regular';\n font-size: 24px;\n color: #8e969b;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n flex: 1;\n}\n\n.cell-top-border {\n border-top-color: #dddddd;\n border-top-width: 1px;\n}\n\n.cell-bottom-border {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: #dddddd;\n}\n\n.cell-arrow-icon {\n width: 40px;\n height: 40px;\n}\n\n.checkbox-disabled {\n opacity: 0.3;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n<style scoped src=\"./diablo.css\"></style>\n\n<script>\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\nimport DofIconfont from '../dof-iconfont'\nconst dom = weex.requireModule('dom')\nconst icon = require('../setting/icon.base64.js')\n// var CHECKED = icon['public_ic_done@2x'];\n// var UNCHECKED = icon['unchecked'];\n// var CHECKED_DISABLED = icon['dischecked'];\n// var UNCHECKED_DISABLED = icon['disuncheked'];\nvar UNCHECKED = icon['icon_checkbox_unselect']\nvar UNCHECKEDDIABLO = icon['icon_checkbox_unselect_diablo']\nvar CHECKED = icon['icon_checkbox_selected']\nvar CHECKEDDIABLO = icon['icon_checkbox_selected_diablo']\nvar ARROW_ICON = icon['public_ic_more@3x']\nconst WIDTH = 498 // hack\nexport default {\n mixins: [ColmoMixin, DiabloMixin],\n components: { DofIconfont },\n props: {\n hasTopBorder: {\n type: Boolean,\n default: false\n },\n hasSubTopBorder: {\n type: Boolean,\n default: false\n },\n hasBottomBorder: {\n type: Boolean,\n default: false\n },\n hasSubBottomBorder: {\n type: Boolean,\n default: false\n },\n\n title: {\n type: String,\n require: true\n },\n\n tag: {\n type: String,\n default: ''\n },\n value: {\n type: [String, Number, Object],\n require: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n checked: {\n type: Boolean,\n default: false\n },\n desc: {\n type: String,\n default: ''\n },\n itemImg: {\n type: String,\n default: ''\n },\n hasArrow: {\n type: Boolean,\n default: false\n }\n },\n data: () => ({\n innerChecked: false,\n isOverflow: false,\n titleWidth: 0,\n tagWidth: 0\n }),\n watch: {\n title: {\n handler(newValue, oldValue) {\n if (newValue) {\n this.$nextTick(() => {\n this.isOverflow = this.titleWidth + this.tagWidth > WIDTH\n })\n }\n },\n immediate: true\n }\n },\n created() {\n const { checked, disabled } = this\n this.innerChecked = checked\n },\n computed: {\n icon () {\n return [this._isDiablo ? CHECKEDDIABLO : CHECKED, this._isDiablo ? UNCHECKEDDIABLO : UNCHECKED]\n },\n checkIcon() {\n const { icon, disabled, innerChecked } = this\n return icon[innerChecked ? 0 : 1]\n },\n // item动态高度 由desc撑开\n // dynamicSizeComp() {\n // if (this.itemImg) {\n // return {\n // height: '160px'\n // }\n // } else {\n // return { }\n // }\n // },\n dynamicSizeComp() {\n if (this.desc || this.itemImg) {\n return {\n height: '160.5px' //有subtitle或者图片时的高度\n }\n } else {\n return {\n // height: '80px' ////无subtitle和无图片时的高度\n }\n }\n },\n\n cellDynamicHeight() {\n if (!this.desc && !this.itemImg) {\n return {\n // height: '82px' ////无subtitle和无图片时的高度\n }\n }\n return {}\n },\n\n titleDynamicHeight() {\n if (!this.desc && !this.itemImg) {\n return {\n height: this._isColmo ? '104px' : '80px' ////无subtitle和无图片时的高度\n }\n }\n return {}\n }\n },\n\n methods: {\n dofCellClick() {\n const { disabled, innerChecked, value } = this\n if (!disabled) {\n this.innerChecked = !innerChecked\n this.$emit('dofCheckBoxItemChecked', { value, checked: this.innerChecked })\n }\n },\n dynamicIsOverflow() {\n // ios下面 对于这个动态的设置flex=1,或者max-width都会 偶现不生效。\n this.$nextTick(() => {\n setTimeout(() => {\n const result = dom.getComponentRect(this.$refs.tagBox, option => {\n const result2 = dom.getComponentRect(this.$refs.titleBox, titleResult => {\n this.titleWidth = titleResult.size && titleResult.size.width\n this.tagWidth = option.size && option.size.width\n this.isOverflow = this.titleWidth + this.tagWidth > WIDTH\n })\n })\n }, 60)\n })\n }\n },\n mounted() {\n this.dynamicIsOverflow()\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9051
|
+
exports.push([module.i, "\n.checkbox[data-v-60711b04] {\n width: 0.48rem;\n height: 0.48rem;\n}\n.avatar[data-v-60711b04] {\n width: 1.28rem;\n height: 1.28rem;\n margin-left: 0.42667rem;\n /* margin-right: 24px; */\n background-color: #f8f8f8;\n border-radius: 0.64rem;\n overflow: hidden;\n}\n.item-img[data-v-60711b04] {\n width: 1.28rem;\n height: 1.28rem;\n}\n.dof-cell[data-v-60711b04] {\n /* height: 160px; */\n position: relative;\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: center;\n -webkit-align-items: center;\n align-items: center;\n padding-left: 0.42667rem;\n /* padding-right: 32px; */\n background-color: inherit;\n}\n.checkBox-top-border[data-v-60711b04] {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n.checkBox-bottom-border[data-v-60711b04] {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n.fakeSubBorder[data-v-60711b04] {\n height: 1px;\n position: absolute;\n right: 0;\n bottom: 0;\n background-color: #dddddd;\n left: 1.14667rem;\n}\n.active-cell[data-v-60711b04]:active {\n background-color: #f5f5f5;\n}\n.main-wrapper[data-v-60711b04] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n padding-right: 0.42667rem;\n margin-left: 0.32rem;\n}\n.content-title[data-v-60711b04] {\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 /* align-items: flex-start; */\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n}\n.cell-title[data-v-60711b04] {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n.title-text[data-v-60711b04] {\n font-family: PingFangSC-Regular;\n font-size: 0.42667rem;\n color: #1e2e37;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n /* max-width:398px; */\n /* flex:1; */\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.title-flex-expand[data-v-60711b04] {\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n}\n.cell-title-btn[data-v-60711b04] {\n font-family: PingFangSC-Medium;\n font-size: 0.32rem;\n height: 0.64rem;\n line-height: 0.64rem;\n padding-left: 0.26667rem;\n padding-right: 0.26667rem;\n border-radius: 0.32rem;\n margin-left: 0.26667rem;\n color: #616c73;\n background-color: #f6f7f9;\n max-width: 4.66667rem;\n overflow: hidden;\n text-overflow: clip;\n}\n.sub-title[data-v-60711b04] {\n margin-top: 0.21333rem;\n /* flex-direction: row; */\n}\n.sub-text[data-v-60711b04] {\n font-family: 'PingFangSC-Regular';\n font-size: 0.32rem;\n color: #8e969b;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n -webkit-box-flex: 1;\n -webkit-flex: 1;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n -webkit-line-clamp: 1;\n}\n.cell-top-border[data-v-60711b04] {\n border-top-color: #dddddd;\n border-top-width: 1px;\n}\n.cell-bottom-border[data-v-60711b04] {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: #dddddd;\n}\n.cell-arrow-icon[data-v-60711b04] {\n width: 0.53333rem;\n height: 0.53333rem;\n}\n.checkbox-disabled[data-v-60711b04] {\n opacity: 0.3;\n}\n", "", {"version":3,"sources":["/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-checkbox/index.vue?1d706632","/Users/wuhm45/Documents/code/weex组件库/dolphin-weex-ui/packages/dof-checkbox/<no source>"],"names":[],"mappings":";AA8DA;EACA,eAAA;EACA,gBAAA;CACA;AAEA;EACA,eAAA;EACA,gBAAA;EACA,wBAAA;EACA,yBAAA;EACA,0BAAA;EACA,uBAAA;EACA,iBAAA;CACA;AAEA;EACA,eAAA;EACA,gBAAA;CACA;AAEA;EACA,oBAAA;EACA,mBAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,uCAAA;UAAA,+BAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,yBAAA;EACA,0BAAA;EACA,0BAAA;CACA;AAEA;EACA,6BAAA;EACA,yBAAA;CACA;AAEA;EACA,6BAAA;EACA,yBAAA;CACA;AAEA;EACA,YAAA;EACA,mBAAA;EACA,SAAA;EACA,UAAA;EACA,0BAAA;EACA,iBAAA;CACA;AAEA;EACA,0BAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,0BAAA;EACA,qBAAA;CACA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;EACA,6BAAA;EAAA,8BAAA;EAAA,+BAAA;UAAA,uBAAA;EACA,8BAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;CACA;AAEA;EACA,+BAAA;EAAA,8BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,wBAAA;EAAA,oCAAA;UAAA,4BAAA;EACA,0BAAA;EAAA,4BAAA;UAAA,oBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA;AAEA;EACA,gCAAA;EACA,sBAAA;EACA,eAAA;EACA,SAAA;EACA,wBAAA;EACA,iBAAA;EACA,sBAAA;EACA,aAAA;EClJA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDmJA;AAEA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;CACA;AAEA;EACA,+BAAA;EACA,mBAAA;EACA,gBAAA;EACA,qBAAA;EACA,yBAAA;EACA,0BAAA;EACA,uBAAA;EACA,wBAAA;EACA,eAAA;EACA,0BAAA;EACA,sBAAA;EACA,iBAAA;EACA,oBAAA;CACA;AAEA;EACA,uBAAA;EACA,0BAAA;CACA;AAEA;EACA,kCAAA;EACA,mBAAA;EACA,eAAA;EACA,SAAA;EACA,wBAAA;EACA,iBAAA;EACA,oBAAA;EAAA,gBAAA;UAAA,QAAA;ECrLA,iBAAA;EAAA,wBAAA;EAAA,sBAAA;CDsLA;AAEA;EACA,0BAAA;EACA,sBAAA;CACA;AAEA;EACA,yBAAA;EACA,2BAAA;EACA,6BAAA;CACA;AAEA;EACA,kBAAA;EACA,mBAAA;CACA;AAEA;EACA,aAAA;CACA","file":"index.vue","sourcesContent":["<template>\n <div\n :key=\"_isColmo + 'checkbox'\"\n :class=\"[\n 'dof-cell',\n !disabled && 'active-cell',\n hasTopBorder && 'cell-top-border',\n hasBottomBorder && 'cell-bottom-border',\n disabled && 'checkbox-disabled'\n ]\"\n :style=\"cellDynamicHeight\"\n @click=\"dofCellClick\"\n >\n <image v-if=\"!_isColmo\" :src=\"checkIcon\" slot=\"value\" :class=\"['checkbox', disabled && 'checkbox-icon-disabled']\"></image>\n <div\n v-if=\"_isColmo\"\n slot=\"value\"\n class=\"circle\"\n :style=\"{\n backgroundColor: innerChecked ? '#b35336' : 'transparent',\n borderColor: innerChecked ? 'transparent' : '#797979'\n }\"\n >\n <dof-iconfont\n v-if=\"innerChecked\"\n style=\"width: 40px\"\n :code=\"'\\u4729'\"\n :size=\"40\"\n :color=\"'rgba(255, 255, 255, 0.8)'\"\n ></dof-iconfont>\n </div>\n <div class=\"avatar\" v-if=\"itemImg && itemImg != ''\">\n <image v-if=\"itemImg && itemImg != ''\" :src=\"itemImg\" class=\"item-img\"> </image>\n </div>\n\n <div\n :class=\"[\n 'main-wrapper',\n hasSubTopBorder && 'checkBox-top-border',\n itemImg && hasSubBottomBorder && 'checkBox-bottom-border'\n ]\"\n :style=\"dynamicSizeComp\"\n >\n <div class=\"content-title\" :style=\"titleDynamicHeight\">\n <div class=\"cell-title\">\n <text :class=\"['title-text', isOverflow && 'title-flex-expand']\" slot=\"title\" ref=\"titleBox\">{{\n title\n }}</text>\n <text v-if=\"tag\" class=\"cell-title-btn\" ref=\"tagBox\">{{ tag }}</text>\n </div>\n <div v-if=\"desc\" class=\"sub-title\">\n <text class=\"sub-text\" slot=\"sub-text\">{{ desc }}</text>\n </div>\n </div>\n <dof-image :src=\"ARROW_ICON\" class=\"cell-arrow-icon\" v-if=\"hasArrow\"></dof-image>\n </div>\n <div v-if=\"!itemImg && hasSubBottomBorder\" class=\"fakeSubBorder\"></div>\n <div v-if=\"_isDiablo && disabled\" class=\"disabledMask\"></div>\n </div>\n</template>\n\n<style scoped>\n.checkbox {\n width: 36px;\n height: 36px;\n}\n\n.avatar {\n width: 96px;\n height: 96px;\n margin-left: 32px;\n /* margin-right: 24px; */\n background-color: #f8f8f8;\n border-radius: 48px;\n overflow: hidden;\n}\n\n.item-img {\n width: 96px;\n height: 96px;\n}\n\n.dof-cell {\n /* height: 160px; */\n position: relative;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-left: 32px;\n /* padding-right: 32px; */\n background-color: inherit;\n}\n\n.checkBox-top-border {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n\n.checkBox-bottom-border {\n border-bottom-color: #dddddd;\n border-bottom-width: 1px;\n}\n\n.fakeSubBorder {\n height: 1px;\n position: absolute;\n right: 0;\n bottom: 0;\n background-color: #dddddd;\n left: 86px;\n}\n\n.active-cell:active {\n background-color: #f5f5f5;\n}\n\n.main-wrapper {\n flex: 1;\n flex-direction: row;\n align-items: center;\n padding-right: 32px;\n margin-left: 24px;\n}\n\n.content-title {\n flex: 1;\n flex-direction: column;\n /* align-items: flex-start; */\n justify-content: flex-start;\n}\n\n.cell-title {\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n flex: 1;\n}\n\n.title-text {\n font-family: PingFangSC-Regular;\n font-size: 32px;\n color: #1e2e37;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n /* max-width:398px; */\n /* flex:1; */\n}\n\n.title-flex-expand {\n flex: 1;\n}\n\n.cell-title-btn {\n font-family: PingFangSC-Medium;\n font-size: 24px;\n height: 48px;\n line-height: 48px;\n padding-left: 20px;\n padding-right: 20px;\n border-radius: 24px;\n margin-left: 20px;\n color: #616c73;\n background-color: #f6f7f9;\n max-width: 350px;\n overflow: hidden;\n text-overflow: clip;\n}\n\n.sub-title {\n margin-top: 16px;\n /* flex-direction: row; */\n}\n\n.sub-text {\n font-family: 'PingFangSC-Regular';\n font-size: 24px;\n color: #8e969b;\n lines: 1;\n text-overflow: ellipsis;\n overflow: hidden;\n flex: 1;\n}\n\n.cell-top-border {\n border-top-color: #dddddd;\n border-top-width: 1px;\n}\n\n.cell-bottom-border {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: #dddddd;\n}\n\n.cell-arrow-icon {\n width: 40px;\n height: 40px;\n}\n\n.checkbox-disabled {\n opacity: 0.3;\n}\n</style>\n<style scoped src=\"./colmo.css\"></style>\n<style scoped src=\"./diablo.css\"></style>\n\n<script>\nimport ColmoMixin from '../../mixins/colmo'\nimport DiabloMixin from '../../mixins/diablo'\nimport DofIconfont from '../dof-iconfont'\nconst dom = weex.requireModule('dom')\nconst icon = require('../setting/icon.base64.js')\n// var CHECKED = icon['public_ic_done@2x'];\n// var UNCHECKED = icon['unchecked'];\n// var CHECKED_DISABLED = icon['dischecked'];\n// var UNCHECKED_DISABLED = icon['disuncheked'];\nvar UNCHECKED = icon['icon_checkbox_unselect']\nvar UNCHECKEDDIABLO = icon['icon_checkbox_unselect_diablo']\nvar CHECKED = icon['icon_checkbox_selected']\nvar CHECKEDDIABLO = icon['icon_checkbox_selected_diablo']\nvar ARROW_ICON = icon['public_ic_more@3x']\nconst WIDTH = 498 // hack\nexport default {\n mixins: [ColmoMixin, DiabloMixin],\n components: { DofIconfont },\n props: {\n hasTopBorder: {\n type: Boolean,\n default: false\n },\n hasSubTopBorder: {\n type: Boolean,\n default: false\n },\n hasBottomBorder: {\n type: Boolean,\n default: false\n },\n hasSubBottomBorder: {\n type: Boolean,\n default: false\n },\n\n title: {\n type: String,\n require: true\n },\n\n tag: {\n type: String,\n default: ''\n },\n value: {\n type: [String, Number, Object],\n require: true\n },\n disabled: {\n type: Boolean,\n default: false\n },\n checked: {\n type: Boolean,\n default: false\n },\n desc: {\n type: String,\n default: ''\n },\n itemImg: {\n type: String,\n default: ''\n },\n hasArrow: {\n type: Boolean,\n default: false\n }\n },\n data: () => ({\n innerChecked: false,\n isOverflow: false,\n titleWidth: 0,\n tagWidth: 0\n }),\n watch: {\n title: {\n handler(newValue, oldValue) {\n if (newValue) {\n this.$nextTick(() => {\n this.isOverflow = this.titleWidth + this.tagWidth > WIDTH\n })\n }\n },\n immediate: true\n }\n },\n created() {\n const { checked, disabled } = this\n this.innerChecked = checked\n },\n computed: {\n icon () {\n return [this._isDiablo ? CHECKEDDIABLO : CHECKED, this._isDiablo ? UNCHECKEDDIABLO : UNCHECKED]\n },\n checkIcon() {\n const { icon, disabled, innerChecked } = this\n return icon[innerChecked ? 0 : 1]\n },\n // item动态高度 由desc撑开\n // dynamicSizeComp() {\n // if (this.itemImg) {\n // return {\n // height: '160px'\n // }\n // } else {\n // return { }\n // }\n // },\n dynamicSizeComp() {\n if (this.desc || this.itemImg) {\n return {\n height: '160.5px' //有subtitle或者图片时的高度\n }\n } else {\n return {\n // height: '80px' ////无subtitle和无图片时的高度\n }\n }\n },\n\n cellDynamicHeight() {\n if (!this.desc && !this.itemImg) {\n return {\n // height: '82px' ////无subtitle和无图片时的高度\n }\n }\n return {}\n },\n\n titleDynamicHeight() {\n if (!this.desc && !this.itemImg) {\n return {\n height: this._isColmo ? '104px' : '80px' ////无subtitle和无图片时的高度\n }\n }\n return {}\n },\n isHarmony() {\n return weex.config.env.platform == 'harmony'\n }\n },\n\n methods: {\n dofCellClick() {\n if (this.isHarmony) {\n if (this.clickLock) return\n this.clickLock = true\n }\n const { disabled, innerChecked, value } = this\n if (!disabled) {\n this.innerChecked = !innerChecked\n this.$emit('dofCheckBoxItemChecked', { value, checked: this.innerChecked })\n }\n if (this.isHarmony) {\n setTimeout(() => {\n this.clickLock = false\n }, 100)\n }\n },\n dynamicIsOverflow() {\n // ios下面 对于这个动态的设置flex=1,或者max-width都会 偶现不生效。\n this.$nextTick(() => {\n setTimeout(() => {\n const result = dom.getComponentRect(this.$refs.tagBox, option => {\n const result2 = dom.getComponentRect(this.$refs.titleBox, titleResult => {\n this.titleWidth = titleResult.size && titleResult.size.width\n this.tagWidth = option.size && option.size.width\n this.isOverflow = this.titleWidth + this.tagWidth > WIDTH\n })\n })\n }, 60)\n })\n }\n },\n mounted() {\n this.dynamicIsOverflow()\n }\n}\n</script>\n",null],"sourceRoot":""}]);
|
|
9038
9052
|
|
|
9039
9053
|
// exports
|
|
9040
9054
|
|
|
@@ -11887,6 +11901,9 @@ exports.default = {
|
|
|
11887
11901
|
_tagBg: function _tagBg() {
|
|
11888
11902
|
if (this.tagBg) return this.tagBg;
|
|
11889
11903
|
return this._isColmo ? '#B35336' : '#00A4F2';
|
|
11904
|
+
},
|
|
11905
|
+
isHarmony: function isHarmony() {
|
|
11906
|
+
return weex.config.env.platform == 'harmony';
|
|
11890
11907
|
}
|
|
11891
11908
|
},
|
|
11892
11909
|
mounted: function mounted() {
|
|
@@ -11901,7 +11918,8 @@ exports.default = {
|
|
|
11901
11918
|
return;
|
|
11902
11919
|
}
|
|
11903
11920
|
this.$nextTick(function () {
|
|
11904
|
-
|
|
11921
|
+
var dom = weex.requireModule('dom');
|
|
11922
|
+
(0, _dom.getBoundingClientRect)(dom, _this.$refs.body, function (res) {
|
|
11905
11923
|
_this.bodyHeight = res.size.height;
|
|
11906
11924
|
if (_this.collapsed_) {
|
|
11907
11925
|
_this.collapseBody(0);
|
|
@@ -11921,6 +11939,12 @@ exports.default = {
|
|
|
11921
11939
|
this.$emit('clicked', this.clicked_ = !this.clicked_);
|
|
11922
11940
|
},
|
|
11923
11941
|
onCollapse: function onCollapse() {
|
|
11942
|
+
var _this2 = this;
|
|
11943
|
+
|
|
11944
|
+
if (this.isHarmony) {
|
|
11945
|
+
if (this.clickLock) return;
|
|
11946
|
+
this.clickLock = true;
|
|
11947
|
+
}
|
|
11924
11948
|
this.collapsed_ = !this.collapsed_;
|
|
11925
11949
|
this.$emit('collapse', this.collapsed_);
|
|
11926
11950
|
if (this.collapsed_) {
|
|
@@ -11930,6 +11954,11 @@ exports.default = {
|
|
|
11930
11954
|
this.expandeBody();
|
|
11931
11955
|
this.expandeArrow();
|
|
11932
11956
|
}
|
|
11957
|
+
if (this.isHarmony) {
|
|
11958
|
+
setTimeout(function () {
|
|
11959
|
+
_this2.clickLock = false;
|
|
11960
|
+
}, 100);
|
|
11961
|
+
}
|
|
11933
11962
|
},
|
|
11934
11963
|
collapseBody: function collapseBody() {
|
|
11935
11964
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
|
|
@@ -14170,11 +14199,20 @@ exports.default = {
|
|
|
14170
14199
|
};
|
|
14171
14200
|
}
|
|
14172
14201
|
return {};
|
|
14202
|
+
},
|
|
14203
|
+
isHarmony: function isHarmony() {
|
|
14204
|
+
return weex.config.env.platform == 'harmony';
|
|
14173
14205
|
}
|
|
14174
14206
|
},
|
|
14175
14207
|
|
|
14176
14208
|
methods: {
|
|
14177
14209
|
dofCellClick: function dofCellClick() {
|
|
14210
|
+
var _this2 = this;
|
|
14211
|
+
|
|
14212
|
+
if (this.isHarmony) {
|
|
14213
|
+
if (this.clickLock) return;
|
|
14214
|
+
this.clickLock = true;
|
|
14215
|
+
}
|
|
14178
14216
|
var disabled = this.disabled,
|
|
14179
14217
|
innerChecked = this.innerChecked,
|
|
14180
14218
|
value = this.value;
|
|
@@ -14183,18 +14221,23 @@ exports.default = {
|
|
|
14183
14221
|
this.innerChecked = !innerChecked;
|
|
14184
14222
|
this.$emit('dofCheckBoxItemChecked', { value: value, checked: this.innerChecked });
|
|
14185
14223
|
}
|
|
14224
|
+
if (this.isHarmony) {
|
|
14225
|
+
setTimeout(function () {
|
|
14226
|
+
_this2.clickLock = false;
|
|
14227
|
+
}, 100);
|
|
14228
|
+
}
|
|
14186
14229
|
},
|
|
14187
14230
|
dynamicIsOverflow: function dynamicIsOverflow() {
|
|
14188
|
-
var
|
|
14231
|
+
var _this3 = this;
|
|
14189
14232
|
|
|
14190
14233
|
// ios下面 对于这个动态的设置flex=1,或者max-width都会 偶现不生效。
|
|
14191
14234
|
this.$nextTick(function () {
|
|
14192
14235
|
setTimeout(function () {
|
|
14193
|
-
var result = dom.getComponentRect(
|
|
14194
|
-
var result2 = dom.getComponentRect(
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14236
|
+
var result = dom.getComponentRect(_this3.$refs.tagBox, function (option) {
|
|
14237
|
+
var result2 = dom.getComponentRect(_this3.$refs.titleBox, function (titleResult) {
|
|
14238
|
+
_this3.titleWidth = titleResult.size && titleResult.size.width;
|
|
14239
|
+
_this3.tagWidth = option.size && option.size.width;
|
|
14240
|
+
_this3.isOverflow = _this3.titleWidth + _this3.tagWidth > WIDTH;
|
|
14198
14241
|
});
|
|
14199
14242
|
});
|
|
14200
14243
|
}, 60);
|
|
@@ -14876,7 +14919,8 @@ exports.default = {
|
|
|
14876
14919
|
var _this = this;
|
|
14877
14920
|
|
|
14878
14921
|
this.$nextTick(function () {
|
|
14879
|
-
|
|
14922
|
+
var dom = weex.requireModule('dom');
|
|
14923
|
+
(0, _dom.getBoundingClientRect)(dom, _this.$refs.slotBody, function (res) {
|
|
14880
14924
|
if (res.result) {
|
|
14881
14925
|
_this.bodyHeight = res.size.height;
|
|
14882
14926
|
}
|
|
@@ -14893,6 +14937,9 @@ exports.default = {
|
|
|
14893
14937
|
computed: {
|
|
14894
14938
|
accordion: function accordion() {
|
|
14895
14939
|
return this._activeData.accordion;
|
|
14940
|
+
},
|
|
14941
|
+
isHarmony: function isHarmony() {
|
|
14942
|
+
return weex.config.env.platform == 'harmony';
|
|
14896
14943
|
}
|
|
14897
14944
|
},
|
|
14898
14945
|
watch: {
|
|
@@ -14929,6 +14976,12 @@ exports.default = {
|
|
|
14929
14976
|
},
|
|
14930
14977
|
methods: {
|
|
14931
14978
|
onCollapseHandler: function onCollapseHandler() {
|
|
14979
|
+
var _this2 = this;
|
|
14980
|
+
|
|
14981
|
+
if (this.isHarmony) {
|
|
14982
|
+
if (this.clickLock) return;
|
|
14983
|
+
this.clickLock = true;
|
|
14984
|
+
}
|
|
14932
14985
|
this.collapsed_ = !this.collapsed_;
|
|
14933
14986
|
//手风琴-发送通知
|
|
14934
14987
|
this.$parent.collapseClick({ collapsed: this.collapsed_, name: this.name });
|
|
@@ -14941,6 +14994,11 @@ exports.default = {
|
|
|
14941
14994
|
this.expandeArrow();
|
|
14942
14995
|
}
|
|
14943
14996
|
}
|
|
14997
|
+
if (this.isHarmony) {
|
|
14998
|
+
setTimeout(function () {
|
|
14999
|
+
_this2.clickLock = false;
|
|
15000
|
+
}, 100);
|
|
15001
|
+
}
|
|
14944
15002
|
},
|
|
14945
15003
|
collapseBody: function collapseBody() {
|
|
14946
15004
|
var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 360;
|
|
@@ -17178,9 +17236,10 @@ exports.default = {
|
|
|
17178
17236
|
initRect: function initRect() {
|
|
17179
17237
|
var _this3 = this;
|
|
17180
17238
|
|
|
17239
|
+
var dom = weex.requireModule('dom');
|
|
17181
17240
|
this.ranges.forEach(function (range, i) {
|
|
17182
17241
|
if (range.gear) {
|
|
17183
|
-
(0, _dom.getBoundingClientRectBase)(_this3.$refs['bar'][i], function (res) {
|
|
17242
|
+
(0, _dom.getBoundingClientRectBase)(dom, _this3.$refs['bar'][i], function (res) {
|
|
17184
17243
|
_this3.rects.push(_extends({}, range, {
|
|
17185
17244
|
left: res.size.left,
|
|
17186
17245
|
dis: res.size.left + res.size.width
|
|
@@ -26000,6 +26059,16 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
|
|
|
26000
26059
|
//
|
|
26001
26060
|
//
|
|
26002
26061
|
//
|
|
26062
|
+
//
|
|
26063
|
+
//
|
|
26064
|
+
//
|
|
26065
|
+
//
|
|
26066
|
+
//
|
|
26067
|
+
//
|
|
26068
|
+
//
|
|
26069
|
+
//
|
|
26070
|
+
//
|
|
26071
|
+
//
|
|
26003
26072
|
|
|
26004
26073
|
var _dofButton = __webpack_require__(21);
|
|
26005
26074
|
|
|
@@ -26017,21 +26086,29 @@ var _diablo = __webpack_require__(4);
|
|
|
26017
26086
|
|
|
26018
26087
|
var _diablo2 = _interopRequireDefault(_diablo);
|
|
26019
26088
|
|
|
26089
|
+
var _index = __webpack_require__(5);
|
|
26090
|
+
|
|
26091
|
+
var _index2 = _interopRequireDefault(_index);
|
|
26092
|
+
|
|
26020
26093
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26021
26094
|
|
|
26095
|
+
var defaultPicBaseUrl = function defaultPicBaseUrl(imageName) {
|
|
26096
|
+
return 'meiju://common/emptyImage?imageName=' + imageName;
|
|
26097
|
+
};
|
|
26098
|
+
var isNewVersion = _index2.default.compareVersionNew('11.4.15');
|
|
26022
26099
|
var Types = {
|
|
26023
26100
|
noNetwork: {
|
|
26024
|
-
pic: _imgs2.default['noNetwork'],
|
|
26101
|
+
pic: isNewVersion ? defaultPicBaseUrl('img_empty_02_disconnection') : _imgs2.default['noNetwork'],
|
|
26025
26102
|
content: '网络异常,请检查您的网络设置'
|
|
26026
26103
|
// button: '刷新'
|
|
26027
26104
|
},
|
|
26028
26105
|
noUpdate: {
|
|
26029
|
-
pic: _imgs2.default['noUpdate'],
|
|
26106
|
+
pic: isNewVersion ? defaultPicBaseUrl('img_empty_03_update') : _imgs2.default['noUpdate'],
|
|
26030
26107
|
content: '当前版本较低',
|
|
26031
26108
|
desc: '请更新到最新版APP'
|
|
26032
26109
|
},
|
|
26033
26110
|
noPage: {
|
|
26034
|
-
pic: _imgs2.default['noPage'],
|
|
26111
|
+
pic: isNewVersion ? defaultPicBaseUrl('img_empty_04_content') : _imgs2.default['noPage'],
|
|
26035
26112
|
content: '找不到页面'
|
|
26036
26113
|
},
|
|
26037
26114
|
colmo: {
|
|
@@ -26075,6 +26152,9 @@ exports.default = {
|
|
|
26075
26152
|
}
|
|
26076
26153
|
},
|
|
26077
26154
|
computed: {
|
|
26155
|
+
isNewVersion: function isNewVersion() {
|
|
26156
|
+
return _index2.default.compareVersionNew('11.4.15');
|
|
26157
|
+
},
|
|
26078
26158
|
type_: function type_() {
|
|
26079
26159
|
if (this.type) return this.type;
|
|
26080
26160
|
return this._isColmo ? 'colmo' : 'noPage';
|
|
@@ -29677,8 +29757,9 @@ exports.default = {
|
|
|
29677
29757
|
initElWidth: function initElWidth() {
|
|
29678
29758
|
var _this = this;
|
|
29679
29759
|
|
|
29760
|
+
var dom = weex.requireModule('dom');
|
|
29680
29761
|
var el = this.$refs['dof-slider-scale'];
|
|
29681
|
-
(0, _dom.getBoundingClientRect)(el, function (res) {
|
|
29762
|
+
(0, _dom.getBoundingClientRect)(dom, el, function (res) {
|
|
29682
29763
|
res.result && (_this.elWidth = res.size.width);
|
|
29683
29764
|
});
|
|
29684
29765
|
}
|
|
@@ -47641,7 +47722,8 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
|
|
|
47641
47722
|
"weex-type": "div"
|
|
47642
47723
|
}
|
|
47643
47724
|
}, [_c('figure', {
|
|
47644
|
-
staticClass: "
|
|
47725
|
+
staticClass: " weex-el weex-image",
|
|
47726
|
+
class: [_vm.isNewVersion ? 'result-image-new' : 'result-image'],
|
|
47645
47727
|
style: (_vm._px2rem(_vm.imgStyle, 75)),
|
|
47646
47728
|
attrs: {
|
|
47647
47729
|
"aria-hidden": true,
|