提交 e00de847 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

docs: 添加注释

上级 bc2b8569
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
methods: { methods: {
getAppBaseInfo: function () { getAppBaseInfo: function () {
const res = uni.getAppBaseInfo(); const res = uni.getAppBaseInfo();
//类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。
const json = JSON.stringify(res); const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json); const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[]; this.items = [] as Item[];
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
methods: { methods: {
getDeviceInfo: function () { getDeviceInfo: function () {
const res = uni.getDeviceInfo(); const res = uni.getDeviceInfo();
//类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。
const json = JSON.stringify(res); const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json); const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[]; this.items = [] as Item[];
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
getSystemInfo: function () { getSystemInfo: function () {
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
//类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。
const json = JSON.stringify(res); const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json); const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[]; this.items = [] as Item[];
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
methods: { methods: {
getWindowInfo: function () { getWindowInfo: function () {
const res = uni.getWindowInfo(); const res = uni.getWindowInfo();
//类型对象暂时不支持forin或Object.keys(), 临时通过字符串进行转化。
const json = JSON.stringify(res); const json = JSON.stringify(res);
const result = JSON.parse<Map<string, any>>(json); const result = JSON.parse<Map<string, any>>(json);
this.items = [] as Item[]; this.items = [] as Item[];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册