Skip to content

Commit

Permalink
test: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MellowCo committed Apr 8, 2023
1 parent 48fda83 commit 02b3afe
Show file tree
Hide file tree
Showing 15 changed files with 461 additions and 498 deletions.
4 changes: 2 additions & 2 deletions examples/taro_webpack4_vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@unocss/webpack": "^0.46.5",
"@unocss/webpack": "^0.50.7",
"@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.50.4",
"unocss": "^0.50.7",
"unocss-preset-weapp": "link:../../",
"vue-loader": "^16.0.0-beta.8"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
<view bg="#2ddd71:50">
111
</view>

<view text-[32px] bg-[#ccc] mt-2>
valueless
</view>
</view>
</template>

Expand Down
363 changes: 165 additions & 198 deletions examples/taro_webpack4_vue3/yarn.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/taro_webpack5_vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"@unocss/webpack": "^0.50.4",
"@unocss/webpack": "^0.50.7",
"@vue/babel-plugin-jsx": "^1.0.6",
"@vue/compiler-sfc": "^3.0.0",
"babel-plugin-import": "^1.13.3",
Expand All @@ -75,7 +75,7 @@
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"typescript": "^3.7.0",
"unocss": "^0.50.6",
"unocss": "^0.50.7",
"unocss-preset-weapp": "link:../../",
"vue-loader": "^17.0.0",
"webpack": "5.69.0"
Expand Down
34 changes: 19 additions & 15 deletions examples/taro_webpack5_vue3/src/pages/attributify-mode/index.vue
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<template>
<view class="dark:bg-#000/30">
<button
<div
text="sm green"
p="y-2 x-4"
m="4"
my-attr="y-1 x-2 sm"
>
Button
</button>
div
</div>

<button
<div
text-base text-blue
py-2 px-4
m-4
>
Button
</button>
div
</div>

<button
<div
li-text="sm green"
li-p="y-2 x-4"
li-m="4"
li-my-attr="y-1 x-2 sm"
>
Button
</button>
div
</div>

<button border="~ red" m="4">
Button
</button>
<div border="~ red" m="4">
div
</div>

<button flex="~ col wrap" class="m4">
Button
</button>
<div flex="~ col wrap" class="m4">
div
</div>

<text text="red" li-text="blue">
This conflicts with links' text prop
Expand All @@ -53,6 +53,10 @@
<view bg-red pr-bg-blue text="#fff" pr-text="green">
prefixedOnly
</view>

<view text-[32px] bg-[#ccc] mt-2>
valueless
</view>
</view>
</template>

Expand Down
4 changes: 4 additions & 0 deletions examples/taro_webpack5_vue3/src/pages/shadow/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
shadow-inner
</view>

<view class="h-200 mb3 bg-white center shadow-inner shadow-[#e45554]">
自定义阴影颜色
</view>

<view class="h-200 mb3 bg-white center shadow-[0px_4px_4px_0px_rgba(237,_0,_0,_1)]">
shadow-[0px_4px_4px_0px_rgba(237,_0,_0,_1)]
</view>
Expand Down
2 changes: 1 addition & 1 deletion examples/uniapp_vue2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"mini-types": "*",
"miniprogram-api-typings": "*",
"postcss-comment": "^2.0.0",
"unocss": "^0.48.0",
"unocss": "^0.50.7",
"unocss-preset-weapp": "link:../../",
"unocss-webpack-uniapp2": "^0.1.4",
"vue-template-compiler": "^2.6.11"
Expand Down
34 changes: 15 additions & 19 deletions examples/uniapp_vue2/src/pages/attributify-mode/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@ export default {

<template>
<view>
<button
<view
text="sm green"
p="y-2 x-4"
m="4"
my-attr="y-1 x-2 sm"
>
Button
</button>
view
</view>

<button
<view
text-base text-blue
py-2 px-4
m-4
>
Button
</button>
view
</view>

<button
<view
li-text="sm green"
li-p="y-2 x-4"
li-m="4"
li-my-attr="y-1 x-2 sm"
>
Button
</button>
view
</view>

<button border="~ red" m="4">
Button
</button>
<view border="~ red" m="4">
view
</view>

<button flex="~ col wrap" class="m4">
Button
</button>
<view flex="~ col wrap" class="m4">
view
</view>

<text text="red" li-text="blue">
This conflicts with links' text prop
Expand All @@ -59,7 +59,3 @@ export default {
</view>
</view>
</template>

<style lang="scss" scoped>
</style>
2 changes: 1 addition & 1 deletion examples/uniapp_vue2/src/pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
</script>

<template>
<view class="py-3">
<view class="py-3 left-60%">
<view class="grid grid-cols-3 justify-items-center">
<view
v-for="(item, index) in list" :key="index" class="w-200 h-200 shadow-md center rounded-md"
Expand Down
5 changes: 4 additions & 1 deletion examples/uniapp_vue2/src/pages/shadow/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
shadow-inner
</view>

<view class="h-200 mb3 bg-white center shadow-inner shadow-#333ddd">
自定义阴影color
</view>

<view class="h-200 mb3 bg-white center shadow-[0px_4px_4px_0px_rgba(237,_0,_0,_1)]">
[0px_4px_4px_0px_rgba(237,_0,_0,_1)]
</view>
</view>
</div>
</template>

Loading

0 comments on commit 02b3afe

Please sign in to comment.