Skip to content

Commit

Permalink
Merge branch 'feat_v3.x' into feat_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyatong authored Nov 22, 2024
2 parents f11f11a + c77e619 commit 18446e7
Show file tree
Hide file tree
Showing 10 changed files with 134 additions and 41 deletions.
104 changes: 96 additions & 8 deletions packages/nutui-taro-demo/src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,125 @@
const subPackages = [
{
"root": "base",
"pages": []
"pages": [
"pages/button/index",
"pages/cell/index",
"pages/configprovider/index",
"pages/icon/index",
"pages/image/index",
"pages/overlay/index"
]
},
{
"root": "layout",
"pages": []
"pages": [
"pages/divider/index",
"pages/grid/index",
"pages/layout/index",
"pages/safearea/index",
"pages/space/index",
"pages/sticky/index"
]
},
{
"root": "nav",
"pages": []
"pages": [
"pages/backtop/index",
"pages/elevator/index",
"pages/fixednav/index",
"pages/hoverbutton/index",
"pages/navbar/index",
"pages/sidenavbar/index",
"pages/tabbar/index",
"pages/tabs/index"
]
},
{
"root": "dentry",
"pages": []
"pages": [
"pages/address/index",
"pages/calendar/index",
"pages/calendarcard/index",
"pages/cascader/index",
"pages/checkbox/index",
"pages/datepicker/index",
"pages/form/index",
"pages/input/index",
"pages/inputnumber/index"
]
},
{
"root": "dataentry",
"pages": []
"pages": [
"pages/menu/index",
"pages/numberkeyboard/index",
"pages/picker/index",
"pages/radio/index",
"pages/range/index",
"pages/rate/index",
"pages/searchbar/index",
"pages/shortpassword/index",
"pages/signature/index",
"pages/switch/index",
"pages/textarea/index",
"pages/uploader/index"
]
},
{
"root": "feedback",
"pages": []
"pages": [
"pages/actionsheet/index",
"pages/badge/index",
"pages/dialog/index",
"pages/drag/index",
"pages/empty/index",
"pages/infiniteloading/index",
"pages/loading/index",
"pages/noticebar/index",
"pages/notify/index",
"pages/popover/index",
"pages/popup/index",
"pages/pulltorefresh/index",
"pages/resultpage/index",
"pages/skeleton/index",
"pages/swipe/index",
"pages/toast/index"
]
},
{
"root": "exhibition",
"pages": [
"pages/countdown/index"
"pages/animate/index",
"pages/animatingnumbers/index",
"pages/avatar/index",
"pages/circleprogress/index",
"pages/collapse/index",
"pages/countdown/index",
"pages/ellipsis/index",
"pages/imagepreview/index",
"pages/indicator/index",
"pages/pagination/index",
"pages/price/index",
"pages/progress/index",
"pages/steps/index",
"pages/swiper/index",
"pages/table/index",
"pages/tag/index",
"pages/tour/index",
"pages/video/index",
"pages/virtuallist/index"
]
},
{
"root": "business",
"pages": []
"pages": [
"pages/avatarcropper/index",
"pages/barrage/index",
"pages/card/index",
"pages/timeselect/index",
"pages/trendarrow/index",
"pages/watermark/index"
]
}
];

Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@
"author": "vickyYE"
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "ImagePreview",
"type": "component",
"cName": "图片预览",
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo1 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [showPreview, setShowPreview] = useState(false)
Expand Down
17 changes: 9 additions & 8 deletions src/packages/imagepreview/demos/taro/demo2.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import React, { useState } from 'react'
import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
import { ImagePreview, Cell, Image } from '@nutui/nutui-react-taro'
import { View } from '@tarojs/components'

const Demo2 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [init, setInit] = useState(0)
Expand All @@ -22,16 +23,16 @@ const Demo2 = () => {
<>
<Cell style={{ position: 'relative' }}>
{images.map((image, index) => (
<span
<View
key={image.src}
onClick={() => {
setShowPreview(true)
setInit(index + 1)
}}
style={{ marginRight: '10px' }}
>
<img width="30px" height="30px" src={image.src} alt={image.src} />
</span>
<Image width={30} height={30} src={image.src} />
</View>
))}
</Cell>
<ImagePreview
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo3 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [showPreview, setShowPreview] = useState(false)
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo4 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [init, setInit] = useState<any>(1)
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo5 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [showPreview, setShowPreview] = useState(false)
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo6.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo6 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
index: 1,
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
index: 2,
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
index: 3,
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
index: 4,
},
]
Expand Down
8 changes: 4 additions & 4 deletions src/packages/imagepreview/demos/taro/demo7.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import { ImagePreview, Cell } from '@nutui/nutui-react-taro'
const Demo7 = () => {
const images = [
{
src: '//fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
src: 'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/26597/30/4870/174583/5c35c5d2Ed55eedc6/50e27870c25e7a82.png',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/9542/17/12873/201687/5c3c4362Ea9eb757d/60026b40a9d60d85.jpg',
},
{
src: '//m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
src: 'https://m.360buyimg.com/mobilecms/s750x366_jfs/t1/30042/36/427/82951/5c3bfdabE3faf2f66/9adca782661c988c.jpg',
},
]
const [showPreview, setShowPreview] = useState(false)
Expand Down
4 changes: 4 additions & 0 deletions src/packages/imagepreview/imagepreview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
background: transparent;
color: $white;

.nut-icon {
color: $white;
}

&.top-right {
top: 50px;
right: 20px;
Expand Down

0 comments on commit 18446e7

Please sign in to comment.