@ -0,0 +1,31 @@ |
|||||||
|
/* |
||||||
|
* Eslint config file |
||||||
|
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||||
|
* Install the Eslint extension before using this feature. |
||||||
|
*/ |
||||||
|
module.exports = { |
||||||
|
env: { |
||||||
|
es6: true, |
||||||
|
browser: true, |
||||||
|
node: true, |
||||||
|
}, |
||||||
|
ecmaFeatures: { |
||||||
|
modules: true, |
||||||
|
}, |
||||||
|
parserOptions: { |
||||||
|
ecmaVersion: 2018, |
||||||
|
sourceType: 'module', |
||||||
|
}, |
||||||
|
globals: { |
||||||
|
wx: true, |
||||||
|
App: true, |
||||||
|
Page: true, |
||||||
|
getCurrentPages: true, |
||||||
|
getApp: true, |
||||||
|
Component: true, |
||||||
|
requirePlugin: true, |
||||||
|
requireMiniProgram: true, |
||||||
|
}, |
||||||
|
// extends: 'eslint:recommended',
|
||||||
|
rules: {}, |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
unpackage/* |
||||||
|
node_modules/* |
||||||
|
.idea/* |
||||||
|
deploy.sh |
||||||
|
.hbuilderx/ |
||||||
|
.vscode/ |
||||||
|
**/.DS_Store |
||||||
|
yarn.lock |
||||||
|
package-lock.json |
||||||
|
*.keystore |
||||||
|
pnpm-lock.yaml |
||||||
|
dist/* |
||||||
|
|
||||||
|
/unpackage/ |
||||||
|
unpackage/ |
||||||
|
unpackage |
@ -0,0 +1,16 @@ |
|||||||
|
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ |
||||||
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 |
||||||
|
"version": "0.0", |
||||||
|
"configurations": [{ |
||||||
|
"default" : |
||||||
|
{ |
||||||
|
"launchtype" : "local" |
||||||
|
}, |
||||||
|
"mp-weixin" : |
||||||
|
{ |
||||||
|
"launchtype" : "local" |
||||||
|
}, |
||||||
|
"type" : "uniCloud" |
||||||
|
} |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,8 @@ |
|||||||
|
# 默认忽略的文件 |
||||||
|
/shelf/ |
||||||
|
/workspace.xml |
||||||
|
# 基于编辑器的 HTTP 客户端请求 |
||||||
|
/httpRequests/ |
||||||
|
# Datasource local storage ignored files |
||||||
|
/dataSources/ |
||||||
|
/dataSources.local.xml |
@ -0,0 +1,21 @@ |
|||||||
|
<script> |
||||||
|
export default { |
||||||
|
onLaunch: function () { |
||||||
|
console.log('App Launch'); |
||||||
|
}, |
||||||
|
onShow: function () { |
||||||
|
console.log('App Show'); |
||||||
|
}, |
||||||
|
onHide: function () { |
||||||
|
console.log('App Hide'); |
||||||
|
} |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style> |
||||||
|
/*每个页面公共css */ |
||||||
|
@import url('@/static/css/animate.min.css'); |
||||||
|
page { |
||||||
|
box-sizing: border-box; |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,20 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8" /> |
||||||
|
<script> |
||||||
|
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || |
||||||
|
CSS.supports('top: constant(a)')) |
||||||
|
document.write( |
||||||
|
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + |
||||||
|
(coverSupport ? ', viewport-fit=cover' : '') + '" />') |
||||||
|
</script> |
||||||
|
<title></title> |
||||||
|
<!--preload-links--> |
||||||
|
<!--app-context--> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="app"><!--app-html--></div> |
||||||
|
<script type="module" src="/main.js"></script> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,25 @@ |
|||||||
|
import App from './App' |
||||||
|
|
||||||
|
// #ifndef VUE3
|
||||||
|
import Vue from 'vue' |
||||||
|
import './uni.promisify.adaptor' |
||||||
|
|
||||||
|
Vue.config.productionTip = false |
||||||
|
App.mpType = 'app' |
||||||
|
const app = new Vue({ |
||||||
|
...App |
||||||
|
}) |
||||||
|
app.$mount() |
||||||
|
// #endif
|
||||||
|
|
||||||
|
// #ifdef VUE3
|
||||||
|
import { |
||||||
|
createSSRApp |
||||||
|
} from 'vue' |
||||||
|
export function createApp() { |
||||||
|
const app = createSSRApp(App) |
||||||
|
return { |
||||||
|
app |
||||||
|
} |
||||||
|
} |
||||||
|
// #endif
|
@ -0,0 +1,73 @@ |
|||||||
|
{ |
||||||
|
"name": "gateway", |
||||||
|
"appid": "__UNI__F085E81", |
||||||
|
"description": "", |
||||||
|
"versionName": "1.0.0", |
||||||
|
"versionCode": "100", |
||||||
|
"transformPx": false, |
||||||
|
/* 5+App特有相关 */ |
||||||
|
"app-plus": { |
||||||
|
"usingComponents": true, |
||||||
|
"nvueStyleCompiler": "uni-app", |
||||||
|
"compilerVersion": 3, |
||||||
|
"splashscreen": { |
||||||
|
"alwaysShowBeforeRender": true, |
||||||
|
"waiting": true, |
||||||
|
"autoclose": true, |
||||||
|
"delay": 0 |
||||||
|
}, |
||||||
|
/* 模块配置 */ |
||||||
|
"modules": {}, |
||||||
|
/* 应用发布信息 */ |
||||||
|
"distribute": { |
||||||
|
/* android打包配置 */ |
||||||
|
"android": { |
||||||
|
"permissions": [ |
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", |
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", |
||||||
|
"<uses-feature android:name=\"android.hardware.camera\"/>", |
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
||||||
|
] |
||||||
|
}, |
||||||
|
/* ios打包配置 */ |
||||||
|
"ios": {}, |
||||||
|
/* SDK配置 */ |
||||||
|
"sdkConfigs": {} |
||||||
|
} |
||||||
|
}, |
||||||
|
/* 快应用特有相关 */ |
||||||
|
"quickapp": {}, |
||||||
|
/* 小程序特有相关 */ |
||||||
|
"mp-weixin": { |
||||||
|
"appid": "wx415b09675ddc378a", |
||||||
|
"setting": { |
||||||
|
"urlCheck": false, |
||||||
|
"es6": true |
||||||
|
}, |
||||||
|
"usingComponents": true |
||||||
|
}, |
||||||
|
"mp-alipay": { |
||||||
|
"usingComponents": true |
||||||
|
}, |
||||||
|
"mp-baidu": { |
||||||
|
"usingComponents": true |
||||||
|
}, |
||||||
|
"mp-toutiao": { |
||||||
|
"usingComponents": true |
||||||
|
}, |
||||||
|
"uniStatistics": { |
||||||
|
"enable": false |
||||||
|
}, |
||||||
|
"vueVersion": "3" |
||||||
|
} |
@ -0,0 +1,55 @@ |
|||||||
|
<template> |
||||||
|
<view class="my-container"> |
||||||
|
<view class="inner-container"> |
||||||
|
<slot></slot> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
export default { |
||||||
|
name: 'myContainer', |
||||||
|
data() { |
||||||
|
return { |
||||||
|
time: '' |
||||||
|
}; |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
//处理滚动 |
||||||
|
handleScroll() { |
||||||
|
const time = Date.now(); |
||||||
|
if (time - this.time > 100) { |
||||||
|
this.time = time; |
||||||
|
uni |
||||||
|
.createSelectorQuery() |
||||||
|
.in(this) |
||||||
|
.select('.inner-container') |
||||||
|
.boundingClientRect((rect) => { |
||||||
|
console.log(rect); |
||||||
|
// this.$store.commit('category/setCategoryShow', rect.top < 100); |
||||||
|
}) |
||||||
|
.exec(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss"> |
||||||
|
.my-container { |
||||||
|
height: 100vh; |
||||||
|
width: 100vw; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
.inner-container { |
||||||
|
width: 90%; |
||||||
|
height: 90%; |
||||||
|
border-radius: 6px; |
||||||
|
background-color: #ffffff3b; |
||||||
|
backdrop-filter: blur(10px); |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,21 @@ |
|||||||
|
hoistPattern: |
||||||
|
- '*' |
||||||
|
hoistedDependencies: {} |
||||||
|
included: |
||||||
|
dependencies: true |
||||||
|
devDependencies: true |
||||||
|
optionalDependencies: true |
||||||
|
injectedDeps: {} |
||||||
|
layoutVersion: 5 |
||||||
|
nodeLinker: isolated |
||||||
|
packageManager: pnpm@8.6.0 |
||||||
|
pendingBuilds: [] |
||||||
|
prunedAt: Thu, 24 Oct 2024 09:31:32 GMT |
||||||
|
publicHoistPattern: |
||||||
|
- '*eslint*' |
||||||
|
- '*prettier*' |
||||||
|
registries: |
||||||
|
default: https://registry.yarnpkg.com/ |
||||||
|
skipped: [] |
||||||
|
storeDir: C:\Users\my_mi\AppData\Local\pnpm\store\v3 |
||||||
|
virtualStoreDir: C:\Users\Public\Documents\gateway\node_modules\.pnpm |
@ -0,0 +1,18 @@ |
|||||||
|
lockfileVersion: '6.1' |
||||||
|
|
||||||
|
settings: |
||||||
|
autoInstallPeers: true |
||||||
|
excludeLinksFromLockfile: false |
||||||
|
|
||||||
|
devDependencies: |
||||||
|
miniprogram-api-typings: |
||||||
|
specifier: ^2.8.3-1 |
||||||
|
version: registry.npmjs.org/miniprogram-api-typings@2.8.3-1 |
||||||
|
|
||||||
|
packages: |
||||||
|
|
||||||
|
registry.npmjs.org/miniprogram-api-typings@2.8.3-1: |
||||||
|
resolution: {integrity: sha512-xJsm+8aF4s8hks/Xbls8UuJ707x67b/6+dw8jvsPkoGt+SfRoRh6FtEueHyz03VTPiq+untKqKR/bFC9/EGImw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/miniprogram-api-typings/-/miniprogram-api-typings-2.8.3-1.tgz} |
||||||
|
name: miniprogram-api-typings |
||||||
|
version: 2.8.3-1 |
||||||
|
dev: true |
@ -0,0 +1,52 @@ |
|||||||
|
## 2019-10-10 v2.8.3-1 |
||||||
|
- 修复注释文档中不可用的链接 |
||||||
|
- 组件实例类型支持 `Partial` 的自定义方法([用例](https://github.com/wechat-miniprogram/api-typings/blob/master/test/issue.test.ts#L170-L185)) |
||||||
|
|
||||||
|
## 2019-09-19 v2.8.3 |
||||||
|
- 同步 API 定义到基础库 2.8.3 |
||||||
|
- `getApp` 支持范型(#77) |
||||||
|
- 修正一些接口错误(#73, #75, #79) |
||||||
|
- 补齐 `require`, `exports`, `module.exports` 定义,以支持在没有 `@types/node` 下编译 |
||||||
|
|
||||||
|
## 2019-09-10 v2.8.2 |
||||||
|
- 同步 API 定义到基础库 2.8.2 |
||||||
|
- 加强了参数为可选值的方法参数类型定义和注释(如 `FileSystemManager.appendFileSync` 的 `encoding`) |
||||||
|
|
||||||
|
## 2019-08-30 v2.8.1 |
||||||
|
- 同步 API 定义到基础库 2.8.1 |
||||||
|
- 修复了部分最低基础库显示为 `[object Object]` 的问题 |
||||||
|
|
||||||
|
## 2019-08-20 v2.8.0-2 |
||||||
|
|
||||||
|
- 将 `object` 改为 `Record<string, any>`,以允许任意属性和方法 |
||||||
|
- 自定义组件属性构造器为 `ObjectConstructor` 时,类型推导为 `Record<string, any>` 而不是 `object` |
||||||
|
- 修正 `component` 参数的类型为页面或自定义组件实例 |
||||||
|
- 补齐 `console: WechatMiniprogram.Console` 全局变量 |
||||||
|
- 修正一些其他的接口类型错误 |
||||||
|
|
||||||
|
## 2019-08-14 v2.8.0-1 |
||||||
|
|
||||||
|
- 补齐 `styleIsolation` 到 `ComponentOption` |
||||||
|
|
||||||
|
## 2019-08-14 v2.8.0 |
||||||
|
|
||||||
|
- 同步 API 定义到基础库 2.8.0 |
||||||
|
- 不再向全局暴露 `IAnyObject`,收回到命名空间 `WechatMiniprogram` 内 |
||||||
|
- 对齐代码规范,使用 4 空格缩进,不再使用分号等 |
||||||
|
- 小幅改动 behavior, component 和 page 的定义,使其对 data 和 properties 等的类型推断更准确 |
||||||
|
- 修复了一些其他问题(#60, #59, #48, #47, #45, #33, #13) |
||||||
|
|
||||||
|
## 2019-08-08 v2.7.7-2 |
||||||
|
|
||||||
|
- 补齐了部分接口 fail 回调的错误码(#51) |
||||||
|
|
||||||
|
## 2019-08-06 v2.7.7-1 |
||||||
|
|
||||||
|
- 重写了 page, component 和 behavior 的定义,替换原来不完整的定义,使其更全面,更准确(#46, #40, #30, #28, #27) |
||||||
|
|
||||||
|
## 2019-07-31 v2.7.7 |
||||||
|
|
||||||
|
- 同步 API 定义到基础库 2.7.7 |
||||||
|
- 将命名空间从 `Wx` 更改为更正式的 `WechatMiniprogram`,这是一个 **破坏性改动**,原本字面上引用了 `Wx` 命名空间的代码可能失效 |
||||||
|
- 修复了云开发的定义无法使用的问题(#25, #32, #42) |
||||||
|
- 修复了一些其它问题(#11, #35, #43) |
@ -0,0 +1,21 @@ |
|||||||
|
MIT License |
||||||
|
|
||||||
|
Copyright (c) 2019 |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||||
|
of this software and associated documentation files (the "Software"), to deal |
||||||
|
in the Software without restriction, including without limitation the rights |
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||||
|
copies of the Software, and to permit persons to whom the Software is |
||||||
|
furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all |
||||||
|
copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||||
|
SOFTWARE. |
@ -0,0 +1,46 @@ |
|||||||
|
# Wechat Mini Program API Typings |
||||||
|
|
||||||
|
> [中文版本](./README.md) |
||||||
|
|
||||||
|
[![Published on NPM](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings) |
||||||
|
[![MIT License](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/api-typings) |
||||||
|
[![Travis CI Test Status](https://travis-ci.org/wechat-miniprogram/api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/api-typings) |
||||||
|
|
||||||
|
Type definitions for APIs of Wechat Mini Program in TypeScript |
||||||
|
|
||||||
|
## Install |
||||||
|
|
||||||
|
Install by NPM: |
||||||
|
```bash |
||||||
|
# install definitions for latest base library |
||||||
|
npm install miniprogram-api-typings |
||||||
|
``` |
||||||
|
|
||||||
|
or specify a base library version: |
||||||
|
|
||||||
|
```bash |
||||||
|
# install definitions for base library version 2.4.1 |
||||||
|
npm install miniprogram-api-typings@2.4.1 |
||||||
|
``` |
||||||
|
|
||||||
|
## Versions |
||||||
|
|
||||||
|
Check out all available versions corresponding to base library version in [VERSIONS.md](https://github.com/wechat-miniprogram/api-typings/blob/master/VERSIONS.md) |
||||||
|
|
||||||
|
## Changelog |
||||||
|
|
||||||
|
See [CHANGELOG.md](https://github.com/wechat-miniprogram/api-typings/blob/master/CHANGELOG.md) (Chinese only) |
||||||
|
|
||||||
|
## Contribution |
||||||
|
|
||||||
|
Definitions of Wechat APIs (`lib.wx.api.d.ts`) are auto-generated together with our [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), therefore PRs including that file will __not__ be merged. If you found some APIs defined wrongly, create an issue instead. |
||||||
|
|
||||||
|
Both PR and issue are welcomed for definitions of pages (`Page`), custom components (`Component`) and other else, since they are written manually. Help us improve this definition if you have any bug reports or suggestions! Thanks for contributing! |
||||||
|
|
||||||
|
### Automated tests |
||||||
|
|
||||||
|
We use [`tsd`](https://github.com/SamVerschueren/tsd) to check if this definition is working properly. All test cases are under folder `test`. |
||||||
|
|
||||||
|
To perform an automated test, clone this repo, `npm install --save-dev` and `npm test`. |
||||||
|
|
||||||
|
If you have test case that fails the test, an issue or PR will be great. Strong test case that passes are also welcomed. |
@ -0,0 +1,45 @@ |
|||||||
|
# 微信小程序定义文件 |
||||||
|
|
||||||
|
> [English version](./README-en.md) |
||||||
|
|
||||||
|
[![已在 NPM 发布](https://img.shields.io/npm/v/miniprogram-api-typings.svg?style=flat)](https://www.npmjs.com/package/miniprogram-api-typings) |
||||||
|
[![MIT 协议](https://img.shields.io/github/license/wechat-miniprogram/api-typings.svg)](https://github.com/wechat-miniprogram/api-typings) |
||||||
|
[![Travis CI 测试状况](https://travis-ci.org/wechat-miniprogram/api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/api-typings) |
||||||
|
|
||||||
|
微信小程序 API 的 TypeScript 类型定义文件 |
||||||
|
|
||||||
|
## 安装 |
||||||
|
|
||||||
|
通过 npm 安装: |
||||||
|
```bash |
||||||
|
# 安装对应最新基础库的定义文件 |
||||||
|
npm install miniprogram-api-typings |
||||||
|
``` |
||||||
|
|
||||||
|
或者通过版本号指定一个基础库版本: |
||||||
|
```bash |
||||||
|
# 安装对应基础库版本 2.4.1 的定义文件 |
||||||
|
npm install miniprogram-api-typings@2.4.1 |
||||||
|
``` |
||||||
|
|
||||||
|
## 版本 |
||||||
|
|
||||||
|
所有可用的版本和对应的基础库版本,参考 [VERSIONS.md](https://github.com/wechat-miniprogram/api-typings/blob/master/VERSIONS.md) |
||||||
|
|
||||||
|
## 更新日志 |
||||||
|
|
||||||
|
参考 [CHANGELOG.md](https://github.com/wechat-miniprogram/api-typings/blob/master/CHANGELOG.md) |
||||||
|
|
||||||
|
## 贡献 |
||||||
|
|
||||||
|
API 的定义文件(`lib.wx.api.d.ts`)是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,如果发现了 API 接口的定义错误,请提一个 issue 给我们,关于 API 的 PR 将 __不会__ 被接受。 |
||||||
|
|
||||||
|
如果有针对页面(`Page`)、自定义组件(`Component`)等接口的 bug 和建议,欢迎 PR 或提一个 issue 给我们。非常感谢! |
||||||
|
|
||||||
|
### 测试 |
||||||
|
|
||||||
|
本定义文件使用 [`tsd`](https://github.com/SamVerschueren/tsd) 进行测试,所有的测试样例放在 `test` 目录下。 |
||||||
|
|
||||||
|
想执行测试的话,克隆本项目并完成 `npm install --save-dev` 后执行 `npm test` 即可。 |
||||||
|
|
||||||
|
如果您发现了不能通过自动化测试的测试样例,可以提交 PR 或者提一个 issue。当然,能通过自动化测试的强有力的测试样例也是欢迎的。 |
@ -0,0 +1,13 @@ |
|||||||
|
## 所有可用版本 |
||||||
|
|
||||||
|
基础库版本|npm 版本|命令 |
||||||
|
-|-|- |
||||||
|
[v2.8.3](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-3-2019-09-17) | [2.8.3-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.3-1) | `npm install miniprogram-api-typings@2.8.3-1` |
||||||
|
[v2.8.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-2-2019-08-30) | [2.8.2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.2) | `npm install miniprogram-api-typings@2.8.2` |
||||||
|
[v2.8.1](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-1-2019-08-22) | [2.8.1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.1) | `npm install miniprogram-api-typings@2.8.1` |
||||||
|
[v2.8.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-8-0-2019-07-30) | [2.8.0-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.8.0-2) | `npm install miniprogram-api-typings@2.8.0-2` |
||||||
|
[v2.7.7](https://developers.weixin.qq.com/miniprogram/dev/framework/release/) | [2.7.7-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.7.7-2) | `npm install miniprogram-api-typings@2.7.7-2` |
||||||
|
[v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.6.5-2) | `npm install miniprogram-api-typings@2.6.5-2` |
||||||
|
[v2.4.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/v2.html#v2-4-2-2018-12-04)|[2.4.2-2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.4.2-2)|`npm install miniprogram-api-typings@2.4.2-2` |
||||||
|
[v2.4.1](https://developers.weixin.qq.com/miniprogram/dev/framework/release/v2.html#v2-4-1-2018-11-21)|[2.4.1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.4.1)|`npm install miniprogram-api-typings@2.4.1` |
||||||
|
[v2.4.0](https://developers.weixin.qq.com/miniprogram/dev/framework/release/v2.html#v2-4-0-2018-11-05)|[2.4.0-1](https://www.npmjs.com/package/miniprogram-api-typings/v/2.4.0-1)|`npm install miniprogram-api-typings@2.4.0-1` |
@ -0,0 +1 @@ |
|||||||
|
/// <reference path="./types/index.d.ts" />
|
@ -0,0 +1,41 @@ |
|||||||
|
{ |
||||||
|
"name": "miniprogram-api-typings", |
||||||
|
"version": "2.8.3-1", |
||||||
|
"description": "Type definitions for APIs of Wechat Mini Program in TypeScript", |
||||||
|
"main": "./index.d.ts", |
||||||
|
"types": "./index.d.ts", |
||||||
|
"scripts": { |
||||||
|
"test": "npm run tsd && npm run tslint", |
||||||
|
"tsd": "tsd", |
||||||
|
"tslint": "tslint --project ." |
||||||
|
}, |
||||||
|
"repository": { |
||||||
|
"type": "git", |
||||||
|
"url": "git+https://github.com/wechat-miniprogram/api-typings.git" |
||||||
|
}, |
||||||
|
"author": "Wechat Miniprogram <wx-miniprogram@qq.com>", |
||||||
|
"license": "MIT", |
||||||
|
"bugs": { |
||||||
|
"url": "https://github.com/wechat-miniprogram/api-typings/issues" |
||||||
|
}, |
||||||
|
"homepage": "https://github.com/wechat-miniprogram/api-typings#readme", |
||||||
|
"dependencies": {}, |
||||||
|
"devDependencies": { |
||||||
|
"tsd": "^0.9.0", |
||||||
|
"tslint": "^5.20.0", |
||||||
|
"typescript": "^3.5.3" |
||||||
|
}, |
||||||
|
"tsd": { |
||||||
|
"directory": "test" |
||||||
|
}, |
||||||
|
"files": [ |
||||||
|
"LICENSE", |
||||||
|
"CHANGELOG.md", |
||||||
|
"VERSIONS.md", |
||||||
|
"README.md", |
||||||
|
"README-en.md", |
||||||
|
"index.d.ts", |
||||||
|
"typings.json", |
||||||
|
"types/" |
||||||
|
] |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
/// <reference path="./wx/index.d.ts" />
|
@ -0,0 +1,22 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
/// <reference path="./lib.wx.app.d.ts" />
|
||||||
|
/// <reference path="./lib.wx.page.d.ts" />
|
||||||
|
/// <reference path="./lib.wx.api.d.ts" />
|
||||||
|
/// <reference path="./lib.wx.cloud.d.ts" />
|
||||||
|
/// <reference path="./lib.wx.component.d.ts" />
|
||||||
|
/// <reference path="./lib.wx.behavior.d.ts" />
|
||||||
|
|
||||||
|
declare namespace WechatMiniprogram { |
||||||
|
type IAnyObject = Record<string, any> |
||||||
|
type Optional<F> = F extends (arg: infer P) => infer R ? (arg?: P) => R : F |
||||||
|
type OptionalInterface<T> = { [K in keyof T]: Optional<T[K]> } |
||||||
|
} |
@ -0,0 +1,249 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
declare namespace WechatMiniprogram { |
||||||
|
namespace App { |
||||||
|
interface ReferrerInfo { |
||||||
|
/** 来源小程序或公众号或App的 appId |
||||||
|
* |
||||||
|
* 以下场景支持返回 referrerInfo.appId: |
||||||
|
* - 1020(公众号 profile 页相关小程序列表): appId |
||||||
|
* - 1035(公众号自定义菜单):来源公众号 appId |
||||||
|
* - 1036(App 分享消息卡片):来源应用 appId |
||||||
|
* - 1037(小程序打开小程序):来源小程序 appId |
||||||
|
* - 1038(从另一个小程序返回):来源小程序 appId |
||||||
|
* - 1043(公众号模板消息):来源公众号 appId |
||||||
|
*/ |
||||||
|
appId: string |
||||||
|
/** 来源小程序传过来的数据,scene=1037或1038时支持 */ |
||||||
|
extraData?: any |
||||||
|
} |
||||||
|
|
||||||
|
type SceneValues = |
||||||
|
| 1001 |
||||||
|
| 1005 |
||||||
|
| 1006 |
||||||
|
| 1007 |
||||||
|
| 1008 |
||||||
|
| 1011 |
||||||
|
| 1012 |
||||||
|
| 1013 |
||||||
|
| 1014 |
||||||
|
| 1017 |
||||||
|
| 1019 |
||||||
|
| 1020 |
||||||
|
| 1023 |
||||||
|
| 1024 |
||||||
|
| 1025 |
||||||
|
| 1026 |
||||||
|
| 1027 |
||||||
|
| 1028 |
||||||
|
| 1029 |
||||||
|
| 1030 |
||||||
|
| 1031 |
||||||
|
| 1032 |
||||||
|
| 1034 |
||||||
|
| 1035 |
||||||
|
| 1036 |
||||||
|
| 1037 |
||||||
|
| 1038 |
||||||
|
| 1039 |
||||||
|
| 1042 |
||||||
|
| 1043 |
||||||
|
| 1044 |
||||||
|
| 1045 |
||||||
|
| 1046 |
||||||
|
| 1047 |
||||||
|
| 1048 |
||||||
|
| 1049 |
||||||
|
| 1052 |
||||||
|
| 1053 |
||||||
|
| 1056 |
||||||
|
| 1057 |
||||||
|
| 1058 |
||||||
|
| 1059 |
||||||
|
| 1064 |
||||||
|
| 1067 |
||||||
|
| 1069 |
||||||
|
| 1071 |
||||||
|
| 1072 |
||||||
|
| 1073 |
||||||
|
| 1074 |
||||||
|
| 1077 |
||||||
|
| 1078 |
||||||
|
| 1079 |
||||||
|
| 1081 |
||||||
|
| 1082 |
||||||
|
| 1084 |
||||||
|
| 1089 |
||||||
|
| 1090 |
||||||
|
| 1091 |
||||||
|
| 1092 |
||||||
|
| 1095 |
||||||
|
| 1096 |
||||||
|
| 1097 |
||||||
|
| 1099 |
||||||
|
| 1102 |
||||||
|
| 1124 |
||||||
|
| 1125 |
||||||
|
| 1126 |
||||||
|
| 1129 |
||||||
|
|
||||||
|
interface LaunchShowOption { |
||||||
|
/** 打开小程序的路径 */ |
||||||
|
path: string |
||||||
|
/** 打开小程序的query */ |
||||||
|
query: IAnyObject |
||||||
|
/** 打开小程序的场景值 |
||||||
|
* - 1001:发现栏小程序主入口,「最近使用」列表(基础库2.2.4版本起包含「我的小程序」列表) |
||||||
|
* - 1005:微信首页顶部搜索框的搜索结果页 |
||||||
|
* - 1006:发现栏小程序主入口搜索框的搜索结果页 |
||||||
|
* - 1007:单人聊天会话中的小程序消息卡片 |
||||||
|
* - 1008:群聊会话中的小程序消息卡片 |
||||||
|
* - 1011:扫描二维码 |
||||||
|
* - 1012:长按图片识别二维码 |
||||||
|
* - 1013:扫描手机相册中选取的二维码 |
||||||
|
* - 1014:小程序模板消息 |
||||||
|
* - 1017:前往小程序体验版的入口页 |
||||||
|
* - 1019:微信钱包(微信客户端7.0.0版本改为支付入口) |
||||||
|
* - 1020:公众号 profile 页相关小程序列表 |
||||||
|
* - 1023:安卓系统桌面图标 |
||||||
|
* - 1024:小程序 profile 页 |
||||||
|
* - 1025:扫描一维码 |
||||||
|
* - 1026:发现栏小程序主入口,「附近的小程序」列表 |
||||||
|
* - 1027:微信首页顶部搜索框搜索结果页「使用过的小程序」列表 |
||||||
|
* - 1028:我的卡包 |
||||||
|
* - 1029:小程序中的卡券详情页 |
||||||
|
* - 1030:自动化测试下打开小程序 |
||||||
|
* - 1031:长按图片识别一维码 |
||||||
|
* - 1032:扫描手机相册中选取的一维码 |
||||||
|
* - 1034:微信支付完成页 |
||||||
|
* - 1035:公众号自定义菜单 |
||||||
|
* - 1036:App 分享消息卡片 |
||||||
|
* - 1037:小程序打开小程序 |
||||||
|
* - 1038:从另一个小程序返回 |
||||||
|
* - 1039:摇电视 |
||||||
|
* - 1042:添加好友搜索框的搜索结果页 |
||||||
|
* - 1043:公众号模板消息 |
||||||
|
* - 1044:带 shareTicket 的小程序消息卡片 [详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html)
|
||||||
|
* - 1045:朋友圈广告 |
||||||
|
* - 1046:朋友圈广告详情页 |
||||||
|
* - 1047:扫描小程序码 |
||||||
|
* - 1048:长按图片识别小程序码 |
||||||
|
* - 1049:扫描手机相册中选取的小程序码 |
||||||
|
* - 1052:卡券的适用门店列表 |
||||||
|
* - 1053:搜一搜的结果页 |
||||||
|
* - 1056:聊天顶部音乐播放器右上角菜单 |
||||||
|
* - 1057:钱包中的银行卡详情页 |
||||||
|
* - 1058:公众号文章 |
||||||
|
* - 1059:体验版小程序绑定邀请页 |
||||||
|
* - 1064:微信首页连Wi-Fi状态栏 |
||||||
|
* - 1067:公众号文章广告 |
||||||
|
* - 1069:移动应用 |
||||||
|
* - 1071:钱包中的银行卡列表页 |
||||||
|
* - 1072:二维码收款页面 |
||||||
|
* - 1073:客服消息列表下发的小程序消息卡片 |
||||||
|
* - 1074:公众号会话下发的小程序消息卡片 |
||||||
|
* - 1077:摇周边 |
||||||
|
* - 1078:微信连Wi-Fi成功提示页 |
||||||
|
* - 1079:微信游戏中心 |
||||||
|
* - 1081:客服消息下发的文字链 |
||||||
|
* - 1082:公众号会话下发的文字链 |
||||||
|
* - 1084:朋友圈广告原生页 |
||||||
|
* - 1089:微信聊天主界面下拉,「最近使用」栏(基础库2.2.4版本起包含「我的小程序」栏) |
||||||
|
* - 1090:长按小程序右上角菜单唤出最近使用历史 |
||||||
|
* - 1091:公众号文章商品卡片 |
||||||
|
* - 1092:城市服务入口 |
||||||
|
* - 1095:小程序广告组件 |
||||||
|
* - 1096:聊天记录 |
||||||
|
* - 1097:微信支付签约页 |
||||||
|
* - 1099:页面内嵌插件 |
||||||
|
* - 1102:公众号 profile 页服务预览 |
||||||
|
* - 1124:扫“一物一码”打开小程序 |
||||||
|
* - 1125:长按图片识别“一物一码” |
||||||
|
* - 1126:扫描手机相册中选取的“一物一码” |
||||||
|
* - 1129:微信爬虫访问 [详情](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/sitemap.html)
|
||||||
|
*/ |
||||||
|
scene: SceneValues |
||||||
|
/** shareTicket,详见 [获取更多转发信息]((转发#获取更多转发信息)) */ |
||||||
|
shareTicket: string |
||||||
|
/** 当场景为由从另一个小程序或公众号或App打开时,返回此字段 */ |
||||||
|
referrerInfo?: ReferrerInfo |
||||||
|
} |
||||||
|
|
||||||
|
interface PageNotFoundOption { |
||||||
|
/** 不存在页面的路径 */ |
||||||
|
path: string |
||||||
|
/** 打开不存在页面的 query */ |
||||||
|
query: IAnyObject |
||||||
|
/** 是否本次启动的首个页面(例如从分享等入口进来,首个页面是开发者配置的分享页面) */ |
||||||
|
isEntryPage: boolean |
||||||
|
} |
||||||
|
|
||||||
|
interface Option { |
||||||
|
/** 生命周期回调—监听小程序初始化 |
||||||
|
* |
||||||
|
* 小程序初始化完成时触发,全局只触发一次。 |
||||||
|
*/ |
||||||
|
onLaunch(options: LaunchShowOption): void |
||||||
|
/** 生命周期回调—监听小程序显示 |
||||||
|
* |
||||||
|
* 小程序启动,或从后台进入前台显示时 |
||||||
|
*/ |
||||||
|
onShow(options: LaunchShowOption): void |
||||||
|
/** 生命周期回调—监听小程序隐藏 |
||||||
|
* |
||||||
|
* 小程序从前台进入后台时 |
||||||
|
*/ |
||||||
|
onHide(): void |
||||||
|
/** 错误监听函数 |
||||||
|
* |
||||||
|
* 小程序发生脚本错误,或者 api |
||||||
|
*/ |
||||||
|
onError(/** 错误信息,包含堆栈 */ error: string): void |
||||||
|
/** 页面不存在监听函数 |
||||||
|
* |
||||||
|
* 小程序要打开的页面不存在时触发,会带上页面信息回调该函数 |
||||||
|
* |
||||||
|
* **注意:** |
||||||
|
* 1. 如果开发者没有添加 `onPageNotFound` 监听,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。 |
||||||
|
* 2. 如果 `onPageNotFound` 回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再回调 `onPageNotFound`。 |
||||||
|
* |
||||||
|
* 最低基础库: 1.9.90 |
||||||
|
*/ |
||||||
|
onPageNotFound(options: PageNotFoundOption): void |
||||||
|
} |
||||||
|
|
||||||
|
type Instance<T extends IAnyObject> = Option & T |
||||||
|
type Options<T extends IAnyObject> = Partial<Option> & |
||||||
|
T & |
||||||
|
ThisType<Instance<T>> |
||||||
|
type TrivialInstance = Instance<IAnyObject> |
||||||
|
|
||||||
|
interface Constructor { |
||||||
|
<T extends IAnyObject>(options: Options<T>): void |
||||||
|
} |
||||||
|
|
||||||
|
interface GetAppOption { |
||||||
|
/** 在 `App` 未定义时返回默认实现。当App被调用时,默认实现中定义的属性会被覆盖合并到App中。一般用于独立分包 |
||||||
|
* |
||||||
|
* 最低基础库: 2.2.4 |
||||||
|
*/ |
||||||
|
allowDefault?: boolean |
||||||
|
} |
||||||
|
|
||||||
|
interface GetApp { |
||||||
|
<T = IAnyObject>(opts?: GetAppOption): Instance<T> |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
declare const App: WechatMiniprogram.App.Constructor |
||||||
|
declare const getApp: WechatMiniprogram.App.GetApp |
@ -0,0 +1,61 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
declare namespace WechatMiniprogram { |
||||||
|
namespace Behavior { |
||||||
|
type Instance< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends MethodOption |
||||||
|
> = Component.Instance<TData, TProperty, TMethod> |
||||||
|
type TrivialInstance = Instance<IAnyObject, IAnyObject, IAnyObject> |
||||||
|
type TrivialOption = Options<IAnyObject, IAnyObject, IAnyObject> |
||||||
|
type Options< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends MethodOption |
||||||
|
> = Partial<Data<TData>> & |
||||||
|
Partial<Property<TProperty>> & |
||||||
|
Partial<Method<TMethod>> & |
||||||
|
Partial<OtherOption> & |
||||||
|
Partial<Lifetimes> & |
||||||
|
ThisType<Instance<TData, TProperty, TMethod>> |
||||||
|
interface Constructor { |
||||||
|
< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends MethodOption |
||||||
|
>( |
||||||
|
options: Options<TData, TProperty, TMethod>, |
||||||
|
): string |
||||||
|
} |
||||||
|
|
||||||
|
type DataOption = Component.DataOption |
||||||
|
type PropertyOption = Component.PropertyOption |
||||||
|
type MethodOption = Component.MethodOption |
||||||
|
type Data<D extends DataOption> = Component.Data<D> |
||||||
|
type Property<P extends PropertyOption> = Component.Property<P> |
||||||
|
type Method<M extends MethodOption> = Component.Method<M> |
||||||
|
|
||||||
|
type DefinitionFilter = Component.DefinitionFilter |
||||||
|
type Lifetimes = Component.Lifetimes |
||||||
|
|
||||||
|
interface OtherOption { |
||||||
|
/** 类似于mixins和traits的组件间代码复用机制,参见 [behaviors](behaviors.md) */ |
||||||
|
behaviors: string[] |
||||||
|
/** 定义段过滤器,用于自定义组件扩展,参见 [自定义组件扩展](extend.md) |
||||||
|
* |
||||||
|
* 最低基础库: `2.2.3` */ |
||||||
|
definitionFilter?: DefinitionFilter |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
/** 注册一个 `behavior`,接受一个 `Object` 类型的参数。*/ |
||||||
|
declare const Behavior: WechatMiniprogram.Behavior.Constructor |
@ -0,0 +1,709 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
///// WX Cloud Apis
|
||||||
|
/////////////////////
|
||||||
|
|
||||||
|
/** |
||||||
|
* Common interfaces and types |
||||||
|
*/ |
||||||
|
|
||||||
|
interface IAPIError { |
||||||
|
errMsg: string |
||||||
|
} |
||||||
|
|
||||||
|
interface IAPIParam<T = any> { |
||||||
|
config?: ICloudConfig |
||||||
|
success?: (res: T) => void |
||||||
|
fail?: (err: IAPIError) => void |
||||||
|
complete?: (val: T | IAPIError) => void |
||||||
|
} |
||||||
|
|
||||||
|
interface IAPISuccessParam { |
||||||
|
errMsg: string |
||||||
|
} |
||||||
|
|
||||||
|
type IAPICompleteParam = IAPISuccessParam | IAPIError |
||||||
|
|
||||||
|
type IAPIFunction<T, P extends IAPIParam<T>> = (param?: P) => Promise<T> |
||||||
|
|
||||||
|
interface IInitCloudConfig { |
||||||
|
env?: |
||||||
|
| string |
||||||
|
| { |
||||||
|
database?: string |
||||||
|
functions?: string |
||||||
|
storage?: string, |
||||||
|
} |
||||||
|
traceUser?: boolean |
||||||
|
} |
||||||
|
|
||||||
|
interface ICloudConfig { |
||||||
|
env?: string |
||||||
|
traceUser?: boolean |
||||||
|
} |
||||||
|
|
||||||
|
interface IICloudAPI { |
||||||
|
init: (config?: IInitCloudConfig) => void |
||||||
|
[api: string]: AnyFunction | IAPIFunction<any, any> |
||||||
|
} |
||||||
|
|
||||||
|
interface ICloudService { |
||||||
|
name: string |
||||||
|
|
||||||
|
getAPIs: () => { [name: string]: IAPIFunction<any, any> } |
||||||
|
} |
||||||
|
|
||||||
|
interface ICloudServices { |
||||||
|
[serviceName: string]: ICloudService |
||||||
|
} |
||||||
|
|
||||||
|
interface ICloudMetaData { |
||||||
|
session_id: string |
||||||
|
} |
||||||
|
|
||||||
|
declare class InternalSymbol {} |
||||||
|
|
||||||
|
interface AnyObject { |
||||||
|
[x: string]: any |
||||||
|
} |
||||||
|
|
||||||
|
type AnyArray = any[] |
||||||
|
|
||||||
|
type AnyFunction = (...args: any[]) => any |
||||||
|
|
||||||
|
/** |
||||||
|
* extend wx with cloud |
||||||
|
*/ |
||||||
|
interface WxCloud { |
||||||
|
init: (config?: ICloudConfig) => void |
||||||
|
|
||||||
|
callFunction(param: OQ<ICloud.CallFunctionParam>): void |
||||||
|
callFunction( |
||||||
|
param: RQ<ICloud.CallFunctionParam>, |
||||||
|
): Promise<ICloud.CallFunctionResult> |
||||||
|
|
||||||
|
uploadFile(param: OQ<ICloud.UploadFileParam>): WechatMiniprogram.UploadTask |
||||||
|
uploadFile( |
||||||
|
param: RQ<ICloud.UploadFileParam>, |
||||||
|
): Promise<ICloud.UploadFileResult> |
||||||
|
|
||||||
|
downloadFile( |
||||||
|
param: OQ<ICloud.DownloadFileParam>, |
||||||
|
): WechatMiniprogram.DownloadTask |
||||||
|
downloadFile( |
||||||
|
param: RQ<ICloud.DownloadFileParam>, |
||||||
|
): Promise<ICloud.DownloadFileResult> |
||||||
|
|
||||||
|
getTempFileURL(param: OQ<ICloud.GetTempFileURLParam>): void |
||||||
|
getTempFileURL( |
||||||
|
param: RQ<ICloud.GetTempFileURLParam>, |
||||||
|
): Promise<ICloud.GetTempFileURLResult> |
||||||
|
|
||||||
|
deleteFile(param: OQ<ICloud.DeleteFileParam>): void |
||||||
|
deleteFile( |
||||||
|
param: RQ<ICloud.DeleteFileParam>, |
||||||
|
): Promise<ICloud.DeleteFileResult> |
||||||
|
|
||||||
|
database: (config?: ICloudConfig) => DB.Database |
||||||
|
} |
||||||
|
|
||||||
|
declare namespace ICloud { |
||||||
|
interface ICloudAPIParam<T = any> extends IAPIParam<T> { |
||||||
|
config?: ICloudConfig |
||||||
|
} |
||||||
|
|
||||||
|
// === API: callFunction ===
|
||||||
|
type CallFunctionData = AnyObject |
||||||
|
|
||||||
|
interface CallFunctionResult extends IAPISuccessParam { |
||||||
|
result: AnyObject | string | undefined |
||||||
|
} |
||||||
|
|
||||||
|
interface CallFunctionParam extends ICloudAPIParam<CallFunctionResult> { |
||||||
|
name: string |
||||||
|
data?: CallFunctionData |
||||||
|
slow?: boolean |
||||||
|
} |
||||||
|
// === end ===
|
||||||
|
|
||||||
|
// === API: uploadFile ===
|
||||||
|
interface UploadFileResult extends IAPISuccessParam { |
||||||
|
fileID: string |
||||||
|
statusCode: number |
||||||
|
} |
||||||
|
|
||||||
|
interface UploadFileParam extends ICloudAPIParam<UploadFileResult> { |
||||||
|
cloudPath: string |
||||||
|
filePath: string |
||||||
|
header?: AnyObject |
||||||
|
} |
||||||
|
// === end ===
|
||||||
|
|
||||||
|
// === API: downloadFile ===
|
||||||
|
interface DownloadFileResult extends IAPISuccessParam { |
||||||
|
tempFilePath: string |
||||||
|
statusCode: number |
||||||
|
} |
||||||
|
|
||||||
|
interface DownloadFileParam extends ICloudAPIParam<DownloadFileResult> { |
||||||
|
fileID: string |
||||||
|
cloudPath?: string |
||||||
|
} |
||||||
|
// === end ===
|
||||||
|
|
||||||
|
// === API: getTempFileURL ===
|
||||||
|
interface GetTempFileURLResult extends IAPISuccessParam { |
||||||
|
fileList: GetTempFileURLResultItem[] |
||||||
|
} |
||||||
|
|
||||||
|
interface GetTempFileURLResultItem { |
||||||
|
fileID: string |
||||||
|
tempFileURL: string |
||||||
|
maxAge: number |
||||||
|
status: number |
||||||
|
errMsg: string |
||||||
|
} |
||||||
|
|
||||||
|
interface GetTempFileURLParam extends ICloudAPIParam<GetTempFileURLResult> { |
||||||
|
fileList: string[] |
||||||
|
} |
||||||
|
// === end ===
|
||||||
|
|
||||||
|
// === API: deleteFile ===
|
||||||
|
interface DeleteFileResult extends IAPISuccessParam { |
||||||
|
fileList: DeleteFileResultItem[] |
||||||
|
} |
||||||
|
|
||||||
|
interface DeleteFileResultItem { |
||||||
|
fileID: string |
||||||
|
status: number |
||||||
|
errMsg: string |
||||||
|
} |
||||||
|
|
||||||
|
interface DeleteFileParam extends ICloudAPIParam<DeleteFileResult> { |
||||||
|
fileList: string[] |
||||||
|
} |
||||||
|
// === end ===
|
||||||
|
} |
||||||
|
|
||||||
|
// === Database ===
|
||||||
|
declare namespace DB { |
||||||
|
/** |
||||||
|
* The class of all exposed cloud database instances |
||||||
|
*/ |
||||||
|
class Database { |
||||||
|
readonly config: ICloudConfig |
||||||
|
readonly command: DatabaseCommand |
||||||
|
readonly Geo: IGeo |
||||||
|
readonly serverDate: () => ServerDate |
||||||
|
readonly RegExp: IRegExpConstructor |
||||||
|
|
||||||
|
private constructor() |
||||||
|
|
||||||
|
collection(collectionName: string): CollectionReference |
||||||
|
} |
||||||
|
|
||||||
|
class CollectionReference extends Query { |
||||||
|
readonly collectionName: string |
||||||
|
readonly database: Database |
||||||
|
|
||||||
|
private constructor(name: string, database: Database) |
||||||
|
|
||||||
|
doc(docId: string | number): DocumentReference |
||||||
|
|
||||||
|
// add(options: IAddDocumentOptions): Promise<IAddResult> | void
|
||||||
|
|
||||||
|
add(options: OQ<IAddDocumentOptions>): void |
||||||
|
add(options: RQ<IAddDocumentOptions>): Promise<IAddResult> |
||||||
|
} |
||||||
|
|
||||||
|
class DocumentReference { |
||||||
|
private constructor(docId: string | number, database: Database) |
||||||
|
|
||||||
|
field(object: object): this |
||||||
|
|
||||||
|
get(options: OQ<IGetDocumentOptions>): void |
||||||
|
get(options?: RQ<IGetDocumentOptions>): Promise<IQuerySingleResult> |
||||||
|
|
||||||
|
set(options: OQ<ISetSingleDocumentOptions>): void |
||||||
|
set(options?: RQ<ISetSingleDocumentOptions>): Promise<ISetResult> |
||||||
|
|
||||||
|
update(options: OQ<IUpdateSingleDocumentOptions>): void |
||||||
|
update( |
||||||
|
options?: RQ<IUpdateSingleDocumentOptions>, |
||||||
|
): Promise<IUpdateResult> |
||||||
|
|
||||||
|
remove(options: OQ<IRemoveSingleDocumentOptions>): void |
||||||
|
remove( |
||||||
|
options?: RQ<IRemoveSingleDocumentOptions>, |
||||||
|
): Promise<IRemoveResult> |
||||||
|
} |
||||||
|
|
||||||
|
class Query { |
||||||
|
where(condition: IQueryCondition): Query |
||||||
|
|
||||||
|
orderBy(fieldPath: string, order: string): Query |
||||||
|
|
||||||
|
limit(max: number): Query |
||||||
|
|
||||||
|
skip(offset: number): Query |
||||||
|
|
||||||
|
field(object: object): Query |
||||||
|
|
||||||
|
get(options: OQ<IGetDocumentOptions>): void |
||||||
|
get(options?: RQ<IGetDocumentOptions>): Promise<IQueryResult> |
||||||
|
|
||||||
|
count(options: OQ<ICountDocumentOptions>): void |
||||||
|
count(options?: RQ<ICountDocumentOptions>): Promise<ICountResult> |
||||||
|
} |
||||||
|
|
||||||
|
interface DatabaseCommand { |
||||||
|
eq(val: any): DatabaseQueryCommand |
||||||
|
neq(val: any): DatabaseQueryCommand |
||||||
|
gt(val: any): DatabaseQueryCommand |
||||||
|
gte(val: any): DatabaseQueryCommand |
||||||
|
lt(val: any): DatabaseQueryCommand |
||||||
|
lte(val: any): DatabaseQueryCommand |
||||||
|
in(val: any[]): DatabaseQueryCommand |
||||||
|
nin(val: any[]): DatabaseQueryCommand |
||||||
|
|
||||||
|
geoNear(options: IGeoNearCommandOptions): DatabaseQueryCommand |
||||||
|
geoWithin(options: IGeoWithinCommandOptions): DatabaseQueryCommand |
||||||
|
geoIntersects( |
||||||
|
options: IGeoIntersectsCommandOptions, |
||||||
|
): DatabaseQueryCommand |
||||||
|
|
||||||
|
and( |
||||||
|
...expressions: Array<DatabaseLogicCommand | IQueryCondition> |
||||||
|
): DatabaseLogicCommand |
||||||
|
or( |
||||||
|
...expressions: Array<DatabaseLogicCommand | IQueryCondition> |
||||||
|
): DatabaseLogicCommand |
||||||
|
|
||||||
|
set(val: any): DatabaseUpdateCommand |
||||||
|
remove(): DatabaseUpdateCommand |
||||||
|
inc(val: number): DatabaseUpdateCommand |
||||||
|
mul(val: number): DatabaseUpdateCommand |
||||||
|
|
||||||
|
push(...values: any[]): DatabaseUpdateCommand |
||||||
|
pop(): DatabaseUpdateCommand |
||||||
|
shift(): DatabaseUpdateCommand |
||||||
|
unshift(...values: any[]): DatabaseUpdateCommand |
||||||
|
} |
||||||
|
|
||||||
|
enum LOGIC_COMMANDS_LITERAL { |
||||||
|
AND = 'and', |
||||||
|
OR = 'or', |
||||||
|
NOT = 'not', |
||||||
|
NOR = 'nor', |
||||||
|
} |
||||||
|
|
||||||
|
class DatabaseLogicCommand { |
||||||
|
fieldName: string | InternalSymbol |
||||||
|
operator: LOGIC_COMMANDS_LITERAL | string |
||||||
|
operands: any[] |
||||||
|
|
||||||
|
_setFieldName(fieldName: string): DatabaseLogicCommand |
||||||
|
|
||||||
|
and( |
||||||
|
...expressions: Array<DatabaseLogicCommand | IQueryCondition> |
||||||
|
): DatabaseLogicCommand |
||||||
|
or( |
||||||
|
...expressions: Array<DatabaseLogicCommand | IQueryCondition> |
||||||
|
): DatabaseLogicCommand |
||||||
|
} |
||||||
|
|
||||||
|
enum QUERY_COMMANDS_LITERAL { |
||||||
|
// normal
|
||||||
|
EQ = 'eq', |
||||||
|
NEQ = 'neq', |
||||||
|
GT = 'gt', |
||||||
|
GTE = 'gte', |
||||||
|
LT = 'lt', |
||||||
|
LTE = 'lte', |
||||||
|
IN = 'in', |
||||||
|
NIN = 'nin', |
||||||
|
// geo
|
||||||
|
GEO_NEAR = 'geoNear', |
||||||
|
GEO_WITHIN = 'geoWithin', |
||||||
|
GEO_INTERSECTS = 'geoIntersects', |
||||||
|
} |
||||||
|
|
||||||
|
class DatabaseQueryCommand extends DatabaseLogicCommand { |
||||||
|
operator: QUERY_COMMANDS_LITERAL | string |
||||||
|
|
||||||
|
_setFieldName(fieldName: string): DatabaseQueryCommand |
||||||
|
|
||||||
|
eq(val: any): DatabaseLogicCommand |
||||||
|
neq(val: any): DatabaseLogicCommand |
||||||
|
gt(val: any): DatabaseLogicCommand |
||||||
|
gte(val: any): DatabaseLogicCommand |
||||||
|
lt(val: any): DatabaseLogicCommand |
||||||
|
lte(val: any): DatabaseLogicCommand |
||||||
|
in(val: any[]): DatabaseLogicCommand |
||||||
|
nin(val: any[]): DatabaseLogicCommand |
||||||
|
|
||||||
|
geoNear(options: IGeoNearCommandOptions): DatabaseLogicCommand |
||||||
|
geoWithin(options: IGeoWithinCommandOptions): DatabaseLogicCommand |
||||||
|
geoIntersects( |
||||||
|
options: IGeoIntersectsCommandOptions, |
||||||
|
): DatabaseLogicCommand |
||||||
|
} |
||||||
|
|
||||||
|
enum UPDATE_COMMANDS_LITERAL { |
||||||
|
SET = 'set', |
||||||
|
REMOVE = 'remove', |
||||||
|
INC = 'inc', |
||||||
|
MUL = 'mul', |
||||||
|
PUSH = 'push', |
||||||
|
POP = 'pop', |
||||||
|
SHIFT = 'shift', |
||||||
|
UNSHIFT = 'unshift', |
||||||
|
} |
||||||
|
|
||||||
|
class DatabaseUpdateCommand { |
||||||
|
fieldName: string | InternalSymbol |
||||||
|
operator: UPDATE_COMMANDS_LITERAL |
||||||
|
operands: any[] |
||||||
|
|
||||||
|
constructor( |
||||||
|
operator: UPDATE_COMMANDS_LITERAL, |
||||||
|
operands: any[], |
||||||
|
fieldName?: string | InternalSymbol, |
||||||
|
) |
||||||
|
|
||||||
|
_setFieldName(fieldName: string): DatabaseUpdateCommand |
||||||
|
} |
||||||
|
|
||||||
|
class Batch {} |
||||||
|
|
||||||
|
/** |
||||||
|
* A contract that all API provider must adhere to |
||||||
|
*/ |
||||||
|
class APIBaseContract< |
||||||
|
PROMISE_RETURN, |
||||||
|
CALLBACK_RETURN, |
||||||
|
PARAM extends IAPIParam, |
||||||
|
CONTEXT = any |
||||||
|
> { |
||||||
|
getContext(param: PARAM): CONTEXT |
||||||
|
|
||||||
|
/** |
||||||
|
* In case of callback-style invocation, this function will be called |
||||||
|
*/ |
||||||
|
getCallbackReturn(param: PARAM, context: CONTEXT): CALLBACK_RETURN |
||||||
|
|
||||||
|
getFinalParam<T extends PARAM>(param: PARAM, context: CONTEXT): T |
||||||
|
|
||||||
|
run<T extends PARAM>(param: T): Promise<PROMISE_RETURN> |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoPointConstructor { |
||||||
|
new (longitude: number, latitide: number): GeoPoint |
||||||
|
new (geojson: IGeoJSONPoint): GeoPoint |
||||||
|
(longitude: number, latitide: number): GeoPoint |
||||||
|
(geojson: IGeoJSONPoint): GeoPoint |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoMultiPointConstructor { |
||||||
|
new (points: GeoPoint[] | IGeoJSONMultiPoint): GeoMultiPoint |
||||||
|
(points: GeoPoint[] | IGeoJSONMultiPoint): GeoMultiPoint |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoLineStringConstructor { |
||||||
|
new (points: GeoPoint[] | IGeoJSONLineString): GeoLineString |
||||||
|
(points: GeoPoint[] | IGeoJSONLineString): GeoLineString |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoMultiLineStringConstructor { |
||||||
|
new ( |
||||||
|
lineStrings: GeoLineString[] | IGeoJSONMultiLineString, |
||||||
|
): GeoMultiLineString |
||||||
|
( |
||||||
|
lineStrings: GeoLineString[] | IGeoJSONMultiLineString, |
||||||
|
): GeoMultiLineString |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoPolygonConstructor { |
||||||
|
new (lineStrings: GeoLineString[] | IGeoJSONPolygon): GeoPolygon |
||||||
|
(lineStrings: GeoLineString[] | IGeoJSONPolygon): GeoPolygon |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoMultiPolygonConstructor { |
||||||
|
new (polygons: GeoPolygon[] | IGeoJSONMultiPolygon): GeoMultiPolygon |
||||||
|
(polygons: GeoPolygon[] | IGeoJSONMultiPolygon): GeoMultiPolygon |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeo { |
||||||
|
Point: IGeoPointConstructor |
||||||
|
MultiPoint: IGeoMultiPointConstructor |
||||||
|
LineString: IGeoLineStringConstructor |
||||||
|
MultiLineString: IGeoMultiLineStringConstructor |
||||||
|
Polygon: IGeoPolygonConstructor |
||||||
|
MultiPolygon: IGeoMultiPolygonConstructor |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONPoint { |
||||||
|
type: 'Point' |
||||||
|
coordinates: [number, number] |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONMultiPoint { |
||||||
|
type: 'MultiPoint' |
||||||
|
coordinates: Array<[number, number]> |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONLineString { |
||||||
|
type: 'LineString' |
||||||
|
coordinates: Array<[number, number]> |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONMultiLineString { |
||||||
|
type: 'MultiLineString' |
||||||
|
coordinates: Array<Array<[number, number]>> |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONPolygon { |
||||||
|
type: 'Polygon' |
||||||
|
coordinates: Array<Array<[number, number]>> |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoJSONMultiPolygon { |
||||||
|
type: 'MultiPolygon' |
||||||
|
coordinates: Array<Array<Array<[number, number]>>> |
||||||
|
} |
||||||
|
|
||||||
|
type IGeoJSONObject = |
||||||
|
| IGeoJSONPoint |
||||||
|
| IGeoJSONMultiPoint |
||||||
|
| IGeoJSONLineString |
||||||
|
| IGeoJSONMultiLineString |
||||||
|
| IGeoJSONPolygon |
||||||
|
| IGeoJSONMultiPolygon |
||||||
|
|
||||||
|
abstract class GeoPoint { |
||||||
|
longitude: number |
||||||
|
latitude: number |
||||||
|
|
||||||
|
constructor(longitude: number, latitude: number) |
||||||
|
|
||||||
|
toJSON(): object |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
abstract class GeoMultiPoint { |
||||||
|
points: GeoPoint[] |
||||||
|
|
||||||
|
constructor(points: GeoPoint[]) |
||||||
|
|
||||||
|
toJSON(): IGeoJSONMultiPoint |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
abstract class GeoLineString { |
||||||
|
points: GeoPoint[] |
||||||
|
|
||||||
|
constructor(points: GeoPoint[]) |
||||||
|
|
||||||
|
toJSON(): IGeoJSONLineString |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
abstract class GeoMultiLineString { |
||||||
|
lines: GeoLineString[] |
||||||
|
|
||||||
|
constructor(lines: GeoLineString[]) |
||||||
|
|
||||||
|
toJSON(): IGeoJSONMultiLineString |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
abstract class GeoPolygon { |
||||||
|
lines: GeoLineString[] |
||||||
|
|
||||||
|
constructor(lines: GeoLineString[]) |
||||||
|
|
||||||
|
toJSON(): IGeoJSONPolygon |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
abstract class GeoMultiPolygon { |
||||||
|
polygons: GeoPolygon[] |
||||||
|
|
||||||
|
constructor(polygons: GeoPolygon[]) |
||||||
|
|
||||||
|
toJSON(): IGeoJSONMultiPolygon |
||||||
|
toString(): string |
||||||
|
} |
||||||
|
|
||||||
|
type GeoInstance = |
||||||
|
| GeoPoint |
||||||
|
| GeoMultiPoint |
||||||
|
| GeoLineString |
||||||
|
| GeoMultiLineString |
||||||
|
| GeoPolygon |
||||||
|
| GeoMultiPolygon |
||||||
|
|
||||||
|
interface IGeoNearCommandOptions { |
||||||
|
geometry: GeoPoint |
||||||
|
maxDistance?: number |
||||||
|
minDistance?: number |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoWithinCommandOptions { |
||||||
|
geometry: GeoPolygon | GeoMultiPolygon |
||||||
|
} |
||||||
|
|
||||||
|
interface IGeoIntersectsCommandOptions { |
||||||
|
geometry: |
||||||
|
| GeoPoint |
||||||
|
| GeoMultiPoint |
||||||
|
| GeoLineString |
||||||
|
| GeoMultiLineString |
||||||
|
| GeoPolygon |
||||||
|
| GeoMultiPolygon |
||||||
|
} |
||||||
|
|
||||||
|
interface IServerDateOptions { |
||||||
|
offset: number |
||||||
|
} |
||||||
|
|
||||||
|
abstract class ServerDate { |
||||||
|
readonly options: IServerDateOptions |
||||||
|
constructor(options?: IServerDateOptions) |
||||||
|
} |
||||||
|
|
||||||
|
interface IRegExpOptions { |
||||||
|
regexp: string |
||||||
|
options?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface IRegExpConstructor { |
||||||
|
new (options: IRegExpOptions): RegExp |
||||||
|
(options: IRegExpOptions): RegExp |
||||||
|
} |
||||||
|
|
||||||
|
abstract class RegExp { |
||||||
|
readonly regexp: string |
||||||
|
readonly options: string |
||||||
|
constructor(options: IRegExpOptions) |
||||||
|
} |
||||||
|
|
||||||
|
type DocumentId = string | number |
||||||
|
|
||||||
|
interface IDocumentData { |
||||||
|
_id?: DocumentId |
||||||
|
[key: string]: any |
||||||
|
} |
||||||
|
|
||||||
|
type IDBAPIParam = IAPIParam |
||||||
|
|
||||||
|
interface IAddDocumentOptions extends IDBAPIParam { |
||||||
|
data: IDocumentData |
||||||
|
} |
||||||
|
|
||||||
|
type IGetDocumentOptions = IDBAPIParam |
||||||
|
|
||||||
|
type ICountDocumentOptions = IDBAPIParam |
||||||
|
|
||||||
|
interface IUpdateDocumentOptions extends IDBAPIParam { |
||||||
|
data: IUpdateCondition |
||||||
|
} |
||||||
|
|
||||||
|
interface IUpdateSingleDocumentOptions extends IDBAPIParam { |
||||||
|
data: IUpdateCondition |
||||||
|
} |
||||||
|
|
||||||
|
interface ISetDocumentOptions extends IDBAPIParam { |
||||||
|
data: IUpdateCondition |
||||||
|
} |
||||||
|
|
||||||
|
interface ISetSingleDocumentOptions extends IDBAPIParam { |
||||||
|
data: IUpdateCondition |
||||||
|
} |
||||||
|
|
||||||
|
interface IRemoveDocumentOptions extends IDBAPIParam { |
||||||
|
query: IQueryCondition |
||||||
|
} |
||||||
|
|
||||||
|
type IRemoveSingleDocumentOptions = IDBAPIParam |
||||||
|
|
||||||
|
interface IQueryCondition { |
||||||
|
[key: string]: any |
||||||
|
} |
||||||
|
|
||||||
|
type IStringQueryCondition = string |
||||||
|
|
||||||
|
interface IQueryResult extends IAPISuccessParam { |
||||||
|
data: IDocumentData[] |
||||||
|
} |
||||||
|
|
||||||
|
interface IQuerySingleResult extends IAPISuccessParam { |
||||||
|
data: IDocumentData |
||||||
|
} |
||||||
|
|
||||||
|
interface IUpdateCondition { |
||||||
|
[key: string]: any |
||||||
|
} |
||||||
|
|
||||||
|
type IStringUpdateCondition = string |
||||||
|
|
||||||
|
interface IAddResult extends IAPISuccessParam { |
||||||
|
_id: DocumentId |
||||||
|
} |
||||||
|
|
||||||
|
interface IUpdateResult extends IAPISuccessParam { |
||||||
|
stats: { |
||||||
|
updated: number, |
||||||
|
// created: number,
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface ISetResult extends IAPISuccessParam { |
||||||
|
_id: DocumentId |
||||||
|
stats: { |
||||||
|
updated: number |
||||||
|
created: number, |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface IRemoveResult extends IAPISuccessParam { |
||||||
|
stats: { |
||||||
|
removed: number, |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface ICountResult extends IAPISuccessParam { |
||||||
|
total: number |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
type Optional<T> = { [K in keyof T]+?: T[K] } |
||||||
|
|
||||||
|
type OQ< |
||||||
|
T extends Optional< |
||||||
|
Record<'complete' | 'success' | 'fail', (...args: any[]) => any> |
||||||
|
> |
||||||
|
> = |
||||||
|
| (RQ<T> & Required<Pick<T, 'success'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'fail'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'complete'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'success' | 'fail'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'success' | 'complete'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'fail' | 'complete'>>) |
||||||
|
| (RQ<T> & Required<Pick<T, 'fail' | 'complete' | 'success'>>) |
||||||
|
|
||||||
|
type RQ< |
||||||
|
T extends Optional< |
||||||
|
Record<'complete' | 'success' | 'fail', (...args: any[]) => any> |
||||||
|
> |
||||||
|
> = Pick<T, Exclude<keyof T, 'complete' | 'success' | 'fail'>> |
@ -0,0 +1,381 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
declare namespace WechatMiniprogram { |
||||||
|
namespace Component { |
||||||
|
type Instance< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends Partial<MethodOption> |
||||||
|
> = InstanceProperties & |
||||||
|
InstanceMethods<TData> & |
||||||
|
TMethod & { |
||||||
|
/** 组件数据,**包括内部数据和属性值** */ |
||||||
|
data: TData & PropertyOptionToData<TProperty> |
||||||
|
/** 组件数据,**包括内部数据和属性值**(与 `data` 一致) */ |
||||||
|
properties: TData & PropertyOptionToData<TProperty>, |
||||||
|
} |
||||||
|
type TrivialInstance = Instance<IAnyObject, IAnyObject, IAnyObject> |
||||||
|
type TrivialOption = Options<IAnyObject, IAnyObject, IAnyObject> |
||||||
|
type Options< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends MethodOption |
||||||
|
> = Partial<Data<TData>> & |
||||||
|
Partial<Property<TProperty>> & |
||||||
|
Partial<Method<TMethod>> & |
||||||
|
Partial<OtherOption> & |
||||||
|
Partial<Lifetimes> & |
||||||
|
ThisType<Instance<TData, TProperty, TMethod>> |
||||||
|
interface Constructor { |
||||||
|
< |
||||||
|
TData extends DataOption, |
||||||
|
TProperty extends PropertyOption, |
||||||
|
TMethod extends MethodOption |
||||||
|
>( |
||||||
|
options: Options<TData, TProperty, TMethod>, |
||||||
|
): string |
||||||
|
} |
||||||
|
type DataOption = Record<string, any> |
||||||
|
type PropertyOption = Record<string, AllProperty> |
||||||
|
type MethodOption = Record<string, (...args: any[]) => any> |
||||||
|
|
||||||
|
interface Data<D extends DataOption> { |
||||||
|
/** 组件的内部数据,和 `properties` 一同用于组件的模板渲染 */ |
||||||
|
data?: D |
||||||
|
} |
||||||
|
interface Property<P extends PropertyOption> { |
||||||
|
/** 组件的对外属性,是属性名到属性设置的映射表 */ |
||||||
|
properties: P |
||||||
|
} |
||||||
|
interface Method<M extends MethodOption> { |
||||||
|
/** object组件的方法,包括事件响应函数和任意的自定义方法,关于事件响应函数的使用,参见 [组件事件](events.md) */ |
||||||
|
|
||||||
|
methods: M |
||||||
|
} |
||||||
|
type PropertyType = |
||||||
|
| StringConstructor |
||||||
|
| NumberConstructor |
||||||
|
| BooleanConstructor |
||||||
|
| ArrayConstructor |
||||||
|
| ObjectConstructor |
||||||
|
| null |
||||||
|
type ValueType<T extends PropertyType> = T extends StringConstructor |
||||||
|
? string |
||||||
|
: T extends NumberConstructor |
||||||
|
? number |
||||||
|
: T extends BooleanConstructor |
||||||
|
? boolean |
||||||
|
: T extends ArrayConstructor |
||||||
|
? any[] |
||||||
|
: T extends ObjectConstructor ? IAnyObject : any |
||||||
|
interface FullProperty<T extends PropertyType> { |
||||||
|
/** 属性类型 */ |
||||||
|
type: T |
||||||
|
/** 属性初始值 */ |
||||||
|
value?: ValueType<T> |
||||||
|
/** 属性值被更改时的响应函数 */ |
||||||
|
observer?( |
||||||
|
newVal: ValueType<T>, |
||||||
|
oldVal: ValueType<T>, |
||||||
|
changedPath: Array<string | number>, |
||||||
|
): void |
||||||
|
/** 属性的类型(可以指定多个) */ |
||||||
|
optionalTypes?: ShortProperty[] |
||||||
|
} |
||||||
|
type AllFullProperty = |
||||||
|
| FullProperty<StringConstructor> |
||||||
|
| FullProperty<NumberConstructor> |
||||||
|
| FullProperty<BooleanConstructor> |
||||||
|
| FullProperty<ArrayConstructor> |
||||||
|
| FullProperty<ObjectConstructor> |
||||||
|
| FullProperty<null> |
||||||
|
type ShortProperty = |
||||||
|
| StringConstructor |
||||||
|
| NumberConstructor |
||||||
|
| BooleanConstructor |
||||||
|
| ArrayConstructor |
||||||
|
| ObjectConstructor |
||||||
|
| null |
||||||
|
type AllProperty = AllFullProperty | ShortProperty |
||||||
|
type PropertyToData<T extends AllProperty> = T extends ShortProperty |
||||||
|
? ValueType<T> |
||||||
|
: FullPropertyToData<Exclude<T, ShortProperty>> |
||||||
|
type FullPropertyToData<T extends AllFullProperty> = ValueType< |
||||||
|
T['type'] |
||||||
|
> |
||||||
|
type PropertyOptionToData<P extends PropertyOption> = { |
||||||
|
[name in keyof P]: PropertyToData<P[name]> |
||||||
|
} |
||||||
|
|
||||||
|
interface InstanceProperties { |
||||||
|
/** 组件的文件路径 */ |
||||||
|
is: string |
||||||
|
/** 节点id */ |
||||||
|
id: string |
||||||
|
/** 节点dataset */ |
||||||
|
dataset: Record<string, string> |
||||||
|
} |
||||||
|
|
||||||
|
interface InstanceMethods<D extends DataOption> { |
||||||
|
/** `setData` 函数用于将数据从逻辑层发送到视图层 |
||||||
|
*(异步),同时改变对应的 `this.data` 的值(同步)。 |
||||||
|
* |
||||||
|
* **注意:** |
||||||
|
* |
||||||
|
* 1. **直接修改 this.data 而不调用 this.setData 是无法改变页面的状态的,还会造成数据不一致**。 |
||||||
|
* 1. 仅支持设置可 JSON 化的数据。 |
||||||
|
* 1. 单次设置的数据不能超过1024kB,请尽量避免一次设置过多的数据。 |
||||||
|
* 1. 请不要把 data 中任何一项的 value 设为 `undefined` ,否则这一项将不被设置并可能遗留一些潜在问题。 |
||||||
|
*/ |
||||||
|
setData( |
||||||
|
/** 这次要改变的数据 |
||||||
|
* |
||||||
|
* 以 `key: value` 的形式表示,将 `this.data` 中的 `key` 对应的值改变成 `value`。 |
||||||
|
* |
||||||
|
* 其中 `key` 可以以数据路径的形式给出,支持改变数组中的某一项或对象的某个属性,如 `array[2].message`,`a.b.c.d`,并且不需要在 this.data 中预先定义。 |
||||||
|
*/ |
||||||
|
data: Partial<D> & IAnyObject, |
||||||
|
/** setData引起的界面更新渲染完毕后的回调函数,最低基础库: `1.5.0` */ |
||||||
|
callback?: () => void, |
||||||
|
): void |
||||||
|
|
||||||
|
/** 检查组件是否具有 `behavior` (检查时会递归检查被直接或间接引入的所有behavior) */ |
||||||
|
hasBehavior(behavior: object): void |
||||||
|
/** 触发事件,参见组件事件 */ |
||||||
|
triggerEvent( |
||||||
|
name: string, |
||||||
|
detail?: object, |
||||||
|
options?: TriggerEventOption, |
||||||
|
): void |
||||||
|
/** 创建一个 SelectorQuery 对象,选择器选取范围为这个组件实例内 */ |
||||||
|
createSelectorQuery(): SelectorQuery |
||||||
|
/** 创建一个 IntersectionObserver 对象,选择器选取范围为这个组件实例内 */ |
||||||
|
createIntersectionObserver( |
||||||
|
options: CreateIntersectionObserverOption, |
||||||
|
): IntersectionObserver |
||||||
|
/** 使用选择器选择组件实例节点,返回匹配到的第一个组件实例对象(会被 `wx://component-export` 影响) */ |
||||||
|
selectComponent(selector: string): TrivialInstance |
||||||
|
/** 使用选择器选择组件实例节点,返回匹配到的全部组件实例对象组成的数组 */ |
||||||
|
selectAllComponents(selector: string): TrivialInstance[] |
||||||
|
/** 获取这个关系所对应的所有关联节点,参见 组件间关系 */ |
||||||
|
getRelationNodes(relationKey: string): TrivialInstance[] |
||||||
|
/** 立刻执行 callback ,其中的多个 setData 之间不会触发界面绘制(只有某些特殊场景中需要,如用于在不同组件同时 setData 时进行界面绘制同步)*/ |
||||||
|
groupSetData(callback?: () => void): void |
||||||
|
/** 返回当前页面的 custom-tab-bar 的组件实例 */ |
||||||
|
getTabBar(): TrivialInstance |
||||||
|
/** 返回页面标识符(一个字符串),可以用来判断几个自定义组件实例是不是在同一个页面内 */ |
||||||
|
getPageId(): string |
||||||
|
} |
||||||
|
|
||||||
|
interface ComponentOptions { |
||||||
|
/** |
||||||
|
* [启用多slot支持](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件wxml的slot)
|
||||||
|
*/ |
||||||
|
multipleSlots?: boolean |
||||||
|
/** |
||||||
|
* [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
|
||||||
|
*/ |
||||||
|
addGlobalClass?: boolean |
||||||
|
/** |
||||||
|
* [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
|
||||||
|
*/ |
||||||
|
styleIsolation?: |
||||||
|
| 'isolated' |
||||||
|
| 'apply-shared' |
||||||
|
| 'shared' |
||||||
|
| 'page-isolated' |
||||||
|
| 'page-apply-shared' |
||||||
|
| 'page-shared' |
||||||
|
} |
||||||
|
|
||||||
|
interface TriggerEventOption { |
||||||
|
/** 事件是否冒泡 |
||||||
|
* |
||||||
|
* 默认值: `false` |
||||||
|
*/ |
||||||
|
bubbles?: boolean |
||||||
|
/** 事件是否可以穿越组件边界,为false时,事件将只能在引用组件的节点树上触发,不进入其他任何组件内部 |
||||||
|
* |
||||||
|
* 默认值: `false` |
||||||
|
*/ |
||||||
|
composed?: boolean |
||||||
|
/** 事件是否拥有捕获阶段 |
||||||
|
* |
||||||
|
* 默认值: `false` |
||||||
|
*/ |
||||||
|
capturePhase?: boolean |
||||||
|
} |
||||||
|
|
||||||
|
interface RelationOption { |
||||||
|
/** 目标组件的相对关系 */ |
||||||
|
type: 'parent' | 'child' | 'ancestor' | 'descendant' |
||||||
|
/** 关系生命周期函数,当关系被建立在页面节点树中时触发,触发时机在组件attached生命周期之后 */ |
||||||
|
linked?(target: TrivialInstance): void |
||||||
|
/** 关系生命周期函数,当关系在页面节点树中发生改变时触发,触发时机在组件moved生命周期之后 */ |
||||||
|
linkChanged?(target: TrivialInstance): void |
||||||
|
/** 关系生命周期函数,当关系脱离页面节点树时触发,触发时机在组件detached生命周期之后 */ |
||||||
|
unlinked?(target: TrivialInstance): void |
||||||
|
/** 如果这一项被设置,则它表示关联的目标节点所应具有的behavior,所有拥有这一behavior的组件节点都会被关联 */ |
||||||
|
target?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface PageLifetimes { |
||||||
|
/** 页面生命周期回调—监听页面显示 |
||||||
|
* |
||||||
|
* 页面显示/切入前台时触发。 |
||||||
|
*/ |
||||||
|
show(): void |
||||||
|
/** 页面生命周期回调—监听页面隐藏 |
||||||
|
* |
||||||
|
* 页面隐藏/切入后台时触发。 如 `navigateTo` 或底部 `tab` 切换到其他页面,小程序切入后台等。 |
||||||
|
*/ |
||||||
|
hide(): void |
||||||
|
/** 页面生命周期回调—监听页面尺寸变化 |
||||||
|
* |
||||||
|
* 所在页面尺寸变化时执行 |
||||||
|
*/ |
||||||
|
resize(size: Page.IResizeOption): void |
||||||
|
} |
||||||
|
|
||||||
|
type DefinitionFilter = <T extends TrivialOption>( |
||||||
|
/** 使用该 behavior 的 component/behavior 的定义对象 */ |
||||||
|
defFields: T, |
||||||
|
/** 该 behavior 所使用的 behavior 的 definitionFilter 函数列表 */ |
||||||
|
definitionFilterArr?: DefinitionFilter[], |
||||||
|
) => void |
||||||
|
|
||||||
|
interface Lifetimes { |
||||||
|
/** 组件生命周期声明对象,组件的生命周期:`created`、`attached`、`ready`、`moved`、`detached` 将收归到 `lifetimes` 字段内进行声明,原有声明方式仍旧有效,如同时存在两种声明方式,则 `lifetimes` 字段内声明方式优先级最高 |
||||||
|
* |
||||||
|
* 最低基础库: `2.2.3` */ |
||||||
|
lifetimes: Partial<{ |
||||||
|
/** |
||||||
|
* 在组件实例刚刚被创建时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
created(): void |
||||||
|
/** |
||||||
|
* 在组件实例进入页面节点树时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
attached(): void |
||||||
|
/** |
||||||
|
* 在组件在视图层布局完成后执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
ready(): void |
||||||
|
/** |
||||||
|
* 在组件实例被移动到节点树另一个位置时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
moved(): void |
||||||
|
/** |
||||||
|
* 在组件实例被从页面节点树移除时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
detached(): void |
||||||
|
/** |
||||||
|
* 每当组件方法抛出错误时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`2.4.1`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
error(err: Error): void, |
||||||
|
}> |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 在组件实例刚刚被创建时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
created(): void |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 在组件实例进入页面节点树时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
attached(): void |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 在组件在视图层布局完成后执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
ready(): void |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 在组件实例被移动到节点树另一个位置时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
moved(): void |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 在组件实例被从页面节点树移除时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
detached(): void |
||||||
|
/** |
||||||
|
* @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义 |
||||||
|
* |
||||||
|
* 每当组件方法抛出错误时执行 |
||||||
|
* |
||||||
|
* 最低基础库版本:[`2.4.1`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
|
||||||
|
*/ |
||||||
|
error(err: Error): void |
||||||
|
} |
||||||
|
|
||||||
|
interface OtherOption { |
||||||
|
/** 类似于mixins和traits的组件间代码复用机制,参见 [behaviors](behaviors.md) */ |
||||||
|
behaviors: string[] |
||||||
|
/** 组件数据字段监听器,用于监听 properties 和 data 的变化 */ |
||||||
|
observers: Record<string, (...args: any[]) => any> |
||||||
|
/** 组件间关系定义,参见 [组件间关系](relations.md) */ |
||||||
|
relations: { |
||||||
|
[componentName: string]: RelationOption, |
||||||
|
} |
||||||
|
/** 组件接受的外部样式类,参见 [外部样式类](wxml-wxss.md) */ |
||||||
|
externalClasses?: string[] |
||||||
|
/** 组件所在页面的生命周期声明对象,目前仅支持页面的 `show` 和 `hide` 两个生命周期 |
||||||
|
* |
||||||
|
* 最低基础库: `2.2.3` */ |
||||||
|
pageLifetimes?: Partial<PageLifetimes> |
||||||
|
/** 一些选项(文档中介绍相关特性时会涉及具体的选项设置,这里暂不列举) */ |
||||||
|
options: ComponentOptions |
||||||
|
|
||||||
|
/** 定义段过滤器,用于自定义组件扩展,参见 [自定义组件扩展](extend.md) |
||||||
|
* |
||||||
|
* 最低基础库: `2.2.3` */ |
||||||
|
definitionFilter?: DefinitionFilter |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
/** Component构造器可用于定义组件,调用Component构造器时可以指定组件的属性、数据、方法等。 |
||||||
|
* |
||||||
|
* * 使用 `this.data` 可以获取内部数据和属性值,但不要直接修改它们,应使用 `setData` 修改。 |
||||||
|
* * 生命周期函数无法在组件方法中通过 `this` 访问到。 |
||||||
|
* * 属性名应避免以 data 开头,即不要命名成 `dataXyz` 这样的形式,因为在 WXML 中, `data-xyz=""` 会被作为节点 dataset 来处理,而不是组件属性。 |
||||||
|
* * 在一个组件的定义和使用时,组件的属性名和 data 字段相互间都不能冲突(尽管它们位于不同的定义段中)。 |
||||||
|
* * 从基础库 `2.0.9` 开始,对象类型的属性和 data 字段中可以包含函数类型的子字段,即可以通过对象类型的属性字段来传递函数。低于这一版本的基础库不支持这一特性。 |
||||||
|
* * `bug` : 对于 type 为 Object 或 Array 的属性,如果通过该组件自身的 `this.setData` 来改变属性值的一个子字段,则依旧会触发属性 observer ,且 observer 接收到的 `newVal` 是变化的那个子字段的值, `oldVal` 为空, `changedPath` 包含子字段的字段名相关信息。 |
||||||
|
*/ |
||||||
|
declare const Component: WechatMiniprogram.Component.Constructor |
@ -0,0 +1,212 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) 2019 Tencent, Inc. All rights reserved. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
declare namespace WechatMiniprogram { |
||||||
|
namespace Page { |
||||||
|
type Instance< |
||||||
|
TData extends DataOption, |
||||||
|
TCustom extends CustomOption |
||||||
|
> = OptionalInterface<ILifetime> & |
||||||
|
InstanceProperties & |
||||||
|
InstanceMethods<TData> & |
||||||
|
Data<TData> & |
||||||
|
TCustom |
||||||
|
type Options< |
||||||
|
TData extends DataOption, |
||||||
|
TCustom extends CustomOption |
||||||
|
> = (TCustom & Partial<Data<TData>> & Partial<ILifetime>) & |
||||||
|
ThisType<Instance<TData, TCustom>> |
||||||
|
type TrivialInstance = Instance<IAnyObject, IAnyObject> |
||||||
|
interface Constructor { |
||||||
|
<TData extends DataOption, TCustom extends CustomOption>( |
||||||
|
options: Options<TData, TCustom>, |
||||||
|
): void |
||||||
|
} |
||||||
|
interface ILifetime { |
||||||
|
/** 生命周期回调—监听页面加载 |
||||||
|
* |
||||||
|
* 页面加载时触发。一个页面只会调用一次,可以在 onLoad 的参数中获取打开当前页面路径中的参数。 |
||||||
|
*/ |
||||||
|
onLoad( |
||||||
|
/** 打开当前页面路径中的参数 */ |
||||||
|
query: Record<string, string | undefined>, |
||||||
|
): void |
||||||
|
/** 生命周期回调—监听页面显示 |
||||||
|
* |
||||||
|
* 页面显示/切入前台时触发。 |
||||||
|
*/ |
||||||
|
onShow(): void |
||||||
|
/** 生命周期回调—监听页面初次渲染完成 |
||||||
|
* |
||||||
|
* 页面初次渲染完成时触发。一个页面只会调用一次,代表页面已经准备妥当,可以和视图层进行交互。 |
||||||
|
* |
||||||
|
|
||||||
|
* 注意:对界面内容进行设置的 API 如`wx.setNavigationBarTitle`,请在`onReady`之后进行。 |
||||||
|
*/ |
||||||
|
onReady(): void |
||||||
|
/** 生命周期回调—监听页面隐藏 |
||||||
|
* |
||||||
|
* 页面隐藏/切入后台时触发。 如 `navigateTo` 或底部 `tab` 切换到其他页面,小程序切入后台等。 |
||||||
|
*/ |
||||||
|
onHide(): void |
||||||
|
/** 生命周期回调—监听页面卸载 |
||||||
|
* |
||||||
|
* 页面卸载时触发。如`redirectTo`或`navigateBack`到其他页面时。 |
||||||
|
*/ |
||||||
|
onUnload(): void |
||||||
|
/** 监听用户下拉动作 |
||||||
|
* |
||||||
|
* 监听用户下拉刷新事件。 |
||||||
|
* - 需要在`app.json`的`window`选项中或页面配置中开启`enablePullDownRefresh`。 |
||||||
|
* - 可以通过`wx.startPullDownRefresh`触发下拉刷新,调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。 |
||||||
|
* - 当处理完数据刷新后,`wx.stopPullDownRefresh`可以停止当前页面的下拉刷新。 |
||||||
|
*/ |
||||||
|
onPullDownRefresh(): void |
||||||
|
/** 页面上拉触底事件的处理函数 |
||||||
|
* |
||||||
|
* 监听用户上拉触底事件。 |
||||||
|
* - 可以在`app.json`的`window`选项中或页面配置中设置触发距离`onReachBottomDistance`。 |
||||||
|
* - 在触发距离内滑动期间,本事件只会被触发一次。 |
||||||
|
*/ |
||||||
|
onReachBottom(): void |
||||||
|
/** 用户点击右上角转发 |
||||||
|
* |
||||||
|
* 监听用户点击页面内转发按钮(`<button>` 组件 `open-type="share"`)或右上角菜单“转发”按钮的行为,并自定义转发内容。 |
||||||
|
* |
||||||
|
* **注意:只有定义了此事件处理函数,右上角菜单才会显示“转发”按钮** |
||||||
|
* |
||||||
|
* 此事件需要 return 一个 Object,用于自定义转发内容 |
||||||
|
*/ |
||||||
|
onShareAppMessage( |
||||||
|
/** 分享发起来源参数 */ |
||||||
|
options: IShareAppMessageOption, |
||||||
|
): ICustomShareContent |
||||||
|
/** 页面滚动触发事件的处理函数 |
||||||
|
* |
||||||
|
* 监听用户滑动页面事件。 |
||||||
|
*/ |
||||||
|
onPageScroll( |
||||||
|
/** 页面滚动参数 */ |
||||||
|
options: IPageScrollOption, |
||||||
|
): void |
||||||
|
|
||||||
|
/** 当前是 tab 页时,点击 tab 时触发,最低基础库: `1.9.0` */ |
||||||
|
onTabItemTap( |
||||||
|
/** tab 点击参数 */ |
||||||
|
options: ITabItemTapOption, |
||||||
|
): void |
||||||
|
|
||||||
|
/** 窗口尺寸改变时触发,最低基础库:`2.4.0` */ |
||||||
|
onResize( |
||||||
|
/** 窗口尺寸参数 */ |
||||||
|
options: IResizeOption, |
||||||
|
): void |
||||||
|
} |
||||||
|
interface InstanceProperties { |
||||||
|
/** 页面的文件路径 */ |
||||||
|
is: string |
||||||
|
|
||||||
|
/** 到当前页面的路径 */ |
||||||
|
route: string |
||||||
|
} |
||||||
|
|
||||||
|
type DataOption = Record<string, any> |
||||||
|
type CustomOption = Record<string, any> |
||||||
|
|
||||||
|
type InstanceMethods<D extends DataOption> = Component.InstanceMethods< |
||||||
|
D |
||||||
|
> & { |
||||||
|
getOpenerEventChannel(): EventChannel, |
||||||
|
} |
||||||
|
|
||||||
|
interface Data<D extends DataOption> { |
||||||
|
/** 页面的初始数据 |
||||||
|
* |
||||||
|
* `data` 是页面第一次渲染使用的**初始数据**。 |
||||||
|
* |
||||||
|
* 页面加载时,`data` 将会以`JSON`字符串的形式由逻辑层传至渲染层,因此`data`中的数据必须是可以转成`JSON`的类型:字符串,数字,布尔值,对象,数组。 |
||||||
|
* |
||||||
|
* 渲染层可以通过 `WXML` 对数据进行绑定。 |
||||||
|
*/ |
||||||
|
data: D |
||||||
|
} |
||||||
|
|
||||||
|
interface ICustomShareContent { |
||||||
|
/** 转发标题。默认值:当前小程序名称 */ |
||||||
|
title?: string |
||||||
|
/** 转发路径,必须是以 / 开头的完整路径。默认值:当前页面 path */ |
||||||
|
path?: string |
||||||
|
/** 自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径。支持PNG及JPG。显示图片长宽比是 5:4,最低基础库: `1.5.0`。默认值:使用默认截图 */ |
||||||
|
imageUrl?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface IPageScrollOption { |
||||||
|
/** 页面在垂直方向已滚动的距离(单位px) */ |
||||||
|
scrollTop: number |
||||||
|
} |
||||||
|
|
||||||
|
interface IShareAppMessageOption { |
||||||
|
/** 转发事件来源。 |
||||||
|
* |
||||||
|
* 可选值: |
||||||
|
* - `button`:页面内转发按钮; |
||||||
|
* - `menu`:右上角转发菜单。 |
||||||
|
* |
||||||
|
* 最低基础库: `1.2.4` |
||||||
|
*/ |
||||||
|
from: 'button' | 'menu' | string |
||||||
|
/** 如果 `from` 值是 `button`,则 `target` 是触发这次转发事件的 `button`,否则为 `undefined` |
||||||
|
* |
||||||
|
* 最低基础库: `1.2.4` */ |
||||||
|
target: any |
||||||
|
/** 页面中包含`<web-view>`组件时,返回当前`<web-view>`的url |
||||||
|
* |
||||||
|
* 最低基础库: `1.6.4` |
||||||
|
*/ |
||||||
|
webViewUrl?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface ITabItemTapOption { |
||||||
|
/** 被点击tabItem的序号,从0开始,最低基础库: `1.9.0` */ |
||||||
|
index: string |
||||||
|
/** 被点击tabItem的页面路径,最低基础库: `1.9.0` */ |
||||||
|
pagePath: string |
||||||
|
/** 被点击tabItem的按钮文字,最低基础库: `1.9.0` */ |
||||||
|
text: string |
||||||
|
} |
||||||
|
|
||||||
|
interface IResizeOption { |
||||||
|
size: { |
||||||
|
/** 变化后的窗口宽度,单位 px */ |
||||||
|
windowWidth: number |
||||||
|
/** 变化后的窗口高度,单位 px */ |
||||||
|
windowHeight: number, |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface getCurrentPages { |
||||||
|
(): Array<Instance<IAnyObject, IAnyObject>> |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 注册小程序中的一个页面。接受一个 `Object` 类型参数,其指定页面的初始数据、生命周期回调、事件处理函数等。 |
||||||
|
*/ |
||||||
|
declare const Page: WechatMiniprogram.Page.Constructor |
||||||
|
/** |
||||||
|
* 获取当前页面栈。数组中第一个元素为首页,最后一个元素为当前页面。 |
||||||
|
|
||||||
|
* __注意:__ |
||||||
|
|
||||||
|
* - __不要尝试修改页面栈,会导致路由以及页面状态错误。__ |
||||||
|
* - 不要在 `App.onLaunch` 的时候调用 `getCurrentPages()`,此时 `page` 还没有生成。 |
||||||
|
*/ |
||||||
|
declare const getCurrentPages: WechatMiniprogram.Page.getCurrentPages |
@ -0,0 +1,4 @@ |
|||||||
|
{ |
||||||
|
"name": "miniprogram-api-typings", |
||||||
|
"main": "index.d.ts" |
||||||
|
} |
@ -0,0 +1,15 @@ |
|||||||
|
{ |
||||||
|
"name": "miniprogram-ts-less-quickstart", |
||||||
|
"version": "1.0.0", |
||||||
|
"description": "", |
||||||
|
"scripts": { |
||||||
|
}, |
||||||
|
"keywords": [], |
||||||
|
"author": "", |
||||||
|
"license": "", |
||||||
|
"dependencies": { |
||||||
|
}, |
||||||
|
"devDependencies": { |
||||||
|
"miniprogram-api-typings": "^2.8.3-1" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,17 @@ |
|||||||
|
{ |
||||||
|
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages |
||||||
|
{ |
||||||
|
"path": "pages/index/index", |
||||||
|
"style": { |
||||||
|
"navigationBarTitleText": "" |
||||||
|
} |
||||||
|
} |
||||||
|
], |
||||||
|
"globalStyle": { |
||||||
|
"navigationBarTextStyle": "black", |
||||||
|
"navigationBarTitleText": "uni-app", |
||||||
|
"navigationBarBackgroundColor": "#ffffff", |
||||||
|
"backgroundColor": "#F8F8F8" |
||||||
|
}, |
||||||
|
"uniIdRouter": {} |
||||||
|
} |
@ -0,0 +1,224 @@ |
|||||||
|
<template> |
||||||
|
<view class="content" :style="setbgStyle()"> |
||||||
|
<scroll-view scroll-y style="max-height: 100vh" :show-scrollbar="false" @scroll="srcollto"> |
||||||
|
<my-container> |
||||||
|
<view style="padding: 20px; display: flex; flex-flow: column; height: 100%; gap: 10px"> |
||||||
|
<view class="animated flipInX delay-5s" style="display: flex; flex-flow: column nowrap; justify-content: center; align-items: center; height: 25%; gap: 48px"> |
||||||
|
<image src="../../static/images/logo.png" mode="" style="width: 146.761px; height: 139.2px"></image> |
||||||
|
</view> |
||||||
|
<view style="text-indent: 2em; font-size: 18px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
锦州昊鼎创新科技有限公司是一家专注于硬件、软件研发与创新的高科技企业,公司成立于2024年,公司位于锦州数字经济产业园。汇聚了优秀的管理人才和专业技术队伍,搭建了强大的自营服务体系和渠道网络在公安刑侦软件领域,包括刑事案件管理系统、犯罪数据分析平台、智能侦查辅助软件等的研发与技术支持。在医疗软件方面,经营范围涵盖医院信息管理系统、电子病历软件、检验设备、医疗影像存储与传输系统等的开发与维护。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="padding: 20px; display: flex; flex-flow: column; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image src="../../static/images/s2.png" mode="" style="height: 182.942px; width: 272.415px"></image> |
||||||
|
<view style="font-size: 20px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">使命</span> |
||||||
|
致力于通过创新的软件技术,提升客户业务效率,推动行业发展,为社会创造价值。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 20px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">愿景</span> |
||||||
|
成为全球领先的软件研发企业,以卓越的产品和服务塑造软件行业新标杆。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 20px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">文化</span> |
||||||
|
公司始终秉持 “用心 学习 实干 创新” 为企业文化理念。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s3${index + 1}.png`" mode="" v-for="(item, index) in 6" :key="index" style="width: 150px; height: 180px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 10px 20px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<view style="font-size: large; font-weight: bold; letter-spacing: 2px">公安刑侦系统</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">刑事案件管理系统</span> |
||||||
|
规范案件流程,实现案件信息的高效管理和跟踪。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">犯罪数据分析平台</span> |
||||||
|
利用大数据和人工智能技术,挖掘犯罪线索,辅助案件侦破。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">智能侦查辅助软件</span> |
||||||
|
为公安干警提供智能化的侦查工具,提高破案效率。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">案件管理功能</span> |
||||||
|
提供案件侦查(受理、立案、侦查、破案和侦查终结)全过程的管理、控制和监督。可以便捷地记录案件的基本信息、涉案人员信息、案件进展情况等,方便刑侦人员随时查看和更新案件状态。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">情报信息整合</span> |
||||||
|
能够整合各种刑侦情报信息,包括线索、举报信息、犯罪嫌疑人的活动轨迹等。通过对这些情报的分析和挖掘,可以为案件侦破提供有力的支持。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">刑事技术信息支持</span> |
||||||
|
与刑事技术部门的信息系统相连接,能够获取和管理刑事技术方面的信息,系统可以帮助刑侦人员快速准确地获取和应用这些技术信息。 |
||||||
|
</view> |
||||||
|
<view style="font-size: 14px; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">辅助决策功能</span> |
||||||
|
基于系统中存储的大量案件数据和情报信息,为领导提供辅助决策支持。根据案件的进展情况和资源需求,为领导合理调配警力和资源提供建议。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: column; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s4${index + 1}.png`" mode="" v-for="(item, index) in 4" :key="index" style="width: 303px; height: 200px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view |
||||||
|
style=" |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 10px 20px; |
||||||
|
display: flex; |
||||||
|
flex-flow: column nowrap; |
||||||
|
justify-content: center; |
||||||
|
align-items: center; |
||||||
|
height: 100%; |
||||||
|
gap: 24px; |
||||||
|
align-content: flex-start; |
||||||
|
" |
||||||
|
> |
||||||
|
<view style="font-size: large; font-weight: bold; letter-spacing: 2px">医疗软件</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">医院信息管理系统</span> |
||||||
|
整合医院各项业务流程,提高管理效率和服务质量。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">电子病历软件</span> |
||||||
|
确保影像数据的安全存储和快速传输,为诊断提供准确依据。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">医疗影像存储与传输系统</span> |
||||||
|
为公安干警提供智能化的侦查工具,提高破案效率。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">医疗检验系统</span> |
||||||
|
专为医院检验科设计的,集样本管理、检验流程管理、数据管理与分析、设备管理及质量控制等功能于一体的实验室信息管理系统。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: column; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s5${index + 1}.png`" mode="" v-for="(item, index) in 6" :key="index" style="width: 303px; height: 200px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 10px 20px; display: flex; flex-flow: column nowrap; justify-content: center; align-items: center; height: 100%; gap: 48px"> |
||||||
|
<view style="font-size: large; font-weight: bold; letter-spacing: 2px">技术实力</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">技术团队</span> |
||||||
|
公司拥有一支由经验丰富的软件工程师、设计师、测试人员组成的专业团队。团队成员具备扎实的技术功底和丰富的项目经验,能够熟练运用各种前沿技术进行软件开发。不断进行技术培训和学习,紧跟行业技术发展趋势,确保公司始终处于技术前沿。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">技术创新</span> |
||||||
|
积极关注行业技术发展动态,不断投入研发资源,进行技术创新。与高校保持密切合作,共同开展前沿技术研究和项目合作。公司在人工智能、大数据、云计算等领域进行了深入探索,并将这些技术应用到软件产品中,为客户提供更智能、更高效的解决方案。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: column; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s6${index + 1}.png`" mode="" v-for="(item, index) in 2" :key="index" style="width: 303px; height: 200px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 10px 20px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<view style="font-size: large; font-weight: bold; letter-spacing: 2px">服务优势</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">定制化服务</span> |
||||||
|
深入了解客户需求,为客户提供个性化的软件解决方案。从需求分析、设计、开发到测试、上线和维护,全程为客户提供专业的服务。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">质量保证体系</span> |
||||||
|
建立了严格的质量管理体系,从需求分析、设计、开发、测试到上线维护,每个环节都进行严格的质量控制。采用先进的测试工具和方法,进行功能测试、性能测试、安全测试等多方面的测试,确保软件系统的稳定性、可靠性和安全性。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">项目管理</span> |
||||||
|
采用先进的项目管理方法,确保项目按时、按质完成。项目团队与客户保持密切沟通,及时反馈项目进展情况,确保客户对项目的满意度。 |
||||||
|
</view> |
||||||
|
<view style="font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
<span style="font-weight: bold">售后服务</span> |
||||||
|
提供完善的售后服务,包括软件维护、升级、技术支持等。公司设立了专门的客服团队,随时为客户解决软件使用过程中遇到的问题。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s7${index + 1}.png`" mode="" v-for="(item, index) in 6" :key="index" style="width: 150px; height: 200px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="box-sizing: border-box; padding: 20px; display: flex; flex-flow: row wrap; justify-content: center; align-items: center; height: 100%; gap: 10px"> |
||||||
|
<image :src="`../../static/images/s7${index + 6}.png`" mode="" v-for="(item, index) in 6" :key="index" style="width: 150px; height: 200px"></image> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
<my-container> |
||||||
|
<view style="padding: 20px; display: flex; flex-flow: column; height: 100%; gap: 10px"> |
||||||
|
<view class="animated flipInX delay-5s" style="display: flex; flex-flow: column nowrap; justify-content: center; align-items: center; height: 25%; gap: 48px"> |
||||||
|
<image src="../../static/images/logo.png" mode="" style="width: 146.761px; height: 139.2px"></image> |
||||||
|
</view> |
||||||
|
<view style="text-indent: 2em; font-size: 18px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
随着信息技术的不断发展和数字化转型的加速,软件行业迎来了广阔的发展前景。锦州昊鼎创新科技有限公司将继续秉承创新、专业、服务的理念和用心、学习、实干、创新的企业理念,不断提升自身的技术实力和服务水平,为客户提供更优质的软件解决方案。同时,公司将积极拓展国内外市场,加强与合作伙伴的合作,实现共同发展。 |
||||||
|
</view> |
||||||
|
<view style="text-indent: 2em; font-size: 18px; font-style: normal; font-weight: 400; line-height: 160%"> |
||||||
|
未来,锦州昊鼎创新科技有限公司将以更加坚定的步伐,迈向软件行业的新高峰,为推动行业发展和社会进步做出更大的贡献。 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</my-container> |
||||||
|
</scroll-view> |
||||||
|
</view> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import myContainer from '@/myCom/myContainer/index.vue'; |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
myContainer |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
title: '', |
||||||
|
bgurl: '' |
||||||
|
}; |
||||||
|
}, |
||||||
|
onShareAppMessage(res) { |
||||||
|
if (res.from === 'button') { |
||||||
|
// 来自页面内分享按钮 |
||||||
|
console.log(res.target); |
||||||
|
} |
||||||
|
return { |
||||||
|
title: '锦州昊鼎创新科技有限公司', |
||||||
|
path: '/pages/index/index', |
||||||
|
imageUrl: '/static/images/share.png' |
||||||
|
}; |
||||||
|
}, |
||||||
|
onLoad() {}, |
||||||
|
methods: { |
||||||
|
setbgStyle() { |
||||||
|
const base64 = uni.getFileSystemManager().readFileSync('/static/images/bg.png', 'base64'); |
||||||
|
return { |
||||||
|
backgroundImage: `url(data:image/png;base64,${base64})` |
||||||
|
}; |
||||||
|
}, |
||||||
|
srcollto(e) { |
||||||
|
// console.log(e.detail.scrollTop); |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style lang="scss"> |
||||||
|
.content { |
||||||
|
width: 100vw; |
||||||
|
height: 100vh; |
||||||
|
overflow: hidden; |
||||||
|
background-size: cover; |
||||||
|
background-repeat: no-repeat; |
||||||
|
} |
||||||
|
</style> |
@ -0,0 +1,18 @@ |
|||||||
|
lockfileVersion: '6.1' |
||||||
|
|
||||||
|
settings: |
||||||
|
autoInstallPeers: true |
||||||
|
excludeLinksFromLockfile: false |
||||||
|
|
||||||
|
devDependencies: |
||||||
|
miniprogram-api-typings: |
||||||
|
specifier: ^2.8.3-1 |
||||||
|
version: registry.npmjs.org/miniprogram-api-typings@2.8.3-1 |
||||||
|
|
||||||
|
packages: |
||||||
|
|
||||||
|
registry.npmjs.org/miniprogram-api-typings@2.8.3-1: |
||||||
|
resolution: {integrity: sha512-xJsm+8aF4s8hks/Xbls8UuJ707x67b/6+dw8jvsPkoGt+SfRoRh6FtEueHyz03VTPiq+untKqKR/bFC9/EGImw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/miniprogram-api-typings/-/miniprogram-api-typings-2.8.3-1.tgz} |
||||||
|
name: miniprogram-api-typings |
||||||
|
version: 2.8.3-1 |
||||||
|
dev: true |
@ -0,0 +1,39 @@ |
|||||||
|
{ |
||||||
|
"description": "项目配置文件", |
||||||
|
"miniprogramRoot": "", |
||||||
|
"compileType": "miniprogram", |
||||||
|
"setting": { |
||||||
|
"useCompilerPlugins": [ |
||||||
|
"typescript", |
||||||
|
"sass" |
||||||
|
], |
||||||
|
"babelSetting": { |
||||||
|
"ignore": [], |
||||||
|
"disablePlugins": [], |
||||||
|
"outputPath": "" |
||||||
|
}, |
||||||
|
"coverView": false, |
||||||
|
"postcss": false, |
||||||
|
"minified": false, |
||||||
|
"enhance": false, |
||||||
|
"showShadowRootInWxmlPanel": false, |
||||||
|
"packNpmRelationList": [], |
||||||
|
"ignoreUploadUnusedFiles": true, |
||||||
|
"compileHotReLoad": false, |
||||||
|
"skylineRenderEnable": true |
||||||
|
}, |
||||||
|
"simulatorType": "wechat", |
||||||
|
"simulatorPluginLibVersion": {}, |
||||||
|
"condition": {}, |
||||||
|
"srcMiniprogramRoot": "miniprogram/", |
||||||
|
"editorSetting": { |
||||||
|
"tabIndent": "insertSpaces", |
||||||
|
"tabSize": 2 |
||||||
|
}, |
||||||
|
"libVersion": "2.32.3", |
||||||
|
"packOptions": { |
||||||
|
"ignore": [], |
||||||
|
"include": [] |
||||||
|
}, |
||||||
|
"appid": "wx415b09675ddc378a" |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
||||||
|
"projectname": "gateway", |
||||||
|
"setting": { |
||||||
|
"compileHotReLoad": true |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 583 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 332 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
@ -0,0 +1,30 @@ |
|||||||
|
{ |
||||||
|
"compilerOptions": { |
||||||
|
"strictNullChecks": true, |
||||||
|
"noImplicitAny": true, |
||||||
|
"module": "CommonJS", |
||||||
|
"target": "ES2020", |
||||||
|
"allowJs": true, |
||||||
|
"allowSyntheticDefaultImports": true, |
||||||
|
"esModuleInterop": true, |
||||||
|
"experimentalDecorators": true, |
||||||
|
"noImplicitThis": true, |
||||||
|
"noImplicitReturns": true, |
||||||
|
"alwaysStrict": true, |
||||||
|
"noFallthroughCasesInSwitch": true, |
||||||
|
"noUnusedLocals": true, |
||||||
|
"noUnusedParameters": true, |
||||||
|
"strict": true, |
||||||
|
"strictPropertyInitialization": true, |
||||||
|
"lib": ["ES2020"], |
||||||
|
"typeRoots": [ |
||||||
|
"./typings" |
||||||
|
] |
||||||
|
}, |
||||||
|
"include": [ |
||||||
|
"./**/*.ts" |
||||||
|
], |
||||||
|
"exclude": [ |
||||||
|
"node_modules" |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,13 @@ |
|||||||
|
uni.addInterceptor({ |
||||||
|
returnValue (res) { |
||||||
|
if (!(!!res && (typeof res === "object" || typeof res === "function") && typeof res.then === "function")) { |
||||||
|
return res; |
||||||
|
} |
||||||
|
return new Promise((resolve, reject) => { |
||||||
|
res.then((res) => { |
||||||
|
if (!res) return resolve(res)
|
||||||
|
return res[0] ? reject(res[0]) : resolve(res[1]) |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
}); |
@ -0,0 +1,76 @@ |
|||||||
|
/** |
||||||
|
* 这里是uni-app内置的常用样式变量 |
||||||
|
* |
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 |
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App |
||||||
|
* |
||||||
|
*/ |
||||||
|
|
||||||
|
/** |
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 |
||||||
|
* |
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 |
||||||
|
*/ |
||||||
|
|
||||||
|
/* 颜色变量 */ |
||||||
|
|
||||||
|
/* 行为相关颜色 */ |
||||||
|
$uni-color-primary: #007aff; |
||||||
|
$uni-color-success: #4cd964; |
||||||
|
$uni-color-warning: #f0ad4e; |
||||||
|
$uni-color-error: #dd524d; |
||||||
|
|
||||||
|
/* 文字基本颜色 */ |
||||||
|
$uni-text-color:#333;//基本色 |
||||||
|
$uni-text-color-inverse:#fff;//反色 |
||||||
|
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 |
||||||
|
$uni-text-color-placeholder: #808080; |
||||||
|
$uni-text-color-disable:#c0c0c0; |
||||||
|
|
||||||
|
/* 背景颜色 */ |
||||||
|
$uni-bg-color:#ffffff; |
||||||
|
$uni-bg-color-grey:#f8f8f8; |
||||||
|
$uni-bg-color-hover:#f1f1f1;//点击状态颜色 |
||||||
|
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 |
||||||
|
|
||||||
|
/* 边框颜色 */ |
||||||
|
$uni-border-color:#c8c7cc; |
||||||
|
|
||||||
|
/* 尺寸变量 */ |
||||||
|
|
||||||
|
/* 文字尺寸 */ |
||||||
|
$uni-font-size-sm:12px; |
||||||
|
$uni-font-size-base:14px; |
||||||
|
$uni-font-size-lg:16px; |
||||||
|
|
||||||
|
/* 图片尺寸 */ |
||||||
|
$uni-img-size-sm:20px; |
||||||
|
$uni-img-size-base:26px; |
||||||
|
$uni-img-size-lg:40px; |
||||||
|
|
||||||
|
/* Border Radius */ |
||||||
|
$uni-border-radius-sm: 2px; |
||||||
|
$uni-border-radius-base: 3px; |
||||||
|
$uni-border-radius-lg: 6px; |
||||||
|
$uni-border-radius-circle: 50%; |
||||||
|
|
||||||
|
/* 水平间距 */ |
||||||
|
$uni-spacing-row-sm: 5px; |
||||||
|
$uni-spacing-row-base: 10px; |
||||||
|
$uni-spacing-row-lg: 15px; |
||||||
|
|
||||||
|
/* 垂直间距 */ |
||||||
|
$uni-spacing-col-sm: 4px; |
||||||
|
$uni-spacing-col-base: 8px; |
||||||
|
$uni-spacing-col-lg: 12px; |
||||||
|
|
||||||
|
/* 透明度 */ |
||||||
|
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 |
||||||
|
|
||||||
|
/* 文章场景相关 */ |
||||||
|
$uni-color-title: #2C405A; // 文章标题颜色 |
||||||
|
$uni-font-size-title:20px; |
||||||
|
$uni-color-subtitle: #555555; // 二级标题颜色 |
||||||
|
$uni-font-size-subtitle:26px; |
||||||
|
$uni-color-paragraph: #3F536E; // 文章段落颜色 |
||||||
|
$uni-font-size-paragraph:15px; |
@ -0,0 +1,25 @@ |
|||||||
|
"use strict"; |
||||||
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); |
||||||
|
const common_vendor = require("./common/vendor.js"); |
||||||
|
if (!Math) { |
||||||
|
"./pages/index/index.js"; |
||||||
|
} |
||||||
|
const _sfc_main = { |
||||||
|
onLaunch: function() { |
||||||
|
console.log("App Launch"); |
||||||
|
}, |
||||||
|
onShow: function() { |
||||||
|
console.log("App Show"); |
||||||
|
}, |
||||||
|
onHide: function() { |
||||||
|
console.log("App Hide"); |
||||||
|
} |
||||||
|
}; |
||||||
|
function createApp() { |
||||||
|
const app = common_vendor.createSSRApp(_sfc_main); |
||||||
|
return { |
||||||
|
app |
||||||
|
}; |
||||||
|
} |
||||||
|
createApp().app.mount("#app"); |
||||||
|
exports.createApp = createApp; |
@ -0,0 +1,12 @@ |
|||||||
|
{ |
||||||
|
"pages": [ |
||||||
|
"pages/index/index" |
||||||
|
], |
||||||
|
"window": { |
||||||
|
"navigationBarTextStyle": "black", |
||||||
|
"navigationBarTitleText": "uni-app", |
||||||
|
"navigationBarBackgroundColor": "#ffffff", |
||||||
|
"backgroundColor": "#F8F8F8" |
||||||
|
}, |
||||||
|
"usingComponents": {} |
||||||
|
} |
@ -0,0 +1,223 @@ |
|||||||
|
@charset "UTF-8"; |
||||||
|
/*每个页面公共css */ |
||||||
|
/*! |
||||||
|
* animate.css - https://animate.style/ |
||||||
|
* Version - 4.1.1 |
||||||
|
* Licensed under the MIT license - http://opensource.org/licenses/MIT |
||||||
|
* |
||||||
|
* Copyright (c) 2020 Animate.css |
||||||
|
*/ |
||||||
|
:root{--animate-duration:1s;--animate-delay:1s;--animate-repeat:1} |
||||||
|
.animate__animated{animation-duration:1s;animation-duration:var(--animate-duration);animation-fill-mode:both} |
||||||
|
.animate__animated.animate__infinite{animation-iteration-count:infinite} |
||||||
|
.animate__animated.animate__repeat-1{animation-iteration-count:1;animation-iteration-count:var(--animate-repeat)} |
||||||
|
.animate__animated.animate__repeat-2{animation-iteration-count:2;animation-iteration-count:calc(var(--animate-repeat)*2)} |
||||||
|
.animate__animated.animate__repeat-3{animation-iteration-count:3;animation-iteration-count:calc(var(--animate-repeat)*3)} |
||||||
|
.animate__animated.animate__delay-1s{animation-delay:1s;animation-delay:var(--animate-delay)} |
||||||
|
.animate__animated.animate__delay-2s{animation-delay:2s;animation-delay:calc(var(--animate-delay)*2)} |
||||||
|
.animate__animated.animate__delay-3s{animation-delay:3s;animation-delay:calc(var(--animate-delay)*3)} |
||||||
|
.animate__animated.animate__delay-4s{animation-delay:4s;animation-delay:calc(var(--animate-delay)*4)} |
||||||
|
.animate__animated.animate__delay-5s{animation-delay:5s;animation-delay:calc(var(--animate-delay)*5)} |
||||||
|
.animate__animated.animate__faster{animation-duration:.5s;animation-duration:calc(var(--animate-duration)/2)} |
||||||
|
.animate__animated.animate__fast{animation-duration:.8s;animation-duration:calc(var(--animate-duration)*0.8)} |
||||||
|
.animate__animated.animate__slow{animation-duration:2s;animation-duration:calc(var(--animate-duration)*2)} |
||||||
|
.animate__animated.animate__slower{animation-duration:3s;animation-duration:calc(var(--animate-duration)*3)} |
||||||
|
@media (prefers-reduced-motion:reduce), print{.animate__animated{animation-duration:1ms!important;transition-duration:1ms!important;animation-iteration-count:1!important}.animate__animated[class*=Out]{opacity:0}} |
||||||
|
@keyframes bounce{0%,20%,53%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0)}40%,43%{animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-30px,0) scaleY(1.1)}70%{animation-timing-function:cubic-bezier(.755,.05,.855,.06);transform:translate3d(0,-15px,0) scaleY(1.05)}80%{transition-timing-function:cubic-bezier(.215,.61,.355,1);transform:translateZ(0) scaleY(.95)}90%{transform:translate3d(0,-4px,0) scaleY(1.02)}} |
||||||
|
.animate__bounce{animation-name:bounce;transform-origin:center bottom} |
||||||
|
@keyframes flash{0%,50%,to{opacity:1}25%,75%{opacity:0}} |
||||||
|
.animate__flash{animation-name:flash} |
||||||
|
@keyframes pulse{0%{transform:scaleX(1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scaleX(1)}} |
||||||
|
.animate__pulse{animation-name:pulse;animation-timing-function:ease-in-out} |
||||||
|
@keyframes rubberBand{0%{transform:scaleX(1)}30%{transform:scale3d(1.25,.75,1)}40%{transform:scale3d(.75,1.25,1)}50%{transform:scale3d(1.15,.85,1)}65%{transform:scale3d(.95,1.05,1)}75%{transform:scale3d(1.05,.95,1)}to{transform:scaleX(1)}} |
||||||
|
.animate__rubberBand{animation-name:rubberBand} |
||||||
|
@keyframes shakeX{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:translate3d(10px,0,0)}} |
||||||
|
.animate__shakeX{animation-name:shakeX} |
||||||
|
@keyframes shakeY{0%,to{transform:translateZ(0)}10%,30%,50%,70%,90%{transform:translate3d(0,-10px,0)}20%,40%,60%,80%{transform:translate3d(0,10px,0)}} |
||||||
|
.animate__shakeY{animation-name:shakeY} |
||||||
|
@keyframes headShake{0%{transform:translateX(0)}6.5%{transform:translateX(-6px) rotateY(-9deg)}18.5%{transform:translateX(5px) rotateY(7deg)}31.5%{transform:translateX(-3px) rotateY(-5deg)}43.5%{transform:translateX(2px) rotateY(3deg)}50%{transform:translateX(0)}} |
||||||
|
.animate__headShake{animation-timing-function:ease-in-out;animation-name:headShake} |
||||||
|
@keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}to{transform:rotate(0deg)}} |
||||||
|
.animate__swing{transform-origin:top center;animation-name:swing} |
||||||
|
@keyframes tada{0%{transform:scaleX(1)}10%,20%{transform:scale3d(.9,.9,.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate(3deg)}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate(-3deg)}to{transform:scaleX(1)}} |
||||||
|
.animate__tada{animation-name:tada} |
||||||
|
@keyframes wobble{0%{transform:translateZ(0)}15%{transform:translate3d(-25%,0,0) rotate(-5deg)}30%{transform:translate3d(20%,0,0) rotate(3deg)}45%{transform:translate3d(-15%,0,0) rotate(-3deg)}60%{transform:translate3d(10%,0,0) rotate(2deg)}75%{transform:translate3d(-5%,0,0) rotate(-1deg)}to{transform:translateZ(0)}} |
||||||
|
.animate__wobble{animation-name:wobble} |
||||||
|
@keyframes jello{0%,11.1%,to{transform:translateZ(0)}22.2%{transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{transform:skewX(6.25deg) skewY(6.25deg)}44.4%{transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{transform:skewX(.390625deg) skewY(.390625deg)}88.8%{transform:skewX(-.1953125deg) skewY(-.1953125deg)}} |
||||||
|
.animate__jello{animation-name:jello;transform-origin:center} |
||||||
|
@keyframes heartBeat{0%{transform:scale(1)}14%{transform:scale(1.3)}28%{transform:scale(1)}42%{transform:scale(1.3)}70%{transform:scale(1)}} |
||||||
|
.animate__heartBeat{animation-name:heartBeat;animation-duration:1.3s;animation-duration:calc(var(--animate-duration)*1.3);animation-timing-function:ease-in-out} |
||||||
|
@keyframes backInDown{0%{transform:translateY(-1200px) scale(.7);opacity:.7}80%{transform:translateY(0) scale(.7);opacity:.7}to{transform:scale(1);opacity:1}} |
||||||
|
.animate__backInDown{animation-name:backInDown} |
||||||
|
@keyframes backInLeft{0%{transform:translateX(-2000px) scale(.7);opacity:.7}80%{transform:translateX(0) scale(.7);opacity:.7}to{transform:scale(1);opacity:1}} |
||||||
|
.animate__backInLeft{animation-name:backInLeft} |
||||||
|
@keyframes backInRight{0%{transform:translateX(2000px) scale(.7);opacity:.7}80%{transform:translateX(0) scale(.7);opacity:.7}to{transform:scale(1);opacity:1}} |
||||||
|
.animate__backInRight{animation-name:backInRight} |
||||||
|
@keyframes backInUp{0%{transform:translateY(1200px) scale(.7);opacity:.7}80%{transform:translateY(0) scale(.7);opacity:.7}to{transform:scale(1);opacity:1}} |
||||||
|
.animate__backInUp{animation-name:backInUp} |
||||||
|
@keyframes backOutDown{0%{transform:scale(1);opacity:1}20%{transform:translateY(0) scale(.7);opacity:.7}to{transform:translateY(700px) scale(.7);opacity:.7}} |
||||||
|
.animate__backOutDown{animation-name:backOutDown} |
||||||
|
@keyframes backOutLeft{0%{transform:scale(1);opacity:1}20%{transform:translateX(0) scale(.7);opacity:.7}to{transform:translateX(-2000px) scale(.7);opacity:.7}} |
||||||
|
.animate__backOutLeft{animation-name:backOutLeft} |
||||||
|
@keyframes backOutRight{0%{transform:scale(1);opacity:1}20%{transform:translateX(0) scale(.7);opacity:.7}to{transform:translateX(2000px) scale(.7);opacity:.7}} |
||||||
|
.animate__backOutRight{animation-name:backOutRight} |
||||||
|
@keyframes backOutUp{0%{transform:scale(1);opacity:1}20%{transform:translateY(0) scale(.7);opacity:.7}to{transform:translateY(-700px) scale(.7);opacity:.7}} |
||||||
|
.animate__backOutUp{animation-name:backOutUp} |
||||||
|
@keyframes bounceIn{0%,20%,40%,60%,80%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:scale3d(.3,.3,.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(.9,.9,.9)}60%{opacity:1;transform:scale3d(1.03,1.03,1.03)}80%{transform:scale3d(.97,.97,.97)}to{opacity:1;transform:scaleX(1)}} |
||||||
|
.animate__bounceIn{animation-duration:.75s;animation-duration:calc(var(--animate-duration)*0.75);animation-name:bounceIn} |
||||||
|
@keyframes bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0) scaleY(3)}60%{opacity:1;transform:translate3d(0,25px,0) scaleY(.9)}75%{transform:translate3d(0,-10px,0) scaleY(.95)}90%{transform:translate3d(0,5px,0) scaleY(.985)}to{transform:translateZ(0)}} |
||||||
|
.animate__bounceInDown{animation-name:bounceInDown} |
||||||
|
@keyframes bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0) scaleX(3)}60%{opacity:1;transform:translate3d(25px,0,0) scaleX(1)}75%{transform:translate3d(-10px,0,0) scaleX(.98)}90%{transform:translate3d(5px,0,0) scaleX(.995)}to{transform:translateZ(0)}} |
||||||
|
.animate__bounceInLeft{animation-name:bounceInLeft} |
||||||
|
@keyframes bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0) scaleX(3)}60%{opacity:1;transform:translate3d(-25px,0,0) scaleX(1)}75%{transform:translate3d(10px,0,0) scaleX(.98)}90%{transform:translate3d(-5px,0,0) scaleX(.995)}to{transform:translateZ(0)}} |
||||||
|
.animate__bounceInRight{animation-name:bounceInRight} |
||||||
|
@keyframes bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0) scaleY(5)}60%{opacity:1;transform:translate3d(0,-20px,0) scaleY(.9)}75%{transform:translate3d(0,10px,0) scaleY(.95)}90%{transform:translate3d(0,-5px,0) scaleY(.985)}to{transform:translateZ(0)}} |
||||||
|
.animate__bounceInUp{animation-name:bounceInUp} |
||||||
|
@keyframes bounceOut{20%{transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(.3,.3,.3)}} |
||||||
|
.animate__bounceOut{animation-duration:.75s;animation-duration:calc(var(--animate-duration)*0.75);animation-name:bounceOut} |
||||||
|
@keyframes bounceOutDown{20%{transform:translate3d(0,10px,0) scaleY(.985)}40%,45%{opacity:1;transform:translate3d(0,-20px,0) scaleY(.9)}to{opacity:0;transform:translate3d(0,2000px,0) scaleY(3)}} |
||||||
|
.animate__bounceOutDown{animation-name:bounceOutDown} |
||||||
|
@keyframes bounceOutLeft{20%{opacity:1;transform:translate3d(20px,0,0) scaleX(.9)}to{opacity:0;transform:translate3d(-2000px,0,0) scaleX(2)}} |
||||||
|
.animate__bounceOutLeft{animation-name:bounceOutLeft} |
||||||
|
@keyframes bounceOutRight{20%{opacity:1;transform:translate3d(-20px,0,0) scaleX(.9)}to{opacity:0;transform:translate3d(2000px,0,0) scaleX(2)}} |
||||||
|
.animate__bounceOutRight{animation-name:bounceOutRight} |
||||||
|
@keyframes bounceOutUp{20%{transform:translate3d(0,-10px,0) scaleY(.985)}40%,45%{opacity:1;transform:translate3d(0,20px,0) scaleY(.9)}to{opacity:0;transform:translate3d(0,-2000px,0) scaleY(3)}} |
||||||
|
.animate__bounceOutUp{animation-name:bounceOutUp} |
||||||
|
@keyframes fadeIn{0%{opacity:0}to{opacity:1}} |
||||||
|
.animate__fadeIn{animation-name:fadeIn} |
||||||
|
@keyframes fadeInDown{0%{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInDown{animation-name:fadeInDown} |
||||||
|
@keyframes fadeInDownBig{0%{opacity:0;transform:translate3d(0,-2000px,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInDownBig{animation-name:fadeInDownBig} |
||||||
|
@keyframes fadeInLeft{0%{opacity:0;transform:translate3d(-100%,0,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInLeft{animation-name:fadeInLeft} |
||||||
|
@keyframes fadeInLeftBig{0%{opacity:0;transform:translate3d(-2000px,0,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInLeftBig{animation-name:fadeInLeftBig} |
||||||
|
@keyframes fadeInRight{0%{opacity:0;transform:translate3d(100%,0,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInRight{animation-name:fadeInRight} |
||||||
|
@keyframes fadeInRightBig{0%{opacity:0;transform:translate3d(2000px,0,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInRightBig{animation-name:fadeInRightBig} |
||||||
|
@keyframes fadeInUp{0%{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInUp{animation-name:fadeInUp} |
||||||
|
@keyframes fadeInUpBig{0%{opacity:0;transform:translate3d(0,2000px,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInUpBig{animation-name:fadeInUpBig} |
||||||
|
@keyframes fadeInTopLeft{0%{opacity:0;transform:translate3d(-100%,-100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInTopLeft{animation-name:fadeInTopLeft} |
||||||
|
@keyframes fadeInTopRight{0%{opacity:0;transform:translate3d(100%,-100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInTopRight{animation-name:fadeInTopRight} |
||||||
|
@keyframes fadeInBottomLeft{0%{opacity:0;transform:translate3d(-100%,100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInBottomLeft{animation-name:fadeInBottomLeft} |
||||||
|
@keyframes fadeInBottomRight{0%{opacity:0;transform:translate3d(100%,100%,0)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__fadeInBottomRight{animation-name:fadeInBottomRight} |
||||||
|
@keyframes fadeOut{0%{opacity:1}to{opacity:0}} |
||||||
|
.animate__fadeOut{animation-name:fadeOut} |
||||||
|
@keyframes fadeOutDown{0%{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}} |
||||||
|
.animate__fadeOutDown{animation-name:fadeOutDown} |
||||||
|
@keyframes fadeOutDownBig{0%{opacity:1}to{opacity:0;transform:translate3d(0,2000px,0)}} |
||||||
|
.animate__fadeOutDownBig{animation-name:fadeOutDownBig} |
||||||
|
@keyframes fadeOutLeft{0%{opacity:1}to{opacity:0;transform:translate3d(-100%,0,0)}} |
||||||
|
.animate__fadeOutLeft{animation-name:fadeOutLeft} |
||||||
|
@keyframes fadeOutLeftBig{0%{opacity:1}to{opacity:0;transform:translate3d(-2000px,0,0)}} |
||||||
|
.animate__fadeOutLeftBig{animation-name:fadeOutLeftBig} |
||||||
|
@keyframes fadeOutRight{0%{opacity:1}to{opacity:0;transform:translate3d(100%,0,0)}} |
||||||
|
.animate__fadeOutRight{animation-name:fadeOutRight} |
||||||
|
@keyframes fadeOutRightBig{0%{opacity:1}to{opacity:0;transform:translate3d(2000px,0,0)}} |
||||||
|
.animate__fadeOutRightBig{animation-name:fadeOutRightBig} |
||||||
|
@keyframes fadeOutUp{0%{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}} |
||||||
|
.animate__fadeOutUp{animation-name:fadeOutUp} |
||||||
|
@keyframes fadeOutUpBig{0%{opacity:1}to{opacity:0;transform:translate3d(0,-2000px,0)}} |
||||||
|
.animate__fadeOutUpBig{animation-name:fadeOutUpBig} |
||||||
|
@keyframes fadeOutTopLeft{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(-100%,-100%,0)}} |
||||||
|
.animate__fadeOutTopLeft{animation-name:fadeOutTopLeft} |
||||||
|
@keyframes fadeOutTopRight{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(100%,-100%,0)}} |
||||||
|
.animate__fadeOutTopRight{animation-name:fadeOutTopRight} |
||||||
|
@keyframes fadeOutBottomRight{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(100%,100%,0)}} |
||||||
|
.animate__fadeOutBottomRight{animation-name:fadeOutBottomRight} |
||||||
|
@keyframes fadeOutBottomLeft{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(-100%,100%,0)}} |
||||||
|
.animate__fadeOutBottomLeft{animation-name:fadeOutBottomLeft} |
||||||
|
@keyframes flip{0%{transform:perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);animation-timing-function:ease-out}40%{transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);animation-timing-function:ease-out}50%{transform:perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);animation-timing-function:ease-in}80%{transform:perspective(400px) scale3d(.95,.95,.95) translateZ(0) rotateY(0deg);animation-timing-function:ease-in}to{transform:perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);animation-timing-function:ease-in}} |
||||||
|
.animate__animated.animate__flip{-webkit-backface-visibility:visible;backface-visibility:visible;animation-name:flip} |
||||||
|
@keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}} |
||||||
|
.animate__flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;animation-name:flipInX} |
||||||
|
@keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateY(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateY(10deg);opacity:1}80%{transform:perspective(400px) rotateY(-5deg)}to{transform:perspective(400px)}} |
||||||
|
.animate__flipInY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;animation-name:flipInY} |
||||||
|
@keyframes flipOutX{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateX(-20deg);opacity:1}to{transform:perspective(400px) rotateX(90deg);opacity:0}} |
||||||
|
.animate__flipOutX{animation-duration:.75s;animation-duration:calc(var(--animate-duration)*0.75);animation-name:flipOutX;-webkit-backface-visibility:visible!important;backface-visibility:visible!important} |
||||||
|
@keyframes flipOutY{0%{transform:perspective(400px)}30%{transform:perspective(400px) rotateY(-15deg);opacity:1}to{transform:perspective(400px) rotateY(90deg);opacity:0}} |
||||||
|
.animate__flipOutY{animation-duration:.75s;animation-duration:calc(var(--animate-duration)*0.75);-webkit-backface-visibility:visible!important;backface-visibility:visible!important;animation-name:flipOutY} |
||||||
|
@keyframes lightSpeedInRight{0%{transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{transform:skewX(20deg);opacity:1}80%{transform:skewX(-5deg)}to{transform:translateZ(0)}} |
||||||
|
.animate__lightSpeedInRight{animation-name:lightSpeedInRight;animation-timing-function:ease-out} |
||||||
|
@keyframes lightSpeedInLeft{0%{transform:translate3d(-100%,0,0) skewX(30deg);opacity:0}60%{transform:skewX(-20deg);opacity:1}80%{transform:skewX(5deg)}to{transform:translateZ(0)}} |
||||||
|
.animate__lightSpeedInLeft{animation-name:lightSpeedInLeft;animation-timing-function:ease-out} |
||||||
|
@keyframes lightSpeedOutRight{0%{opacity:1}to{transform:translate3d(100%,0,0) skewX(30deg);opacity:0}} |
||||||
|
.animate__lightSpeedOutRight{animation-name:lightSpeedOutRight;animation-timing-function:ease-in} |
||||||
|
@keyframes lightSpeedOutLeft{0%{opacity:1}to{transform:translate3d(-100%,0,0) skewX(-30deg);opacity:0}} |
||||||
|
.animate__lightSpeedOutLeft{animation-name:lightSpeedOutLeft;animation-timing-function:ease-in} |
||||||
|
@keyframes rotateIn{0%{transform:rotate(-200deg);opacity:0}to{transform:translateZ(0);opacity:1}} |
||||||
|
.animate__rotateIn{animation-name:rotateIn;transform-origin:center} |
||||||
|
@keyframes rotateInDownLeft{0%{transform:rotate(-45deg);opacity:0}to{transform:translateZ(0);opacity:1}} |
||||||
|
.animate__rotateInDownLeft{animation-name:rotateInDownLeft;transform-origin:left bottom} |
||||||
|
@keyframes rotateInDownRight{0%{transform:rotate(45deg);opacity:0}to{transform:translateZ(0);opacity:1}} |
||||||
|
.animate__rotateInDownRight{animation-name:rotateInDownRight;transform-origin:right bottom} |
||||||
|
@keyframes rotateInUpLeft{0%{transform:rotate(45deg);opacity:0}to{transform:translateZ(0);opacity:1}} |
||||||
|
.animate__rotateInUpLeft{animation-name:rotateInUpLeft;transform-origin:left bottom} |
||||||
|
@keyframes rotateInUpRight{0%{transform:rotate(-90deg);opacity:0}to{transform:translateZ(0);opacity:1}} |
||||||
|
.animate__rotateInUpRight{animation-name:rotateInUpRight;transform-origin:right bottom} |
||||||
|
@keyframes rotateOut{0%{opacity:1}to{transform:rotate(200deg);opacity:0}} |
||||||
|
.animate__rotateOut{animation-name:rotateOut;transform-origin:center} |
||||||
|
@keyframes rotateOutDownLeft{0%{opacity:1}to{transform:rotate(45deg);opacity:0}} |
||||||
|
.animate__rotateOutDownLeft{animation-name:rotateOutDownLeft;transform-origin:left bottom} |
||||||
|
@keyframes rotateOutDownRight{0%{opacity:1}to{transform:rotate(-45deg);opacity:0}} |
||||||
|
.animate__rotateOutDownRight{animation-name:rotateOutDownRight;transform-origin:right bottom} |
||||||
|
@keyframes rotateOutUpLeft{0%{opacity:1}to{transform:rotate(-45deg);opacity:0}} |
||||||
|
.animate__rotateOutUpLeft{animation-name:rotateOutUpLeft;transform-origin:left bottom} |
||||||
|
@keyframes rotateOutUpRight{0%{opacity:1}to{transform:rotate(90deg);opacity:0}} |
||||||
|
.animate__rotateOutUpRight{animation-name:rotateOutUpRight;transform-origin:right bottom} |
||||||
|
@keyframes hinge{0%{animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);animation-timing-function:ease-in-out}40%,80%{transform:rotate(60deg);animation-timing-function:ease-in-out;opacity:1}to{transform:translate3d(0,700px,0);opacity:0}} |
||||||
|
.animate__hinge{animation-duration:2s;animation-duration:calc(var(--animate-duration)*2);animation-name:hinge;transform-origin:top left} |
||||||
|
@keyframes jackInTheBox{0%{opacity:0;transform:scale(.1) rotate(30deg);transform-origin:center bottom}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{opacity:1;transform:scale(1)}} |
||||||
|
.animate__jackInTheBox{animation-name:jackInTheBox} |
||||||
|
@keyframes rollIn{0%{opacity:0;transform:translate3d(-100%,0,0) rotate(-120deg)}to{opacity:1;transform:translateZ(0)}} |
||||||
|
.animate__rollIn{animation-name:rollIn} |
||||||
|
@keyframes rollOut{0%{opacity:1}to{opacity:0;transform:translate3d(100%,0,0) rotate(120deg)}} |
||||||
|
.animate__rollOut{animation-name:rollOut} |
||||||
|
@keyframes zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}} |
||||||
|
.animate__zoomIn{animation-name:zoomIn} |
||||||
|
@keyframes zoomInDown{0%{opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomInDown{animation-name:zoomInDown} |
||||||
|
@keyframes zoomInLeft{0%{opacity:0;transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomInLeft{animation-name:zoomInLeft} |
||||||
|
@keyframes zoomInRight{0%{opacity:0;transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomInRight{animation-name:zoomInRight} |
||||||
|
@keyframes zoomInUp{0%{opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomInUp{animation-name:zoomInUp} |
||||||
|
@keyframes zoomOut{0%{opacity:1}50%{opacity:0;transform:scale3d(.3,.3,.3)}to{opacity:0}} |
||||||
|
.animate__zoomOut{animation-name:zoomOut} |
||||||
|
@keyframes zoomOutDown{40%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomOutDown{animation-name:zoomOutDown;transform-origin:center bottom} |
||||||
|
@keyframes zoomOutLeft{40%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;transform:scale(.1) translate3d(-2000px,0,0)}} |
||||||
|
.animate__zoomOutLeft{animation-name:zoomOutLeft;transform-origin:left center} |
||||||
|
@keyframes zoomOutRight{40%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;transform:scale(.1) translate3d(2000px,0,0)}} |
||||||
|
.animate__zoomOutRight{animation-name:zoomOutRight;transform-origin:right center} |
||||||
|
@keyframes zoomOutUp{40%{opacity:1;transform:scale3d(.475,.475,.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);animation-timing-function:cubic-bezier(.175,.885,.32,1)}} |
||||||
|
.animate__zoomOutUp{animation-name:zoomOutUp;transform-origin:center bottom} |
||||||
|
@keyframes slideInDown{0%{transform:translate3d(0,-100%,0);visibility:visible}to{transform:translateZ(0)}} |
||||||
|
.animate__slideInDown{animation-name:slideInDown} |
||||||
|
@keyframes slideInLeft{0%{transform:translate3d(-100%,0,0);visibility:visible}to{transform:translateZ(0)}} |
||||||
|
.animate__slideInLeft{animation-name:slideInLeft} |
||||||
|
@keyframes slideInRight{0%{transform:translate3d(100%,0,0);visibility:visible}to{transform:translateZ(0)}} |
||||||
|
.animate__slideInRight{animation-name:slideInRight} |
||||||
|
@keyframes slideInUp{0%{transform:translate3d(0,100%,0);visibility:visible}to{transform:translateZ(0)}} |
||||||
|
.animate__slideInUp{animation-name:slideInUp} |
||||||
|
@keyframes slideOutDown{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,100%,0)}} |
||||||
|
.animate__slideOutDown{animation-name:slideOutDown} |
||||||
|
@keyframes slideOutLeft{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(-100%,0,0)}} |
||||||
|
.animate__slideOutLeft{animation-name:slideOutLeft} |
||||||
|
@keyframes slideOutRight{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(100%,0,0)}} |
||||||
|
.animate__slideOutRight{animation-name:slideOutRight} |
||||||
|
@keyframes slideOutUp{0%{transform:translateZ(0)}to{visibility:hidden;transform:translate3d(0,-100%,0)}} |
||||||
|
.animate__slideOutUp{animation-name:slideOutUp} |
||||||
|
page { |
||||||
|
box-sizing: border-box; |
||||||
|
} |
||||||
|
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;} |
@ -0,0 +1,5 @@ |
|||||||
|
"use strict"; |
||||||
|
const _imports_0 = "/static/images/logo.png"; |
||||||
|
const _imports_1 = "/static/images/s2.png"; |
||||||
|
exports._imports_0 = _imports_0; |
||||||
|
exports._imports_1 = _imports_1; |
@ -0,0 +1,29 @@ |
|||||||
|
"use strict"; |
||||||
|
const common_vendor = require("../../common/vendor.js"); |
||||||
|
const _sfc_main = { |
||||||
|
name: "myContainer", |
||||||
|
data() { |
||||||
|
return { |
||||||
|
time: "" |
||||||
|
}; |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
//处理滚动
|
||||||
|
handleScroll() { |
||||||
|
const time = Date.now(); |
||||||
|
if (time - this.time > 100) { |
||||||
|
this.time = time; |
||||||
|
common_vendor.index.createSelectorQuery().in(this).select(".inner-container").boundingClientRect((rect) => { |
||||||
|
console.log(rect); |
||||||
|
}).exec(); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { |
||||||
|
return {}; |
||||||
|
} |
||||||
|
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); |
||||||
|
wx.createComponent(Component); |
@ -0,0 +1,4 @@ |
|||||||
|
{ |
||||||
|
"component": true, |
||||||
|
"usingComponents": {} |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
<view class="my-container"><view class="inner-container"><slot></slot></view></view> |
@ -0,0 +1,40 @@ |
|||||||
|
/** |
||||||
|
* 这里是uni-app内置的常用样式变量 |
||||||
|
* |
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 |
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App |
||||||
|
* |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 |
||||||
|
* |
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 |
||||||
|
*/ |
||||||
|
/* 颜色变量 */ |
||||||
|
/* 行为相关颜色 */ |
||||||
|
/* 文字基本颜色 */ |
||||||
|
/* 背景颜色 */ |
||||||
|
/* 边框颜色 */ |
||||||
|
/* 尺寸变量 */ |
||||||
|
/* 文字尺寸 */ |
||||||
|
/* 图片尺寸 */ |
||||||
|
/* Border Radius */ |
||||||
|
/* 水平间距 */ |
||||||
|
/* 垂直间距 */ |
||||||
|
/* 透明度 */ |
||||||
|
/* 文章场景相关 */ |
||||||
|
.my-container { |
||||||
|
height: 100vh; |
||||||
|
width: 100vw; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
} |
||||||
|
.my-container .inner-container { |
||||||
|
width: 90%; |
||||||
|
height: 90%; |
||||||
|
border-radius: 6px; |
||||||
|
background-color: #ffffff3b; |
||||||
|
-webkit-backdrop-filter: blur(10px); |
||||||
|
backdrop-filter: blur(10px); |
||||||
|
} |
@ -0,0 +1,89 @@ |
|||||||
|
"use strict"; |
||||||
|
const common_vendor = require("../../common/vendor.js"); |
||||||
|
const common_assets = require("../../common/assets.js"); |
||||||
|
const myContainer = () => "../../myCom/myContainer/index.js"; |
||||||
|
const _sfc_main = { |
||||||
|
components: { |
||||||
|
myContainer |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
title: "", |
||||||
|
bgurl: "" |
||||||
|
}; |
||||||
|
}, |
||||||
|
onShareAppMessage(res) { |
||||||
|
if (res.from === "button") { |
||||||
|
console.log(res.target); |
||||||
|
} |
||||||
|
return { |
||||||
|
title: "锦州昊鼎创新科技有限公司", |
||||||
|
path: "/pages/index/index", |
||||||
|
imageUrl: "/static/images/share.png" |
||||||
|
}; |
||||||
|
}, |
||||||
|
onLoad() { |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
setbgStyle() { |
||||||
|
const base64 = common_vendor.index.getFileSystemManager().readFileSync("/static/images/bg.png", "base64"); |
||||||
|
return { |
||||||
|
backgroundImage: `url(data:image/png;base64,${base64})` |
||||||
|
}; |
||||||
|
}, |
||||||
|
srcollto(e) { |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
if (!Array) { |
||||||
|
const _component_my_container = common_vendor.resolveComponent("my-container"); |
||||||
|
_component_my_container(); |
||||||
|
} |
||||||
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { |
||||||
|
return { |
||||||
|
a: common_assets._imports_0, |
||||||
|
b: common_assets._imports_1, |
||||||
|
c: common_vendor.f(6, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s3${index + 1}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
d: common_vendor.f(4, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s4${index + 1}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
e: common_vendor.f(6, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s5${index + 1}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
f: common_vendor.f(2, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s6${index + 1}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
g: common_vendor.f(6, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s7${index + 1}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
h: common_vendor.f(6, (item, index, i0) => { |
||||||
|
return { |
||||||
|
a: `../../static/images/s7${index + 6}.png`, |
||||||
|
b: index |
||||||
|
}; |
||||||
|
}), |
||||||
|
i: common_assets._imports_0, |
||||||
|
j: common_vendor.o((...args) => $options.srcollto && $options.srcollto(...args)), |
||||||
|
k: common_vendor.s($options.setbgStyle()) |
||||||
|
}; |
||||||
|
} |
||||||
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]); |
||||||
|
_sfc_main.__runtimeHooks = 2; |
||||||
|
wx.createPage(MiniProgramPage); |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"navigationBarTitleText": "", |
||||||
|
"usingComponents": { |
||||||
|
"my-container": "../../myCom/myContainer/index" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
/** |
||||||
|
* 这里是uni-app内置的常用样式变量 |
||||||
|
* |
||||||
|
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 |
||||||
|
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App |
||||||
|
* |
||||||
|
*/ |
||||||
|
/** |
||||||
|
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 |
||||||
|
* |
||||||
|
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 |
||||||
|
*/ |
||||||
|
/* 颜色变量 */ |
||||||
|
/* 行为相关颜色 */ |
||||||
|
/* 文字基本颜色 */ |
||||||
|
/* 背景颜色 */ |
||||||
|
/* 边框颜色 */ |
||||||
|
/* 尺寸变量 */ |
||||||
|
/* 文字尺寸 */ |
||||||
|
/* 图片尺寸 */ |
||||||
|
/* Border Radius */ |
||||||
|
/* 水平间距 */ |
||||||
|
/* 垂直间距 */ |
||||||
|
/* 透明度 */ |
||||||
|
/* 文章场景相关 */ |
||||||
|
.content { |
||||||
|
width: 100vw; |
||||||
|
height: 100vh; |
||||||
|
overflow: hidden; |
||||||
|
background-size: cover; |
||||||
|
background-repeat: no-repeat; |
||||||
|
} |
@ -0,0 +1,39 @@ |
|||||||
|
{ |
||||||
|
"description": "项目配置文件", |
||||||
|
"miniprogramRoot": "", |
||||||
|
"compileType": "miniprogram", |
||||||
|
"setting": { |
||||||
|
"useCompilerPlugins": [ |
||||||
|
"typescript", |
||||||
|
"sass" |
||||||
|
], |
||||||
|
"babelSetting": { |
||||||
|
"ignore": [], |
||||||
|
"disablePlugins": [], |
||||||
|
"outputPath": "" |
||||||
|
}, |
||||||
|
"coverView": false, |
||||||
|
"postcss": false, |
||||||
|
"minified": false, |
||||||
|
"enhance": false, |
||||||
|
"showShadowRootInWxmlPanel": false, |
||||||
|
"packNpmRelationList": [], |
||||||
|
"ignoreUploadUnusedFiles": true, |
||||||
|
"compileHotReLoad": false, |
||||||
|
"skylineRenderEnable": true |
||||||
|
}, |
||||||
|
"simulatorType": "wechat", |
||||||
|
"simulatorPluginLibVersion": {}, |
||||||
|
"condition": {}, |
||||||
|
"srcMiniprogramRoot": "miniprogram/", |
||||||
|
"editorSetting": { |
||||||
|
"tabIndent": "insertSpaces", |
||||||
|
"tabSize": 2 |
||||||
|
}, |
||||||
|
"libVersion": "2.32.3", |
||||||
|
"packOptions": { |
||||||
|
"ignore": [], |
||||||
|
"include": [] |
||||||
|
}, |
||||||
|
"appid": "wx415b09675ddc378a" |
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", |
||||||
|
"projectname": "gateway", |
||||||
|
"setting": { |
||||||
|
"compileHotReLoad": true |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 583 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 70 KiB |