This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
SXS20240115/SRC/iMES_PAD/module/moduleCustomer/program/sample/dialog_sample.js

44 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-01-24 16:47:50 +08:00
define(["angularAMD"], function (angularAMD) {
angularAMD.service('dialog_sample', ['$rootScope', '$filter', 'config', 'MMWService', '$mdDialog', '$calculater','$timeout',
function ($rootScope, $filter, config, $MMWService, $mdDialog, $calculater, $timeout) {
/***
* options : {
*
* }
*/
this.init = function (options) {
(function openDialog() {
$mdDialog.dialog('module/moduleCustomer/program/sample/dialog_sample.html',
function (dialog) {
return {
back: function () {
//返回
dialog.hide();
if (options.close)
options.close();
},
background: {
click: function () {
dialog.hide();
if (typeof (feedback) == 'function')
feedback();
}
},
confirm: function () {
if (options.callback)
options.callback();
dialog.hide();
}
}
});
})();
}
}
]);
});