Blame view

uni_modules/uview-plus/components/u-read-more/props.js 2.13 KB
a2702f6d   刘淇   巡查计划
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  import { defineMixin } from '../../libs/vue'
  import defProps from '../../libs/config/props.js'
  export const props = defineMixin({
      props: {
          // 默认的显示占位高度
          showHeight: {
              type: [String, Number],
              default: () => defProps.readMore.showHeight
          },
          // 展开后是否显示"收起"按钮
          toggle: {
              type: Boolean,
              default: () => defProps.readMore.toggle
          },
          // 关闭时的提示文字
          closeText: {
              type: String,
              default: () => defProps.readMore.closeText
          },
          // 展开时的提示文字
          openText: {
              type: String,
              default: () => defProps.readMore.openText
          },
          // 提示的文字颜色
          color: {
              type: String,
              default: () => defProps.readMore.color
          },
          // 提示文字的大小
          fontSize: {
              type: [String, Number],
              default: () => defProps.readMore.fontSize
          },
          // 是否显示阴影
          // 此参数不能写在props/readMore.js中进行默认配置,因为使用了条件编译,在外部js中
          // uni无法准确识别当前是否处于nvue还是非nvue下
          shadowStyle: {
              type: Object,
              default: () => ({
                  // #ifndef APP-NVUE
                  backgroundImage: 'linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)',
                  // #endif
                  // #ifdef APP-NVUE
                  // nvue上不支持设置复杂的backgroundImage属性
                  backgroundImage: 'linear-gradient(to top, #fff, rgba(255, 255, 255, 0.5))',
                  // #endif
                  paddingTop: '100px',
                  marginTop: '-100px'
              })
          },
          // 段落首行缩进的字符个数
          textIndent: {
              type: String,
              default: () => defProps.readMore.textIndent
          },
          // open和close事件时,将此参数返回在回调参数中
          name: {
              type: [String, Number],
              default: () => defProps.readMore.name
          }
      }
  })