sadais-piui 1.2.7-beta30 → 1.2.7-beta33

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.
@@ -1,14 +1,10 @@
1
1
  <template>
2
- <view
3
- class="pi-collapse-item"
4
- :class="[customClass]"
5
- :style="[customStyle]"
6
- @click="clickHandler"
7
- >
2
+ <view class="pi-collapse-item" :class="[customClass]" :style="[customStyle]">
8
3
  <!-- 标题 -->
9
4
  <view
10
5
  class="pi-collapse-item__title pi-justify-between pi-align-center"
11
6
  :class="{ disabled: disabled, border: border }"
7
+ @tap="handleCollapseItemClick"
12
8
  >
13
9
  <!-- 左侧 -->
14
10
  <view class="pi-flex-column pi-lh-44">
@@ -32,7 +28,12 @@
32
28
  </view>
33
29
  </view>
34
30
  <!-- 内容 -->
35
- <view ref="animation" class="pi-collapse-item__content" :animation="animationData">
31
+ <view
32
+ ref="animation"
33
+ class="pi-collapse-item__content"
34
+ :animation="animationData"
35
+ @tap="handleContentClick"
36
+ >
36
37
  <view :id="elId" :ref="elId" class="pi-collapse-item__content__text content-class">
37
38
  <slot />
38
39
  </view>
@@ -176,7 +177,7 @@ export default {
176
177
  this.expanded = (value || []).some(item => item == this.name)
177
178
  }
178
179
  // 设置组件的展开或收起状态
179
- this.$nextTick(function () {
180
+ this.$nextTick(function() {
180
181
  this.setContentAnimate()
181
182
  })
182
183
  },
@@ -227,8 +228,11 @@ export default {
227
228
  })
228
229
  // #endif
229
230
  },
231
+ handleContentClick() {
232
+ this.$emit('content-click')
233
+ },
230
234
  // 点击collapsehead头部
231
- clickHandler() {
235
+ handleCollapseItemClick() {
232
236
  if (this.disabled || this.animating) return
233
237
  // 设置本组件为相反的状态
234
238
  this.parent && this.parent.onChange(this)
@@ -16,12 +16,12 @@
16
16
  :style="[customStyle, getItemStyle]"
17
17
  @tap="handleSelectItem(item)"
18
18
  >
19
- <view :class="[{ 'pi-primary': item[keyField] === val }]">
19
+ <view :class="[{ 'pi-primary': item[getKeyField] === val }]">
20
20
  {{ item[getDisplayField] }}
21
21
  </view>
22
22
  <!-- 如果配置了图片地址,使用图片 -->
23
23
  <pi-img
24
- v-if="getSelectedImg.src && item[keyField] === val"
24
+ v-if="getSelectedImg.src && item[getKeyField] === val"
25
25
  :src="getSelectedImg.src"
26
26
  :mode="getSelectedImg.mode"
27
27
  :width="getSelectedImg.width"
@@ -43,7 +43,7 @@
43
43
  <pi-checkbox
44
44
  v-if="!getSelectedImg.src && getSelectedCheckbox !== 'none'"
45
45
  readonly
46
- :value="item[keyField] === val"
46
+ :value="item[getKeyField] === val"
47
47
  :name="getSelectedCheckbox.name"
48
48
  :shape="getSelectedCheckbox.shape"
49
49
  :border-radius="getSelectedCheckbox.borderRadius"
@@ -31,7 +31,7 @@
31
31
  </view>
32
32
  <view
33
33
  class="slider-bar-guide"
34
- :style="[{ 'background-color': showSliderBarGuide ? '#e4e7ed' : 'unset' }]"
34
+ :style="[{ 'background-color': showSliderBarGuide ? '#e4e7ed' : 'transparent' }]"
35
35
  >
36
36
  <view v-if="showSliderBar" class="slider-bar" :style="[getSliderBarStyle]" />
37
37
  </view>
@@ -21,6 +21,10 @@ export default {
21
21
  },
22
22
  url: {
23
23
  type: String
24
+ },
25
+ autoAddTimestamp: {
26
+ type: Boolean,
27
+ default: () => true
24
28
  }
25
29
  },
26
30
  data() {
@@ -47,9 +51,11 @@ export default {
47
51
  }
48
52
  if (!this.url) return
49
53
  // H5 url 需要加时间戳,否则会有缓存问题
50
- this.webviewURL = this.urlAddParam(this.url || '', {
51
- sadaisTimestamp: new Date().getTime() + '-' + Math.round(Math.random(1) * 10000)
52
- })
54
+ this.webviewURL = this.autoAddTimestamp
55
+ ? this.urlAddParam(this.url || '', {
56
+ sadaisTimestamp: new Date().getTime() + '-' + Math.round(Math.random(1) * 10000)
57
+ })
58
+ : this.url
53
59
  console.log('webview页面即将打开以下URL:', this.webviewURL)
54
60
  // #ifdef APP-PLUS
55
61
  const wv = plus.webview.create('', 'custom-webview', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7beta30",
3
+ "version": "1.2.7beta33",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {