pixuireactcomponents 1.2.2 → 1.2.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/index.d.ts +15 -0
  2. package/index.js +16 -20
  3. package/package.json +9 -9
  4. package/tools/EventDispatcherJs.d.ts +10 -0
  5. package/tools/EventDispatcherJs.js +71 -0
  6. package/tools/Logger.d.ts +6 -0
  7. package/tools/Logger.js +138 -0
  8. package/ui/components/button/Button.d.ts +5 -0
  9. package/ui/components/button/Button.js +37 -0
  10. package/ui/components/carousel/Carousel.d.ts +5 -0
  11. package/ui/components/carousel/Carousel.js +219 -0
  12. package/ui/components/dropdown/Dropdown.d.ts +30 -0
  13. package/ui/components/dropdown/Dropdown.js +92 -0
  14. package/ui/components/dropdown/DropdownOptionUI.d.ts +11 -0
  15. package/ui/components/dropdown/DropdownOptionUI.js +28 -0
  16. package/ui/components/dropdown/DropdownSpreadMainUI.d.ts +9 -0
  17. package/ui/components/dropdown/DropdownSpreadMainUI.js +27 -0
  18. package/ui/components/dropdown/DropdownUnspreadMainUI.d.ts +9 -0
  19. package/ui/components/dropdown/DropdownUnspreadMainUI.js +27 -0
  20. package/ui/components/gradient/GradientText.d.ts +63 -0
  21. package/ui/components/gradient/{GradientText.tsx → GradientText.js} +174 -183
  22. package/ui/components/outlinetext/OutlineText.d.ts +94 -0
  23. package/ui/components/outlinetext/OutlineText.js +168 -0
  24. package/ui/components/progress/Progress.d.ts +34 -0
  25. package/ui/components/progress/Progress.js +142 -0
  26. package/ui/components/slapface/Slapface.d.ts +12 -0
  27. package/ui/components/slapface/Slapface.js +235 -0
  28. package/ui/components/slider/Slider.d.ts +57 -0
  29. package/ui/components/slider/Slider.js +289 -0
  30. package/ui/components/tab/Tab.d.ts +6 -0
  31. package/ui/components/tab/Tab.js +27 -0
  32. package/ui/components/tab/Tabs.d.ts +12 -0
  33. package/ui/components/tab/Tabs.js +54 -0
  34. package/cmdAfterTsBuild.js +0 -8
  35. package/tools/EventDispatcherJs.tsx +0 -74
  36. package/tools/Logger.tsx +0 -161
  37. package/tools/img/logger.png +0 -0
  38. package/tsconfig.json +0 -45
  39. package/ui/components/bulletscreen/BulletItemAnimation.tsx +0 -117
  40. package/ui/components/bulletscreen/BulletScreenAnimation.tsx +0 -278
  41. package/ui/components/bulletscreen/bullet.less +0 -17
  42. package/ui/components/button/Button.tsx +0 -18
  43. package/ui/components/carousel/Carousel.tsx +0 -279
  44. package/ui/components/checkBox/CheckBox.tsx +0 -40
  45. package/ui/components/dropdown/Dropdown.tsx +0 -126
  46. package/ui/components/dropdown/DropdownOptionUI.tsx +0 -14
  47. package/ui/components/dropdown/DropdownSpreadMainUI.tsx +0 -11
  48. package/ui/components/dropdown/DropdownUnspreadMainUI.tsx +0 -11
  49. package/ui/components/outlinetext/OutlineText.tsx +0 -184
  50. package/ui/components/progress/Progress.tsx +0 -174
  51. package/ui/components/slapface/Slapface.tsx +0 -284
  52. package/ui/components/slider/Slider.tsx +0 -366
  53. package/ui/components/tab/Tab.tsx +0 -12
  54. package/ui/components/tab/Tabs.tsx +0 -56
  55. package/ui/components/togglegroup/ToggleGroup.tsx +0 -105
  56. package/ui/components/videoplayer/VideoPlayer.tsx +0 -200
  57. package/ui/components/waterfallcomponent/WaterfallComponent.jsx +0 -687
  58. package/ui/components/waterfallcomponent/less/WaterfallComponent.less +0 -13
  59. package/ui/sample/Images.tsx +0 -60
  60. package/ui/sample/OutlineText/OutlineDemo.tsx +0 -61
  61. package/ui/sample/Slapface/SlapfaceDemo.tsx +0 -30
  62. package/ui/sample/asset/btn_close.png +0 -0
  63. package/ui/sample/asset/changtai_button.jpg +0 -0
  64. package/ui/sample/asset/checkbox0.png +0 -0
  65. package/ui/sample/asset/checkbox1.png +0 -0
  66. package/ui/sample/asset/data_arrow_down.png +0 -0
  67. package/ui/sample/asset/data_arrow_up.png +0 -0
  68. package/ui/sample/asset/dot.png +0 -0
  69. package/ui/sample/asset/inner.png +0 -0
  70. package/ui/sample/asset/item_reddot.png +0 -0
  71. package/ui/sample/asset/loading.png +0 -0
  72. package/ui/sample/asset/money_dropdown.png +0 -0
  73. package/ui/sample/asset/money_dropdownall.png +0 -0
  74. package/ui/sample/asset/outer.png +0 -0
  75. package/ui/sample/asset/slapface_samplepic1.png +0 -0
  76. package/ui/sample/asset/slapface_samplepic2.png +0 -0
  77. package/ui/sample/asset/slapface_samplepic3.png +0 -0
  78. package/ui/sample/asset/slapface_samplepic4.png +0 -0
  79. package/ui/sample/asset/slapface_samplepic5.png +0 -0
  80. package/ui/sample/asset/slapface_samplepic6.png +0 -0
  81. package/ui/sample/asset/tab_choosed.png +0 -0
  82. package/ui/sample/asset/tabs_bg.png +0 -0
  83. package/ui/sample/asset/video_pause.png +0 -0
  84. package/ui/sample/asset/video_play.png +0 -0
  85. package/ui/sample/asset/video_reload.png +0 -0
  86. package/ui/sample/asset/xuanfu_button.jpg +0 -0
  87. package/ui/sample/asset/yaxia_button.jpg +0 -0
  88. package/ui/sample/bulletscreen/BulletDemo.tsx +0 -84
  89. package/ui/sample/button/ButtonDemo.tsx +0 -19
  90. package/ui/sample/carousel/carouselDemo.tsx +0 -52
  91. package/ui/sample/checkBox/checkBoxDemo.tsx +0 -7
  92. package/ui/sample/dropdown/DropdownDemo.tsx +0 -65
  93. package/ui/sample/dropdown/MoneyDropdownOption.tsx +0 -50
  94. package/ui/sample/dropdown/MoneyDropdownSpreadMain.tsx +0 -42
  95. package/ui/sample/dropdown/MoneyDropdownUnspreadMain.tsx +0 -44
  96. package/ui/sample/gradient/GradientDemo.tsx +0 -51
  97. package/ui/sample/less/video.less +0 -144
  98. package/ui/sample/progress/ProgressDemo.tsx +0 -74
  99. package/ui/sample/slider/SliderDemo.tsx +0 -116
  100. package/ui/sample/tab/TabDemo.tsx +0 -67
  101. package/ui/sample/tab/TopTab.tsx +0 -74
  102. package/ui/sample/togglegroup/ToggleGroupDemo.tsx +0 -35
  103. package/ui/sample/videoplayer/VideoPlayerDemo.tsx +0 -57
  104. package/ui/sample/waterfallcomponent/WaterfallComponentDemo.jsx +0 -137
