@netang/quasar 0.2.50 → 0.2.51
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.
|
@@ -108,6 +108,14 @@
|
|
|
108
108
|
name="crop_original"
|
|
109
109
|
color="white"
|
|
110
110
|
/>
|
|
111
|
+
|
|
112
|
+
<!-- 其他菜单 -->
|
|
113
|
+
<q-icon
|
|
114
|
+
v-for="e in otherMenus"
|
|
115
|
+
class="cursor-pointer"
|
|
116
|
+
:name="e.icon"
|
|
117
|
+
@click="e.click(currentImg)"
|
|
118
|
+
/>
|
|
111
119
|
</div>
|
|
112
120
|
</div>
|
|
113
121
|
|
|
@@ -118,7 +126,7 @@
|
|
|
118
126
|
v-for="(item, i) in currentImages"
|
|
119
127
|
:key="`${item.src}-${i}`"
|
|
120
128
|
class="non-selectable no-outline"
|
|
121
|
-
@click="onClickImg({ src })"
|
|
129
|
+
@click="onClickImg({ src: item.origin })"
|
|
122
130
|
>
|
|
123
131
|
<img
|
|
124
132
|
:ref="(el) => (imgRefs[i] = el)"
|
|
@@ -162,6 +170,7 @@ import $n_get from 'lodash/get'
|
|
|
162
170
|
|
|
163
171
|
import $n_forEach from '@netang/utils/forEach'
|
|
164
172
|
import $n_run from '@netang/utils/run'
|
|
173
|
+
import $n_isValidArray from '@netang/utils/isValidArray'
|
|
165
174
|
|
|
166
175
|
import $n_getImage from '../../../utils/getImage'
|
|
167
176
|
|
|
@@ -297,6 +306,10 @@ export default {
|
|
|
297
306
|
// 图片是否可点击
|
|
298
307
|
const isClickImg = ref($n_get(configs, 'components.imgViewer.isClickImg') === true)
|
|
299
308
|
|
|
309
|
+
// 其他菜单
|
|
310
|
+
const _menus = $n_get(configs, 'components.imgViewer.menus')
|
|
311
|
+
const otherMenus = ref($n_isValidArray(_menus) ? _menus : [])
|
|
312
|
+
|
|
300
313
|
// 转换效果
|
|
301
314
|
const transform = ref({
|
|
302
315
|
scale: 1,
|
|
@@ -599,6 +612,8 @@ export default {
|
|
|
599
612
|
transform,
|
|
600
613
|
// 图片是否可点击
|
|
601
614
|
isClickImg,
|
|
615
|
+
// 其他菜单
|
|
616
|
+
otherMenus,
|
|
602
617
|
|
|
603
618
|
// 当前图片数组
|
|
604
619
|
currentImages,
|