提交 283fc8b7 编写于 作者: 杜庆泉's avatar 杜庆泉

增加 log file 示例

上级 76cf1a30
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<button @click="logInt">打印整数</button> <button @click="logInt">打印整数</button>
<button @click="logObject">打印对象</button> <button @click="logObject">打印对象</button>
<button @click="logFunction">打印函数</button> <button @click="logFunction">打印函数</button>
<button @click="logFile">打印文件</button>
<button @click="logDate">打印日期</button> <button @click="logDate">打印日期</button>
<button @click="logDateCombine">组合打印日期</button> <button @click="logDateCombine">组合打印日期</button>
</template> </template>
...@@ -16,6 +17,7 @@ ...@@ -16,6 +17,7 @@
logObjectTest, logObjectTest,
logFunctionTest, logFunctionTest,
logDateTest, logDateTest,
logFileTest,
logDateCombineTest logDateCombineTest
} from '@/uni_modules/uts-advance' } from '@/uni_modules/uts-advance'
...@@ -43,6 +45,9 @@ ...@@ -43,6 +45,9 @@
logFunction() { logFunction() {
logFunctionTest() logFunctionTest()
}, },
logFile() {
logFileTest()
},
logDate() { logDate() {
logDateTest() logDateTest()
}, },
......
...@@ -26,6 +26,7 @@ import { ...@@ -26,6 +26,7 @@ import {
UTSAndroid UTSAndroid
} from "io.dcloud.uts"; } from "io.dcloud.uts";
import array from 'android.R.array'; import array from 'android.R.array';
import File from 'java.io.File';
...@@ -448,6 +449,11 @@ export function logFunctionTest(){ ...@@ -448,6 +449,11 @@ export function logFunctionTest(){
} }
export function logFileTest(){
console.log(new File("/sdcard/temp/1.txt"))
}
export function logDateTest(){ export function logDateTest(){
console.log(new Date()) console.log(new Date())
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册