├── .editorconfig
├── .gitignore
├── .hbuilderx
└── launch.json
├── .prettierrc.json
├── App.vue
├── README.md
├── components
└── empty-view.vue
├── configs
└── base.js
├── index.html
├── main.js
├── manifest.json
├── pages.json
├── pages
├── article
│ ├── article.vue
│ └── detail.vue
├── cases
│ ├── cases.vue
│ └── detail.vue
├── index
│ ├── index.vue
│ └── search.vue
└── page
│ ├── about.vue
│ ├── page.vue
│ └── test.vue
├── screenshots
├── cases.jpg
├── home.jpg
└── news.jpg
├── services
├── article.js
├── cases.js
├── category.js
├── flash.js
├── page.js
└── shortcut.js
├── static
├── c1.png
├── c2.png
├── c3.png
├── c4.png
├── c5.png
├── c6.png
├── c7.png
├── c8.png
├── c9.png
├── customicons.css
├── customicons.ttf
├── logo.png
├── nopic.jpg
├── phone-contact.png
├── tabbar
│ ├── aboutus.png
│ ├── aboutus2.png
│ ├── home.png
│ ├── home2.png
│ ├── news.png
│ ├── news2.png
│ ├── product.png
│ └── product2.png
├── uni.png
└── wechat-contact.png
├── stores
└── store.js
├── uni.scss
├── uni_modules
├── pinia-plugin-unistorage
│ ├── changelog.md
│ ├── index.js
│ ├── package.json
│ ├── readme.md
│ └── src
│ │ ├── filter.ts
│ │ ├── index.ts
│ │ ├── normalize.ts
│ │ └── types.ts
├── u-ajax
│ ├── README.md
│ ├── changelog.md
│ ├── js_sdk
│ │ ├── index.d.ts
│ │ ├── index.js
│ │ └── lib
│ │ │ ├── adapters
│ │ │ ├── Fetcher.js
│ │ │ └── http.js
│ │ │ ├── core
│ │ │ ├── Ajax.js
│ │ │ ├── InterceptorManager.js
│ │ │ ├── dispatchRequest.js
│ │ │ └── handleCancel.js
│ │ │ ├── defaults.js
│ │ │ ├── helpers
│ │ │ ├── buildURL.js
│ │ │ ├── isCallback.js
│ │ │ └── mergeConfig.js
│ │ │ └── utils.js
│ └── package.json
├── uni-badge
│ ├── changelog.md
│ ├── components
│ │ └── uni-badge
│ │ │ └── uni-badge.vue
│ ├── package.json
│ └── readme.md
├── uni-breadcrumb
│ ├── changelog.md
│ ├── components
│ │ ├── uni-breadcrumb-item
│ │ │ └── uni-breadcrumb-item.vue
│ │ └── uni-breadcrumb
│ │ │ └── uni-breadcrumb.vue
│ ├── package.json
│ └── readme.md
├── uni-calendar
│ ├── changelog.md
│ ├── components
│ │ └── uni-calendar
│ │ │ ├── calendar.js
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ ├── uni-calendar-item.vue
│ │ │ ├── uni-calendar.vue
│ │ │ └── util.js
│ ├── package.json
│ └── readme.md
├── uni-card
│ ├── changelog.md
│ ├── components
│ │ └── uni-card
│ │ │ └── uni-card.vue
│ ├── package.json
│ └── readme.md
├── uni-collapse
│ ├── changelog.md
│ ├── components
│ │ ├── uni-collapse-item
│ │ │ └── uni-collapse-item.vue
│ │ └── uni-collapse
│ │ │ └── uni-collapse.vue
│ ├── package.json
│ └── readme.md
├── uni-combox
│ ├── changelog.md
│ ├── components
│ │ └── uni-combox
│ │ │ └── uni-combox.vue
│ ├── package.json
│ └── readme.md
├── uni-countdown
│ ├── changelog.md
│ ├── components
│ │ └── uni-countdown
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-countdown.vue
│ ├── package.json
│ └── readme.md
├── uni-data-checkbox
│ ├── changelog.md
│ ├── components
│ │ └── uni-data-checkbox
│ │ │ └── uni-data-checkbox.vue
│ ├── package.json
│ └── readme.md
├── uni-data-picker
│ ├── changelog.md
│ ├── components
│ │ ├── uni-data-picker
│ │ │ ├── keypress.js
│ │ │ ├── uni-data-picker.uvue
│ │ │ └── uni-data-picker.vue
│ │ └── uni-data-pickerview
│ │ │ ├── loading.uts
│ │ │ ├── uni-data-picker.js
│ │ │ ├── uni-data-picker.uts
│ │ │ ├── uni-data-pickerview.css
│ │ │ ├── uni-data-pickerview.uvue
│ │ │ └── uni-data-pickerview.vue
│ ├── package.json
│ └── readme.md
├── uni-data-select
│ ├── changelog.md
│ ├── components
│ │ └── uni-data-select
│ │ │ └── uni-data-select.vue
│ ├── package.json
│ └── readme.md
├── uni-dateformat
│ ├── changelog.md
│ ├── components
│ │ └── uni-dateformat
│ │ │ ├── date-format.js
│ │ │ └── uni-dateformat.vue
│ ├── package.json
│ └── readme.md
├── uni-datetime-picker
│ ├── changelog.md
│ ├── components
│ │ └── uni-datetime-picker
│ │ │ ├── calendar-item.vue
│ │ │ ├── calendar.vue
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ ├── time-picker.vue
│ │ │ ├── uni-datetime-picker.vue
│ │ │ └── util.js
│ ├── package.json
│ └── readme.md
├── uni-drawer
│ ├── changelog.md
│ ├── components
│ │ └── uni-drawer
│ │ │ ├── keypress.js
│ │ │ └── uni-drawer.vue
│ ├── package.json
│ └── readme.md
├── uni-easyinput
│ ├── changelog.md
│ ├── components
│ │ └── uni-easyinput
│ │ │ ├── common.js
│ │ │ └── uni-easyinput.vue
│ ├── package.json
│ └── readme.md
├── uni-fab
│ ├── changelog.md
│ ├── components
│ │ └── uni-fab
│ │ │ └── uni-fab.vue
│ ├── package.json
│ └── readme.md
├── uni-fav
│ ├── changelog.md
│ ├── components
│ │ └── uni-fav
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-fav.vue
│ ├── package.json
│ └── readme.md
├── uni-file-picker
│ ├── changelog.md
│ ├── components
│ │ └── uni-file-picker
│ │ │ ├── choose-and-upload-file.js
│ │ │ ├── uni-file-picker.vue
│ │ │ ├── upload-file.vue
│ │ │ ├── upload-image.vue
│ │ │ └── utils.js
│ ├── package.json
│ └── readme.md
├── uni-forms
│ ├── changelog.md
│ ├── components
│ │ ├── uni-forms-item
│ │ │ └── uni-forms-item.vue
│ │ └── uni-forms
│ │ │ ├── uni-forms.vue
│ │ │ ├── utils.js
│ │ │ └── validate.js
│ ├── package.json
│ └── readme.md
├── uni-goods-nav
│ ├── changelog.md
│ ├── components
│ │ └── uni-goods-nav
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-goods-nav.vue
│ ├── package.json
│ └── readme.md
├── uni-grid
│ ├── changelog.md
│ ├── components
│ │ ├── uni-grid-item
│ │ │ └── uni-grid-item.vue
│ │ └── uni-grid
│ │ │ └── uni-grid.vue
│ ├── package.json
│ └── readme.md
├── uni-group
│ ├── changelog.md
│ ├── components
│ │ └── uni-group
│ │ │ └── uni-group.vue
│ ├── package.json
│ └── readme.md
├── uni-icons
│ ├── changelog.md
│ ├── components
│ │ └── uni-icons
│ │ │ ├── icons.js
│ │ │ ├── uni-icons.uvue
│ │ │ ├── uni-icons.vue
│ │ │ ├── uniicons.css
│ │ │ ├── uniicons.ttf
│ │ │ ├── uniicons_file.ts
│ │ │ └── uniicons_file_vue.js
│ ├── package.json
│ └── readme.md
├── uni-indexed-list
│ ├── changelog.md
│ ├── components
│ │ └── uni-indexed-list
│ │ │ ├── uni-indexed-list-item.vue
│ │ │ └── uni-indexed-list.vue
│ ├── package.json
│ └── readme.md
├── uni-link
│ ├── changelog.md
│ ├── components
│ │ └── uni-link
│ │ │ └── uni-link.vue
│ ├── package.json
│ └── readme.md
├── uni-list
│ ├── changelog.md
│ ├── components
│ │ ├── uni-list-ad
│ │ │ └── uni-list-ad.vue
│ │ ├── uni-list-chat
│ │ │ ├── uni-list-chat.scss
│ │ │ └── uni-list-chat.vue
│ │ ├── uni-list-item
│ │ │ └── uni-list-item.vue
│ │ └── uni-list
│ │ │ ├── uni-list.vue
│ │ │ ├── uni-refresh.vue
│ │ │ └── uni-refresh.wxs
│ ├── package.json
│ └── readme.md
├── uni-load-more
│ ├── changelog.md
│ ├── components
│ │ └── uni-load-more
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-load-more.vue
│ ├── package.json
│ └── readme.md
├── uni-nav-bar
│ ├── changelog.md
│ ├── components
│ │ └── uni-nav-bar
│ │ │ ├── uni-nav-bar.vue
│ │ │ └── uni-status-bar.vue
│ ├── package.json
│ └── readme.md
├── uni-notice-bar
│ ├── changelog.md
│ ├── components
│ │ └── uni-notice-bar
│ │ │ └── uni-notice-bar.vue
│ ├── package.json
│ └── readme.md
├── uni-number-box
│ ├── changelog.md
│ ├── components
│ │ └── uni-number-box
│ │ │ └── uni-number-box.vue
│ ├── package.json
│ └── readme.md
├── uni-pagination
│ ├── changelog.md
│ ├── components
│ │ └── uni-pagination
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── es.json
│ │ │ ├── fr.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-pagination.vue
│ ├── package.json
│ └── readme.md
├── uni-popup
│ ├── changelog.md
│ ├── components
│ │ ├── uni-popup-dialog
│ │ │ ├── keypress.js
│ │ │ └── uni-popup-dialog.vue
│ │ ├── uni-popup-message
│ │ │ └── uni-popup-message.vue
│ │ ├── uni-popup-share
│ │ │ └── uni-popup-share.vue
│ │ └── uni-popup
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ ├── keypress.js
│ │ │ ├── popup.js
│ │ │ ├── uni-popup.uvue
│ │ │ └── uni-popup.vue
│ ├── package.json
│ └── readme.md
├── uni-rate
│ ├── changelog.md
│ ├── components
│ │ └── uni-rate
│ │ │ └── uni-rate.vue
│ ├── package.json
│ └── readme.md
├── uni-row
│ ├── changelog.md
│ ├── components
│ │ ├── uni-col
│ │ │ └── uni-col.vue
│ │ └── uni-row
│ │ │ └── uni-row.vue
│ ├── package.json
│ └── readme.md
├── uni-scss
│ ├── changelog.md
│ ├── index.scss
│ ├── package.json
│ ├── readme.md
│ ├── styles
│ │ ├── index.scss
│ │ ├── setting
│ │ │ ├── _border.scss
│ │ │ ├── _color.scss
│ │ │ ├── _radius.scss
│ │ │ ├── _space.scss
│ │ │ ├── _styles.scss
│ │ │ ├── _text.scss
│ │ │ └── _variables.scss
│ │ └── tools
│ │ │ └── functions.scss
│ ├── theme.scss
│ └── variables.scss
├── uni-search-bar
│ ├── changelog.md
│ ├── components
│ │ └── uni-search-bar
│ │ │ ├── i18n
│ │ │ ├── en.json
│ │ │ ├── index.js
│ │ │ ├── zh-Hans.json
│ │ │ └── zh-Hant.json
│ │ │ └── uni-search-bar.vue
│ ├── package.json
│ └── readme.md
├── uni-section
│ ├── changelog.md
│ ├── components
│ │ └── uni-section
│ │ │ └── uni-section.vue
│ ├── package.json
│ └── readme.md
├── uni-segmented-control
│ ├── changelog.md
│ ├── components
│ │ └── uni-segmented-control
│ │ │ └── uni-segmented-control.vue
│ ├── package.json
│ └── readme.md
├── uni-steps
│ ├── changelog.md
│ ├── components
│ │ └── uni-steps
│ │ │ └── uni-steps.vue
│ ├── package.json
│ └── readme.md
├── uni-swipe-action
│ ├── changelog.md
│ ├── components
│ │ ├── uni-swipe-action-item
│ │ │ ├── bindingx.js
│ │ │ ├── isPC.js
│ │ │ ├── mpalipay.js
│ │ │ ├── mpother.js
│ │ │ ├── mpwxs.js
│ │ │ ├── render.js
│ │ │ ├── uni-swipe-action-item.vue
│ │ │ └── wx.wxs
│ │ └── uni-swipe-action
│ │ │ └── uni-swipe-action.vue
│ ├── package.json
│ └── readme.md
├── uni-swiper-dot
│ ├── changelog.md
│ ├── components
│ │ └── uni-swiper-dot
│ │ │ └── uni-swiper-dot.vue
│ ├── package.json
│ └── readme.md
├── uni-table
│ ├── changelog.md
│ ├── components
│ │ ├── uni-table
│ │ │ └── uni-table.vue
│ │ ├── uni-tbody
│ │ │ └── uni-tbody.vue
│ │ ├── uni-td
│ │ │ └── uni-td.vue
│ │ ├── uni-th
│ │ │ ├── filter-dropdown.vue
│ │ │ └── uni-th.vue
│ │ ├── uni-thead
│ │ │ └── uni-thead.vue
│ │ └── uni-tr
│ │ │ ├── table-checkbox.vue
│ │ │ └── uni-tr.vue
│ ├── i18n
│ │ ├── en.json
│ │ ├── es.json
│ │ ├── fr.json
│ │ ├── index.js
│ │ ├── zh-Hans.json
│ │ └── zh-Hant.json
│ ├── package.json
│ └── readme.md
├── uni-tag
│ ├── changelog.md
│ ├── components
│ │ └── uni-tag
│ │ │ └── uni-tag.vue
│ ├── package.json
│ └── readme.md
├── uni-test
│ ├── changelog.md
│ ├── components
│ │ └── uni-test
│ │ │ └── uni-test.vue
│ ├── package.json
│ └── readme.md
├── uni-title
│ ├── changelog.md
│ ├── components
│ │ └── uni-title
│ │ │ └── uni-title.vue
│ ├── package.json
│ └── readme.md
├── uni-tooltip
│ ├── changelog.md
│ ├── components
│ │ └── uni-tooltip
│ │ │ └── uni-tooltip.vue
│ ├── package.json
│ └── readme.md
├── uni-transition
│ ├── changelog.md
│ ├── components
│ │ └── uni-transition
│ │ │ ├── createAnimation.js
│ │ │ └── uni-transition.vue
│ ├── package.json
│ └── readme.md
└── uni-ui
│ ├── changelog.md
│ ├── components
│ └── uni-ui
│ │ └── uni-ui.vue
│ ├── package.json
│ └── readme.md
└── utils
└── ajax.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | # https://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | end_of_line = lf
9 | insert_final_newline = true
10 | trim_trailing_whitespace = true
11 |
12 | [*.md]
13 | insert_final_newline = false
14 | trim_trailing_whitespace = false
15 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.idea
2 | unpackage
3 |
--------------------------------------------------------------------------------
/.hbuilderx/launch.json:
--------------------------------------------------------------------------------
1 | { // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
2 | // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
3 | "version": "0.0",
4 | "configurations": [{
5 | "default": {
6 | "launchtype": "local"
7 | },
8 | "mp-weixin": {
9 | "launchtype": "local"
10 | },
11 | "type": "uniCloud"
12 | }]
13 | }
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/prettierrc",
3 | "semi": false,
4 | "tabWidth": 2,
5 | "singleQuote": true,
6 | "printWidth": 100,
7 | "trailingComma": "none"
8 | }
--------------------------------------------------------------------------------
/App.vue:
--------------------------------------------------------------------------------
1 |
15 |
16 |
33 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 企业展示型小程序
2 | - [HBuilderX](https://hx.dcloud.net.cn/)
3 | - [uni-app](https://uniapp.dcloud.net.cn/)
4 | - [Vue3](https://github.com/vuejs/core)
5 | - [uni-ui](https://ext.dcloud.net.cn/plugin?id=55)
6 |
7 | - [pinia-plugin-unistorage](https://ext.dcloud.net.cn/plugin?id=8081)
8 | - [uni-ajax](https://ext.dcloud.net.cn/plugin?id=2351)
9 | - [Prettier](https://ext.dcloud.net.cn/plugin?id=2025)
10 |
11 | 如果需要`服务端`或`管理员端`,请移步:https://github.com/chudaozhe/gin-vue-weapp
12 |
13 | ## 格式化单个文件
14 | ```
15 | Ctrl+Shift+F
16 | ```
17 |
18 | ## 配置
19 | 1、修改接口前缀
20 | ```
21 | vi configs/base.js
22 | ...
23 | baseURL: 'https://ent.uqiantu.com',
24 | ```
25 |
26 | 2、关于我们
27 |
28 | 这是个单页,并且id是写死的,如果后台修改了,小程序需要同步修改
29 | ```
30 | vi pages/page/about.vue
31 | ...
32 | pageHandleDetail(3)
33 | ```
34 |
35 | ## 截图
36 |
37 | 
38 | 
39 | 
--------------------------------------------------------------------------------
/components/empty-view.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 空空如也
6 |
7 |
8 |
9 |
10 |
11 |
12 |
30 |
--------------------------------------------------------------------------------
/configs/base.js:
--------------------------------------------------------------------------------
1 | export default {
2 | baseURL: 'https://ent.uqiantu.com',
3 | mobile: '13800138002',
4 | wx: 'haoiwan',
5 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 |
2 | // #ifndef VUE3
3 | import Vue from 'vue'
4 | import App from './App'
5 |
6 | Vue.config.productionTip = false
7 |
8 | App.mpType = 'app'
9 |
10 | const app = new Vue({
11 | ...App
12 | })
13 | app.$mount()
14 | // #endif
15 |
16 | // #ifdef VUE3
17 | import { createSSRApp } from 'vue'
18 | import App from './App.vue'
19 | import * as Pinia from "pinia";
20 | import { createUnistorage } from "@/uni_modules/pinia-plugin-unistorage";
21 | export function createApp() {
22 | const app = createSSRApp(App)
23 | const store = Pinia.createPinia()
24 | store.use(createUnistorage())
25 | app.use(store)
26 | return {
27 | app,
28 | Pinia
29 | }
30 | }
31 | // #endif
--------------------------------------------------------------------------------
/pages/article/detail.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
41 |
42 |
68 |
--------------------------------------------------------------------------------
/pages/page/about.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
30 |
31 |
40 |
--------------------------------------------------------------------------------
/pages/page/page.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
43 |
44 |
53 |
--------------------------------------------------------------------------------
/pages/page/test.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/screenshots/cases.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/screenshots/cases.jpg
--------------------------------------------------------------------------------
/screenshots/home.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/screenshots/home.jpg
--------------------------------------------------------------------------------
/screenshots/news.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/screenshots/news.jpg
--------------------------------------------------------------------------------
/services/article.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | /**
12 | * 列表
13 | * @param category_id
14 | * @param page
15 | * @param max
16 | * @returns {Promise.<*>}
17 | */
18 | export async function gets(category_id, page, max) {
19 | return http.get('/user/' + getUserId() + '/category/' + category_id + '/article', {
20 | page: page,
21 | max: max
22 | })
23 | }
24 |
25 | export async function get(id) {
26 | return http.get('/user/' + getUserId() + '/article/' + id, {})
27 | }
28 |
--------------------------------------------------------------------------------
/services/cases.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | /**
12 | * 列表
13 | * @param category_id
14 | * @param keyword
15 | * @param page
16 | * @param max
17 | * @returns {Promise.<*>}
18 | */
19 | export async function gets(category_id, keyword, page, max) {
20 | return http.get('/user/' + getUserId() + '/category/' + category_id + '/cases', {
21 | keyword: keyword,
22 | page: page,
23 | max: max
24 | })
25 | }
26 |
27 | export async function get(id) {
28 | return http.get('/user/' + getUserId() + '/cases/' + id, {})
29 | }
30 |
--------------------------------------------------------------------------------
/services/category.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | /**
12 | * 列表
13 | * @param category_id
14 | * @param keyword
15 | * @param page
16 | * @param max
17 | * @returns {Promise.<*>}
18 | */
19 | export async function gets(type) {
20 | return http.get('/user/' + getUserId() + '/category', {
21 | type: type
22 | })
23 | }
24 |
--------------------------------------------------------------------------------
/services/flash.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | /**
12 | * 列表
13 | * @param category_id
14 | * @param keyword
15 | * @param page
16 | * @param max
17 | * @returns {Promise.<*>}
18 | */
19 | export async function gets(category_id, keyword, page, max) {
20 | return http.get('/user/' + getUserId() + '/flash', {
21 | keyword: keyword,
22 | page: page,
23 | max: max
24 | })
25 | }
26 |
--------------------------------------------------------------------------------
/services/page.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | export async function get(id) {
12 | return http.get('/user/' + getUserId() + '/page/' + id, {})
13 | }
14 |
--------------------------------------------------------------------------------
/services/shortcut.js:
--------------------------------------------------------------------------------
1 | import http from '@/utils/ajax'
2 | import { useUserInfoStore } from '@/stores/store'
3 | /**
4 | * 获取用户id
5 | */
6 | const getUserId = () => {
7 | const { userInfo: user } = useUserInfoStore()
8 | return user.id ?? 0
9 | }
10 |
11 | /**
12 | * 列表
13 | * @param page
14 | * @param max
15 | * @returns {Promise.<*>}
16 | */
17 | export async function gets(page, max) {
18 | return http.get('/user/' + getUserId() + '/shortcut', {
19 | page: page,
20 | max: max
21 | })
22 | }
23 |
--------------------------------------------------------------------------------
/static/c1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c1.png
--------------------------------------------------------------------------------
/static/c2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c2.png
--------------------------------------------------------------------------------
/static/c3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c3.png
--------------------------------------------------------------------------------
/static/c4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c4.png
--------------------------------------------------------------------------------
/static/c5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c5.png
--------------------------------------------------------------------------------
/static/c6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c6.png
--------------------------------------------------------------------------------
/static/c7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c7.png
--------------------------------------------------------------------------------
/static/c8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c8.png
--------------------------------------------------------------------------------
/static/c9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/c9.png
--------------------------------------------------------------------------------
/static/customicons.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "customicons"; /* Project id 2878519 */
3 | src:url('/static/customicons.ttf') format('truetype');
4 | }
5 |
6 | .customicons {
7 | font-family: "customicons" !important;
8 | }
9 |
10 | .youxi:before {
11 | content: "\e60e";
12 | }
13 |
14 | .wenjian:before {
15 | content: "\e60f";
16 | }
17 |
18 | .zhuanfa:before {
19 | content: "\e610";
20 | }
21 |
--------------------------------------------------------------------------------
/static/customicons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/customicons.ttf
--------------------------------------------------------------------------------
/static/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/logo.png
--------------------------------------------------------------------------------
/static/nopic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/nopic.jpg
--------------------------------------------------------------------------------
/static/phone-contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/phone-contact.png
--------------------------------------------------------------------------------
/static/tabbar/aboutus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/aboutus.png
--------------------------------------------------------------------------------
/static/tabbar/aboutus2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/aboutus2.png
--------------------------------------------------------------------------------
/static/tabbar/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/home.png
--------------------------------------------------------------------------------
/static/tabbar/home2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/home2.png
--------------------------------------------------------------------------------
/static/tabbar/news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/news.png
--------------------------------------------------------------------------------
/static/tabbar/news2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/news2.png
--------------------------------------------------------------------------------
/static/tabbar/product.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/product.png
--------------------------------------------------------------------------------
/static/tabbar/product2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/tabbar/product2.png
--------------------------------------------------------------------------------
/static/uni.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/uni.png
--------------------------------------------------------------------------------
/static/wechat-contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/chudaozhe/enterprise-weapp/c15b145e37ac45793ff0948ad0a53290b600464b/static/wechat-contact.png
--------------------------------------------------------------------------------
/stores/store.js:
--------------------------------------------------------------------------------
1 | import { defineStore } from 'pinia'
2 | import { ref } from 'vue'
3 |
4 | export const useUserInfoStore = defineStore(
5 | 'userInfo',
6 | () => {
7 | const userInfo = ref({})
8 |
9 | const setUserInfo = (info) => {
10 | userInfo.value = info
11 | }
12 |
13 | const removeUserInfo = () => {
14 | userInfo.value = {}
15 | }
16 |
17 | const isEmpty = () => {
18 | return Object.keys(userInfo.value).length === 0
19 | }
20 |
21 | return {
22 | userInfo,
23 | setUserInfo,
24 | removeUserInfo,
25 | isEmpty
26 | }
27 | },
28 | {
29 | unistorage: true //持久化存储
30 | }
31 | )
32 |
--------------------------------------------------------------------------------
/uni.scss:
--------------------------------------------------------------------------------
1 | @import '@/uni_modules/uni-scss/variables.scss';
2 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/changelog.md:
--------------------------------------------------------------------------------
1 | ## 0.0.19(2024-01-18)
2 | fix: 重新构建,不需要默认参数
3 | ## 0.0.16(2023-05-06)
4 |
5 | fix: 修复全局 key 移除
6 |
7 | ## 0.0.14(2023-04-29)
8 |
9 | fix: 修复全局 global key 选项
10 |
11 | ## 0.0.12(2023-04-07)
12 |
13 | - fix: 修复类型错误
14 |
15 | ## 0.0.11(2023-03-22)
16 |
17 | - chore: ts 支持
18 |
19 | ## 0.0.7(2022-04-29)
20 |
21 | - 更新 README
22 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "pinia-plugin-unistorage",
3 | "displayName": "pinia-plugin-unistorage",
4 | "version": "0.0.19",
5 | "description": "uniapp 下 pinia 的本地数据缓存插件",
6 | "keywords": [
7 | "pinia",
8 | "uniapp",
9 | "storage",
10 | "pinia-plugin",
11 | "persistence"
12 | ],
13 | "engines": {
14 | "HBuilderX": "^3.4.7"
15 | },
16 | "dcloudext": {
17 | "sale": {
18 | "regular": {
19 | "price": "0.00"
20 | },
21 | "sourcecode": {
22 | "price": "0.00"
23 | }
24 | },
25 | "contact": {
26 | "qq": ""
27 | },
28 | "declaration": {
29 | "ads": "无",
30 | "data": "无",
31 | "permissions": "无"
32 | },
33 | "npmurl": "https://www.npmjs.com/package/pinia-plugin-unistorage",
34 | "type": "sdk-js"
35 | },
36 | "uni_modules": {
37 | "dependencies": [],
38 | "encrypt": [],
39 | "platforms": {
40 | "cloud": {
41 | "tcb": "y",
42 | "aliyun": "y"
43 | },
44 | "client": {
45 | "Vue": {
46 | "vue2": "y",
47 | "vue3": "y"
48 | },
49 | "App": {
50 | "app-vue": "y",
51 | "app-nvue": "y"
52 | },
53 | "H5-mobile": {
54 | "Safari": "y",
55 | "Android Browser": "y",
56 | "微信浏览器(Android)": "y",
57 | "QQ浏览器(Android)": "y"
58 | },
59 | "H5-pc": {
60 | "Chrome": "y",
61 | "IE": "y",
62 | "Edge": "y",
63 | "Firefox": "y",
64 | "Safari": "y"
65 | },
66 | "小程序": {
67 | "微信": "y",
68 | "阿里": "y",
69 | "百度": "y",
70 | "字节跳动": "y",
71 | "QQ": "y",
72 | "钉钉": "y",
73 | "快手": "y",
74 | "飞书": "y",
75 | "京东": "y"
76 | },
77 | "快应用": {
78 | "华为": "y",
79 | "联盟": "y"
80 | }
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/src/filter.ts:
--------------------------------------------------------------------------------
1 | import type { StateTree } from "pinia";
2 |
3 | function get(state: StateTree, path: Array) {
4 | return path.reduce((obj, p) => {
5 | return obj?.[p];
6 | }, state);
7 | }
8 |
9 | function set(state: StateTree, path: Array, val: unknown): StateTree {
10 | return (
11 | (path.slice(0, -1).reduce((obj, p) => {
12 | if (!/^(__proto__)$/.test(p)) {
13 | return (obj[p] = obj[p] || {});
14 | } else return {};
15 | }, state)[path[path.length - 1]] = val), state
16 | );
17 | }
18 |
19 | export function pick(baseState: StateTree, paths: string[]): StateTree {
20 | return paths.reduce((substate, path) => {
21 | const pathArray = path.split(".");
22 | return set(
23 | substate,
24 | pathArray,
25 | get(baseState, pathArray),
26 | );
27 | }, {});
28 | }
29 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/src/index.ts:
--------------------------------------------------------------------------------
1 | import { pick } from "./filter";
2 | import type { PiniaPlugin } from "pinia";
3 | import { normalizeOptions } from "./normalize";
4 | import { PersistedStateFactoryOptions } from "./types";
5 |
6 | function passage(key: string) {
7 | return key;
8 | }
9 |
10 | export function createUnistorage(
11 | globalOptions: PersistedStateFactoryOptions = {},
12 | ): PiniaPlugin {
13 | const { key: normalizeKey = passage } = globalOptions || {};
14 | if (globalOptions?.key) {
15 | delete globalOptions.key;
16 | }
17 | return function (ctx) {
18 | {
19 | const { store, options } = ctx;
20 | // @ts-ignore
21 | let { unistorage } = options || {};
22 |
23 | if (!unistorage) return;
24 |
25 | const {
26 | paths = null,
27 | afterRestore,
28 | beforeRestore,
29 | serializer = {
30 | serialize: JSON.stringify,
31 | deserialize: JSON.parse,
32 | },
33 | key = store.$id,
34 | } = normalizeOptions(unistorage, globalOptions);
35 |
36 | beforeRestore?.(ctx);
37 |
38 | const normalizedKey = normalizeKey(key);
39 |
40 | try {
41 | // @ts-ignore
42 | const fromStorage = uni.getStorageSync(normalizedKey);
43 | if (fromStorage) {
44 | store.$patch(serializer.deserialize(fromStorage));
45 | }
46 | } catch (_error) {}
47 |
48 | afterRestore?.(ctx);
49 |
50 | store.$subscribe(
51 | (_, state) => {
52 | try {
53 | const toStore = Array.isArray(paths) ? pick(state, paths) : state;
54 | // @ts-ignore
55 | uni.setStorageSync(
56 | normalizedKey,
57 | serializer.serialize(toStore),
58 | );
59 | } catch (_error) {}
60 | },
61 | { detached: true },
62 | );
63 | }
64 | };
65 | }
66 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/src/normalize.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | PersistedStateFactoryOptions,
3 | PersistedStateOptions,
4 | } from "./types";
5 |
6 | const isObject = (v: unknown): v is Object =>
7 | typeof v === "object" && v !== null;
8 |
9 | export const normalizeOptions = (
10 | options: boolean | PersistedStateOptions | undefined,
11 | globalOptions: PersistedStateFactoryOptions,
12 | ): PersistedStateOptions => {
13 | options = isObject(options) ? options : Object.create(null);
14 |
15 | return new Proxy(options as object, {
16 | get(t, p, r) {
17 | return (
18 | Reflect.get(t, p, r) ||
19 | Reflect.get(globalOptions, p, r)
20 | );
21 | },
22 | });
23 | };
24 |
--------------------------------------------------------------------------------
/uni_modules/pinia-plugin-unistorage/src/types.ts:
--------------------------------------------------------------------------------
1 | import type { PiniaPluginContext, StateTree } from "pinia";
2 |
3 | type Prettify = { [K in keyof T]: T[K] };
4 |
5 | export type StorageLike = Pick;
6 |
7 | export interface Serializer {
8 | /**
9 | * Serializes state into string before storing
10 | * @default JSON.stringify
11 | */
12 | serialize: (value: StateTree) => string;
13 |
14 | /**
15 | * Deserializes string into state before hydrating
16 | * @default JSON.parse
17 | */
18 | deserialize: (value: string) => StateTree;
19 | }
20 |
21 | export interface PersistedStateOptions {
22 | /**
23 | * Storage key to use.
24 | * @default $store.id
25 | */
26 | key?: string;
27 |
28 | /**
29 | * Dot-notation paths to partially save state. Saves everything if undefined.
30 | * @default undefined
31 | */
32 | paths?: Array;
33 |
34 | /**
35 | * Customer serializer to serialize/deserialize state.
36 | */
37 | serializer?: Serializer;
38 |
39 | /**
40 | * Hook called before state is hydrated from storage.
41 | * @default null
42 | */
43 | beforeRestore?: (context: PiniaPluginContext) => void;
44 |
45 | /**
46 | * Hook called after state is hydrated from storage.
47 | * @default undefined
48 | */
49 | afterRestore?: (context: PiniaPluginContext) => void;
50 | }
51 |
52 | export type PersistedStateFactoryOptions = Prettify<
53 | Pick<
54 | PersistedStateOptions,
55 | "serializer" | "afterRestore" | "beforeRestore"
56 | > & {
57 | /**
58 | * Global key generator, allows pre/postfixing store keys.
59 | * @default storeKey => storeKey
60 | */
61 | key?: (storeKey: string) => string;
62 | }
63 | >;
64 |
65 | declare module "pinia" {
66 | export interface DefineStoreOptionsBase {
67 | unistorage?: boolean | PersistedStateOptions;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/README.md:
--------------------------------------------------------------------------------
1 | ## ✨ 特性
2 |
3 | - 支持 Promise API
4 | - 支持 Typescript 开发
5 | - 拦截请求和响应
6 | - 自定义配置请求实例
7 | - 多种 Method 方法请求
8 | - 支持 RequestTask 操作
9 |
10 | ## 🍟 文档
11 |
12 | **[uniajax.ponjs.com](https://uniajax.ponjs.com)**
13 |
14 | ## 🥗 安装
15 |
16 | **插件市场**
17 |
18 | 在插件市场右上角选择 `使用HBuilder X 导入插件` 或者 `下载插件ZIP`
19 |
20 | **NPM**
21 |
22 | ```bash
23 | # 如果您的项目是HBuilder X创建的,根目录又没有package.json文件的话,请先执行如下命令:
24 | # npm init -y
25 |
26 | # 安装
27 | npm install uni-ajax
28 |
29 | # 更新
30 | npm update uni-ajax
31 | ```
32 |
33 | ## 🥐 实例
34 |
35 | 新建 `ajax.js` 文件(文件名可自定义)用于处理拦截器、接口根地址、默认配置等,详细配置请[查看文档](https://uniajax.ponjs.com/instance/create.html)
36 |
37 | ```JavaScript
38 | // ajax.js
39 |
40 | import ajax from 'uni-ajax' // 引入 uni-ajax 模块
41 |
42 | const instance = ajax.create(config) // 创建请求实例
43 |
44 | instance.interceptors.request.use(onFulfilled, onRejected) // 添加请求拦截器
45 | instance.interceptors.response.use(onFulfilled, onRejected) // 添加响应拦截器
46 |
47 | export default instance // 导出创建后的实例
48 | ```
49 |
50 | ## 🥪 使用
51 |
52 | **请求方法**
53 |
54 | ```JavaScript
55 | // 常规方法
56 | ajax()
57 |
58 | // 请求方法别名
59 | ajax.get()
60 | ajax.post()
61 | ajax.put()
62 | ajax.delete()
63 | ```
64 |
65 | **RequestTask**
66 |
67 | ```JavaScript
68 | import ajax, { Fetcher } from 'uni-ajax'
69 |
70 | const fetcher = new Fetcher()
71 | ajax({ fetcher })
72 |
73 | fetcher.abort() // 中断请求任务
74 | const requestTask = await fetcher.source() // 获取请求任务对象
75 | ```
76 |
77 | **其他属性方法**
78 |
79 | ```JavaScript
80 | ajax.defaults // 全局默认配置
81 | ajax.config // 当前实例配置
82 | ajax.getURL(config) // 获取实例请求地址
83 | ```
84 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/changelog.md:
--------------------------------------------------------------------------------
1 | ## 2.5.1(2023-01-16)
2 | - 精简代码,体积更小,性能提升
3 | - 废弃封装请求任务方法和 xhr 属性 [详情](https://uniajax.ponjs.com/guide/usage#requesttask)
4 | - 新增 fetcher 属性获取请求任务 [详情](https://uniajax.ponjs.com/api/config#fetcher)
5 | - 移除回调函数属性 success / fail / complete [详情](https://uniajax.ponjs.com/guide/usage#发起请求)
6 | ## 2.4.6(2022-12-01)
7 | - 新增自定义响应内容类型 CustomResponse [详情](https://uniajax.ponjs.com/guide/typescript#定义类型)
8 | - 修改自定义请求配置类型 CustomConfig [详情](https://uniajax.ponjs.com/guide/typescript#定义类型)
9 | - 优化插件市场安装引入路径 [详情](https://uniajax.ponjs.com/guide/installation#插件市场)
10 | - 优化创建请求类工厂函数
11 |
12 | ## 2.4.5(2022-07-08)
13 | - 优化使用拦截器的 Typescript 类型 [详情](https://uniajax.ponjs.com/api#interceptors)
14 |
15 | ## 2.4.4(2022-04-01)
16 | - 修复 params 参数被转成 JSON 字符串问题 [详情](https://uniajax.ponjs.com/api/config#params)
17 |
18 | ## 2.4.3(2022-02-24)
19 | - 兼容支付宝小程序不支持 `class extends Promise` 错误
20 | - 去除多余的 defaults 默认值 [详情](https://uniajax.ponjs.com/api#defaults)
21 |
22 | ## 2.4.2(2022-02-01)
23 | - 修改 params 配置参数 [详情](https://uniajax.ponjs.com/api/config#params)
24 | - 新增 query 配置参数 [详情](https://uniajax.ponjs.com/api/config#query)
25 | - 优化 create 方法的 TypeScript 参数类型
26 |
27 | ## 2.4.1(2022-01-15)
28 | - 全新的获取实例配置机制 [详情](https://uniajax.ponjs.com/guide/instance#实例配置)
29 | - 新增全局默认配置 [详情](https://uniajax.ponjs.com/guide/instance#全局配置)
30 | - 新增获取请求地址方法 [详情](https://uniajax.ponjs.com/api#geturl)
31 | - 去除获取 baseURL 和 origin 属性
32 |
33 | ## 2.4.0(2022-01-15)
34 | **全新版本发布**
35 | 注意 2.4.x 版本与 2.3.x 以下版本存在些许差异!
36 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/index.js:
--------------------------------------------------------------------------------
1 | import Ajax from './lib/core/Ajax'
2 | import Fetcher from './lib/adapters/Fetcher'
3 |
4 | const ajax = Ajax()
5 |
6 | ajax.create = function create(instanceConfig) {
7 | return Ajax(instanceConfig)
8 | }
9 |
10 | ajax.Fetcher = Fetcher
11 |
12 | export { Fetcher }
13 |
14 | export default ajax
15 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/adapters/Fetcher.js:
--------------------------------------------------------------------------------
1 | const PROMISE = Symbol('$$promise')
2 |
3 | export default class Fetcher {
4 | get [Symbol.toStringTag]() {
5 | return '[object Fetcher]'
6 | }
7 |
8 | constructor() {
9 | this[PROMISE] = new Promise((resolve, reject) => {
10 | this.resolve = resolve
11 | this.reject = reject
12 | })
13 | }
14 |
15 | async source() {
16 | return this[PROMISE]
17 | }
18 |
19 | async abort() {
20 | ;(await this.source())?.abort()
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/adapters/http.js:
--------------------------------------------------------------------------------
1 | export default function adapter(config) {
2 | return new Promise((resolve, reject) => {
3 | const requestTask = uni.request({
4 | ...config,
5 | complete: result => {
6 | // 根据状态码判断要执行的触发的状态
7 | const response = { config, ...result }
8 | !config.validateStatus || config.validateStatus(result.statusCode)
9 | ? resolve(response)
10 | : reject(response)
11 | }
12 | })
13 |
14 | config.fetcher?.resolve(requestTask)
15 | })
16 | }
17 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/core/InterceptorManager.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 拦截器类
3 | */
4 | export default class InterceptorManager {
5 | handlers = []
6 |
7 | use(fulfilled, rejected) {
8 | this.handlers.push({
9 | fulfilled,
10 | rejected
11 | })
12 | return this.handlers.length - 1
13 | }
14 |
15 | eject(id) {
16 | if (this.handlers[id]) {
17 | this.handlers[id] = null
18 | }
19 | }
20 |
21 | forEach(fn, reverse = false) {
22 | if (reverse) {
23 | for (let i = this.handlers.length - 1; i >= 0; i--) {
24 | this.handlers[i] !== null && fn(this.handlers[i])
25 | }
26 | } else {
27 | for (let i = 0, l = this.handlers.length; i < l; i++) {
28 | this.handlers[i] !== null && fn(this.handlers[i])
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/core/dispatchRequest.js:
--------------------------------------------------------------------------------
1 | import buildURL from '../helpers/buildURL'
2 | import isCallback from '../helpers/isCallback'
3 | import { forEach, isPlainObject, merge } from '../utils'
4 | import { HEADER } from '../defaults'
5 |
6 | /** 派发请求方法 */
7 | export default function dispatchRequest(config) {
8 | // 拼接 url
9 | config.url = buildURL(config)
10 |
11 | // 请求方法转大写
12 | config.method = (config.method || 'get').toUpperCase()
13 |
14 | // 调整 header 优先级
15 | config.header = merge(
16 | config.header.common,
17 | config.header[config.method.toLowerCase()],
18 | config.header
19 | )
20 |
21 | // 清除多余的请求头
22 | forEach(HEADER, h => isPlainObject(config.header[h]) && delete config.header[h])
23 |
24 | // 清除回调函数
25 | forEach(config, (val, key) => isCallback(key) && delete config[key])
26 |
27 | // 执行请求方法
28 | return config.adapter(config)
29 | }
30 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/core/handleCancel.js:
--------------------------------------------------------------------------------
1 | const CANCEL = Symbol('$$cancel')
2 |
3 | function hasCancel(target) {
4 | return target === null || target === undefined
5 | ? false
6 | : Object.prototype.hasOwnProperty.call(target, CANCEL)
7 | }
8 |
9 | /**
10 | * 派发请求拒绝方法,处理发起请求前错误,取消执行请求,并防止进入响应拦截器
11 | * @param {*} reason 错误原因
12 | * @returns {Promise} 封装了 CANCEL 的失败对象
13 | */
14 | export function dispatchCancel(reason) {
15 | return Promise.reject({ [CANCEL]: reason })
16 | }
17 |
18 | /**
19 | * 拦截失败对象
20 | * @param {Function} rejected 响应错误拦截器
21 | */
22 | export function interceptCancel(rejected) {
23 | // 判断发起请求前是否发生错误,如果发生错误则不执行后面的响应错误拦截器
24 | return (
25 | rejected && (response => (hasCancel(response) ? Promise.reject(response) : rejected(response)))
26 | )
27 | }
28 |
29 | /**
30 | * 分离失败对象
31 | * @param {*} response 封装了 CANCEL 的失败对象
32 | */
33 | export function detachCancel(error) {
34 | return Promise.reject(hasCancel(error) ? error[CANCEL] : error)
35 | }
36 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/defaults.js:
--------------------------------------------------------------------------------
1 | import adapter from './adapters/http'
2 | import { forEach } from './utils'
3 |
4 | export const METHOD = ['get', 'post', 'put', 'delete', 'connect', 'head', 'options', 'trace']
5 | export const HEADER = ['common', ...METHOD]
6 |
7 | const defaults = {
8 | adapter,
9 | header: {},
10 | method: 'GET',
11 | validateStatus: statusCode => statusCode >= 200 && statusCode < 300
12 | }
13 |
14 | forEach(HEADER, h => (defaults.header[h] = {}))
15 |
16 | export default defaults
17 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/helpers/isCallback.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 判断参数是否含有回调参数 success / fail / complete 之一
3 | * @param {string} field 参数的 Key 值字符串
4 | * @returns {boolean} 返回判断值
5 | */
6 | export default function isCallback(field) {
7 | return ['success', 'fail', 'complete'].includes(field)
8 | }
9 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/helpers/mergeConfig.js:
--------------------------------------------------------------------------------
1 | import { assign, forEach } from '../utils'
2 |
3 | /**
4 | * 深度合并,且不合并 undefined 值
5 | * @param {object} obj1 前对象
6 | * @param {object} obj2 后对象
7 | * @returns {object} 合并后的对象
8 | */
9 | function merge(obj1 = {}, obj2 = {}) {
10 | const obj = {}
11 |
12 | const objKeys = Object.keys({ ...obj1, ...obj2 })
13 |
14 | forEach(objKeys, prop => {
15 | if (obj2[prop] !== undefined) {
16 | obj[prop] = assign(obj1[prop], obj2[prop])
17 | } else if (obj1[prop] !== undefined) {
18 | obj[prop] = assign(undefined, obj1[prop])
19 | }
20 | })
21 |
22 | return obj
23 | }
24 |
25 | /**
26 | * 合并请求配置
27 | * @param {...object|function} args 请求配置
28 | * @returns {object} 合并后的请求配置
29 | */
30 | export default async function mergeConfig(...args) {
31 | let config = {}
32 |
33 | for (let i = 0, l = args.length; i < l; i++) {
34 | const current = typeof args[i] === 'function' ? await args[i]() : args[i]
35 | config = merge(config, current)
36 | }
37 |
38 | config.method = config.method.toUpperCase()
39 |
40 | return config
41 | }
42 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/js_sdk/lib/utils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 获取值的原始类型字符串,例如 [object Object]
3 | */
4 | const _toString = Object.prototype.toString
5 |
6 | /**
7 | * 判断是否为数组
8 | * @param {*} val 要判断的值
9 | * @returns {boolean} 返回判断结果
10 | */
11 | export function isArray(val) {
12 | return _toString.call(val) === '[object Array]'
13 | }
14 |
15 | /**
16 | * 判断是否为普通对象
17 | * @param {*} val 要判断的值
18 | * @returns {boolean} 返回判断结果
19 | */
20 | export function isPlainObject(val) {
21 | return _toString.call(val) === '[object Object]'
22 | }
23 |
24 | /**
25 | * 遍历
26 | * @param {object|array} obj 要迭代的对象
27 | * @param {function} fn 为每个项调用的回调
28 | */
29 | export function forEach(obj, fn) {
30 | if (obj === null || obj === undefined) return
31 | if (typeof obj !== 'object') obj = [obj]
32 | if (isArray(obj)) {
33 | for (let i = 0, l = obj.length; i < l; i++) {
34 | fn.call(null, obj[i], i, obj)
35 | }
36 | } else {
37 | for (const k in obj) {
38 | if (Object.prototype.hasOwnProperty.call(obj, k)) {
39 | fn.call(null, obj[k], k, obj)
40 | }
41 | }
42 | }
43 | }
44 |
45 | /**
46 | * 对象深合并
47 | * @param {...object} args 对象
48 | * @returns {object} 合并后的对象
49 | */
50 | export function merge(...args) {
51 | const result = {}
52 | for (let i = 0, l = args.length; i < l; i++) {
53 | if (isPlainObject(args[i])) {
54 | forEach(args[i], (val, key) => {
55 | result[key] = assign(result[key], val)
56 | })
57 | }
58 | }
59 | return result
60 | }
61 |
62 | /**
63 | * 合并分配到目标对象
64 | * @param {*} target 目标对象
65 | * @param {*} source 源对象
66 | * @returns {*} 目标对象
67 | */
68 | export function assign(target, source) {
69 | if (isPlainObject(target) && isPlainObject(source)) {
70 | return merge(target, source)
71 | } else if (isPlainObject(source)) {
72 | return merge({}, source)
73 | } else if (isArray(source)) {
74 | return source.slice()
75 | }
76 | return source
77 | }
78 |
--------------------------------------------------------------------------------
/uni_modules/u-ajax/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "u-ajax",
3 | "displayName": "request uni-ajax 请求",
4 | "version": "2.5.1",
5 | "description": "封装 uni.request,支持拦截器、接口根地址、默认配置、中断请求等功能",
6 | "keywords": [
7 | "ajax",
8 | "http",
9 | "promise",
10 | "request",
11 | "task"
12 | ],
13 | "main": "./js_sdk/index.js",
14 | "types": "./js_sdk/index.d.ts",
15 | "repository": "https://github.com/ponjs/uni-ajax",
16 | "dcloudext": {
17 | "type": "sdk-js",
18 | "declaration": {
19 | "ads": "无",
20 | "data": "插件不采集任何数据",
21 | "permissions": "无"
22 | },
23 | "npmurl": "https://www.npmjs.com/package/uni-ajax",
24 | "contact": {
25 | "qq": ""
26 | }
27 | },
28 | "uni_modules": {
29 | "platforms": {
30 | "cloud": {
31 | "tcb": "y",
32 | "aliyun": "y"
33 | },
34 | "client": {
35 | "App": {
36 | "app-vue": "y",
37 | "app-nvue": "y"
38 | },
39 | "H5-mobile": {
40 | "Safari": "y",
41 | "Android Browser": "y",
42 | "微信浏览器(Android)": "y",
43 | "QQ浏览器(Android)": "y"
44 | },
45 | "H5-pc": {
46 | "Chrome": "y",
47 | "IE": "y",
48 | "Edge": "y",
49 | "Firefox": "y",
50 | "Safari": "y"
51 | },
52 | "小程序": {
53 | "微信": "y",
54 | "阿里": "y",
55 | "百度": "y",
56 | "字节跳动": "y",
57 | "QQ": "y",
58 | "钉钉": "y",
59 | "快手": "y",
60 | "飞书": "y",
61 | "京东": "y"
62 | },
63 | "快应用": {
64 | "华为": "y",
65 | "联盟": "y"
66 | },
67 | "Vue": {
68 | "vue2": "y",
69 | "vue3": "y"
70 | }
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/uni_modules/uni-badge/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.2(2023-01-28)
2 | - 修复 运行/打包 控制台警告问题
3 | ## 1.2.1(2022-09-05)
4 | - 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
5 | ## 1.2.0(2021-11-19)
6 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
7 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge)
8 | ## 1.1.7(2021-11-08)
9 | - 优化 升级ui
10 | - 修改 size 属性默认值调整为 small
11 | - 修改 type 属性,默认值调整为 error,info 替换 default
12 | ## 1.1.6(2021-09-22)
13 | - 修复 在字节小程序上样式不生效的 bug
14 | ## 1.1.5(2021-07-30)
15 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
16 | ## 1.1.4(2021-07-29)
17 | - 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性
18 | ## 1.1.3(2021-06-24)
19 | - 优化 示例项目
20 | ## 1.1.1(2021-05-12)
21 | - 新增 组件示例地址
22 | ## 1.1.0(2021-05-12)
23 | - 新增 uni-badge 的 absolute 属性,支持定位
24 | - 新增 uni-badge 的 offset 属性,支持定位偏移
25 | - 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点
26 | - 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+
27 | - 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式
28 | ## 1.0.7(2021-05-07)
29 | - 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug
30 | - 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug
31 | - 新增 uni-badge 属性 custom-style, 支持自定义样式
32 | ## 1.0.6(2021-02-04)
33 | - 调整为uni_modules目录规范
34 |
--------------------------------------------------------------------------------
/uni_modules/uni-badge/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-badge",
3 | "displayName": "uni-badge 数字角标",
4 | "version": "1.2.2",
5 | "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
6 | "keywords": [
7 | "",
8 | "badge",
9 | "uni-ui",
10 | "uniui",
11 | "数字角标",
12 | "徽章"
13 | ],
14 | "repository": "https://github.com/dcloudio/uni-ui",
15 | "engines": {
16 | "HBuilderX": ""
17 | },
18 | "directories": {
19 | "example": "../../temps/example_temps"
20 | },
21 | "dcloudext": {
22 | "sale": {
23 | "regular": {
24 | "price": "0.00"
25 | },
26 | "sourcecode": {
27 | "price": "0.00"
28 | }
29 | },
30 | "contact": {
31 | "qq": ""
32 | },
33 | "declaration": {
34 | "ads": "无",
35 | "data": "无",
36 | "permissions": "无"
37 | },
38 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
39 | "type": "component-vue"
40 | },
41 | "uni_modules": {
42 | "dependencies": ["uni-scss"],
43 | "encrypt": [],
44 | "platforms": {
45 | "cloud": {
46 | "tcb": "y",
47 | "aliyun": "y"
48 | },
49 | "client": {
50 | "App": {
51 | "app-vue": "y",
52 | "app-nvue": "y"
53 | },
54 | "H5-mobile": {
55 | "Safari": "y",
56 | "Android Browser": "y",
57 | "微信浏览器(Android)": "y",
58 | "QQ浏览器(Android)": "y"
59 | },
60 | "H5-pc": {
61 | "Chrome": "y",
62 | "IE": "y",
63 | "Edge": "y",
64 | "Firefox": "y",
65 | "Safari": "y"
66 | },
67 | "小程序": {
68 | "微信": "y",
69 | "阿里": "y",
70 | "百度": "y",
71 | "字节跳动": "y",
72 | "QQ": "y"
73 | },
74 | "快应用": {
75 | "华为": "y",
76 | "联盟": "y"
77 | },
78 | "Vue": {
79 | "vue2": "y",
80 | "vue3": "y"
81 | }
82 | }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/uni_modules/uni-badge/readme.md:
--------------------------------------------------------------------------------
1 | ## Badge 数字角标
2 | > **组件名:uni-badge**
3 | > 代码块: `uBadge`
4 |
5 | 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景,
6 |
7 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-badge)
8 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
9 |
10 |
11 |
--------------------------------------------------------------------------------
/uni_modules/uni-breadcrumb/changelog.md:
--------------------------------------------------------------------------------
1 | ## 0.1.2(2022-06-08)
2 | - 修复 微信小程序 separator 不显示的Bug
3 | ## 0.1.1(2022-06-02)
4 | - 新增 支持 uni.scss 修改颜色
5 | ## 0.1.0(2022-04-21)
6 | - 初始化
7 |
--------------------------------------------------------------------------------
/uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
37 |
42 |
--------------------------------------------------------------------------------
/uni_modules/uni-breadcrumb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-breadcrumb",
3 | "displayName": "uni-breadcrumb 面包屑",
4 | "version": "0.1.2",
5 | "description": "Breadcrumb 面包屑",
6 | "keywords": [
7 | "uni-breadcrumb",
8 | "breadcrumb",
9 | "uni-ui",
10 | "面包屑导航",
11 | "面包屑"
12 | ],
13 | "repository": "",
14 | "engines": {
15 | "HBuilderX": "^3.1.0"
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "category": [
22 | "前端组件",
23 | "通用组件"
24 | ],
25 | "sale": {
26 | "regular": {
27 | "price": "0.00"
28 | },
29 | "sourcecode": {
30 | "price": "0.00"
31 | }
32 | },
33 | "contact": {
34 | "qq": ""
35 | },
36 | "declaration": {
37 | "ads": "无",
38 | "data": "无",
39 | "permissions": "无"
40 | },
41 | "npmurl": ""
42 | },
43 | "uni_modules": {
44 | "dependencies": [],
45 | "encrypt": [],
46 | "platforms": {
47 | "cloud": {
48 | "tcb": "y",
49 | "aliyun": "y"
50 | },
51 | "client": {
52 | "Vue": {
53 | "vue2": "y",
54 | "vue3": "y"
55 | },
56 | "App": {
57 | "app-vue": "y",
58 | "app-nvue": "n"
59 | },
60 | "H5-mobile": {
61 | "Safari": "y",
62 | "Android Browser": "y",
63 | "微信浏览器(Android)": "y",
64 | "QQ浏览器(Android)": "y"
65 | },
66 | "H5-pc": {
67 | "Chrome": "y",
68 | "IE": "y",
69 | "Edge": "y",
70 | "Firefox": "y",
71 | "Safari": "y"
72 | },
73 | "小程序": {
74 | "微信": "y",
75 | "阿里": "u",
76 | "百度": "u",
77 | "字节跳动": "u",
78 | "QQ": "u",
79 | "京东": "u"
80 | },
81 | "快应用": {
82 | "华为": "u",
83 | "联盟": "u"
84 | }
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/uni_modules/uni-breadcrumb/readme.md:
--------------------------------------------------------------------------------
1 |
2 | ## breadcrumb 面包屑导航
3 | > **组件名:uni-breadcrumb**
4 | > 代码块: `ubreadcrumb`
5 |
6 | 显示当前页面的路径,快速返回之前的任意页面。
7 |
8 | ### 安装方式
9 |
10 | 本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
11 |
12 | 如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
13 |
14 | ### 基本用法
15 |
16 | 在 ``template`` 中使用组件
17 |
18 | ```html
19 |
20 | {{route.name}}
21 |
22 | ```
23 |
24 | ```js
25 | export default {
26 | name: "uni-stat-breadcrumb",
27 | data() {
28 | return {
29 | routes: [{
30 | to: '/A',
31 | name: 'A页面'
32 | }, {
33 | to: '/B',
34 | name: 'B页面'
35 | }, {
36 | to: '/C',
37 | name: 'C页面'
38 | }]
39 | };
40 | }
41 | }
42 | ```
43 |
44 |
45 | ## API
46 |
47 | ### Breadcrumb Props
48 |
49 | |属性名 |类型 |默认值 |说明 |
50 | |:-: |:-: |:-: |:-: |
51 | |separator |String |斜杠'/' |分隔符 |
52 | |separatorClass |String | |图标分隔符 class |
53 |
54 | ### Breadcrumb Item Props
55 |
56 | |属性名 |类型 |默认值 |说明 |
57 | |:-: |:-: |:-: |:-: |
58 | |to |String | |路由跳转页面路径 |
59 | |replace|Boolean | |在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录(仅 h5 支持) |
60 |
61 |
62 |
63 |
64 | ## 组件示例
65 |
66 | 点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/breadcrumb/breadcrumb](https://hellouniapp.dcloud.net.cn/pages/extUI/breadcrumb/breadcrumb)
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.4.11(2024-01-10)
2 | - 修复 回到今天时,月份显示不一致问题
3 | ## 1.4.10(2023-04-10)
4 | - 修复 某些情况 monthSwitch 未触发的Bug
5 | ## 1.4.9(2023-02-02)
6 | - 修复 某些情况切换月份错误的Bug
7 | ## 1.4.8(2023-01-30)
8 | - 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/161964)
9 | ## 1.4.7(2022-09-16)
10 | - 优化 支持使用 uni-scss 控制主题色
11 | ## 1.4.6(2022-09-08)
12 | - 修复 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件的Bug
13 | ## 1.4.5(2022-02-25)
14 | - 修复 条件编译 nvue 不支持的 css 样式的Bug
15 | ## 1.4.4(2022-02-25)
16 | - 修复 条件编译 nvue 不支持的 css 样式的Bug
17 | ## 1.4.3(2021-09-22)
18 | - 修复 startDate、 endDate 属性失效的Bug
19 | ## 1.4.2(2021-08-24)
20 | - 新增 支持国际化
21 | ## 1.4.1(2021-08-05)
22 | - 修复 弹出层被 tabbar 遮盖的Bug
23 | ## 1.4.0(2021-07-30)
24 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
25 | ## 1.3.16(2021-05-12)
26 | - 新增 组件示例地址
27 | ## 1.3.15(2021-02-04)
28 | - 调整为uni_modules目录规范
29 |
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/components/uni-calendar/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "ok",
3 | "uni-calender.cancel": "cancel",
4 | "uni-calender.today": "today",
5 | "uni-calender.MON": "MON",
6 | "uni-calender.TUE": "TUE",
7 | "uni-calender.WED": "WED",
8 | "uni-calender.THU": "THU",
9 | "uni-calender.FRI": "FRI",
10 | "uni-calender.SAT": "SAT",
11 | "uni-calender.SUN": "SUN"
12 | }
13 |
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/components/uni-calendar/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "确定",
3 | "uni-calender.cancel": "取消",
4 | "uni-calender.today": "今日",
5 | "uni-calender.SUN": "日",
6 | "uni-calender.MON": "一",
7 | "uni-calender.TUE": "二",
8 | "uni-calender.WED": "三",
9 | "uni-calender.THU": "四",
10 | "uni-calender.FRI": "五",
11 | "uni-calender.SAT": "六"
12 | }
13 |
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-calender.ok": "確定",
3 | "uni-calender.cancel": "取消",
4 | "uni-calender.today": "今日",
5 | "uni-calender.SUN": "日",
6 | "uni-calender.MON": "一",
7 | "uni-calender.TUE": "二",
8 | "uni-calender.WED": "三",
9 | "uni-calender.THU": "四",
10 | "uni-calender.FRI": "五",
11 | "uni-calender.SAT": "六"
12 | }
13 |
--------------------------------------------------------------------------------
/uni_modules/uni-calendar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-calendar",
3 | "displayName": "uni-calendar 日历",
4 | "version": "1.4.11",
5 | "description": "日历组件",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "日历",
10 | "",
11 | "打卡",
12 | "日历选择"
13 | ],
14 | "repository": "https://github.com/dcloudio/uni-ui",
15 | "engines": {
16 | "HBuilderX": ""
17 | },
18 | "directories": {
19 | "example": "../../temps/example_temps"
20 | },
21 | "dcloudext": {
22 | "sale": {
23 | "regular": {
24 | "price": "0.00"
25 | },
26 | "sourcecode": {
27 | "price": "0.00"
28 | }
29 | },
30 | "contact": {
31 | "qq": ""
32 | },
33 | "declaration": {
34 | "ads": "无",
35 | "data": "无",
36 | "permissions": "无"
37 | },
38 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
39 | "type": "component-vue"
40 | },
41 | "uni_modules": {
42 | "dependencies": [],
43 | "encrypt": [],
44 | "platforms": {
45 | "cloud": {
46 | "tcb": "y",
47 | "aliyun": "y"
48 | },
49 | "client": {
50 | "App": {
51 | "app-vue": "y",
52 | "app-nvue": "y"
53 | },
54 | "H5-mobile": {
55 | "Safari": "y",
56 | "Android Browser": "y",
57 | "微信浏览器(Android)": "y",
58 | "QQ浏览器(Android)": "y"
59 | },
60 | "H5-pc": {
61 | "Chrome": "y",
62 | "IE": "y",
63 | "Edge": "y",
64 | "Firefox": "y",
65 | "Safari": "y"
66 | },
67 | "小程序": {
68 | "微信": "y",
69 | "阿里": "y",
70 | "百度": "y",
71 | "字节跳动": "y",
72 | "QQ": "y"
73 | },
74 | "快应用": {
75 | "华为": "u",
76 | "联盟": "u"
77 | },
78 | "Vue": {
79 | "vue2": "y",
80 | "vue3": "y"
81 | }
82 | }
83 | }
84 | }
85 | }
--------------------------------------------------------------------------------
/uni_modules/uni-card/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.3.1(2021-12-20)
2 | - 修复 在vue页面下略缩图显示不正常的bug
3 | ## 1.3.0(2021-11-19)
4 | - 重构插槽的用法 ,header 替换为 title
5 | - 新增 actions 插槽
6 | - 新增 cover 封面图属性和插槽
7 | - 新增 padding 内容默认内边距离
8 | - 新增 margin 卡片默认外边距离
9 | - 新增 spacing 卡片默认内边距
10 | - 新增 shadow 卡片阴影属性
11 | - 取消 mode 属性,可使用组合插槽代替
12 | - 取消 note 属性 ,使用actions插槽代替
13 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
14 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card)
15 | ## 1.2.1(2021-07-30)
16 | - 优化 vue3下事件警告的问题
17 | ## 1.2.0(2021-07-13)
18 | - 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
19 | ## 1.1.8(2021-07-01)
20 | - 优化 图文卡片无图片加载时,提供占位图标
21 | - 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持)
22 | - 修复 thumbnail 不存在仍然占位的 bug
23 | ## 1.1.7(2021-05-12)
24 | - 新增 组件示例地址
25 | ## 1.1.6(2021-02-04)
26 | - 调整为uni_modules目录规范
27 |
--------------------------------------------------------------------------------
/uni_modules/uni-card/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Card 卡片
4 | > **组件名:uni-card**
5 | > 代码块: `uCard`
6 |
7 | 卡片视图组件。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
11 |
12 |
13 |
--------------------------------------------------------------------------------
/uni_modules/uni-collapse/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.4.4(2024-03-20)
2 | - 修复 titleBorder类型修正
3 | ## 1.4.3(2022-01-25)
4 | - 修复 初始化的时候 ,open 属性失效的bug
5 | ## 1.4.2(2022-01-21)
6 | - 修复 微信小程序resize后组件收起的bug
7 | ## 1.4.1(2021-11-22)
8 | - 修复 vue3中个别scss变量无法找到的问题
9 | ## 1.4.0(2021-11-19)
10 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
11 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
12 | ## 1.3.3(2021-08-17)
13 | - 优化 show-arrow 属性默认为true
14 | ## 1.3.2(2021-08-17)
15 | - 新增 show-arrow 属性,控制是否显示右侧箭头
16 | ## 1.3.1(2021-07-30)
17 | - 优化 vue3下小程序事件警告的问题
18 | ## 1.3.0(2021-07-30)
19 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
20 | ## 1.2.2(2021-07-21)
21 | - 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
22 | ## 1.2.1(2021-07-21)
23 | - 优化 组件示例
24 | ## 1.2.0(2021-07-21)
25 | - 新增 组件折叠动画
26 | - 新增 value\v-model 属性 ,动态修改面板折叠状态
27 | - 新增 title 插槽 ,可定义面板标题
28 | - 新增 border 属性 ,显示隐藏面板内容分隔线
29 | - 新增 title-border 属性 ,显示隐藏面板标题分隔线
30 | - 修复 resize 方法失效的Bug
31 | - 修复 change 事件返回参数不正确的Bug
32 | - 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
33 | ## 1.1.7(2021-05-12)
34 | - 新增 组件示例地址
35 | ## 1.1.6(2021-02-05)
36 | - 优化 组件引用关系,通过uni_modules引用组件
37 | ## 1.1.5(2021-02-05)
38 | - 调整为uni_modules目录规范
--------------------------------------------------------------------------------
/uni_modules/uni-collapse/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-collapse",
3 | "displayName": "uni-collapse 折叠面板",
4 | "version": "1.4.4",
5 | "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
6 | "keywords": [
7 | "uni-ui",
8 | "折叠",
9 | "折叠面板",
10 | "手风琴"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "sale": {
21 | "regular": {
22 | "price": "0.00"
23 | },
24 | "sourcecode": {
25 | "price": "0.00"
26 | }
27 | },
28 | "contact": {
29 | "qq": ""
30 | },
31 | "declaration": {
32 | "ads": "无",
33 | "data": "无",
34 | "permissions": "无"
35 | },
36 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37 | "type": "component-vue"
38 | },
39 | "uni_modules": {
40 | "dependencies": [
41 | "uni-scss",
42 | "uni-icons"
43 | ],
44 | "encrypt": [],
45 | "platforms": {
46 | "cloud": {
47 | "tcb": "y",
48 | "aliyun": "y"
49 | },
50 | "client": {
51 | "App": {
52 | "app-vue": "y",
53 | "app-nvue": "y"
54 | },
55 | "H5-mobile": {
56 | "Safari": "y",
57 | "Android Browser": "y",
58 | "微信浏览器(Android)": "y",
59 | "QQ浏览器(Android)": "y"
60 | },
61 | "H5-pc": {
62 | "Chrome": "y",
63 | "IE": "y",
64 | "Edge": "y",
65 | "Firefox": "y",
66 | "Safari": "y"
67 | },
68 | "小程序": {
69 | "微信": "y",
70 | "阿里": "y",
71 | "百度": "y",
72 | "字节跳动": "y",
73 | "QQ": "y"
74 | },
75 | "快应用": {
76 | "华为": "u",
77 | "联盟": "u"
78 | },
79 | "Vue": {
80 | "vue2": "y",
81 | "vue3": "y"
82 | }
83 | }
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/uni_modules/uni-collapse/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Collapse 折叠面板
4 | > **组件名:uni-collapse**
5 | > 代码块: `uCollapse`
6 | > 关联组件:`uni-collapse-item`、`uni-icons`。
7 |
8 |
9 | 折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
10 |
11 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
12 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-combox/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.1(2021-11-23)
2 | - 优化 label、label-width 属性
3 | ## 1.0.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox)
6 | ## 0.1.0(2021-07-30)
7 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
8 | ## 0.0.6(2021-05-12)
9 | - 新增 组件示例地址
10 | ## 0.0.5(2021-04-21)
11 | - 优化 添加依赖 uni-icons, 导入后自动下载依赖
12 | ## 0.0.4(2021-02-05)
13 | - 优化 组件引用关系,通过uni_modules引用组件
14 | ## 0.0.3(2021-02-04)
15 | - 调整为uni_modules目录规范
16 |
--------------------------------------------------------------------------------
/uni_modules/uni-combox/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Combox 组合框
4 | > **组件名:uni-combox**
5 | > 代码块: `uCombox`
6 |
7 |
8 | 组合框组件。
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-combox)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.3(2024-02-20)
2 | - 新增 支持控制小时,分钟的显隐:showHour showMinute
3 | ## 1.2.2(2022-01-19)
4 | - 修复 在微信小程序中样式不生效的bug
5 | ## 1.2.1(2022-01-18)
6 | - 新增 update 方法 ,在动态更新时间后,刷新组件
7 | ## 1.2.0(2021-11-19)
8 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
9 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-countdown](https://uniapp.dcloud.io/component/uniui/uni-countdown)
10 | ## 1.1.3(2021-10-18)
11 | - 重构
12 | - 新增 font-size 支持自定义字体大小
13 | ## 1.1.2(2021-08-24)
14 | - 新增 支持国际化
15 | ## 1.1.1(2021-07-30)
16 | - 优化 vue3下小程序事件警告的问题
17 | ## 1.1.0(2021-07-30)
18 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
19 | ## 1.0.5(2021-06-18)
20 | - 修复 uni-countdown 重复赋值跳两秒的 bug
21 | ## 1.0.4(2021-05-12)
22 | - 新增 组件示例地址
23 | ## 1.0.3(2021-05-08)
24 | - 修复 uni-countdown 不能控制倒计时的 bug
25 | ## 1.0.2(2021-02-04)
26 | - 调整为uni_modules目录规范
27 |
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/components/uni-countdown/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "day",
3 | "uni-countdown.h": "h",
4 | "uni-countdown.m": "m",
5 | "uni-countdown.s": "s"
6 | }
7 |
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/components/uni-countdown/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "天",
3 | "uni-countdown.h": "时",
4 | "uni-countdown.m": "分",
5 | "uni-countdown.s": "秒"
6 | }
7 |
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-countdown.day": "天",
3 | "uni-countdown.h": "時",
4 | "uni-countdown.m": "分",
5 | "uni-countdown.s": "秒"
6 | }
7 |
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-countdown",
3 | "displayName": "uni-countdown 倒计时",
4 | "version": "1.2.3",
5 | "description": "CountDown 倒计时组件",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "countdown",
10 | "倒计时"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "sale": {
21 | "regular": {
22 | "price": "0.00"
23 | },
24 | "sourcecode": {
25 | "price": "0.00"
26 | }
27 | },
28 | "contact": {
29 | "qq": ""
30 | },
31 | "declaration": {
32 | "ads": "无",
33 | "data": "无",
34 | "permissions": "无"
35 | },
36 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37 | "type": "component-vue"
38 | },
39 | "uni_modules": {
40 | "dependencies": ["uni-scss"],
41 | "encrypt": [],
42 | "platforms": {
43 | "cloud": {
44 | "tcb": "y",
45 | "aliyun": "y"
46 | },
47 | "client": {
48 | "App": {
49 | "app-vue": "y",
50 | "app-nvue": "y"
51 | },
52 | "H5-mobile": {
53 | "Safari": "y",
54 | "Android Browser": "y",
55 | "微信浏览器(Android)": "y",
56 | "QQ浏览器(Android)": "y"
57 | },
58 | "H5-pc": {
59 | "Chrome": "y",
60 | "IE": "y",
61 | "Edge": "y",
62 | "Firefox": "y",
63 | "Safari": "y"
64 | },
65 | "小程序": {
66 | "微信": "y",
67 | "阿里": "y",
68 | "百度": "y",
69 | "字节跳动": "y",
70 | "QQ": "y"
71 | },
72 | "快应用": {
73 | "华为": "u",
74 | "联盟": "u"
75 | },
76 | "Vue": {
77 | "vue2": "y",
78 | "vue3": "y"
79 | }
80 | }
81 | }
82 | }
83 | }
--------------------------------------------------------------------------------
/uni_modules/uni-countdown/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## CountDown 倒计时
4 | > **组件名:uni-countdown**
5 | > 代码块: `uCountDown`
6 |
7 | 倒计时组件。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-countdown)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-data-checkbox/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.5(2024-03-20)
2 | - 修复 单选模式下选中样式不生效的bug
3 | ## 1.0.4(2024-01-27)
4 | - 修复 修复错别字chagne为change
5 | ## 1.0.3(2022-09-16)
6 | - 可以使用 uni-scss 控制主题色
7 | ## 1.0.2(2022-06-30)
8 | - 优化 在 uni-forms 中的依赖注入方式
9 | ## 1.0.1(2022-02-07)
10 | - 修复 multiple 为 true 时,v-model 的值为 null 报错的 bug
11 | ## 1.0.0(2021-11-19)
12 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
13 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-data-checkbox](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
14 | ## 0.2.5(2021-08-23)
15 | - 修复 在uni-forms中 modelValue 中不存在当前字段,当前字段必填写也不参与校验的问题
16 | ## 0.2.4(2021-08-17)
17 | - 修复 单选 list 模式下 ,icon 为 left 时,选中图标不显示的问题
18 | ## 0.2.3(2021-08-11)
19 | - 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
20 | ## 0.2.2(2021-07-30)
21 | - 优化 在uni-forms组件,与label不对齐的问题
22 | ## 0.2.1(2021-07-27)
23 | - 修复 单选默认值为0不能选中的Bug
24 | ## 0.2.0(2021-07-13)
25 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
26 | ## 0.1.11(2021-07-06)
27 | - 优化 删除无用日志
28 | ## 0.1.10(2021-07-05)
29 | - 修复 由 0.1.9 引起的非 nvue 端图标不显示的问题
30 | ## 0.1.9(2021-07-05)
31 | - 修复 nvue 黑框样式问题
32 | ## 0.1.8(2021-06-28)
33 | - 修复 selectedTextColor 属性不生效的Bug
34 | ## 0.1.7(2021-06-02)
35 | - 新增 map 属性,可以方便映射text/value属性
36 | ## 0.1.6(2021-05-26)
37 | - 修复 不关联服务空间的情况下组件报错的Bug
38 | ## 0.1.5(2021-05-12)
39 | - 新增 组件示例地址
40 | ## 0.1.4(2021-04-09)
41 | - 修复 nvue 下无法选中的问题
42 | ## 0.1.3(2021-03-22)
43 | - 新增 disabled属性
44 | ## 0.1.2(2021-02-24)
45 | - 优化 默认颜色显示
46 | ## 0.1.1(2021-02-24)
47 | - 新增 支持nvue
48 | ## 0.1.0(2021-02-18)
49 | - “暂无数据”显示居中
50 |
--------------------------------------------------------------------------------
/uni_modules/uni-data-checkbox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-data-checkbox",
3 | "displayName": "uni-data-checkbox 数据选择器",
4 | "version": "1.0.5",
5 | "description": "通过数据驱动的单选框和复选框",
6 | "keywords": [
7 | "uni-ui",
8 | "checkbox",
9 | "单选",
10 | "多选",
11 | "单选多选"
12 | ],
13 | "repository": "https://github.com/dcloudio/uni-ui",
14 | "engines": {
15 | "HBuilderX": "^3.1.1"
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "sale": {
22 | "regular": {
23 | "price": "0.00"
24 | },
25 | "sourcecode": {
26 | "price": "0.00"
27 | }
28 | },
29 | "contact": {
30 | "qq": ""
31 | },
32 | "declaration": {
33 | "ads": "无",
34 | "data": "无",
35 | "permissions": "无"
36 | },
37 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
38 | "type": "component-vue"
39 | },
40 | "uni_modules": {
41 | "dependencies": ["uni-load-more","uni-scss"],
42 | "encrypt": [],
43 | "platforms": {
44 | "cloud": {
45 | "tcb": "y",
46 | "aliyun": "y"
47 | },
48 | "client": {
49 | "App": {
50 | "app-vue": "y",
51 | "app-nvue": "y"
52 | },
53 | "H5-mobile": {
54 | "Safari": "y",
55 | "Android Browser": "y",
56 | "微信浏览器(Android)": "y",
57 | "QQ浏览器(Android)": "y"
58 | },
59 | "H5-pc": {
60 | "Chrome": "y",
61 | "IE": "y",
62 | "Edge": "y",
63 | "Firefox": "y",
64 | "Safari": "y"
65 | },
66 | "小程序": {
67 | "微信": "y",
68 | "阿里": "y",
69 | "百度": "y",
70 | "字节跳动": "y",
71 | "QQ": "y"
72 | },
73 | "快应用": {
74 | "华为": "u",
75 | "联盟": "u"
76 | },
77 | "Vue": {
78 | "vue2": "y",
79 | "vue3": "y"
80 | }
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/uni_modules/uni-data-checkbox/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## DataCheckbox 数据驱动的单选复选框
4 | > **组件名:uni-data-checkbox**
5 | > 代码块: `uDataCheckbox`
6 |
7 |
8 | 本组件是基于uni-app基础组件checkbox的封装。本组件要解决问题包括:
9 |
10 | 1. 数据绑定型组件:给本组件绑定一个data,会自动渲染一组候选内容。再以往,开发者需要编写不少代码实现类似功能
11 | 2. 自动的表单校验:组件绑定了data,且符合[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)组件的表单校验规范,搭配使用会自动实现表单校验
12 | 3. 本组件合并了单选多选
13 | 4. 本组件有若干风格选择,如普通的单选多选框、并列button风格、tag风格。开发者可以快速选择需要的风格。但作为一个封装组件,样式代码虽然不用自己写了,却会牺牲一定的样式自定义性
14 |
15 | 在uniCloud开发中,`DB Schema`中配置了enum枚举等类型后,在web控制台的[自动生成表单](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)功能中,会自动生成``uni-data-checkbox``组件并绑定好data
16 |
17 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
18 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-data-picker/components/uni-data-picker/keypress.js:
--------------------------------------------------------------------------------
1 | // #ifdef H5
2 | export default {
3 | name: 'Keypress',
4 | props: {
5 | disable: {
6 | type: Boolean,
7 | default: false
8 | }
9 | },
10 | mounted () {
11 | const keyNames = {
12 | esc: ['Esc', 'Escape'],
13 | tab: 'Tab',
14 | enter: 'Enter',
15 | space: [' ', 'Spacebar'],
16 | up: ['Up', 'ArrowUp'],
17 | left: ['Left', 'ArrowLeft'],
18 | right: ['Right', 'ArrowRight'],
19 | down: ['Down', 'ArrowDown'],
20 | delete: ['Backspace', 'Delete', 'Del']
21 | }
22 | const listener = ($event) => {
23 | if (this.disable) {
24 | return
25 | }
26 | const keyName = Object.keys(keyNames).find(key => {
27 | const keyName = $event.key
28 | const value = keyNames[key]
29 | return value === keyName || (Array.isArray(value) && value.includes(keyName))
30 | })
31 | if (keyName) {
32 | // 避免和其他按键事件冲突
33 | setTimeout(() => {
34 | this.$emit(keyName, {})
35 | }, 0)
36 | }
37 | }
38 | document.addEventListener('keyup', listener)
39 | this.$once('hook:beforeDestroy', () => {
40 | document.removeEventListener('keyup', listener)
41 | })
42 | },
43 | render: () => {}
44 | }
45 | // #endif
46 |
--------------------------------------------------------------------------------
/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.css:
--------------------------------------------------------------------------------
1 | .uni-data-pickerview {
2 | position: relative;
3 | flex-direction: column;
4 | overflow: hidden;
5 | }
6 |
7 | .loading-cover {
8 | position: absolute;
9 | left: 0;
10 | top: 0;
11 | right: 0;
12 | bottom: 0;
13 | align-items: center;
14 | justify-content: center;
15 | background-color: rgba(150, 150, 150, .1);
16 | }
17 |
18 | .error {
19 | background-color: #fff;
20 | padding: 15px;
21 | }
22 |
23 | .error-text {
24 | color: #DD524D;
25 | }
26 |
27 | .selected-node-list {
28 | flex-direction: row;
29 | flex-wrap: nowrap;
30 | }
31 |
32 | .selected-node-item {
33 | margin-left: 10px;
34 | margin-right: 10px;
35 | padding: 8px 10px 8px 10px;
36 | border-bottom: 2px solid transparent;
37 | }
38 |
39 | .selected-node-item-active {
40 | color: #007aff;
41 | border-bottom-color: #007aff;
42 | }
43 |
44 | .list-view {
45 | flex: 1;
46 | }
47 |
48 | .list-item {
49 | flex-direction: row;
50 | justify-content: space-between;
51 | padding: 12px 15px;
52 | border-bottom: 1px solid #f0f0f0;
53 | }
54 |
55 | .item-text {
56 | color: #333333;
57 | }
58 |
59 | .item-text-disabled {
60 | opacity: .5;
61 | }
62 |
63 | .item-text-overflow {
64 | overflow: hidden;
65 | }
66 |
67 | .check {
68 | margin-right: 5px;
69 | border: 2px solid #007aff;
70 | border-left: 0;
71 | border-top: 0;
72 | height: 12px;
73 | width: 6px;
74 | transform-origin: center;
75 | transform: rotate(45deg);
76 | }
77 |
--------------------------------------------------------------------------------
/uni_modules/uni-data-picker/readme.md:
--------------------------------------------------------------------------------
1 | ## DataPicker 级联选择
2 | > **组件名:uni-data-picker**
3 | > 代码块: `uDataPicker`
4 | > 关联组件:`uni-data-pickerview`、`uni-load-more`。
5 |
6 |
7 | `` 是一个选择类[datacom组件](https://uniapp.dcloud.net.cn/component/datacom)。
8 |
9 | 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
10 |
11 | 候选数据支持一次性加载完毕,也支持懒加载,比如示例图中,选择了“北京”后,动态加载北京的区县数据。
12 |
13 | `` 组件尤其适用于地址选择、分类选择等选择类。
14 |
15 | `` 支持本地数据、云端静态数据(json),uniCloud云数据库数据。
16 |
17 | `` 可以通过JQL直连uniCloud云数据库,配套[DB Schema](https://uniapp.dcloud.net.cn/uniCloud/schema),可在schema2code中自动生成前端页面,还支持服务器端校验。
18 |
19 | 在uniCloud数据表中新建表“uni-id-address”和“opendb-city-china”,这2个表的schema自带foreignKey关联。在“uni-id-address”表的表结构页面使用schema2code生成前端页面,会自动生成地址管理的维护页面,自动从“opendb-city-china”表包含的中国所有省市区信息里选择地址。
20 |
21 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
22 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-data-select/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.8(2024-03-28)
2 | - 修复 在vue2下:style动态绑定导致编译失败的bug
3 | ## 1.0.7(2024-01-20)
4 | - 修复 长文本回显超过容器的bug,超过容器部分显示省略号
5 | ## 1.0.6(2023-04-12)
6 | - 修复 微信小程序点击时会改变背景颜色的 bug
7 | ## 1.0.5(2023-02-03)
8 | - 修复 禁用时会显示清空按钮
9 | ## 1.0.4(2023-02-02)
10 | - 优化 查询条件短期内多次变更只查询最后一次变更后的结果
11 | - 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
12 | ## 1.0.3(2023-01-16)
13 | - 修复 不关联服务空间报错的问题
14 | ## 1.0.2(2023-01-14)
15 | - 新增 属性 `format` 可用于格式化显示选项内容
16 | ## 1.0.1(2022-12-06)
17 | - 修复 当where变化时,数据不会自动更新的问题
18 | ## 0.1.9(2022-09-05)
19 | - 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
20 | ## 0.1.8(2022-08-29)
21 | - 修复 点击的位置不准确
22 | ## 0.1.7(2022-08-12)
23 | - 新增 支持 disabled 属性
24 | ## 0.1.6(2022-07-06)
25 | - 修复 pc端宽度异常的bug
26 | ## 0.1.5
27 | - 修复 pc端宽度异常的bug
28 | ## 0.1.4(2022-07-05)
29 | - 优化 显示样式
30 | ## 0.1.3(2022-06-02)
31 | - 修复 localdata 赋值不生效的 bug
32 | - 新增 支持 uni.scss 修改颜色
33 | - 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
34 | ## 0.1.2(2022-05-08)
35 | - 修复 当 value 为 0 时选择不生效的 bug
36 | ## 0.1.1(2022-05-07)
37 | - 新增 记住上次的选项(仅 collection 存在时有效)
38 | ## 0.1.0(2022-04-22)
39 | - 初始化
40 |
--------------------------------------------------------------------------------
/uni_modules/uni-data-select/readme.md:
--------------------------------------------------------------------------------
1 | ## DataSelect 下拉框选择器
2 | > **组件名:uni-data-select**
3 | > 代码块: `uDataSelect`
4 |
5 | 当选项过多时,使用下拉菜单展示并选择内容
6 |
7 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
8 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
9 |
--------------------------------------------------------------------------------
/uni_modules/uni-dateformat/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.0.0(2021-11-19)
2 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
3 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-dateformat](https://uniapp.dcloud.io/component/uniui/uni-dateformat)
4 | ## 0.0.5(2021-07-08)
5 | - 调整 默认时间不再是当前时间,而是显示'-'字符
6 | ## 0.0.4(2021-05-12)
7 | - 新增 组件示例地址
8 | ## 0.0.3(2021-02-04)
9 | - 调整为uni_modules目录规范
10 | - 修复 iOS 平台日期格式化出错的问题
11 |
--------------------------------------------------------------------------------
/uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.vue:
--------------------------------------------------------------------------------
1 |
2 | {{dateShow}}
3 |
4 |
5 |
85 |
86 |
89 |
--------------------------------------------------------------------------------
/uni_modules/uni-dateformat/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ### DateFormat 日期格式化
4 | > **组件名:uni-dateformat**
5 | > 代码块: `uDateformat`
6 |
7 |
8 | 日期格式化组件。
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-dateformat)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "select date",
3 | "uni-datetime-picker.selectTime": "select time",
4 | "uni-datetime-picker.selectDateTime": "select date and time",
5 | "uni-datetime-picker.startDate": "start date",
6 | "uni-datetime-picker.endDate": "end date",
7 | "uni-datetime-picker.startTime": "start time",
8 | "uni-datetime-picker.endTime": "end time",
9 | "uni-datetime-picker.ok": "ok",
10 | "uni-datetime-picker.clear": "clear",
11 | "uni-datetime-picker.cancel": "cancel",
12 | "uni-datetime-picker.year": "-",
13 | "uni-datetime-picker.month": "",
14 | "uni-calender.MON": "MON",
15 | "uni-calender.TUE": "TUE",
16 | "uni-calender.WED": "WED",
17 | "uni-calender.THU": "THU",
18 | "uni-calender.FRI": "FRI",
19 | "uni-calender.SAT": "SAT",
20 | "uni-calender.SUN": "SUN",
21 | "uni-calender.confirm": "confirm"
22 | }
23 |
--------------------------------------------------------------------------------
/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "选择日期",
3 | "uni-datetime-picker.selectTime": "选择时间",
4 | "uni-datetime-picker.selectDateTime": "选择日期时间",
5 | "uni-datetime-picker.startDate": "开始日期",
6 | "uni-datetime-picker.endDate": "结束日期",
7 | "uni-datetime-picker.startTime": "开始时间",
8 | "uni-datetime-picker.endTime": "结束时间",
9 | "uni-datetime-picker.ok": "确定",
10 | "uni-datetime-picker.clear": "清除",
11 | "uni-datetime-picker.cancel": "取消",
12 | "uni-datetime-picker.year": "年",
13 | "uni-datetime-picker.month": "月",
14 | "uni-calender.SUN": "日",
15 | "uni-calender.MON": "一",
16 | "uni-calender.TUE": "二",
17 | "uni-calender.WED": "三",
18 | "uni-calender.THU": "四",
19 | "uni-calender.FRI": "五",
20 | "uni-calender.SAT": "六",
21 | "uni-calender.confirm": "确认"
22 | }
--------------------------------------------------------------------------------
/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-datetime-picker.selectDate": "選擇日期",
3 | "uni-datetime-picker.selectTime": "選擇時間",
4 | "uni-datetime-picker.selectDateTime": "選擇日期時間",
5 | "uni-datetime-picker.startDate": "開始日期",
6 | "uni-datetime-picker.endDate": "結束日期",
7 | "uni-datetime-picker.startTime": "開始时间",
8 | "uni-datetime-picker.endTime": "結束时间",
9 | "uni-datetime-picker.ok": "確定",
10 | "uni-datetime-picker.clear": "清除",
11 | "uni-datetime-picker.cancel": "取消",
12 | "uni-datetime-picker.year": "年",
13 | "uni-datetime-picker.month": "月",
14 | "uni-calender.SUN": "日",
15 | "uni-calender.MON": "一",
16 | "uni-calender.TUE": "二",
17 | "uni-calender.WED": "三",
18 | "uni-calender.THU": "四",
19 | "uni-calender.FRI": "五",
20 | "uni-calender.SAT": "六",
21 | "uni-calender.confirm": "確認"
22 | }
--------------------------------------------------------------------------------
/uni_modules/uni-datetime-picker/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | > `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
4 |
5 | ## DatetimePicker 时间选择器
6 |
7 | > **组件名:uni-datetime-picker**
8 | > 代码块: `uDatetimePicker`
9 |
10 |
11 | 该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
12 |
13 | 若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
14 |
15 | **_点击 picker 默认值规则:_**
16 |
17 | - 若设置初始值 value, 会显示在 picker 显示框中
18 | - 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
19 |
20 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
21 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-drawer/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.1(2021-11-22)
2 | - 修复 vue3中个别scss变量无法找到的问题
3 | ## 1.2.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer)
6 | ## 1.1.1(2021-07-30)
7 | - 优化 vue3下事件警告的问题
8 | ## 1.1.0(2021-07-13)
9 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
10 | ## 1.0.7(2021-05-12)
11 | - 新增 组件示例地址
12 | ## 1.0.6(2021-02-04)
13 | - 调整为uni_modules目录规范
14 |
--------------------------------------------------------------------------------
/uni_modules/uni-drawer/components/uni-drawer/keypress.js:
--------------------------------------------------------------------------------
1 | // #ifdef H5
2 | export default {
3 | name: 'Keypress',
4 | props: {
5 | disable: {
6 | type: Boolean,
7 | default: false
8 | }
9 | },
10 | mounted () {
11 | const keyNames = {
12 | esc: ['Esc', 'Escape'],
13 | tab: 'Tab',
14 | enter: 'Enter',
15 | space: [' ', 'Spacebar'],
16 | up: ['Up', 'ArrowUp'],
17 | left: ['Left', 'ArrowLeft'],
18 | right: ['Right', 'ArrowRight'],
19 | down: ['Down', 'ArrowDown'],
20 | delete: ['Backspace', 'Delete', 'Del']
21 | }
22 | const listener = ($event) => {
23 | if (this.disable) {
24 | return
25 | }
26 | const keyName = Object.keys(keyNames).find(key => {
27 | const keyName = $event.key
28 | const value = keyNames[key]
29 | return value === keyName || (Array.isArray(value) && value.includes(keyName))
30 | })
31 | if (keyName) {
32 | // 避免和其他按键事件冲突
33 | setTimeout(() => {
34 | this.$emit(keyName, {})
35 | }, 0)
36 | }
37 | }
38 | document.addEventListener('keyup', listener)
39 | // this.$once('hook:beforeDestroy', () => {
40 | // document.removeEventListener('keyup', listener)
41 | // })
42 | },
43 | render: () => {}
44 | }
45 | // #endif
46 |
--------------------------------------------------------------------------------
/uni_modules/uni-drawer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-drawer",
3 | "displayName": "uni-drawer 抽屉",
4 | "version": "1.2.1",
5 | "description": "抽屉式导航,用于展示侧滑菜单,侧滑导航。",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "drawer",
10 | "抽屉",
11 | "侧滑导航"
12 | ],
13 | "repository": "https://github.com/dcloudio/uni-ui",
14 | "engines": {
15 | "HBuilderX": ""
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "category": [
22 | "前端组件",
23 | "通用组件"
24 | ],
25 | "sale": {
26 | "regular": {
27 | "price": "0.00"
28 | },
29 | "sourcecode": {
30 | "price": "0.00"
31 | }
32 | },
33 | "contact": {
34 | "qq": ""
35 | },
36 | "declaration": {
37 | "ads": "无",
38 | "data": "无",
39 | "permissions": "无"
40 | },
41 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
42 | },
43 | "uni_modules": {
44 | "dependencies": ["uni-scss"],
45 | "encrypt": [],
46 | "platforms": {
47 | "cloud": {
48 | "tcb": "y",
49 | "aliyun": "y"
50 | },
51 | "client": {
52 | "App": {
53 | "app-vue": "y",
54 | "app-nvue": "y"
55 | },
56 | "H5-mobile": {
57 | "Safari": "y",
58 | "Android Browser": "y",
59 | "微信浏览器(Android)": "y",
60 | "QQ浏览器(Android)": "y"
61 | },
62 | "H5-pc": {
63 | "Chrome": "y",
64 | "IE": "y",
65 | "Edge": "y",
66 | "Firefox": "y",
67 | "Safari": "y"
68 | },
69 | "小程序": {
70 | "微信": "y",
71 | "阿里": "y",
72 | "百度": "y",
73 | "字节跳动": "y",
74 | "QQ": "y"
75 | },
76 | "快应用": {
77 | "华为": "u",
78 | "联盟": "u"
79 | },
80 | "Vue": {
81 | "vue2": "y",
82 | "vue3": "y"
83 | }
84 | }
85 | }
86 | }
87 | }
--------------------------------------------------------------------------------
/uni_modules/uni-drawer/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Drawer 抽屉
4 | > **组件名:uni-drawer**
5 | > 代码块: `uDrawer`
6 |
7 | 抽屉侧滑菜单。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-drawer)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-easyinput/components/uni-easyinput/common.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @desc 函数防抖
3 | * @param func 目标函数
4 | * @param wait 延迟执行毫秒数
5 | * @param immediate true - 立即执行, false - 延迟执行
6 | */
7 | export const debounce = function(func, wait = 1000, immediate = true) {
8 | let timer;
9 | return function() {
10 | let context = this,
11 | args = arguments;
12 | if (timer) clearTimeout(timer);
13 | if (immediate) {
14 | let callNow = !timer;
15 | timer = setTimeout(() => {
16 | timer = null;
17 | }, wait);
18 | if (callNow) func.apply(context, args);
19 | } else {
20 | timer = setTimeout(() => {
21 | func.apply(context, args);
22 | }, wait)
23 | }
24 | }
25 | }
26 | /**
27 | * @desc 函数节流
28 | * @param func 函数
29 | * @param wait 延迟执行毫秒数
30 | * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
31 | */
32 | export const throttle = (func, wait = 1000, type = 1) => {
33 | let previous = 0;
34 | let timeout;
35 | return function() {
36 | let context = this;
37 | let args = arguments;
38 | if (type === 1) {
39 | let now = Date.now();
40 |
41 | if (now - previous > wait) {
42 | func.apply(context, args);
43 | previous = now;
44 | }
45 | } else if (type === 2) {
46 | if (!timeout) {
47 | timeout = setTimeout(() => {
48 | timeout = null;
49 | func.apply(context, args)
50 | }, wait)
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/uni_modules/uni-easyinput/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ### Easyinput 增强输入框
4 | > **组件名:uni-easyinput**
5 | > 代码块: `uEasyinput`
6 |
7 |
8 | easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-fab/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.5(2023-03-29)
2 | - 新增 pattern.icon 属性,可自定义图标
3 | ## 1.2.4(2022-09-07)
4 | 小程序端由于 style 使用了对象导致报错,[详情](https://ask.dcloud.net.cn/question/152790?item_id=211778&rf=false)
5 | ## 1.2.3(2022-09-05)
6 | - 修复 nvue 环境下,具有 tabBar 时,fab 组件下部位置无法正常获取 --window-bottom 的bug,详见:[https://ask.dcloud.net.cn/question/110638?notification_id=826310](https://ask.dcloud.net.cn/question/110638?notification_id=826310)
7 | ## 1.2.2(2021-12-29)
8 | - 更新 组件依赖
9 | ## 1.2.1(2021-11-19)
10 | - 修复 阴影颜色不正确的bug
11 | ## 1.2.0(2021-11-19)
12 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
13 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fab](https://uniapp.dcloud.io/component/uniui/uni-fab)
14 | ## 1.1.1(2021-11-09)
15 | - 新增 提供组件设计资源,组件样式调整
16 | ## 1.1.0(2021-07-30)
17 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
18 | ## 1.0.7(2021-05-12)
19 | - 新增 组件示例地址
20 | ## 1.0.6(2021-02-05)
21 | - 调整为uni_modules目录规范
22 | - 优化 按钮背景色调整
23 | - 优化 兼容pc端
24 |
--------------------------------------------------------------------------------
/uni_modules/uni-fab/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-fab",
3 | "displayName": "uni-fab 悬浮按钮",
4 | "version": "1.2.5",
5 | "description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "按钮",
10 | "悬浮按钮",
11 | "fab"
12 | ],
13 | "repository": "https://github.com/dcloudio/uni-ui",
14 | "engines": {
15 | "HBuilderX": ""
16 | },
17 | "directories": {
18 | "example": "../../temps/example_temps"
19 | },
20 | "dcloudext": {
21 | "sale": {
22 | "regular": {
23 | "price": "0.00"
24 | },
25 | "sourcecode": {
26 | "price": "0.00"
27 | }
28 | },
29 | "contact": {
30 | "qq": ""
31 | },
32 | "declaration": {
33 | "ads": "无",
34 | "data": "无",
35 | "permissions": "无"
36 | },
37 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
38 | "type": "component-vue"
39 | },
40 | "uni_modules": {
41 | "dependencies": ["uni-scss","uni-icons"],
42 | "encrypt": [],
43 | "platforms": {
44 | "cloud": {
45 | "tcb": "y",
46 | "aliyun": "y"
47 | },
48 | "client": {
49 | "App": {
50 | "app-vue": "y",
51 | "app-nvue": "y"
52 | },
53 | "H5-mobile": {
54 | "Safari": "y",
55 | "Android Browser": "y",
56 | "微信浏览器(Android)": "y",
57 | "QQ浏览器(Android)": "y"
58 | },
59 | "H5-pc": {
60 | "Chrome": "y",
61 | "IE": "y",
62 | "Edge": "y",
63 | "Firefox": "y",
64 | "Safari": "y"
65 | },
66 | "小程序": {
67 | "微信": "y",
68 | "阿里": "y",
69 | "百度": "y",
70 | "字节跳动": "y",
71 | "QQ": "y"
72 | },
73 | "快应用": {
74 | "华为": "u",
75 | "联盟": "u"
76 | },
77 | "Vue": {
78 | "vue2": "y",
79 | "vue3": "y"
80 | }
81 | }
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/uni_modules/uni-fab/readme.md:
--------------------------------------------------------------------------------
1 | ## Fab 悬浮按钮
2 | > **组件名:uni-fab**
3 | > 代码块: `uFab`
4 |
5 |
6 | 点击可展开一个图形按钮菜单
7 |
8 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fab)
9 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-fav/changelog.md:
--------------------------------------------------------------------------------
1 | ## 1.2.1(2022-05-30)
2 | - 新增 stat 属性 ,是否开启uni统计功能
3 | ## 1.2.0(2021-11-19)
4 | - 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
5 | - 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-fav](https://uniapp.dcloud.io/component/uniui/uni-fav)
6 | ## 1.1.1(2021-08-24)
7 | - 新增 支持国际化
8 | ## 1.1.0(2021-07-13)
9 | - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
10 | ## 1.0.6(2021-05-12)
11 | - 新增 组件示例地址
12 | ## 1.0.5(2021-04-21)
13 | - 优化 添加依赖 uni-icons, 导入后自动下载依赖
14 | ## 1.0.4(2021-02-05)
15 | - 优化 组件引用关系,通过uni_modules引用组件
16 | ## 1.0.3(2021-02-05)
17 | - 优化 组件引用关系,通过uni_modules引用组件
18 | ## 1.0.2(2021-02-05)
19 | - 调整为uni_modules目录规范
20 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/components/uni-fav/i18n/en.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "collect",
3 | "uni-fav.collected": "collected"
4 | }
5 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/components/uni-fav/i18n/index.js:
--------------------------------------------------------------------------------
1 | import en from './en.json'
2 | import zhHans from './zh-Hans.json'
3 | import zhHant from './zh-Hant.json'
4 | export default {
5 | en,
6 | 'zh-Hans': zhHans,
7 | 'zh-Hant': zhHant
8 | }
9 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hans.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "收藏",
3 | "uni-fav.collected": "已收藏"
4 | }
5 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/components/uni-fav/i18n/zh-Hant.json:
--------------------------------------------------------------------------------
1 | {
2 | "uni-fav.collect": "收藏",
3 | "uni-fav.collected": "已收藏"
4 | }
5 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-fav",
3 | "displayName": "uni-fav 收藏按钮",
4 | "version": "1.2.1",
5 | "description": " Fav 收藏组件,可自定义颜色、大小。",
6 | "keywords": [
7 | "fav",
8 | "uni-ui",
9 | "uniui",
10 | "收藏"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "category": [
21 | "前端组件",
22 | "通用组件"
23 | ],
24 | "sale": {
25 | "regular": {
26 | "price": "0.00"
27 | },
28 | "sourcecode": {
29 | "price": "0.00"
30 | }
31 | },
32 | "contact": {
33 | "qq": ""
34 | },
35 | "declaration": {
36 | "ads": "无",
37 | "data": "无",
38 | "permissions": "无"
39 | },
40 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
41 | },
42 | "uni_modules": {
43 | "dependencies": [
44 | "uni-scss",
45 | "uni-icons"
46 | ],
47 | "encrypt": [],
48 | "platforms": {
49 | "cloud": {
50 | "tcb": "y",
51 | "aliyun": "y"
52 | },
53 | "client": {
54 | "App": {
55 | "app-vue": "y",
56 | "app-nvue": "y"
57 | },
58 | "H5-mobile": {
59 | "Safari": "y",
60 | "Android Browser": "y",
61 | "微信浏览器(Android)": "y",
62 | "QQ浏览器(Android)": "y"
63 | },
64 | "H5-pc": {
65 | "Chrome": "y",
66 | "IE": "y",
67 | "Edge": "y",
68 | "Firefox": "y",
69 | "Safari": "y"
70 | },
71 | "小程序": {
72 | "微信": "y",
73 | "阿里": "y",
74 | "百度": "y",
75 | "字节跳动": "y",
76 | "QQ": "y"
77 | },
78 | "快应用": {
79 | "华为": "u",
80 | "联盟": "u"
81 | },
82 | "Vue": {
83 | "vue2": "y",
84 | "vue3": "y"
85 | }
86 | }
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/uni_modules/uni-fav/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Fav 收藏按钮
4 | > **组件名:uni-fav**
5 | > 代码块: `uFav`
6 |
7 | 用于收藏功能,可点击切换选中、不选中的状态。
8 |
9 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-fav)
10 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-file-picker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "uni-file-picker",
3 | "displayName": "uni-file-picker 文件选择上传",
4 | "version": "1.0.8",
5 | "description": "文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间",
6 | "keywords": [
7 | "uni-ui",
8 | "uniui",
9 | "图片上传",
10 | "文件上传"
11 | ],
12 | "repository": "https://github.com/dcloudio/uni-ui",
13 | "engines": {
14 | "HBuilderX": ""
15 | },
16 | "directories": {
17 | "example": "../../temps/example_temps"
18 | },
19 | "dcloudext": {
20 | "sale": {
21 | "regular": {
22 | "price": "0.00"
23 | },
24 | "sourcecode": {
25 | "price": "0.00"
26 | }
27 | },
28 | "contact": {
29 | "qq": ""
30 | },
31 | "declaration": {
32 | "ads": "无",
33 | "data": "无",
34 | "permissions": "无"
35 | },
36 | "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
37 | "type": "component-vue"
38 | },
39 | "uni_modules": {
40 | "dependencies": ["uni-scss"],
41 | "encrypt": [],
42 | "platforms": {
43 | "cloud": {
44 | "tcb": "y",
45 | "aliyun": "y"
46 | },
47 | "client": {
48 | "App": {
49 | "app-vue": "y",
50 | "app-nvue": "n"
51 | },
52 | "H5-mobile": {
53 | "Safari": "y",
54 | "Android Browser": "y",
55 | "微信浏览器(Android)": "y",
56 | "QQ浏览器(Android)": "y"
57 | },
58 | "H5-pc": {
59 | "Chrome": "y",
60 | "IE": "y",
61 | "Edge": "y",
62 | "Firefox": "y",
63 | "Safari": "y"
64 | },
65 | "小程序": {
66 | "微信": "y",
67 | "阿里": "y",
68 | "百度": "y",
69 | "字节跳动": "y",
70 | "QQ": "y"
71 | },
72 | "快应用": {
73 | "华为": "u",
74 | "联盟": "u"
75 | },
76 | "Vue": {
77 | "vue2": "y",
78 | "vue3": "y"
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/uni_modules/uni-file-picker/readme.md:
--------------------------------------------------------------------------------
1 |
2 | ## FilePicker 文件选择上传
3 |
4 | > **组件名:uni-file-picker**
5 | > 代码块: `uFilePicker`
6 |
7 |
8 | 文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间
9 |
10 | ### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-file-picker)
11 | #### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
--------------------------------------------------------------------------------
/uni_modules/uni-forms/readme.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Forms 表单
4 |
5 | > **组件名:uni-forms**
6 | > 代码块: `uForms`、`uni-forms-item`
7 | > 关联组件:`uni-forms-item`、`uni-easyinput`、`uni-data-checkbox`、`uni-group`。
8 |
9 |
10 | uni-app的内置组件已经有了 `