diff --git a/pages.json b/pages.json index bcdf38f9d953e66fc9cba7685e3ea00b6ce0c369..a2153bb9c6f52140ec3dee8b1569c5808078a9ae 100644 --- a/pages.json +++ b/pages.json @@ -35,6 +35,14 @@ } }, + { + "path" : "pages/component/component", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } + }, { "path" : "pages/SDKIntegration/SDKIntegration", "style" : diff --git a/pages/advance/advance.vue b/pages/advance/advance.vue index f27e5288bb642474762775191dd93c37473a8a0f..430397bbb1b6eae6b802d82ca0dc17f5ba32a62f 100644 --- a/pages/advance/advance.vue +++ b/pages/advance/advance.vue @@ -5,7 +5,6 @@ - @@ -33,6 +32,15 @@ + + + + + + + + + @@ -162,6 +170,11 @@ url: '/pages/lifecycle/lifecycle' }) }, + testHelloUTSComponent: function() { + uni.navigateTo({ + url: '/pages/component/component' + }) + }, testSyntax: function() { uni.navigateTo({ url: '/pages/SyntaxCase/index' diff --git a/pages/component/component.nvue b/pages/component/component.nvue new file mode 100644 index 0000000000000000000000000000000000000000..d9f0731287eeae8af75340be9d55540eb9146dd2 --- /dev/null +++ b/pages/component/component.nvue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/uts-hello-component/changelog.md b/uni_modules/uts-hello-component/changelog.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/uni_modules/uts-hello-component/package.json b/uni_modules/uts-hello-component/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8daab459237de0da72bdbe35f42edba789b5d08f --- /dev/null +++ b/uni_modules/uts-hello-component/package.json @@ -0,0 +1,81 @@ +{ + "id": "uts-hello-component", + "displayName": "uts-hello-component", + "version": "1.0.0", + "description": "uts-hello-component", + "keywords": [ + "uts-hello-component" +], + "repository": "", + "engines": { + "HBuilderX": "^3.6.8" + }, + "dcloudext": { + "type": "uts", + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "", + "data": "", + "permissions": "" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "u", + "aliyun": "u" + }, + "client": { + "Vue": { + "vue2": "u", + "vue3": "u" + }, + "App": { + "app-android": "u", + "app-ios": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/uts-hello-component/readme.md b/uni_modules/uts-hello-component/readme.md new file mode 100644 index 0000000000000000000000000000000000000000..92d2add462a016626b1c9d56e6cbe5c4b6b8f515 --- /dev/null +++ b/uni_modules/uts-hello-component/readme.md @@ -0,0 +1,5 @@ +# uts-hello-component +### 开发文档 +[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html) +[UTS 原生插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html) +[Hello UTS](https://gitcode.net/dcloud/hello-uts/-/tree/dev) \ No newline at end of file diff --git a/uni_modules/uts-hello-component/utssdk/app-android/container.vue b/uni_modules/uts-hello-component/utssdk/app-android/container.vue new file mode 100644 index 0000000000000000000000000000000000000000..3efa7057bd8d3a9117d64120e30ff7fb4d47e71b --- /dev/null +++ b/uni_modules/uts-hello-component/utssdk/app-android/container.vue @@ -0,0 +1,101 @@ + + + diff --git a/uni_modules/uts-hello-component/utssdk/app-android/index.uts b/uni_modules/uts-hello-component/utssdk/app-android/index.uts new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/uni_modules/uts-hello-component/utssdk/app-android/view.vue b/uni_modules/uts-hello-component/utssdk/app-android/view.vue new file mode 100644 index 0000000000000000000000000000000000000000..b106f8e82023b9ec54759c805d837eff76112d6a --- /dev/null +++ b/uni_modules/uts-hello-component/utssdk/app-android/view.vue @@ -0,0 +1,170 @@ + + + diff --git a/uni_modules/uts-hello-component/utssdk/app-ios/index.uts b/uni_modules/uts-hello-component/utssdk/app-ios/index.uts new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts index bf0495f2ad90991d07f4c653c5bc48b2f2385ae6..cce58765e3ac7d2ef0a017cf707f82669aa5b704 100644 --- a/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts +++ b/uni_modules/uts-nativepage/utssdk/app-android/DoAppWidget.uts @@ -76,17 +76,14 @@ class UIRunnable extends Runnable { appWidgetId: Int ) { - let widgetText = "当前股票价格为:0.0元" - setTimeout(function(){ // 模拟请求网络,这里需要替换成真正的网络请求 Thread.sleep(1000) - widgetText = "当前股票价格为:13.25元" + let widgetText = "当前股票价格为:13.25元" let uiRunnable = new UIRunnable(context,appWidgetManager,appWidgetId,widgetText) // 更新UI UTSAndroid.getUniActivity()!.runOnUiThread(uiRunnable) },500); - } \ No newline at end of file