提交 f2ff0a1a 编写于 作者: Q qiang

chore: build app

上级 f8b3159b
...@@ -4831,6 +4831,9 @@ var serviceContext = (function () { ...@@ -4831,6 +4831,9 @@ var serviceContext = (function () {
}, },
openMapApp (ctx, args) { openMapApp (ctx, args) {
return invokeVmMethod(ctx, 'openMapApp', args) return invokeVmMethod(ctx, 'openMapApp', args)
},
on (ctx, args) {
return ctx.on(args.name, args.callback)
} }
}; };
...@@ -10623,24 +10626,35 @@ var serviceContext = (function () { ...@@ -10623,24 +10626,35 @@ var serviceContext = (function () {
cancelText, cancelText,
cancelColor, cancelColor,
confirmText, confirmText,
confirmColor confirmColor,
editable = false,
placeholderText = ''
} = {}, callbackId) { } = {}, callbackId) {
// TODO 在 editable 为 true 时,content 应该是输入框中可修改内容。后续找客户端商量。
const buttons = showCancel ? [cancelText, confirmText] : [confirmText];
const tip = editable ? placeholderText : buttons;
content = content || ' '; content = content || ' ';
plus.nativeUI.confirm(content, (e) => { plus.nativeUI[editable ? 'prompt' : 'confirm'](content, (e) => {
if (showCancel) { if (showCancel) {
invoke$1(callbackId, { const isConfirm = e.index === 1;
const res = {
errMsg: 'showModal:ok', errMsg: 'showModal:ok',
confirm: e.index === 1, confirm: isConfirm,
cancel: e.index === 0 || e.index === -1 cancel: e.index === 0 || e.index === -1
}); };
isConfirm && editable && (res.content = e.value);
invoke$1(callbackId, res);
} else { } else {
invoke$1(callbackId, { const res = {
errMsg: 'showModal:ok', errMsg: 'showModal:ok',
confirm: e.index === 0, confirm: e.index === 0,
cancel: false cancel: false
}); };
editable && (res.content = e.value);
invoke$1(callbackId, res);
} }
}, title, showCancel ? [cancelText, confirmText] : [confirmText]); }, title, tip, buttons);
} }
function showActionSheet$1 ({ function showActionSheet$1 ({
itemList = [], itemList = [],
...@@ -19636,6 +19650,13 @@ var serviceContext = (function () { ...@@ -19636,6 +19650,13 @@ var serviceContext = (function () {
constructor (id, pageVm) { constructor (id, pageVm) {
this.id = id; this.id = id;
this.pageVm = pageVm; this.pageVm = pageVm;
}
on (name, callback) {
operateMapPlayer$3(this.id, this.pageVm, 'on', {
name,
callback
});
} }
} }
...@@ -19643,7 +19664,7 @@ var serviceContext = (function () { ...@@ -19643,7 +19664,7 @@ var serviceContext = (function () {
{ {
return plus.maps.getMapById(this.pageVm.$page.id + '-map-' + this.id) return plus.maps.getMapById(this.pageVm.$page.id + '-map-' + this.id)
} }
}; };
methods.forEach(function (method) { methods.forEach(function (method) {
MapContext.prototype[method] = callback.warp(function (options, callbackId) { MapContext.prototype[method] = callback.warp(function (options, callbackId) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册