Skip to content

Commit

Permalink
Merge branch 'main' into fix-page-turn
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEJIA-LIU authored Apr 22, 2024
2 parents 18fb7c6 + 4c79d5c commit d7ccb5a
Show file tree
Hide file tree
Showing 249 changed files with 1,176 additions and 1,726 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ module.exports = {
'import',
'jest',
'react',
'simple-import-sort',
'prettier'
'simple-import-sort'
],
extends: [
'eslint:recommended',
'standard',
'plugin:@typescript-eslint/recommended',
'plugin:react/jsx-runtime',
'plugin:react/recommended',
'prettier'
],
rules: {
'@typescript-eslint/ban-ts-comment': 0,
Expand All @@ -31,6 +29,10 @@ module.exports = {
'@typescript-eslint/no-use-before-define': [1, { functions: false, classes: false }],
'@typescript-eslint/no-var-requires': 0,
camelcase: 0,
'eol-last': 0,
'comma-dangle': 0,
'no-mixed-operators': 1,
'no-multiple-empty-lines': 0,
'import/first': 2,
'import/newline-after-import': 2,
'import/no-duplicates': 2,
Expand Down
12 changes: 0 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
{
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],
"search.exclude": {
"**/.git": true,
"**/node_modules": true,
Expand Down
2 changes: 1 addition & 1 deletion crates/native_binding/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding",
"version": "3.6.25",
"version": "3.6.27",
"description": "Node binding for taro",
"main": "binding.js",
"typings": "binding.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion examples/mini-program-example/project.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
"tabIndent": "insertSpaces",
"tabSize": 2
}
}
}
2 changes: 1 addition & 1 deletion examples/mini-program-example/project.private.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"setting": {
"compileHotReLoad": true
}
}
}
2 changes: 1 addition & 1 deletion examples/mini-program-example/src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default defineAppConfig({
'pages/api/alipay/index',
'pages/api/analysis/index',
'pages/api/basics/basics/index',
'pages/api/basics/debug/index',
'pages/api/basics/nativeDebug/index',
'pages/api/basics/encryption/index',
'pages/api/basics/miniProgram/index',
'pages/api/basics/performance/index',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
navigationBarTitleText: '基础-调试',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "@/styles/variables.scss";

.test-style {
color: #f5f5f5;
background-color: $color-success;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
import React from 'react'
import Taro from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import ButtonList from '@/components/buttonList'
import './index.scss'
import { TestConsole } from '@/util/util'

/**
* 基础-调试
* @returns
*/
let realtimeLogManager
let logManager
export default class Index extends React.Component {
state = {
list: [
{
id: 'setEnableDebug',
func: () => {
TestConsole.consoleTest('setEnableDebug')
Taro.setEnableDebug({
enableDebug: true,
success(res) {
TestConsole.consoleSuccess(res)
},
fail(res) {
TestConsole.consoleFail(res)
},
complete(res) {
TestConsole.consoleComplete(res)
},
}).then((res) => {
TestConsole.consoleResult(res)
})
},
},
{
id: 'getRealtimeLogManager',
func: () => {
realtimeLogManager = Taro.getRealtimeLogManager()
TestConsole.consoleNormal('setEnableDebug', realtimeLogManager)
},
},
{
id: 'RealtimeLogManager-addFilterMsg',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-addFilterMsg')
realtimeLogManager.addFilterMsg('test')
},
},
{
id: 'RealtimeLogManager-in',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-in')
realtimeLogManager.in(Taro.getCurrentPages())
},
},
{
id: 'RealtimeLogManager-error',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-error')
realtimeLogManager.error('test', ['test'])
},
},
{
id: 'RealtimeLogManager-info',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-info')
realtimeLogManager.info(['test'])
},
},
{
id: 'RealtimeLogManager-setFilterMsg',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-setFilterMsg')
realtimeLogManager.setFilterMsg('test')
},
},
{
id: 'RealtimeLogManager-warn',
func: () => {
TestConsole.consoleNormal('RealtimeLogManager-warn')
realtimeLogManager.warn('test', ['test'])
},
},
{
id: 'RealtimeLogManager-tag',
func: () => {
let realtimeTagLogManage = realtimeLogManager.tag('test')
TestConsole.consoleNormal('RealtimeLogManager-tag', realtimeTagLogManage)
},
},
{
id: 'getLogManager',
func: () => {
logManager = Taro.getLogManager()
TestConsole.consoleNormal('getLogManager', logManager)
},
},
{
id: 'LogManager-debug',
func: () => {
logManager.debug(['test'])
TestConsole.consoleNormal('LogManager-debug')
},
},
{
id: 'LogManager-info',
func: () => {
logManager.info(['test'])
TestConsole.consoleNormal('LogManager-info')
},
},
{
id: 'LogManager-log',
func: () => {
logManager.log(['test'])
TestConsole.consoleNormal('LogManager-log')
},
},
{
id: 'LogManager-warn',
func: () => {
logManager.warn(['test'])
TestConsole.consoleNormal('LogManager-warn')
},
},
{
id: 'console',
func: null,
},
{
id: 'RealtimeTagLogManager',
func: null,
},
],
}
render() {
const { list } = this.state
return (
<View className='api-page'>
<ButtonList buttonList={list} />
</View>
)
}
}
5 changes: 4 additions & 1 deletion examples/mini-program-example/src/util/nativeApi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// @ts-ignore
const decorator = window.MethodChannel && window.MethodChannel.jsBridgeMode({ isAsync: false, autoRelease: true }) || (target => target)

