Skip to content

Commit

Permalink
feat: ✨ 采用新的 uv-ui 作为UI框架并更新依赖版本
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Dec 19, 2023
1 parent 3d31a08 commit 44f5e98
Show file tree
Hide file tree
Showing 24 changed files with 177 additions and 160 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": false
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"eslint.format.enable": true,
"eslint.codeAction.showDocumentation": {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- ⚡️ Request: 请求库使用 [uni-network](https://github.com/uni-helper/uni-network) 完全基于 uniapp API 编写的高性能请求库, API 同 axios。
- 👇 Z-paging: 内置了高性能且易于使用的业务常用下拉分页组件模块,轻松实现下拉刷新、上拉加载等功能。
- 💅 Unocss: 使用原子化 CSS 引擎,小程序环境下依然完美支持原子化的 class 命名书写规则。
- 🎨 UI-libs: 预设了 [uivew-plus](https://uiadmin.net/uview-plus/)[uni-ui](https://uniapp.dcloud.net.cn/component/uniui/uni-ui.html) 两者相辅相成,轻松满足绝大多数业务场景,并支持主题色定制功能。
- 🎨 UI-libs: 预设了 [uv-ui](https://www.uvui.cn/)[uni-ui](https://uniapp.dcloud.net.cn/component/uniui/uni-ui.html) 两者相辅相成,轻松满足绝大多数业务场景,并支持主题色定制功能。
- 📝 NoTs: 只使用 JavaScript,在常规业务场景或人员水平差距过大情况下,TypeScript 并不会提升开发体验。

## 使用方法
Expand Down
58 changes: 32 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"dev:mp-qq": "uni -p mp-qq",
"dev:mp-toutiao": "uni -p mp-toutiao",
"dev:mp-weixin": "uni -p mp-weixin",
"dev:mp-xhs": "uni -p mp-xhs",
"dev:quickapp-webview": "uni -p quickapp-webview",
"dev:quickapp-webview-huawei": "uni -p quickapp-webview-huawei",
"dev:quickapp-webview-union": "uni -p quickapp-webview-union",
Expand All @@ -40,51 +41,56 @@
"build:mp-qq": "uni build -p mp-qq",
"build:mp-toutiao": "uni build -p mp-toutiao",
"build:mp-weixin": "uni build -p mp-weixin",
"build:mp-xhs": "uni build -p mp-xhs",
"build:quickapp-webview": "uni build -p quickapp-webview",
"build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei",
"build:quickapp-webview-union": "uni build -p quickapp-webview-union"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-3081220230817001",
"@dcloudio/uni-app-plus": "3.0.0-3081220230817001",
"@dcloudio/uni-components": "3.0.0-3081220230817001",
"@dcloudio/uni-h5": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-alipay": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-baidu": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-jd": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-lark": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-qq": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3081220230817001",
"@dcloudio/uni-mp-weixin": "3.0.0-3081220230817001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3081220230817001",
"@climblee/uv-ui": "^1.1.19",
"@dcloudio/uni-app": "3.0.0-3090820231124001",
"@dcloudio/uni-app-plus": "3.0.0-3090820231124001",
"@dcloudio/uni-components": "3.0.0-3090820231124001",
"@dcloudio/uni-h5": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-alipay": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-baidu": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-jd": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-lark": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-qq": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-toutiao": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-weixin": "3.0.0-3090820231124001",
"@dcloudio/uni-mp-xhs": "3.0.0-3090820231124001",
"@dcloudio/uni-quickapp-webview": "3.0.0-3090820231124001",
"@dcloudio/uni-ui": "^1.4.28",
"@uni-helper/uni-env": "^0.0.3",
"@uni-helper/uni-network": "^0.16.1",
"@uni-helper/uni-promises": "^0.2.0",
"@viarotel-org/unocss-preset-shades": "^0.7.0",
"@unocss-applet/reset": "^0.7.8",
"color": "^4.2.3",
"dayjs": "^1.11.9",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"pinia": "2.0.33",
"qs": "6.9.7",
"uniapp-router-next": "^1.2.3",
"uniapp-router-next": "^1.2.4",
"uview-plus": "^3.1.35",
"vue": "3.2.47",
"vue-i18n": "^9.1.9",
"vue-i18n": "^9.8.0",
"z-paging": "^2.5.8"
},
"devDependencies": {
"@dcloudio/types": "^3.3.2",
"@dcloudio/uni-automator": "3.0.0-3081220230817001",
"@dcloudio/uni-cli-shared": "3.0.0-3081220230817001",
"@dcloudio/uni-stacktracey": "3.0.0-3081220230817001",
"@dcloudio/vite-plugin-uni": "3.0.0-3081220230817001",
"@dcloudio/types": "^3.4.3",
"@dcloudio/uni-automator": "3.0.0-3090820231124001",
"@dcloudio/uni-cli-shared": "3.0.0-3090820231124001",
"@dcloudio/uni-stacktracey": "3.0.0-3090820231124001",
"@dcloudio/vite-plugin-uni": "3.0.0-3090820231124001",
"@uni-helper/vite-plugin-uni-pages": "^0.2.9",
"@unocss/transformer-directives": "0.55.3",
"@unocss/preset-wind": "^0.58.0",
"@unocss/transformer-directives": "0.58.0",
"@viarotel-org/eslint-config": "^0.7.0",
"@vue/runtime-core": "^3.2.45",
"@viarotel-org/unocss-preset-shades": "^0.7.4",
"@vue/runtime-core": "^3.3.12",
"eslint": "^8.48.0",
"mini-types": "^0.1.7",
"miniprogram-api-typings": "^3.10.0",
Expand All @@ -95,9 +101,9 @@
"postcss-scss": "^4.0.6",
"sass": "^1.63.4",
"typescript": "5.1.6",
"unocss": "0.55.3",
"unocss-applet": "0.5.5",
"vite": "4.1.4",
"unocss": "0.58.0",
"unocss-applet": "0.7.8",
"vite": "4.0.3",
"vite-plugin-eslint": "^1.8.1"
}
}
3 changes: 2 additions & 1 deletion pages.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export default defineUniPages({
easycom: {
autoscan: true,
custom: {
'^u-(.*)': 'uview-plus/components/u-$1/u-$1.vue',
// '^u-(.*)': 'uview-plus/components/u-$1/u-$1.vue',
'^uni-(.*)': '@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue',
'^uv-(.*)': '@climblee/uv-ui/components/uv-$1/uv-$1.vue',
'^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)':
'z-paging/components/z-paging$1/z-paging$1.vue',
},
Expand Down
5 changes: 3 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default {
</script>

<style lang="scss">
@import "./styles/css/index.css";
@import "uview-plus/index.scss";
// @import "uview-plus/index.scss";
@import './styles/css/index.css';
@import '@climblee/uv-ui/index.scss';
</style>
8 changes: 4 additions & 4 deletions src/components/dict-picker/dict-picker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
>
<view class="flex items-center w-full">
<view class="flex-1 w-0">
<u-input
<uv-input
:model-value="showValue"
:placeholder="placeholder"
border="none"
readonly
></u-input>
></uv-input>
</view>
<view class="flex-none">
<u-icon
<uv-icon
name="arrow-right"
></u-icon>
></uv-icon>
</view>
</view>
</slot>
Expand Down
2 changes: 1 addition & 1 deletion src/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"easycom": {
"autoscan": true,
"custom": {
"^u-(.*)": "uview-plus/components/u-$1/u-$1.vue",
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue",
"^uv-(.*)": "@climblee/uv-ui/components/uv-$1/uv-$1.vue",
"^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue"
}
},
Expand Down
16 changes: 8 additions & 8 deletions src/pages/contact/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
/>
</view>
<view class="p-4 bg-white mt-4 shadow-md rounded-md">
<u-form label-width="200" border>
<u-form-item label="邮箱">
<uv-form label-width="200" border>
<uv-form-item label="邮箱">
<view class="" @click="handleCopy(enterpriseInfo.email)">
{{ enterpriseInfo.email }}
<via-icon name="fuzhi" class="text-gray-400"></via-icon>
</view>
</u-form-item>
<u-form-item label="微信号">
</uv-form-item>
<uv-form-item label="微信号">
<view class="" @click="handleCopy(enterpriseInfo.wechat)">
{{ enterpriseInfo.wechat }}
<via-icon name="fuzhi" class="text-gray-400"></via-icon>
</view>
</u-form-item>
<u-form-item label="微信二维码">
</uv-form-item>
<uv-form-item label="微信二维码">
<image :src="wechatImage" alt="" class="w-25 h-25" />
</u-form-item>
</u-form>
</uv-form-item>
</uv-form>
</view>
</view>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/errors/404/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<view class="h-full flex items-center justify-center -mt-12">
<u-empty mode="page" text="404">
</u-empty>
<uv-empty mode="page" text="404">
</uv-empty>
</view>
</template>

Expand Down
6 changes: 3 additions & 3 deletions src/pages/index/personal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<view
v-for="(item, index) of listModel"
:key="index"
class="flex items-center py-4 px-4 border-b border-gray-200 bg-white"
class="flex items-center py-4 px-4 border-b border-gray-200 bg-white active:bg-gray-200"
@click="handleInfo(item)"
>
<view class="w-10 flex-none truncate text-primary-500 text-2xl">
Expand All @@ -36,9 +36,9 @@
</view>
</view>
<view v-if="isLogin" class="mt-8 px-4">
<u-button type="success" plain ripple @click="handleLogout">
<uv-button ripple @click="handleLogout">
退出登录
</u-button>
</uv-button>
</view>
</view>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/login/phone/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</view>
</view>
<view class="px-4 mt-18">
<u-button type="primary" shape="circle" ripple @click="handleLogin">
<uv-button type="primary" shape="circle" ripple @click="handleLogin">
手机号快捷登录
</u-button>
</uv-button>
<view class="text-center mt-4 flex items-center justify-center">
<checkbox :checked="agreed" class="">
</checkbox>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/realname/components/Base/AreaPicker/trigger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<slot :value="joinValue" />
</view>
<!-- :default-index="defaultIndex" -->
<u-picker
<uv-picker
ref="uPicker"
v-bind="$attrs"
:show="show"
Expand All @@ -18,7 +18,7 @@
@confirm="onConfirm"
@change="onChange"
@close="onClose"
></u-picker>
></uv-picker>
</view>
</template>

Expand Down
50 changes: 25 additions & 25 deletions src/pages/realname/components/Base/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
个人基本信息
</view>
<view class="flex-1 h-0">
<u--form
<uv-form
ref="uForm"
label-position="left"
:model="formData"
:label-width="90"
>
<u-form-item label="性别" prop="userSex" border-bottom>
<u-radio-group
<uv-form-item label="性别" prop="userSex" border-bottom>
<uv-radio-group
v-model="formData.userSex"
placement="row"
v-bind="{
Expand All @@ -20,69 +20,69 @@
disabled
>
<view>
<u-radio label="" :name="1"></u-radio>
<uv-radio label="" :name="1"></uv-radio>
</view>
<view class="pl-4">
<u-radio label="" :name="2"></u-radio>
<uv-radio label="" :name="2"></uv-radio>
</view>
</u-radio-group>
</u-form-item>
<u-form-item label="户籍信息" prop="nativePlace" border-bottom>
</uv-radio-group>
</uv-form-item>
<uv-form-item label="户籍信息" prop="nativePlace" border-bottom>
<AreaPickerTrigger v-model="formData.nativePlace">
<template #default="{ value }">
<view class="flex items-center w-full">
<view class="flex-1 w-0">
<u--input
<uv-input
:model-value="value"
placeholder="请选择户籍信息"
border="none"
readonly
></u--input>
></uv-input>
</view>
<view class="flex-none">
<u-icon name="arrow-right"></u-icon>
<uv-icon name="arrow-right"></uv-icon>
</view>
</view>
</template>
</AreaPickerTrigger>
</u-form-item>
<u-form-item label="户主" prop="realName" border-bottom>
<u--input
</uv-form-item>
<uv-form-item label="户主" prop="realName" border-bottom>
<uv-input
v-model="formData.realName"
placeholder="请输入户主姓名"
border="none"
></u--input>
</u-form-item>
<u-form-item label="手机号" prop="userPhone" border-bottom>
></uv-input>
</uv-form-item>
<uv-form-item label="手机号" prop="userPhone" border-bottom>
<view class="flex">
<u--input
<uv-input
v-model="formData.userPhone"
placeholder="请输入手机号"
border="none"
></u--input>
></uv-input>
<view class="flex-none pl-1">
<u-button
<uv-button
type="primary"
size="small"
open-type="getPhoneNumber"
readonly
@getphonenumber="getPhoneNumber"
>
获取手机号
</u-button>
</uv-button>
</view>
</view>
</u-form-item>
</u--form>
</uv-form-item>
</uv-form>
</view>
<view class="flex-none pb-4">
<u-button
<uv-button
type="primary"
text="确定"
shape="circle"
size="large"
@click="handleSubmit"
></u-button>
></uv-button>
</view>
</view>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/realname/components/Certificate/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
</view>
</view>
<view class="flex-none pb-4">
<u-button
<uv-button
type="primary"
size="large"
shape="circle"
text="确定"
@click="handleSubmit"
>
</u-button>
</uv-button>
</view>
</view>
</template>
Expand Down

0 comments on commit 44f5e98

Please sign in to comment.