首次提交

This commit is contained in:
何江明
2025-02-28 16:19:58 +08:00
commit 15014e22aa
92 changed files with 15941 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/hashmall-app.iml" filepath="$PROJECT_DIR$/.idea/hashmall-app.iml" />
</modules>
</component>
</project>
+23
View File
@@ -0,0 +1,23 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
.container {
padding: 15px;
}
button {
margin-bottom: 15px;
}
</style>
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 DCloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+15
View File
@@ -0,0 +1,15 @@
# hello-i18n
# en
A demo project for uni-app globalization
This template include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API
# zh-hans
uni-app 国际化演示
包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API
+8
View File
@@ -0,0 +1,8 @@
## 1.0.2(2022-06-30)
- 新增 支持 ios 安全区
## 1.0.1(2021-11-26)
- 新增 schema 国际化 (HBuilderX 3.3+)
- 修复 非 Android 平台切换语音无法实时变化的问题
- 修复 设置某些语言下无法生效的问题 (HBuilderX 3.3+)
## 1.0.0(2021-10-20)
- 初始化
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>
+24
View File
@@ -0,0 +1,24 @@
{
"locale.auto": "System",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "Home",
"index.component": "Component",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app globalization",
"index.demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema",
"index.detail": "Detail",
"index.language": "Language",
"index.language-info": "Settings",
"index.system-language": "System language",
"index.application-language": "Application language",
"index.language-change-confirm": "Applying this setting will restart the app",
"api.message": "Message",
"schema.name": "Name",
"schema.add": "Add",
"schema.add-success": "Add success"
}
+10
View File
@@ -0,0 +1,10 @@
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
import ja from './ja.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant,
ja
}
+23
View File
@@ -0,0 +1,23 @@
{
"locale.auto": "システム",
"locale.en": "英語",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "ホーム",
"index.component": "コンポーネント",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app globalization",
"index.demo-description": "ユニフレームワーク、manifest.json、pages.json、タブバー、ページ、コンポーネント、APIを含める、Schema",
"index.detail": "詳細",
"index.language": "言語",
"index.language-info": "設定",
"index.system-language": "システム言語",
"index.application-language": "アプリケーション言語",
"index.language-change-confirm": "この設定を適用すると、アプリが再起動します",
"api.message": "メッセージ",
"schema.add": "追加",
"schema.add-success": "成功を追加"
}
+36
View File
@@ -0,0 +1,36 @@
{
"common": {
"uni.app.quit": "もう一度押すと、アプリケーションが終了します",
"uni.async.error": "サーバーへの接続がタイムアウトしました。画面をクリックして再試行してください",
"uni.showActionSheet.cancel": "キャンセル",
"uni.showToast.unpaired": "使用するには、showToastとhideToastをペアにする必要があることに注意してください",
"uni.showLoading.unpaired": "使用するには、showLoadingとhideLoadingをペアにする必要があることに注意してください",
"uni.showModal.cancel": "キャンセル",
"uni.showModal.confirm": "OK",
"uni.chooseImage.cancel": "キャンセル",
"uni.chooseImage.sourceType.album": "アルバムから選択",
"uni.chooseImage.sourceType.camera": "カメラ",
"uni.chooseVideo.cancel": "キャンセル",
"uni.chooseVideo.sourceType.album": "アルバムから選択",
"uni.chooseVideo.sourceType.camera": "カメラ",
"uni.previewImage.cancel": "キャンセル",
"uni.previewImage.button.save": "画像を保存",
"uni.previewImage.save.success": "画像をアルバムに正常に保存します",
"uni.previewImage.save.fail": "画像をアルバムに保存できませんでした",
"uni.setClipboardData.success": "コンテンツがコピーされました",
"uni.scanCode.title": "スキャンコード",
"uni.scanCode.album": "アルバム",
"uni.scanCode.fail": "認識に失敗しました",
"uni.scanCode.flash.on": "タッチして点灯",
"uni.scanCode.flash.off": "タップして閉じる",
"uni.startSoterAuthentication.authContent": "指紋認識...",
"uni.picker.done": "完了",
"uni.picker.cancel": "キャンセル",
"uni.video.danmu": "「弾幕」",
"uni.video.volume": "ボリューム",
"uni.button.feedback.title": "質問のフィードバック",
"uni.button.feedback.send": "送信"
},
"ios": {},
"android": {}
}
+24
View File
@@ -0,0 +1,24 @@
{
"locale.auto": "系统",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "主页",
"index.component": "组件",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app 国际化演示",
"index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API、Schema",
"index.detail": "详情",
"index.language": "语言",
"index.language-info": "语言信息",
"index.system-language": "系统语言",
"index.application-language": "应用语言",
"index.language-change-confirm": "应用此设置将重启App",
"api.message": "提示",
"schema.name": "姓名",
"schema.add": "新增",
"schema.add-success": "新增成功"
}
+24
View File
@@ -0,0 +1,24 @@
{
"locale.auto": "系統",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁體中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "主頁",
"index.component": "組件",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app 國際化演示",
"index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、頁面、組件、API、Schema",
"index.detail": "詳情",
"index.language": "語言",
"index.language-info": "語言信息",
"index.system-language": "系統語言",
"index.application-language": "應用語言",
"index.language-change-confirm": "應用此設置將重啟App",
"api.message": "提示",
"schema.name": "姓名",
"schema.add": "新增",
"schema.add-success": "新增成功"
}
+34
View File
@@ -0,0 +1,34 @@
import App from './App'
import messages from './locale/index'
let i18nConfig = {
locale: uni.getLocale(),
messages
}
// #ifndef VUE3
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
i18n,
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
import { createI18n } from 'vue-i18n'
const i18n = createI18n(i18nConfig)
export function createApp() {
const app = createSSRApp(App)
app.use(i18n)
return {
app
}
}
// #endif
+105
View File
@@ -0,0 +1,105 @@
{
"name" : "哈希优品",
"appid" : "__UNI__DA4D660",
"description" : "哈希优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。",
"versionName" : "1.0.1",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"name" : "哈希优品",
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
}
+79
View File
@@ -0,0 +1,79 @@
{
"id": "uni-hello-i18n",
"name": "Hello i18n",
"displayName": "hello-i18n 示例工程",
"version": "1.0.2",
"description": "uni-app 国际化演示",
"keywords": [
"i18n",
"hello-i18n",
"多语言"
],
"dcloudext": {
"category": [
"前端页面模板",
"uni-app前端项目模板"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"repository": "",
"uni_modules": {
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "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"
},
"Vue": {
"vue2": "u",
"vue3": "u"
}
}
}
}
}
+55
View File
@@ -0,0 +1,55 @@
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "%index.title%"
}
}, {
"path": "pages/component/component",
"style": {
"navigationBarTitleText": "%index.component%",
"enablePullDownRefresh": false
}
}, {
"path": "pages/api/api",
"style": {
"navigationBarTitleText": "%index.api%",
"enablePullDownRefresh": false
}
}, {
"path": "pages/schema/schema",
"style": {
"navigationBarTitleText": "%index.schema%",
"enablePullDownRefresh": false
}
}
],
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#F8F8F8",
"list": [{
"pagePath": "pages/index/index",
"text": "%index.home%"
},
{
"pagePath": "pages/component/component",
"text": "%index.component%"
}, {
"pagePath": "pages/api/api",
"text": "%index.api%"
}, {
"pagePath": "pages/schema/schema",
"text": "%index.schema%"
}
]
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
}
}
+27
View File
@@ -0,0 +1,27 @@
<template>
<view class="container">
<button @click="showModel">uni.showModal</button>
</view>
</template>
<script>
export default {
data() {
return {}
},
methods: {
showModel() {
uni.showModal({
content: this.$t('api.message'),
success: (res) => {
console.log(res);
}
})
}
}
}
</script>
<style>
</style>
+22
View File
@@ -0,0 +1,22 @@
<template>
<view class="container">
<no-data></no-data>
</view>
</template>
<script>
export default {
data() {
return {
title: this.$t('')
}
},
methods: {
}
}
</script>
<style>
</style>
+151
View File
@@ -0,0 +1,151 @@
<template>
<view class="container">
<view class="title">{{$t('index.demo')}}</view>
<view class="description">{{$t('index.demo-description')}}</view>
<view class="detail-link">{{$t('index.detail')}}: <text
class="link">https://uniapp.dcloud.net.cn/collocation/i18n</text></view>
<view class="locale-setting">{{$t('index.language-info')}}</view>
<view class="list-item">
<text class="k">{{$t('index.system-language')}}:</text>
<text class="v">{{systemLocale}}</text>
</view>
<view class="list-item">
<text class="k">{{$t('index.application-language')}}:</text>
<text class="v">{{applicationLocale}}</text>
</view>
<view class="locale-setting">{{$t('index.language')}}</view>
<view class="locale-list">
<view class="locale-item" v-for="(item, index) in locales" :key="index" @click="onLocaleChange(item)">
<text class="text">{{item.text}}</text>
<text class="icon-check" v-if="item.code == applicationLocale"></text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
systemLocale: '',
applicationLocale: ''
}
},
computed:{
locales() {
return [{
text: this.$t('locale.auto'),
code: 'auto'
}, {
text: this.$t('locale.en'),
code: 'en'
},
{
text: this.$t('locale.zh-hans'),
code: 'zh-Hans'
},
{
text: this.$t('locale.zh-hant'),
code: 'zh-Hant'
},
{
text: this.$t('locale.ja'),
code: 'ja'
}
]
}
},
onLoad() {
let systemInfo = uni.getSystemInfoSync();
this.systemLocale = systemInfo.language;
this.applicationLocale = uni.getLocale();
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
uni.onLocaleChange((e) => {
this.applicationLocale = e.locale;
})
},
methods: {
onLocaleChange(e) {
if (this.isAndroid) {
uni.showModal({
content: this.$t('index.language-change-confirm'),
success: (res) => {
if (res.confirm) {
uni.setLocale(e.code);
}
}
})
} else {
uni.setLocale(e.code);
this.$i18n.locale = e.code;
}
}
}
}
</script>
<style>
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 15px;
}
.description {
font-size: 14px;
opacity: 0.6;
margin-bottom: 15px;
}
.detail-link {
font-size: 14px;
word-break: break-all;
}
.link {
color: #007AFF;
margin-left: 10px;
}
.locale-setting {
font-size: 16px;
font-weight: bold;
margin-top: 25px;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.list-item {
font-size: 14px;
padding: 10px 0;
}
.list-item .v {
margin-left: 5px;
}
.locale-item {
display: flex;
flex-direction: row;
padding: 10px 0;
}
.locale-item .text {
flex: 1;
}
.icon-check {
margin-right: 5px;
border: 2px solid #007aff;
border-left: 0;
border-top: 0;
height: 12px;
width: 6px;
transform-origin: center;
/* #ifndef APP-NVUE */
transition: all 0.3s;
/* #endif */
transform: rotate(45deg);
}
</style>
+48
View File
@@ -0,0 +1,48 @@
<template>
<view class="container">
<view>{{$t('schema.name')}}</view>
<input class="input" v-model="name" />
<button type="primary" @click="add">{{$t('schema.add')}}</button>
</view>
</template>
<script>
const collection = "hello";
export default {
data() {
return {
name: ""
}
},
methods: {
add() {
uni.showLoading();
let db = uniCloud.database()
db.collection(collection).add({
name: this.name
}).then((res) => {
uni.showToast({
title: this.$t('schema.add-success')
})
}).catch((err) => {
uni.showModal({
content: err.message,
showCancel: false
})
}).finally(() => {
uni.hideLoading();
})
}
}
}
</script>
<style>
.input {
border: 1px solid #ebebeb;
border-radius: 3px;
margin-top: 15px;
margin-bottom: 15px;
padding: 8px;
}
</style>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

+76
View File
@@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:12px;
$uni-font-size-base:14px;
$uni-font-size-lg:16;
/* 图片尺寸 */
$uni-img-size-sm:20px;
$uni-img-size-base:26px;
$uni-img-size-lg:40px;
/* Border Radius */
$uni-border-radius-sm: 2px;
$uni-border-radius-base: 3px;
$uni-border-radius-lg: 6px;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 5px;
$uni-spacing-row-base: 10px;
$uni-spacing-row-lg: 15px;
/* 垂直间距 */
$uni-spacing-col-sm: 4px;
$uni-spacing-col-base: 8px;
$uni-spacing-col-lg: 12px;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:20px;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:26px;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:15px;
@@ -0,0 +1,27 @@
// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema
{
"bsonType": "object",
"required": ["name"],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},
"properties": {
"_id": {
"description": "ID"
},
"name": {
"bsonType": "string",
"label": "%name%",
"minLength": 1,
"maxLength": 8,
"errorMessage": {
"format": "{label}%name.format%",
"minLength": "{label}%name.minLength%",
"maxLength": "{label}%name.maxLength%"
}
}
}
}
@@ -0,0 +1,6 @@
{
"name": "Name",
"name.format": " invalid format",
"name.minLength": "{label} length cannot be less than {{minLength}}",
"name.maxLength": "{label} length cannot exceed {{maxLength}}"
}
@@ -0,0 +1,6 @@
{
"name": "姓名",
"name.format": "格式无效",
"name.minLength": "{label}不能小于{{minLength}}个字符",
"name.maxLength": "{label}不能大于{{maxLength}}个字符"
}
View File
@@ -0,0 +1,3 @@
{
"no-data.title": "No Data"
}
@@ -0,0 +1,10 @@
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
import ja from './ja.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant,
ja
}
@@ -0,0 +1,3 @@
{
"no-data.title": "データなし"
}
@@ -0,0 +1,3 @@
{
"no-data.title": "无数据"
}
@@ -0,0 +1,3 @@
{
"no-data.title": "無數據"
}
@@ -0,0 +1,44 @@
<template>
<view class="content">
<text class="message">{{title}}</text>
</view>
</template>
<script>
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import messages from './i18n/index.js'
const {
t
} = initVueI18n(messages)
export default {
name: 'no-data',
props: {},
data() {
return {
title: t('no-data.title')
}
},
created(e) {},
// #ifndef VUE3
destroyed() {},
// #endif
// #ifdef VUE3
unmounted() {},
// #endif
methods: {}
}
</script>
<style lang="scss" scoped>
.content {
display: flex;
align-items: center;
justify-content: center;
}
.message {
opacity: .8;
}
</style>
+80
View File
@@ -0,0 +1,80 @@
{
"id": "no-data",
"displayName": "no-data",
"version": "1.0.0",
"description": "no-data",
"keywords": [
"no-data"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"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-vue": "u",
"app-nvue": "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"
}
}
}
}
}
+1
View File
@@ -0,0 +1 @@
# no-data
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"app.js","sources":["App.vue"],"sourcesContent":["<script>\n export default {\n onLaunch: function() {\n console.log('App Launch')\n },\n onShow: function() {\n console.log('App Show')\n },\n onHide: function() {\n console.log('App Hide')\n }\n }\n</script>\n\n<style>\n .container {\n padding: 15px;\n }\n\n button {\n margin-bottom: 15px;\n }\n</style>\n"],"names":["uni"],"mappings":";;;;;;;;;;AACE,MAAK,YAAU;AAAA,EACb,UAAU,WAAW;AACnBA,kBAAAA,MAAA,MAAA,OAAA,gBAAY,YAAY;AAAA,EACzB;AAAA,EACD,QAAQ,WAAW;AACjBA,kBAAAA,mCAAY,UAAU;AAAA,EACvB;AAAA,EACD,QAAQ,WAAW;AACjBA,kBAAAA,oCAAY,UAAU;AAAA,EACxB;AACF;;;;;;;;;;;;;;;"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["locale/index.js"],"sourcesContent":["import en from './en.json'\nimport zhHans from './zh-Hans.json'\nimport zhHant from './zh-Hant.json'\nimport ja from './ja.json'\nexport default {\n\ten,\n\t'zh-Hans': zhHans,\n\t'zh-Hant': zhHant,\n\tja\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAe,WAAA;AAAA,EACd;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AACD;;"}
@@ -0,0 +1 @@
{"version":3,"file":"api.js","sources":["pages/api/api.vue","D:/Tool/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvYXBpL2FwaS52dWU"],"sourcesContent":["<template>\n <view class=\"container\">\n <button @click=\"showModel\">uni.showModal</button>\n </view>\n</template>\n\n<script>\n export default {\n data() {\n return {}\n },\n methods: {\n showModel() {\n uni.showModal({\n content: this.$t('api.message'),\n success: (res) => {\n console.log(res);\n }\n })\n }\n }\n }\n</script>\n\n<style>\n\n</style>\n","import MiniProgramPage from 'E:/Project/Vue/uniapp/hashmall-app/pages/api/api.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni"],"mappings":";;AAOE,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO,CAAC;AAAA,EACT;AAAA,EACD,SAAS;AAAA,IACP,YAAY;AACVA,oBAAAA,MAAI,UAAU;AAAA,QACZ,SAAS,KAAK,GAAG,aAAa;AAAA,QAC9B,SAAS,CAAC,QAAQ;AAChBA,wBAAAA,MAAY,MAAA,OAAA,2BAAA,GAAG;AAAA,QACjB;AAAA,OACD;AAAA,IACH;AAAA,EACF;AACF;;;;;;;ACpBF,GAAG,WAAW,eAAe;"}
@@ -0,0 +1 @@
{"version":3,"file":"component.js","sources":["pages/component/component.vue","D:/Tool/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvY29tcG9uZW50L2NvbXBvbmVudC52dWU"],"sourcesContent":["<template>\n <view class=\"container\">\n <no-data></no-data>\n </view>\n</template>\n\n<script>\n export default {\n data() {\n return {\n title: this.$t('')\n }\n },\n methods: {\n \n }\n }\n</script>\n\n<style>\n\n</style>\n","import MiniProgramPage from 'E:/Project/Vue/uniapp/hashmall-app/pages/component/component.vue'\nwx.createPage(MiniProgramPage)"],"names":[],"mappings":";;AAOE,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,OAAO,KAAK,GAAG,EAAE;AAAA,IACnB;AAAA,EACD;AAAA,EACD,SAAS,CAET;AACF;;;;;;;;;;;;;ACfF,GAAG,WAAW,eAAe;"}
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"version":3,"file":"schema.js","sources":["pages/schema/schema.vue","D:/Tool/HBuilderX/plugins/uniapp-cli-vite/uniPage:/cGFnZXMvc2NoZW1hL3NjaGVtYS52dWU"],"sourcesContent":["<template>\n <view class=\"container\">\n <view>{{$t('schema.name')}}</view>\n <input class=\"input\" v-model=\"name\" />\n <button type=\"primary\" @click=\"add\">{{$t('schema.add')}}</button>\n </view>\n</template>\n\n<script>\n const collection = \"hello\";\n export default {\n data() {\n return {\n name: \"\"\n }\n },\n methods: {\n add() {\n uni.showLoading();\n let db = uniCloud.database()\n db.collection(collection).add({\n name: this.name\n }).then((res) => {\n uni.showToast({\n title: this.$t('schema.add-success')\n })\n }).catch((err) => {\n uni.showModal({\n content: err.message,\n showCancel: false\n })\n }).finally(() => {\n uni.hideLoading();\n })\n }\n }\n }\n</script>\n\n<style>\n .input {\n border: 1px solid #ebebeb;\n border-radius: 3px;\n margin-top: 15px;\n margin-bottom: 15px;\n padding: 8px;\n }\n</style>\n","import MiniProgramPage from 'E:/Project/Vue/uniapp/hashmall-app/pages/schema/schema.vue'\nwx.createPage(MiniProgramPage)"],"names":["uni","uniCloud"],"mappings":";;AASE,MAAM,aAAa;AACnB,MAAK,YAAU;AAAA,EACb,OAAO;AACL,WAAO;AAAA,MACL,MAAM;AAAA,IACR;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AACJA,oBAAG,MAAC,YAAW;AACf,UAAI,KAAKC,cAAQ,GAAC,SAAS;AAC3B,SAAG,WAAW,UAAU,EAAE,IAAI;AAAA,QAC5B,MAAM,KAAK;AAAA,MACb,CAAC,EAAE,KAAK,CAAC,QAAQ;AACfD,sBAAAA,MAAI,UAAU;AAAA,UACZ,OAAO,KAAK,GAAG,oBAAoB;AAAA,SACpC;AAAA,MACH,CAAC,EAAE,MAAM,CAAC,QAAQ;AAChBA,sBAAAA,MAAI,UAAU;AAAA,UACZ,SAAS,IAAI;AAAA,UACb,YAAY;AAAA,SACb;AAAA,MACH,CAAC,EAAE,QAAQ,MAAM;AACfA,sBAAG,MAAC,YAAW;AAAA,OAChB;AAAA,IACH;AAAA,EACF;AACF;;;;;;;;;;;ACnCF,GAAG,WAAW,eAAe;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["uni_modules/no-data/components/no-data/i18n/index.js"],"sourcesContent":["import en from './en.json'\nimport zhHans from './zh-Hans.json'\nimport zhHant from './zh-Hant.json'\nimport ja from './ja.json'\nexport default {\n en,\n 'zh-Hans': zhHans,\n 'zh-Hant': zhHant,\n ja\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,MAAe,WAAA;AAAA,EACb;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AACF;;"}
@@ -0,0 +1 @@
{"version":3,"file":"no-data.js","sources":["uni_modules/no-data/components/no-data/no-data.vue","D:/Tool/HBuilderX/plugins/uniapp-cli-vite/uniComponent:/RTovUHJvamVjdC9WdWUvdW5pYXBwL2hhc2htYWxsLWFwcC91bmlfbW9kdWxlcy9uby1kYXRhL2NvbXBvbmVudHMvbm8tZGF0YS9uby1kYXRhLnZ1ZQ"],"sourcesContent":["<template>\n <view class=\"content\">\n <text class=\"message\">{{title}}</text>\n </view>\n</template>\n<script>\n import {\n initVueI18n\n } from '@dcloudio/uni-i18n'\n import messages from './i18n/index.js'\n const {\n t\n } = initVueI18n(messages)\n\n export default {\n name: 'no-data',\n props: {},\n data() {\n return {\n title: t('no-data.title')\n }\n },\n created(e) {},\n // #ifndef VUE3\n destroyed() {},\n // #endif\n // #ifdef VUE3\n unmounted() {},\n // #endif\n methods: {}\n }\n</script>\n\n<style lang=\"scss\" scoped>\n .content {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .message {\n opacity: .8;\n }\n</style>\n","import Component from 'E:/Project/Vue/uniapp/hashmall-app/uni_modules/no-data/components/no-data/no-data.vue'\nwx.createComponent(Component)"],"names":["initVueI18n","messages"],"mappings":";;;AAUE,MAAM;AAAA,EACJ;IACEA,cAAAA,YAAYC,gDAAAA,QAAQ;AAExB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAE;AAAA,EACT,OAAO;AACL,WAAO;AAAA,MACL,OAAO,EAAE,eAAe;AAAA,IAC1B;AAAA,EACD;AAAA,EACD,QAAQ,GAAG;AAAA,EAAE;AAAA,EAKb,YAAY;AAAA,EAAE;AAAA,EAEd,SAAS,CAAC;AACZ;;;;;;;AC7BF,GAAG,gBAAgB,SAAS;"}
+36
View File
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
const locale_index = require("./locale/index.js");
if (!Math) {
"./pages/index/index.js";
"./pages/component/component.js";
"./pages/api/api.js";
"./pages/schema/schema.js";
}
const _sfc_main = {
onLaunch: function() {
common_vendor.index.__f__("log", "at App.vue:4", "App Launch");
},
onShow: function() {
common_vendor.index.__f__("log", "at App.vue:7", "App Show");
},
onHide: function() {
common_vendor.index.__f__("log", "at App.vue:10", "App Hide");
}
};
let i18nConfig = {
locale: common_vendor.index.getLocale(),
messages: locale_index.messages
};
const i18n = common_vendor.createI18n(i18nConfig);
function createApp() {
const app = common_vendor.createSSRApp(_sfc_main);
app.use(i18n);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
+39
View File
@@ -0,0 +1,39 @@
{
"pages": [
"pages/index/index",
"pages/component/component",
"pages/api/api",
"pages/schema/schema"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#007AFF",
"borderStyle": "black",
"backgroundColor": "#F8F8F8",
"list": [
{
"pagePath": "pages/index/index",
"text": "Home"
},
{
"pagePath": "pages/component/component",
"text": "Component"
},
{
"pagePath": "pages/api/api",
"text": "API"
},
{
"pagePath": "pages/schema/schema",
"text": "Schema"
}
]
},
"usingComponents": {}
}
+8
View File
@@ -0,0 +1,8 @@
.container {
padding: 15px;
}
button {
margin-bottom: 15px;
}
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}
File diff suppressed because it is too large Load Diff
+104
View File
@@ -0,0 +1,104 @@
"use strict";
const en = {
"locale.auto": "System",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "Home",
"index.component": "Component",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app globalization",
"index.demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema",
"index.detail": "Detail",
"index.language": "Language",
"index.language-info": "Settings",
"index.system-language": "System language",
"index.application-language": "Application language",
"index.language-change-confirm": "Applying this setting will restart the app",
"api.message": "Message",
"schema.name": "Name",
"schema.add": "Add",
"schema.add-success": "Add success"
};
const zhHans = {
"locale.auto": "系统",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "主页",
"index.component": "组件",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app 国际化演示",
"index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API、Schema",
"index.detail": "详情",
"index.language": "语言",
"index.language-info": "语言信息",
"index.system-language": "系统语言",
"index.application-language": "应用语言",
"index.language-change-confirm": "应用此设置将重启App",
"api.message": "提示",
"schema.name": "姓名",
"schema.add": "新增",
"schema.add-success": "新增成功"
};
const zhHant = {
"locale.auto": "系統",
"locale.en": "English",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁體中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "主頁",
"index.component": "組件",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app 國際化演示",
"index.demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、頁面、組件、API、Schema",
"index.detail": "詳情",
"index.language": "語言",
"index.language-info": "語言信息",
"index.system-language": "系統語言",
"index.application-language": "應用語言",
"index.language-change-confirm": "應用此設置將重啟App",
"api.message": "提示",
"schema.name": "姓名",
"schema.add": "新增",
"schema.add-success": "新增成功"
};
const ja = {
"locale.auto": "システム",
"locale.en": "英語",
"locale.zh-hans": "简体中文",
"locale.zh-hant": "繁体中文",
"locale.ja": "日语",
"index.title": "Hello i18n",
"index.home": "ホーム",
"index.component": "コンポーネント",
"index.api": "API",
"index.schema": "Schema",
"index.demo": "uni-app globalization",
"index.demo-description": "ユニフレームワーク、manifest.json、pages.json、タブバー、ページ、コンポーネント、APIを含める、Schema",
"index.detail": "詳細",
"index.language": "言語",
"index.language-info": "設定",
"index.system-language": "システム言語",
"index.application-language": "アプリケーション言語",
"index.language-change-confirm": "この設定を適用すると、アプリが再起動します",
"api.message": "メッセージ",
"schema.add": "追加",
"schema.add-success": "成功を追加"
};
const messages = {
en,
"zh-Hans": zhHans,
"zh-Hant": zhHant,
ja
};
exports.messages = messages;
//# sourceMappingURL=../../.sourcemap/mp-weixin/locale/index.js.map
+25
View File
@@ -0,0 +1,25 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
methods: {
showModel() {
common_vendor.index.showModal({
content: this.$t("api.message"),
success: (res) => {
common_vendor.index.__f__("log", "at pages/api/api.vue:17", res);
}
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o((...args) => $options.showModel && $options.showModel(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/api/api.js.map
+5
View File
@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "API",
"enablePullDownRefresh": false,
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view class="container"><button bindtap="{{a}}">uni.showModal</button></view>
View File
@@ -0,0 +1,24 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
title: this.$t("")
};
},
methods: {}
};
if (!Array) {
const _easycom_no_data2 = common_vendor.resolveComponent("no-data");
_easycom_no_data2();
}
const _easycom_no_data = () => "../../uni_modules/no-data/components/no-data/no-data.js";
if (!Math) {
_easycom_no_data();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/component/component.js.map
@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "Component",
"enablePullDownRefresh": false,
"usingComponents": {
"no-data": "../../uni_modules/no-data/components/no-data/no-data"
}
}
@@ -0,0 +1 @@
<view class="container"><no-data u-i="a3e3830c-0" bind:__l="__l"></no-data></view>
+87
View File
@@ -0,0 +1,87 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {
systemLocale: "",
applicationLocale: ""
};
},
computed: {
locales() {
return [
{
text: this.$t("locale.auto"),
code: "auto"
},
{
text: this.$t("locale.en"),
code: "en"
},
{
text: this.$t("locale.zh-hans"),
code: "zh-Hans"
},
{
text: this.$t("locale.zh-hant"),
code: "zh-Hant"
},
{
text: this.$t("locale.ja"),
code: "ja"
}
];
}
},
onLoad() {
let systemInfo = common_vendor.index.getSystemInfoSync();
this.systemLocale = systemInfo.language;
this.applicationLocale = common_vendor.index.getLocale();
this.isAndroid = systemInfo.platform.toLowerCase() === "android";
common_vendor.index.onLocaleChange((e) => {
this.applicationLocale = e.locale;
});
},
methods: {
onLocaleChange(e) {
if (this.isAndroid) {
common_vendor.index.showModal({
content: this.$t("index.language-change-confirm"),
success: (res) => {
if (res.confirm) {
common_vendor.index.setLocale(e.code);
}
}
});
} else {
common_vendor.index.setLocale(e.code);
this.$i18n.locale = e.code;
}
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t(_ctx.$t("index.demo")),
b: common_vendor.t(_ctx.$t("index.demo-description")),
c: common_vendor.t(_ctx.$t("index.detail")),
d: common_vendor.t(_ctx.$t("index.language-info")),
e: common_vendor.t(_ctx.$t("index.system-language")),
f: common_vendor.t($data.systemLocale),
g: common_vendor.t(_ctx.$t("index.application-language")),
h: common_vendor.t($data.applicationLocale),
i: common_vendor.t(_ctx.$t("index.language")),
j: common_vendor.f($options.locales, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.text),
b: item.code == $data.applicationLocale
}, item.code == $data.applicationLocale ? {} : {}, {
c: index,
d: common_vendor.o(($event) => $options.onLocaleChange(item), index)
});
})
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "Hello i18n",
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view class="container"><view class="title">{{a}}</view><view class="description">{{b}}</view><view class="detail-link">{{c}}: <text class="link">https://uniapp.dcloud.net.cn/collocation/i18n</text></view><view class="locale-setting">{{d}}</view><view class="list-item"><text class="k">{{e}}:</text><text class="v">{{f}}</text></view><view class="list-item"><text class="k">{{g}}:</text><text class="v">{{h}}</text></view><view class="locale-setting">{{i}}</view><view class="locale-list"><view wx:for="{{j}}" wx:for-item="item" wx:key="c" class="locale-item" bindtap="{{item.d}}"><text class="text">{{item.a}}</text><text wx:if="{{item.b}}" class="icon-check"></text></view></view></view>
+55
View File
@@ -0,0 +1,55 @@
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 15px;
}
.description {
font-size: 14px;
opacity: 0.6;
margin-bottom: 15px;
}
.detail-link {
font-size: 14px;
word-break: break-all;
}
.link {
color: #007AFF;
margin-left: 10px;
}
.locale-setting {
font-size: 16px;
font-weight: bold;
margin-top: 25px;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.list-item {
font-size: 14px;
padding: 10px 0;
}
.list-item .v {
margin-left: 5px;
}
.locale-item {
display: flex;
flex-direction: row;
padding: 10px 0;
}
.locale-item .text {
flex: 1;
}
.icon-check {
margin-right: 5px;
border: 2px solid #007aff;
border-left: 0;
border-top: 0;
height: 12px;
width: 6px;
transform-origin: center;
transition: all 0.3s;
transform: rotate(45deg);
}
+42
View File
@@ -0,0 +1,42 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const collection = "hello";
const _sfc_main = {
data() {
return {
name: ""
};
},
methods: {
add() {
common_vendor.index.showLoading();
let db = common_vendor.er.database();
db.collection(collection).add({
name: this.name
}).then((res) => {
common_vendor.index.showToast({
title: this.$t("schema.add-success")
});
}).catch((err) => {
common_vendor.index.showModal({
content: err.message,
showCancel: false
});
}).finally(() => {
common_vendor.index.hideLoading();
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t(_ctx.$t("schema.name")),
b: $data.name,
c: common_vendor.o(($event) => $data.name = $event.detail.value),
d: common_vendor.t(_ctx.$t("schema.add")),
e: common_vendor.o((...args) => $options.add && $options.add(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/schema/schema.js.map
+5
View File
@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "Schema",
"enablePullDownRefresh": false,
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view class="container"><view>{{a}}</view><input class="input" value="{{b}}" bindinput="{{c}}"/><button type="primary" bindtap="{{e}}">{{d}}</button></view>
+8
View File
@@ -0,0 +1,8 @@
.input {
border: 1px solid #ebebeb;
border-radius: 3px;
margin-top: 15px;
margin-bottom: 15px;
padding: 8px;
}
+29
View File
@@ -0,0 +1,29 @@
{
"description": "项目配置文件。",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": false,
"minified": false,
"newFeature": true,
"bigPackageSizeSupport": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "3.7.8",
"appid": "touristappid",
"projectname": "哈希优品",
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
@@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "hashmall-app",
"setting": {
"compileHotReLoad": true
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

@@ -0,0 +1,21 @@
"use strict";
const en = {
"no-data.title": "No Data"
};
const zhHans = {
"no-data.title": "无数据"
};
const zhHant = {
"no-data.title": "無數據"
};
const ja = {
"no-data.title": "データなし"
};
const messages = {
en,
"zh-Hans": zhHans,
"zh-Hant": zhHant,
ja
};
exports.messages = messages;
//# sourceMappingURL=../../../../../../.sourcemap/mp-weixin/uni_modules/no-data/components/no-data/i18n/index.js.map
@@ -0,0 +1,28 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_noData_components_noData_i18n_index = require("./i18n/index.js");
const {
t
} = common_vendor.initVueI18n(uni_modules_noData_components_noData_i18n_index.messages);
const _sfc_main = {
name: "no-data",
props: {},
data() {
return {
title: t("no-data.title")
};
},
created(e) {
},
unmounted() {
},
methods: {}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.t($data.title)
};
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-985e9f3e"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/no-data/components/no-data/no-data.js.map
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="content data-v-985e9f3e"><text class="message data-v-985e9f3e">{{a}}</text></view>
@@ -0,0 +1,33 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.content.data-v-985e9f3e {
display: flex;
align-items: center;
justify-content: center;
}
.message.data-v-985e9f3e {
opacity: 0.8;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB