@10yun/cv-pc-ui 0.3.52 → 0.3.53
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/lib/cv-ui.cjs +4 -4
- package/lib/cv-ui.js +14 -2
- package/package.json +1 -1
- package/src/mixins/attrs.js +2 -3
package/lib/cv-ui.js
CHANGED
|
@@ -608,7 +608,7 @@ const Dl = (() => {
|
|
|
608
608
|
} }, methods: { _mergeAttrs(e) {
|
|
609
609
|
const t = this.$cvUiParams || {}, o = e && t[e] || {}, l = t[this.componentName] || {}, a = Object.assign({}, o, l);
|
|
610
610
|
return Object.assign({}, a, this.$attrs);
|
|
611
|
-
} } }, Ss = { class: "cv-geo-map__wrap" }, Vs = { class: "cv-geo-map__box" }, _s = { style: { width: "100%", height: "510px" } }, Is = ["src"], Ts = { class: "cv-geo-map__info" }, Ls = { key: 0, class: "cv-geo-map__address" }, Ds = { key: 1, class: "cv-geo-map__jwd" }, Ot = S({ name: "cvGeoMap", mixins: [$l], emits: ["update:address", "update:latitude", "update:longitude", "update:name", "update:city"], props: { title: { type: [String], default: "选择经纬度地点" }, mapKey: { type: [String], default: "" }, mapType: { type: [String], default: "qq" }, address: { type: [String] }, latitude: { type: [Number, String] }, longitude: { type: [Number, String] } }, watch: { address(e) {
|
|
611
|
+
} } }, Ss = { class: "cv-geo-map__wrap" }, Vs = { class: "cv-geo-map__box" }, _s = { style: { width: "100%", height: "510px" } }, Is = ["src"], Ts = { class: "cv-geo-map__info" }, Ls = { key: 0, class: "cv-geo-map__address" }, Ds = { key: 1, class: "cv-geo-map__jwd" }, Ot = S({ name: "cvGeoMap", mixins: [$l], emits: ["update:address", "update:latitude", "update:longitude", "update:name", "update:city"], props: { title: { type: [String], default: "选择经纬度地点" }, mapKey: { type: [String], default: "" }, mapSecret: { type: [String], default: "" }, mapType: { type: [String], default: "qq" }, address: { type: [String] }, name: { type: [String] }, city: { type: [String] }, latitude: { type: [Number, String] }, longitude: { type: [Number, String] } }, watch: { address(e) {
|
|
612
612
|
this.localAddress = e;
|
|
613
613
|
}, latitude(e) {
|
|
614
614
|
this.localLatitude = e;
|
|
@@ -620,9 +620,21 @@ const Dl = (() => {
|
|
|
620
620
|
this.localCity = e;
|
|
621
621
|
} }, computed: { localMapKey() {
|
|
622
622
|
return this._mergeAttrs("geo").mapKey;
|
|
623
|
+
}, localMapSecret() {
|
|
624
|
+
return this._mergeAttrs("geo").mapSecret;
|
|
623
625
|
}, mapSrc() {
|
|
624
626
|
let e = this.localMapKey;
|
|
625
|
-
|
|
627
|
+
if (this.mapType == "qq") {
|
|
628
|
+
if (!this.localMapKey) return "";
|
|
629
|
+
let t = "https://apis.map.qq.com/tools/locpicker";
|
|
630
|
+
return t += `?search=1&type=1&key=${e}&referer=myapp`, this.latitude && this.longitude && (t += `&coord=${this.latitude},${this.longitude}`), t;
|
|
631
|
+
}
|
|
632
|
+
if (this.mapType == "amap") {
|
|
633
|
+
if (!this.localMapKey || !this.localMapSecret) return "";
|
|
634
|
+
let t = "https://m.amap.com/picker/";
|
|
635
|
+
return t += `?zoom=15&radius=1000&total=20&key=${e}&jscode=${localMapSecret}`, this.latitude && this.longitude && (t += `¢er=${this.longitude},${this.latitude}`), t;
|
|
636
|
+
}
|
|
637
|
+
return this.$message.info("目前不支持百度地图"), "";
|
|
626
638
|
} }, data: () => ({ localMapShow: !1, localAddress: "", localLatitude: "", localLongitude: "", localName: "", localCity: "" }), mounted() {
|
|
627
639
|
this.initData();
|
|
628
640
|
}, methods: { initData() {
|
package/package.json
CHANGED
package/src/mixins/attrs.js
CHANGED
|
@@ -21,6 +21,8 @@ export default {
|
|
|
21
21
|
const globalCompoAttr = globalAttrs[this.componentName] || {};
|
|
22
22
|
const lastCompAttrs = Object.assign({}, globalUploadAttrs, globalCompoAttr);
|
|
23
23
|
// console.log('---lastCompAttrs---', this.componentName, lastCompAttrs, this.$props, this.$attrs);
|
|
24
|
+
console.log(globalAttrs);
|
|
25
|
+
console.log(globalCompoAttr);
|
|
24
26
|
return Object.assign(
|
|
25
27
|
{},
|
|
26
28
|
lastCompAttrs,
|
|
@@ -29,9 +31,6 @@ export default {
|
|
|
29
31
|
// { disabled: this.disabled || this.$attrs.disabled },
|
|
30
32
|
// { readonly: this.readonly || this.$attrs.readonly }
|
|
31
33
|
);
|
|
32
|
-
console.log(globalAttrs);
|
|
33
|
-
console.log(globalCompoAttr);
|
|
34
|
-
return 'NQWBZ-VG6KO-YUDWV-SCAPV-MFRYH-QJB7S';
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
};
|