Skip to content

Commit

Permalink
test: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MellowCo committed May 27, 2023
1 parent dafad39 commit 39cbcf4
Show file tree
Hide file tree
Showing 13 changed files with 1,861 additions and 1,613 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ interactive/guides/vendor/*.md
interactive/data/guides.ts
interactive/public/play
interactive/public/shiki
.swc
22 changes: 11 additions & 11 deletions examples/taro_react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@
"author": "",
"dependencies": {
"@babel/runtime": "^7.7.7",
"@tarojs/components": "3.4.13",
"@tarojs/plugin-framework-react": "3.4.13",
"@tarojs/react": "3.4.13",
"@tarojs/runtime": "3.4.13",
"@tarojs/taro": "3.4.13",
"@tarojs/components": "3.6.6",
"@tarojs/plugin-framework-react": "3.6.6",
"@tarojs/react": "3.6.6",
"@tarojs/runtime": "3.6.6",
"@tarojs/taro": "3.6.6",
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@tarojs/mini-runner": "3.4.13",
"@tarojs/webpack-runner": "3.4.13",
"@tarojs/mini-runner": "3.6.6",
"@tarojs/webpack-runner": "3.6.6",
"@types/react": "^17.0.2",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@unocss/webpack": "0.46.1",
"babel-preset-taro": "3.4.13",
"@unocss/webpack": "0.52.4",
"babel-preset-taro": "3.6.6",
"eslint": "^8.12.0",
"eslint-config-taro": "3.4.13",
"eslint-config-taro": "3.6.6",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"stylelint": "^14.4.0",
"typescript": "^4.1.0",
"unocss": "^0.51.8",
"unocss": "^0.52.4",
"unocss-preset-weapp": "link:../../"
}
}
24 changes: 23 additions & 1 deletion examples/taro_react/src/pages/color/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
export default function BorderColor() {
const day = 30

function classnames(obj:Record<string,boolean>){
let arr:string[] = []

for (const key in obj) {
if (obj[key]) {
arr.push(key)
}
}
return arr.join(' ')
}

return (
<view className='p-2 text-center'>
<view className='bg-[#3498db] mb-1'>
bg-[#3498db]
</view>
<view className='bg-[#3498db]/80 mb-1'>
bg-[#3498db]/80
bg-[#3498db] 80
</view>

<view className='bg-[#3498db]:60 mb-1'>
Expand Down Expand Up @@ -39,6 +52,15 @@ export default function BorderColor() {
<view className='bg-hex-000/80 text-hex-fff:60 mb-1'>
bg-hex-000/80 text-hex-fff:60
</view>

<view className={day < 20 ? 'c-#e67e22' : "c-[#157]/60"} >剩余 {day}</view>

<view className={classnames({
'c-#e67e22':true,
"c-$color-variable/10": true
})
}
>222222</view>
</view>
)
}
2,664 changes: 1,449 additions & 1,215 deletions examples/taro_react/yarn.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions examples/taro_webpack4_vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@
},
"devDependencies": {
"@babel/core": "^7.8.0",
"@iconify/json": "^2.2.64",
"@iconify/json": "^2.2.70",
"@tarojs/mini-runner": "3.4.13",
"@tarojs/webpack-runner": "3.4.13",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@unocss/webpack": "^0.51.12",
"@unocss/webpack": "^0.52.4",
"@vue/compiler-sfc": "^3.0.0",
"babel-preset-taro": "3.4.13",
"eslint": "^8.12.0",
"eslint-config-taro": "3.4.13",
"eslint-plugin-vue": "^8.0.0",
"stylelint": "^14.4.0",
"typescript": "^4.1.0",
"unocss": "^0.51.12",
"unocss": "^0.52.4",
"unocss-preset-weapp": "link:../../",
"vue-loader": "^16.0.0-beta.8"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/taro_webpack4_vue3/src/pages/bg/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {

<template>
<view text="white" class="p-3">
<view class="bg-local-logo">
<view class="bg-local-logo mx-auto">
</view>

<view flex justify-center w-full>
Expand Down
Loading

0 comments on commit 39cbcf4

Please sign in to comment.