@@ -1,60 +0,0 @@
1
-
2
- import btn_close from './asset/btn_close.png';
3
- import changtai_button from './asset/changtai_button.jpg';
4
- import checkbox0 from './asset/checkbox0.png';
5
- import checkbox1 from './asset/checkbox1.png';
6
- import data_arrow_down from './asset/data_arrow_down.png';
7
- import data_arrow_up from './asset/data_arrow_up.png';
8
- import dot from './asset/dot.png';
9
- import inner from './asset/inner.png';
10
- import item_reddot from './asset/item_reddot.png';
11
- import loading from './asset/loading.png';
12
- import money_dropdown from './asset/money_dropdown.png';
13
- import money_dropdownall from './asset/money_dropdownall.png';
14
- import outer from './asset/outer.png';
15
- import tab_choosed from './asset/tab_choosed.png';
16
- import tabs_bg from './asset/tabs_bg.png';
17
- import video_pause from './asset/video_pause.png';
18
- import video_play from './asset/video_play.png';
19
- import video_reload from './asset/video_reload.png';
20
- import xuanfu_button from './asset/xuanfu_button.jpg';
21
- import yaxia_button from './asset/yaxia_button.jpg';
22
- import slapface_samplepic1 from './asset/slapface_samplepic1.png'
23
- import slapface_samplepic2 from './asset/slapface_samplepic2.png'
24
- import slapface_samplepic3 from './asset/slapface_samplepic3.png'
25
- import slapface_samplepic4 from './asset/slapface_samplepic4.png'
26
- import slapface_samplepic5 from './asset/slapface_samplepic5.png'
27
- import slapface_samplepic6 from './asset/slapface_samplepic6.png'
28
-
29
-
30
-
31
-
32
- export const Images = {
33
- btn_close: btn_close,
34
- changtai_button: changtai_button,
35
- checkbox0: checkbox0,
36
- checkbox1: checkbox1,
37
- data_arrow_down: data_arrow_down,
38
- data_arrow_up: data_arrow_up,
39
- dot: dot,
40
- inner: inner,
41
- item_reddot: item_reddot,
42
- loading: loading,
43
- money_dropdown: money_dropdown,
44
- money_dropdownall: money_dropdownall,
45
- outer: outer,
46
- tab_choosed: tab_choosed,
47
- tabs_bg: tabs_bg,
48
- video_pause: video_pause,
49
- video_play: video_play,
50
- video_reload: video_reload,
51
- xuanfu_button: xuanfu_button,
52
- yaxia_button: yaxia_button,
53
- slapface_samplepic1: slapface_samplepic1,
54
- slapface_samplepic2: slapface_samplepic2,
55
- slapface_samplepic3: slapface_samplepic3,
56
- slapface_samplepic4: slapface_samplepic4,
57
- slapface_samplepic5: slapface_samplepic5,
58
- slapface_samplepic6: slapface_samplepic6
59
- };
60
-
@@ -1,61 +0,0 @@
1
- import { Component, createRef, CSSProperties } from 'preact';
2
- import { OutlineText } from '../../components/outlinetext/OutlineText';
3
-
4
- interface DemoProps{
5
- style?: CSSProperties;
6
- outlineColor?: {
7
- r: number;
8
- g: number;
9
- b: number;
10
- a: number;
11
- };
12
- outlineDistance?: {
13
- x: number;
14
- y: number;
15
- };
16
- }
17
- export class OutlineDemo extends Component<DemoProps,DemoProps >{
18
- constructor(param)
19
- {
20
- super(param);
21
- this.setState({
22
- style: {width:'200px', height:'200px', backgroundColor:'#FF00FFFF'},
23
- outlineDistance : {
24
- x : 2,
25
- y : 2
26
- },
27
- outlineColor : {
28
- r: 0,
29
- g:204,
30
- b: 0,
31
- a: 1,
32
- }
33
- });
34
- }
35
-
36
-
37
- onClickButton() {
38
- this.setState({
39
- style: {width:'100px', height:'100px', backgroundColor:'#FFFF00FF'},
40
- outlineDistance : {
41
- x : 1,
42
- y : 1
43
- },
44
- outlineColor : {
45
- r: 255,
46
- g: 0,
47
- b: 0,
48
- a: 1,
49
- }
50
- });
51
- }
52
-
53
- render() {
54
- return(
55
- <div>
56
- <div style={{width:'100px', height:'100px', backgroundColor:'#FF00FFFF'}} onClick={this.onClickButton.bind(this)}>点击更新组件状态</div>
57
- <OutlineText style={this.state.style} outlineDistance={this.state.outlineDistance} outlineColor={this.state.outlineColor}/>
58
- </div>
59
- );
60
- }
61
- }
@@ -1,30 +0,0 @@
1
- import { Component } from 'preact';
2
- import { Slapface } from 'src/pixUIReactComponents/ui/components/slapface/Slapface';
3
- import { Images } from 'src/pixUIReactComponents/ui/sample/Images'
4
-
5
- const settingsitems = {
6
- ani_switch_type: 2,
7
- is_mask: false
8
- }
9
-
10
- let jumpButton = {
11
- pic_changtai: Images.changtai_button,
12
- pic_yaxia: Images.yaxia_button,
13
- pic_xuanfu: Images.xuanfu_button
14
- }
15
-
16
- let btn_closeButton = Images.btn_close
17
-
18
- let groupArr = [{ picture: Images.slapface_samplepic1, width: 632, height: 639 }, { picture: Images.slapface_samplepic2, width: 304, height: 331 },
19
- { picture: Images.slapface_samplepic3, width: 662, height: 631 }, { picture: Images.slapface_samplepic4, width: 728, height: 651 },
20
- { picture: Images.slapface_samplepic5, width: 630, height: 579 }, { picture: Images.slapface_samplepic6, width: 703, height: 621 }];
21
-
22
- export class SlapfaceDemo extends Component<any, any>{
23
- render() {
24
- return (
25
- <div style={{position:"relative",width:"100%",height:"100%"}}>
26
- <Slapface LoadGroup={groupArr} jumpButton={jumpButton} settingsitems={settingsitems} pic_loading={Images.loading} btn_closeButton = {Images.btn_close}/>
27
- </div>
28
- )
29
- }
30
- }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,84 +0,0 @@
1
- import { createRef } from 'lib/preact/src/create-element';
2
- import { Component, CSSProperties } from 'preact';
3
- import { BulletScreenAnimation, BulletScreenAnimationData } from '../../components/bulletscreen/BulletScreenAnimation';
4
-
5
- let rootStyle: CSSProperties = {
6
- width: '100%',
7
- height: '750px',
8
-
9
- display: 'flex',
10
- flexDirection: 'row',
11
- justifyContent: 'center',
12
- alignItems: 'center',
13
-
14
- backgroundColor: '#FF000055'
15
- };
16
-
17
- let bulletScreenConfigData: BulletScreenAnimationData = {
18
- generateCycle: 200,
19
- channelHeight: 50,
20
- screenWidth: 0,
21
- screenHeight: 0,
22
- totalTime: 8000
23
- };
24
-
25
- let GetBulletData = (function () {
26
- let BULLET_NUM = 1;
27
- return function () {
28
- console.log('测试弹幕1');
29
- return '测试弹幕' + BULLET_NUM++;
30
- };
31
- }());
32
-
33
- export class BulletDemo extends Component<
34
- any,
35
- {
36
- screenWidth: number;
37
- screenHeight: number;
38
- }>{
39
- constructor(props) {
40
- super(props);
41
-
42
- this.state = {
43
- screenWidth: 0,
44
- screenHeight: 0
45
- };
46
- }
47
-
48
- private refRoot = createRef();
49
- private refBulletScreen = createRef();
50
-
51
- componentDidMount() {
52
- let _width = this.getRootComputedSize('width');
53
- let _height = this.getRootComputedSize('height');
54
- console.warn(_width, '___', _height);
55
-
56
- this.setState({
57
- screenWidth: _width,
58
- screenHeight: _height
59
- }, () => {
60
- this.refBulletScreen.current.StartRunBullets();
61
- });
62
- }
63
-
64
- getRootComputedSize = (key: string) => {
65
- if (key == '' || key == undefined) return undefined;
66
-
67
- let realWidthStr = window.getComputedStyle(this.refRoot.current, null).getPropertyValue(key);
68
- let widthNum = parseInt(realWidthStr.substring(0, realWidthStr.length - 2));
69
-
70
- return widthNum;
71
- }
72
-
73
- render() {
74
- console.warn('[[render]]---)))');
75
- bulletScreenConfigData.screenWidth = this.state.screenWidth;
76
- bulletScreenConfigData.screenHeight = this.state.screenHeight;
77
-
78
- return (
79
- <div ref={this.refRoot} style={rootStyle}>
80
- <BulletScreenAnimation screenWidth={this.state.screenWidth} screenHeight={this.state.screenHeight} ref={this.refBulletScreen} isRun={true} screenData={bulletScreenConfigData} getBulletText={GetBulletData} />
81
- </div>
82
- );
83
- }
84
- }
@@ -1,19 +0,0 @@
1
- import { Component } from 'preact';
2
- import {Button} from '../../components/button/Button';
3
- import { Images } from '../Images';
4
-
5
- export class ButtonDemo extends Component<any,any> {
6
- public clickArr = [1,2,3]
7
- private clickEvent = (arr1,arr2,arr3)=>{
8
- console.log("1",arr1)
9
- console.log("2",arr2)
10
- console.log("3",arr3)
11
- }
12
- render(){
13
- return(
14
- <div>
15
- <Button pic_changtai = {Images.changtai_button} pic_yaxia = {Images.yaxia_button} pic_xuanfu = {Images.xuanfu_button} clickEvent = {this.clickEvent} clickArr = {this.clickArr} />
16
- </div>
17
- )
18
- }
19
- }
@@ -1,52 +0,0 @@
1
- import { useState } from 'preact/hooks';
2
- import { useRef } from '../../../../../lib/preact/hooks/src';
3
- import { Carousel } from '../../components/carousel/Carousel';
4
- /*
5
- 选项:
6
- defaultIndex: number = 1, //默认index,从1开始
7
- compWidth: number = 100, //组件宽度
8
- compHeight: number = 100, //组件高度
9
- autoplay: boolean = true, //自动轮播
10
- switchDuration: number = 3000, //自动轮播切换间隔(>1000)
11
- loop: boolean = true, //播到最后是否停止
12
- isVertical: boolean = false, //轮播元素滚动方向
13
- touchable: boolean = true, //是否允许手势切换
14
- onSlideChange: Function | null = null//切换元素后的回调函数
15
- onclickEvent: Function
16
- cRef: PropRef //Carousel的引用,通过ref可以拿到组件的切换方法
17
- */
18
- export function CarouselDemo() {
19
- const CarouselRef = useRef();
20
- let carouselData = [1, 2, 3];
21
- let clicked = (i) => {
22
- console.log('clicked ' + i);
23
- };
24
- const switchNext = () => {
25
- (CarouselRef.current as any).handleNext();
26
- };
27
- const switchPrev = () => {
28
- (CarouselRef.current as any).handlePrev();
29
- };
30
- let [aut,setaut] = useState(true);
31
-
32
- return (
33
- <div>
34
- <div onClick={switchNext} style={{ width: '50px', height: '50px', backgroundColor: 'green' }}>next</div>
35
- <div onClick={switchPrev} style={{ width: '50px', height: '50px', backgroundColor: 'green' }}>prev</div>
36
-
37
- <div onClick={()=>{setaut(true)}} style={{ width: '50px', height: '50px', backgroundColor: 'green' }}>auto</div>
38
- <div onClick={()=>{setaut(false)}} style={{ width: '50px', height: '50px', backgroundColor: 'green' }}>notauto</div>
39
-
40
- <Carousel onclickEvent={clicked} compWidth={300} compHeight={100} switchDuration={1000} cRef={CarouselRef} autoplay = {aut}>
41
- {/* 在Carousel.Item的子节点放入要展示的内容,节点宽高要和compWidth,compHeight一致 */}
42
- {carouselData.map((item, i) => (
43
- <Carousel.Item>
44
- <div style={{ width: '300px', height: '100px', backgroundColor: 'yellow' }} >{item}</div>
45
- </Carousel.Item>
46
- ))}
47
- </Carousel>
48
-
49
- </div>
50
-
51
- );
52
- }
@@ -1,7 +0,0 @@
1
- import { Checkbox } from '../../components/checkBox/CheckBox';
2
-
3
- export function CheckboxDemo() {
4
- return (
5
- <Checkbox defauleSelected={false} selectedChanged={(b) => { console.log(b); }} />
6
- );
7
- }
@@ -1,65 +0,0 @@
1
- import { Component, CSSProperties } from 'preact';
2
- import { Dropdown, DropdownConfig } from '../../components/dropdown/Dropdown';
3
- import { Images } from '../Images';
4
- import { MoneyDropdownOption } from './MoneyDropdownOption';
5
- import { MoneyDropdownSpreadMain } from './MoneyDropdownSpreadMain';
6
- import { MoneyDropdownUnspreadMain } from './MoneyDropdownUnspreadMain';
7
-
8
- const dropdownAreaStyle: CSSProperties = {
9
- position: 'absolute',
10
- top: '0px',
11
- right: '17px',
12
- width: '98px',
13
- height: '40px',
14
- // backgroundColor: '#FF00FF33',
15
- };
16
-
17
- const TYPES: string[] = ['团队', '单人路', '打野', '中路', '射手', '辅助'];
18
-
19
- export class DropdownDemo extends Component<any, any>{
20
- constructor(props) {
21
- super(props);
22
- }
23
-
24
- onChoose = () => {
25
-
26
- }
27
-
28
- render() {
29
-
30
-
31
- // dropdown展开的样式
32
- const _spreadStyle: CSSProperties = {
33
- position: 'absolute',
34
- display: 'flex',
35
- flexDirection: 'column',
36
- justifyContent: 'flex-start',
37
- alignItems: 'center',
38
- borderImage: `url(${Images.money_dropdownall}) 45 10 10 10`,
39
- width: '98px',
40
- height: '182px',
41
- top: '4px',
42
- };
43
-
44
- let _config: DropdownConfig<string> = {
45
- spreadStyle: _spreadStyle,
46
- datas: TYPES,
47
- };
48
-
49
- let _options: MoneyDropdownOption[] = Array(TYPES.length).fill('').map((value, index) => {
50
- return <MoneyDropdownOption index={index} info={TYPES[index]} />;
51
- });
52
-
53
- return (
54
- <div style={dropdownAreaStyle}>
55
- <Dropdown<string, MoneyDropdownUnspreadMain, MoneyDropdownSpreadMain, MoneyDropdownOption>
56
- config={_config}
57
- onChoose={this.onChoose}
58
- unspreadMainUI={<MoneyDropdownUnspreadMain />}
59
- spreadMainUI={<MoneyDropdownSpreadMain />}
60
- optionsUI={_options}
61
- defaultIndex={this.state.selectedType} />
62
- </div>
63
- );
64
- }
65
- }
@@ -1,50 +0,0 @@
1
- import { CSSProperties } from 'preact';
2
- import { DropdownOptionUI } from '../../components/dropdown/DropdownOptionUI';
3
- import videoLess from './../less/video.less';
4
-
5
-
6
-
7
- const rootStyle: CSSProperties = {
8
- width: '98px',
9
- height: '29px',
10
- flexShrink: 0, //如果需要使用滚动条需加该属性
11
- // backgroundColor: "#FF000044"
12
- };
13
-
14
- const textStyle: CSSProperties = {
15
- color: '#CDBE91',
16
- fontSize: 14,
17
- marginLeft: '17px', // 13 + 4
18
-
19
- marginTop: '7px'
20
- };
21
-
22
- const lineStyle: CSSProperties = {
23
- height: '1px',
24
- width: '65px',
25
- marginLeft: '17px',
26
- backgroundColor: '#C4C4C4',
27
- };
28
-
29
-
30
- export class MoneyDropdownOption extends DropdownOptionUI<string>{
31
- private isLast = false
32
- constructor(props) {
33
- super(props);
34
-
35
- if (props['isLast']) this.isLast = true;
36
- // this.props.isLast : boolean
37
- // 最后一个不要横线...
38
- }
39
-
40
- render() {
41
- return (
42
- <div style={rootStyle} className={videoLess.column_start_start} onClick={this.props.onChoose}>
43
- <div style={{ width: '100%', height: '28px' }} className={videoLess.row_start_center}>
44
- <text style={textStyle}>{this.props.info}</text>
45
- </div>
46
- {this.isLast ? null : <div style={lineStyle}></div>}
47
- </div>
48
- );
49
- }
50
- }
@@ -1,42 +0,0 @@
1
- import { CSSProperties } from 'preact';
2
- import { DropdownSpreadMainUI } from '../../components/dropdown/DropdownSpreadMainUI';
3
- import { Images } from '../Images';
4
- import videoLess from './../less/video.less';
5
-
6
-
7
- const rootStyle: CSSProperties = {
8
- width: '98px',
9
- height: '32px',
10
- // backgroundColor: '#FF000F77'
11
- };
12
-
13
- const textStyle: CSSProperties = {
14
- color: '#CDBE91',
15
- fontSize: 16,
16
- marginLeft: '13px',
17
- top: '4px',
18
- };
19
-
20
- const arrowStyle: CSSProperties = {
21
- width: '15px',
22
- height: '18px',
23
- marginRight: '20px',
24
- top: '-2px',
25
- };
26
-
27
-
28
- export class MoneyDropdownSpreadMain extends DropdownSpreadMainUI<string>{
29
- constructor(props) {
30
- super(props);
31
- // console.warn("MoneyDropdownSpreadMain constructor ---")
32
- }
33
-
34
- render() {
35
- return (
36
- <div style={rootStyle} className={videoLess.row_between_center} onClick={this.props.closeList}>
37
- <text style={textStyle}>{this.props.info}</text>
38
- <img style={arrowStyle} src={Images.data_arrow_up} />
39
- </div>
40
- );
41
- }
42
- }
@@ -1,44 +0,0 @@
1
- import { CSSProperties } from 'preact';
2
- import { DropdownUnspreadMainUI } from '../../components/dropdown/DropdownUnspreadMainUI';
3
- import { Images } from '../Images';
4
- import videoLess from './../less/video.less';
5
-
6
-
7
-
8
- const rootStyle: CSSProperties = {
9
- width: '98px',
10
- height: '40px',
11
- top: '4px',
12
- backgroundImage: `url(${Images.money_dropdown})`
13
- };
14
-
15
- const textStyle: CSSProperties = {
16
- color: '#CDBE91',
17
- fontSize: 16,
18
- marginLeft: '13px',
19
- };
20
-
21
- const arrowStyle: CSSProperties = {
22
- width: '15px',
23
- height: '18px',
24
- marginRight: '20px',
25
- top: '-4px',
26
- };
27
-
28
-
29
- export class MoneyDropdownUnspreadMain extends DropdownUnspreadMainUI<string>{
30
- constructor(props) {
31
- super(props);
32
-
33
- // console.warn("UnspreadMain constructor----")
34
- }
35
-
36
- render() {
37
- return (
38
- <div style={rootStyle} className={videoLess.row_between_center} onClick={this.props.openList}>
39
- <text style={textStyle}>{this.props.info}</text>
40
- <img style={arrowStyle} src={Images.data_arrow_down} />
41
- </div>
42
- );
43
- }
44
- }
@@ -1,51 +0,0 @@
1
- import { Component, CSSProperties, } from 'preact';
2
- import { GradientText } from '../../components/gradient/GradientText';
3
-
4
- interface DemoProps {
5
- buttonText?: string;
6
- fontSize?: number;
7
- text?: string;
8
- fontStyle?: string;
9
- style?: CSSProperties;
10
- colorTop?: string;
11
- direction?: string;
12
- }
13
-
14
- export class GradientTextDemo extends Component<DemoProps, DemoProps> {
15
-
16
- constructor(param) {
17
- super(param);
18
- this.setState({
19
- buttonText: '点击更新组件属性',
20
- fontSize: 25,
21
- text: '1111',
22
- fontStyle: 'Normal',
23
- style: { width: '200px', height: '200px', backgroundColor: '#FFFFFFFF' },
24
- colorTop: '#4CE0314F',
25
- direction: 'Vertical',
26
- });
27
- }
28
-
29
-
30
- onClickButton() {
31
- this.setState({
32
- buttonText: '已更新属性',
33
- fontSize: 30,
34
- fontStyle: 'BoldAndItalic',
35
- text: '123123',
36
- style: { width: '500px', height: '200px', backgroundColor: '#FFFFFFFF' },
37
- colorTop: '#8757FFFF',
38
- direction: 'Both',
39
- });
40
- }
41
-
42
- render() {
43
- console.log(this.state.text + '|22222222222222222222222222222222222222222222222222222222222222222222222222');
44
- return (
45
- <div>
46
- <div style={{ width: '150px', height: '50px', backgroundColor: '#FF00FFFF' }} onClick={this.onClickButton.bind(this)}>{this.state.buttonText}</div>
47
- <GradientText style={this.state.style} fontStyle={this.state.fontStyle} fontSize={this.state.fontSize} text={this.state.text} colorTop={this.state.colorTop} direction={this.state.direction} />
48
- </div>
49
- );
50
- }
51
- }