// @proxyClassSign('')
class NativeApi {
// @ts-ignore
@window.MethodChannel?.jsBridgeMode({ isAsync: false, autoRelease: true })
@decorator
harmonyNavigateTo(options: any) {
return options
}
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-arm64",
"description": "Native binding for taro",
"version": "3.6.25",
"version": "3.6.27",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-darwin-x64",
"description": "Native binding for taro",
"version": "3.6.25",
"version": "3.6.27",
"os": [
"darwin"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-linux-x64-gnu",
"description": "Native binding for taro",
"version": "3.6.25",
"version": "3.6.27",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/binding-linux-x64-musl",
"version": "3.6.25",
"version": "3.6.27",
"os": [
"linux"
],
Expand Down
2 changes: 1 addition & 1 deletion npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tarojs/binding-win32-x64-msvc",
"description": "Native binding for taro",
"version": "3.6.25",
"version": "3.6.27",
"os": [
"win32"
],
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro",
"version": "3.6.25",
"version": "3.6.27",
"description": "开放式跨端跨框架开发解决方案",
"homepage": "https://github.com/NervJS/taro#readme",
"author": "O2Team",
Expand All @@ -26,8 +26,10 @@
"build:binding:release": "pnpm --filter @tarojs/binding run build",
"format::rs": "cargo fmt --all",
"clear-all": "rimraf **/node_modules",
"lint": "eslint packages/ --ext .js --ext .ts --ext .tsx",
"lint": "eslint ./packages/ --ext .js,.jsx,.ts,.tsx",
"lint:style": "stylelint ./packages/**/*.{css,scss}",
"format": "prettier --write --cache .",
"format:check": "prettier --check --cache .",
"test": "pnpm --if-present -r --aggregate-output --filter=./packages/* test:ci",
"test:binding": "pnpm --filter @tarojs/binding run test",
"updateSnapshot": "pnpm --if-present -r --aggregate-output --filter=./packages/* updateSnapshot",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-react-jsx-to-rn-stylesheet",
"version": "3.6.25",
"version": "3.6.27",
"description": "Transform stylesheet selector to style in JSX Elements.",
"license": "MIT",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-taroapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-transform-taroapi",
"version": "3.6.25",
"version": "3.6.27",
"main": "dist/index.js",
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-preset-taro",
"version": "3.6.25",
"version": "3.6.27",
"description": "Taro babel preset",
"author": "yuche <i@yuche.me>",
"homepage": "https://github.com/nervjs/taro/tree/master/packages/babel-preset-taro#readme",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/create-app",
"version": "3.6.25",
"version": "3.6.27",
"description": "create taro app with one command",
"author": "VincentW <Vincent.Mr.W@gmail.com>",
"homepage": "https://github.com/nervjs/taro/tree/master/packages/create-app#readme",
Expand Down
2 changes: 1 addition & 1 deletion packages/css-to-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "taro-css-to-react-native",
"description": "Convert CSS text to a React Native stylesheet object",
"version": "3.6.25",
"version": "3.6.27",
"main": "dist/index.js",
"license": "MIT",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-taro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-taro",
"version": "3.6.25",
"version": "3.6.27",
"description": "Taro specific linting rules for ESLint",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-html-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-html-transform",
"version": "3.6.25",
"version": "3.6.27",
"description": "transform html tag name selector",
"main": "index.js",
"author": "drchan",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-plugin-constparse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-plugin-constparse",
"version": "3.6.25",
"version": "3.6.27",
"description": "parse constants defined in config",
"main": "index.js",
"author": "Simba",
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-pxtransform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-pxtransform",
"version": "3.6.25",
"version": "3.6.27",
"description": "PostCSS plugin px 转小程序 rpx及h5 rem 单位",
"main": "index.js",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/postcss-unit-transform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-taro-unit-transform",
"version": "3.6.25",
"version": "3.6.27",
"description": "小程序单位转换",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tarojs/shared",
"version": "3.6.25",
"version": "3.6.27",
"description": "Taro utils internal use.",
"author": "yuche <i@yuche.me>",
"homepage": "https://github.com/nervjs/taro/tree/master/packages/shared#readme",
Expand Down
Loading

0 comments on commit d7ccb5a

Please sign in to comment.