refactor(通用功能): 代码规范整理

Signed-off-by: fit2-zhao <yong.zhao@fit2cloud.com>
This commit is contained in:
fit2-zhao 2023-05-06 13:31:51 +08:00 committed by fit2-zhao
parent e6cef61351
commit 0074a48369
5 changed files with 1 additions and 9 deletions

View File

@ -69,7 +69,6 @@
* polyfill version of `btoa` * polyfill version of `btoa`
*/ */
var btoaPolyfill = function (bin) { var btoaPolyfill = function (bin) {
// console.log('polyfilled');
var u32, c0, c1, c2, asc = ''; var u32, c0, c1, c2, asc = '';
var pad = bin.length % 3; var pad = bin.length % 3;
for (var i = 0; i < bin.length;) { for (var i = 0; i < bin.length;) {
@ -197,7 +196,6 @@
* polyfill version of `atob` * polyfill version of `atob`
*/ */
var atobPolyfill = function (asc) { var atobPolyfill = function (asc) {
// console.log('polyfilled');
asc = asc.replace(/\s+/g, ''); asc = asc.replace(/\s+/g, '');
if (!b64re.test(asc)) if (!b64re.test(asc))
throw new TypeError('malformed base64.'); throw new TypeError('malformed base64.');

View File

@ -73,10 +73,8 @@ export default class Node {
this.parent = null; this.parent = null;
this.visible = true; this.visible = true;
this.isCurrent = false; this.isCurrent = false;
// console.log(22, Object.prototype.hasOwnProperty.call(options, name));
for (let name in options) { for (let name in options) {
if (Object.prototype.hasOwnProperty.call(options, name)) { if (Object.prototype.hasOwnProperty.call(options, name)) {
// if (options.hasOwnProperty(name)) {
this[name] = options[name]; this[name] = options[name];
} }
} }

View File

@ -47,9 +47,7 @@ export default {
this.microApp = loadMicroApp(app); this.microApp = loadMicroApp(app);
}, },
messageInit() { messageInit() {
this.messageEvent.onGlobalStateChange((state, prev) => { this.messageEvent.onGlobalStateChange((state, prev) => {});
console.log("main-onGlobalStateChange", state, prev);
});
}, },
changeState() { changeState() {
this.messageEvent.setGlobalState({b: 1}); this.messageEvent.setGlobalState({b: 1});

View File

@ -273,7 +273,6 @@ export default {
} }
}, },
detail() { detail() {
console.log(this.edit)
this.disabled = false; this.disabled = false;
this.visible = true; this.visible = true;
}, },

View File

@ -213,7 +213,6 @@ export default {
this.$emit('refresh'); this.$emit('refresh');
}) })
.catch((e) => { .catch((e) => {
console.log(e)
}); });
}); });
} }