persagy-vant 0.0.45 → 0.0.47
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.
- package/es/blue-mark/BlueMarkHeader.d.ts +3 -12
- package/es/blue-mark/BlueMarkHeader.mjs +2 -2
- package/es/blue-mark/index.d.ts +2 -8
- package/es/cell/Cell.d.ts +12 -1
- package/es/cell/Cell.mjs +41 -9
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +5 -1
- package/es/cell/index.less +34 -0
- package/es/collapse-item/CollapseItem.d.ts +4 -0
- package/es/collapse-item/index.d.ts +3 -0
- package/es/field/Field.d.ts +4 -0
- package/es/field/index.d.ts +3 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/label/Label.d.ts +2 -2
- package/es/label/index.d.ts +2 -2
- package/es/object-select/ObjectSelect.mjs +2 -1
- package/es/tree-select-panel/TreeSelectPanel.d.ts +13 -0
- package/es/tree-select-panel/TreeSelectPanel.mjs +25 -7
- package/es/tree-select-panel/index.css +1 -1
- package/es/tree-select-panel/index.d.ts +9 -0
- package/es/tree-select-panel/index.less +2 -0
- package/es/video-preview/VideoPreview.mjs +30 -15
- package/es/video-preview/index.css +1 -1
- package/es/video-preview/index.less +21 -0
- package/lib/blue-mark/BlueMarkHeader.d.ts +3 -12
- package/lib/blue-mark/BlueMarkHeader.js +1 -1
- package/lib/blue-mark/index.d.ts +2 -8
- package/lib/cell/Cell.d.ts +12 -1
- package/lib/cell/Cell.js +40 -8
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +5 -1
- package/lib/cell/index.less +34 -0
- package/lib/collapse-item/CollapseItem.d.ts +4 -0
- package/lib/collapse-item/index.d.ts +3 -0
- package/lib/field/Field.d.ts +4 -0
- package/lib/field/index.d.ts +3 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/label/Label.d.ts +2 -2
- package/lib/label/index.d.ts +2 -2
- package/lib/object-select/ObjectSelect.js +2 -1
- package/lib/tree-select-panel/TreeSelectPanel.d.ts +13 -0
- package/lib/tree-select-panel/TreeSelectPanel.js +24 -6
- package/lib/tree-select-panel/index.css +1 -1
- package/lib/tree-select-panel/index.d.ts +9 -0
- package/lib/tree-select-panel/index.less +2 -0
- package/lib/vant.cjs.js +98 -32
- package/lib/vant.es.js +98 -32
- package/lib/vant.js +98 -32
- package/lib/vant.min.js +1 -1
- package/lib/video-preview/VideoPreview.js +30 -15
- package/lib/video-preview/index.css +1 -1
- package/lib/video-preview/index.less +21 -0
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +6 -0
- package/skills/use-persagy-vant/references/business-component-catalog.md +3 -0
- package/skills/use-persagy-vant/references/component-catalog.md +4 -3
- package/skills/use-persagy-vant/references/component-variant-selection.md +9 -4
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +1 -1
- package/skills/use-persagy-vant/references/dynamic-panel-policy.md +46 -0
- package/skills/use-persagy-vant/references/element-component-matching.md +3 -1
- package/skills/use-persagy-vant/references/page-recipes.md +3 -3
- package/skills/use-persagy-vant/references/reuse-policy.md +5 -1
- package/skills/use-persagy-vant/references/usage-patterns.md +2 -2
package/lib/vant.es.js
CHANGED
|
@@ -3176,6 +3176,7 @@ const cellSharedProps = {
|
|
|
3176
3176
|
showTitleCollapseIcon: Boolean,
|
|
3177
3177
|
defaultMultiLineNotesCollapsed: Boolean,
|
|
3178
3178
|
threeLine: Boolean,
|
|
3179
|
+
threeLineEllipsis: Boolean,
|
|
3179
3180
|
labelSize: numericProp,
|
|
3180
3181
|
avatar: String,
|
|
3181
3182
|
showAvatar: {
|
|
@@ -3278,13 +3279,39 @@ const cellProps = extend({}, cellSharedProps, routeProps);
|
|
|
3278
3279
|
var stdin_default$1M = defineComponent({
|
|
3279
3280
|
name: name$1D,
|
|
3280
3281
|
props: cellProps,
|
|
3281
|
-
emits: ["click", "click-label", "click-description", "click-note", "click-title-icon", "update:leftSelect", "update:rightSelect", "update:multiLineNotesCollapsed"],
|
|
3282
|
+
emits: ["click", "click-label", "click-description", "click-note", "click-title-icon", "long-press", "update:leftSelect", "update:rightSelect", "update:multiLineNotesCollapsed"],
|
|
3282
3283
|
setup(props2, {
|
|
3283
3284
|
slots,
|
|
3284
3285
|
emit
|
|
3285
3286
|
}) {
|
|
3286
3287
|
var _a, _b;
|
|
3288
|
+
let longPressTimer;
|
|
3287
3289
|
const config = inject(CONFIG_PROVIDER_KEY, null);
|
|
3290
|
+
const clearLongPress = () => {
|
|
3291
|
+
if (longPressTimer !== void 0) {
|
|
3292
|
+
clearTimeout(longPressTimer);
|
|
3293
|
+
longPressTimer = void 0;
|
|
3294
|
+
}
|
|
3295
|
+
};
|
|
3296
|
+
const startLongPress = (target, text) => {
|
|
3297
|
+
if (!props2.threeLine || !props2.threeLineEllipsis || !isDef(text))
|
|
3298
|
+
return;
|
|
3299
|
+
clearLongPress();
|
|
3300
|
+
longPressTimer = setTimeout(() => {
|
|
3301
|
+
longPressTimer = void 0;
|
|
3302
|
+
const payload = {
|
|
3303
|
+
target,
|
|
3304
|
+
text: String(text)
|
|
3305
|
+
};
|
|
3306
|
+
emit("long-press", payload);
|
|
3307
|
+
}, 500);
|
|
3308
|
+
};
|
|
3309
|
+
const longPressEvents = (target, text) => ({
|
|
3310
|
+
onPointerdown: () => startLongPress(target, text),
|
|
3311
|
+
onPointerup: clearLongPress,
|
|
3312
|
+
onPointercancel: clearLongPress,
|
|
3313
|
+
onPointerleave: clearLongPress
|
|
3314
|
+
});
|
|
3288
3315
|
const route2 = useRoute();
|
|
3289
3316
|
const vm = getCurrentInstance().proxy;
|
|
3290
3317
|
const leftSelectState = ref((_a = props2.leftSelect) != null ? _a : false);
|
|
@@ -3331,7 +3358,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3331
3358
|
const showLabel = slots.label || isDef(props2.label);
|
|
3332
3359
|
const showLabelIcon = (_a2 = props2.showLabelIcon) != null ? _a2 : !!(slots["label-icon"] || props2.labelIcon);
|
|
3333
3360
|
if (showLabel) {
|
|
3334
|
-
return createVNode("div", {
|
|
3361
|
+
return createVNode("div", mergeProps({
|
|
3335
3362
|
"class": [bem$1z("label", {
|
|
3336
3363
|
clickable: props2.labelClickable
|
|
3337
3364
|
}), props2.labelClass],
|
|
@@ -3346,19 +3373,21 @@ var stdin_default$1M = defineComponent({
|
|
|
3346
3373
|
event.stopPropagation();
|
|
3347
3374
|
emit("click-label", event);
|
|
3348
3375
|
}
|
|
3349
|
-
}, [showLabelIcon && slots["label-icon"] ? createVNode("span", {
|
|
3376
|
+
}, longPressEvents("label", props2.label)), [showLabelIcon && slots["label-icon"] ? createVNode("span", {
|
|
3350
3377
|
"class": bem$1z("label-icon")
|
|
3351
3378
|
}, [slots["label-icon"]()]) : showLabelIcon ? createVNode(Icon, {
|
|
3352
3379
|
"name": props2.labelIcon || "location-o",
|
|
3353
3380
|
"class": bem$1z("label-icon"),
|
|
3354
3381
|
"classPrefix": props2.iconPrefix
|
|
3355
|
-
}, null) : null, createVNode("span",
|
|
3382
|
+
}, null) : null, createVNode("span", {
|
|
3383
|
+
"class": bem$1z("label-content")
|
|
3384
|
+
}, [slots.label ? slots.label() : props2.label])]);
|
|
3356
3385
|
}
|
|
3357
3386
|
};
|
|
3358
3387
|
const renderDescription = () => {
|
|
3359
3388
|
const showDescription = slots.description || isDef(props2.description);
|
|
3360
3389
|
if (showDescription) {
|
|
3361
|
-
return createVNode("div", {
|
|
3390
|
+
return createVNode("div", mergeProps({
|
|
3362
3391
|
"class": bem$1z("description", {
|
|
3363
3392
|
clickable: props2.descriptionClickable
|
|
3364
3393
|
}),
|
|
@@ -3370,7 +3399,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3370
3399
|
event.stopPropagation();
|
|
3371
3400
|
emit("click-description", event);
|
|
3372
3401
|
}
|
|
3373
|
-
}, [slots.description ? slots.description() : props2.description]);
|
|
3402
|
+
}, longPressEvents("description", props2.description)), [slots.description ? slots.description() : props2.description]);
|
|
3374
3403
|
}
|
|
3375
3404
|
};
|
|
3376
3405
|
const renderMultiLineNotes = () => {
|
|
@@ -3415,7 +3444,9 @@ var stdin_default$1M = defineComponent({
|
|
|
3415
3444
|
"class": bem$1z("title-collapse-icon", {
|
|
3416
3445
|
collapsed: multiLineNotesCollapsed.value
|
|
3417
3446
|
})
|
|
3418
|
-
}, null)]),
|
|
3447
|
+
}, null)]), createVNode("span", mergeProps({
|
|
3448
|
+
"class": bem$1z("title-content")
|
|
3449
|
+
}, longPressEvents("title", props2.title)), [slots.title ? slots.title() : props2.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props2.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
3419
3450
|
}
|
|
3420
3451
|
};
|
|
3421
3452
|
const renderValue = () => {
|
|
@@ -3427,7 +3458,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3427
3458
|
"class": [bem$1z("value", {
|
|
3428
3459
|
alone: !hasTitle
|
|
3429
3460
|
}), props2.valueClass]
|
|
3430
|
-
}, [slot ? slot() : createVNode("span",
|
|
3461
|
+
}, [slot ? slot() : createVNode("span", longPressEvents("value", props2.value), [props2.value])]);
|
|
3431
3462
|
}
|
|
3432
3463
|
};
|
|
3433
3464
|
const renderLeftIcon = () => {
|
|
@@ -3700,6 +3731,7 @@ var stdin_default$1M = defineComponent({
|
|
|
3700
3731
|
clickable,
|
|
3701
3732
|
borderless: !border,
|
|
3702
3733
|
"three-line": threeLine,
|
|
3734
|
+
"three-line-ellipsis": threeLine && props2.threeLineEllipsis,
|
|
3703
3735
|
"multi-line-notes": hasMultiLineNotes
|
|
3704
3736
|
};
|
|
3705
3737
|
if (cellSize) {
|
|
@@ -5549,7 +5581,7 @@ const blueMarkHeaderProps = {
|
|
|
5549
5581
|
required: Boolean,
|
|
5550
5582
|
actionText: String,
|
|
5551
5583
|
expandable: Boolean,
|
|
5552
|
-
showExpandIcon:
|
|
5584
|
+
showExpandIcon: Boolean,
|
|
5553
5585
|
modelValue: Boolean,
|
|
5554
5586
|
expandText: String,
|
|
5555
5587
|
collapseText: String
|
|
@@ -16703,7 +16735,8 @@ var stdin_default$t = defineComponent({
|
|
|
16703
16735
|
"showAction": true
|
|
16704
16736
|
}, null) : createVNode(Fragment, null, [createVNode(NavBar, {
|
|
16705
16737
|
"title": props2.title,
|
|
16706
|
-
"class": bem$o("nav")
|
|
16738
|
+
"class": bem$o("nav"),
|
|
16739
|
+
"border": false
|
|
16707
16740
|
}, {
|
|
16708
16741
|
left: () => createVNode(Icon, {
|
|
16709
16742
|
"name": "cross",
|
|
@@ -19133,6 +19166,7 @@ const treeSelectPanelProps = {
|
|
|
19133
19166
|
showSelectLevels: Array,
|
|
19134
19167
|
searchable: truthProp,
|
|
19135
19168
|
searchPlaceholder: String,
|
|
19169
|
+
showSearchParentPath: truthProp,
|
|
19136
19170
|
lazy: Boolean,
|
|
19137
19171
|
loading: Boolean,
|
|
19138
19172
|
finished: Boolean,
|
|
@@ -19145,11 +19179,15 @@ const treeSelectPanelProps = {
|
|
|
19145
19179
|
clearSelectedText: makeStringProp("清空已选"),
|
|
19146
19180
|
confirmText: makeStringProp("确定")
|
|
19147
19181
|
};
|
|
19148
|
-
const findMatchingLeaves = (items, keyword) => items.flatMap((item) => {
|
|
19182
|
+
const findMatchingLeaves = (items, keyword, parentPath = []) => items.flatMap((item) => {
|
|
19149
19183
|
var _a;
|
|
19150
|
-
if ((_a = item.children) == null ? void 0 : _a.length)
|
|
19151
|
-
return findMatchingLeaves(item.children, keyword);
|
|
19152
|
-
|
|
19184
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
19185
|
+
return findMatchingLeaves(item.children, keyword, [...parentPath, item.text]);
|
|
19186
|
+
}
|
|
19187
|
+
return item.text.toLocaleLowerCase().includes(keyword) ? [{
|
|
19188
|
+
item,
|
|
19189
|
+
parentPath
|
|
19190
|
+
}] : [];
|
|
19153
19191
|
});
|
|
19154
19192
|
const flattenItems = (items) => items.flatMap((item) => [item, ...item.children ? flattenItems(item.children) : []]);
|
|
19155
19193
|
var stdin_default$9 = defineComponent({
|
|
@@ -19162,7 +19200,10 @@ var stdin_default$9 = defineComponent({
|
|
|
19162
19200
|
const keyword = ref("");
|
|
19163
19201
|
const expandedSelected = ref(false);
|
|
19164
19202
|
const normalizedKeyword = computed(() => keyword.value.trim().toLocaleLowerCase());
|
|
19165
|
-
const
|
|
19203
|
+
const searchResults = computed(() => normalizedKeyword.value ? findMatchingLeaves(props2.items, normalizedKeyword.value) : []);
|
|
19204
|
+
const filteredItems = computed(() => normalizedKeyword.value ? searchResults.value.map(({
|
|
19205
|
+
item
|
|
19206
|
+
}) => item) : props2.items);
|
|
19166
19207
|
const selectedItems = computed(() => flattenItems(props2.items).filter((item) => props2.modelValue.includes(item.id)));
|
|
19167
19208
|
const close = () => emit("update:show", false);
|
|
19168
19209
|
const updateSelected = (value) => {
|
|
@@ -19217,7 +19258,17 @@ var stdin_default$9 = defineComponent({
|
|
|
19217
19258
|
title: ({
|
|
19218
19259
|
item,
|
|
19219
19260
|
hasChildren
|
|
19220
|
-
}) =>
|
|
19261
|
+
}) => {
|
|
19262
|
+
if (hasChildren || !normalizedKeyword.value)
|
|
19263
|
+
return item.text;
|
|
19264
|
+
const result = searchResults.value.find((result2) => result2.item.id === item.id);
|
|
19265
|
+
if (!result || !props2.showSearchParentPath || !result.parentPath.length) {
|
|
19266
|
+
return renderHighlightedTitle(item.text);
|
|
19267
|
+
}
|
|
19268
|
+
return createVNode(Fragment, null, [result.parentPath.join("/"), createVNode("span", {
|
|
19269
|
+
"class": bem$4("path-separator")
|
|
19270
|
+
}, [createTextVNode("/")]), renderHighlightedTitle(item.text)]);
|
|
19271
|
+
}
|
|
19221
19272
|
})]);
|
|
19222
19273
|
};
|
|
19223
19274
|
return () => createVNode(ActionSheet, {
|
|
@@ -19947,24 +19998,37 @@ var stdin_default$6 = defineComponent({
|
|
|
19947
19998
|
setup(props2, {
|
|
19948
19999
|
emit
|
|
19949
20000
|
}) {
|
|
19950
|
-
const
|
|
20001
|
+
const playerHost = ref();
|
|
20002
|
+
let video;
|
|
19951
20003
|
const mediaEvents = ["play", "pause", "ended", "timeupdate", "error"];
|
|
19952
20004
|
let player;
|
|
19953
20005
|
const updateShow = (show) => emit("update:show", show);
|
|
19954
20006
|
const close = () => updateShow(false);
|
|
19955
20007
|
const emitMediaEvent = (event) => emit(event.type, event);
|
|
19956
20008
|
const destroyPlayer = () => {
|
|
19957
|
-
|
|
20009
|
+
var _a;
|
|
19958
20010
|
if (video) {
|
|
19959
|
-
mediaEvents.forEach((event) => video.removeEventListener(event, emitMediaEvent));
|
|
20011
|
+
mediaEvents.forEach((event) => video == null ? void 0 : video.removeEventListener(event, emitMediaEvent));
|
|
19960
20012
|
}
|
|
19961
20013
|
player == null ? void 0 : player.destroy();
|
|
19962
20014
|
player = void 0;
|
|
20015
|
+
video = void 0;
|
|
20016
|
+
(_a = playerHost.value) == null ? void 0 : _a.replaceChildren();
|
|
19963
20017
|
};
|
|
19964
20018
|
const createPlayer = () => {
|
|
19965
|
-
const
|
|
19966
|
-
if (!
|
|
20019
|
+
const host = playerHost.value;
|
|
20020
|
+
if (!host || player || !props2.show)
|
|
19967
20021
|
return;
|
|
20022
|
+
video = document.createElement("video");
|
|
20023
|
+
video.className = `${name$2}__video ${name$2}__video--${props2.fit}`;
|
|
20024
|
+
video.src = props2.src;
|
|
20025
|
+
if (props2.poster)
|
|
20026
|
+
video.poster = props2.poster;
|
|
20027
|
+
video.autoplay = props2.autoplay;
|
|
20028
|
+
video.muted = props2.muted;
|
|
20029
|
+
video.loop = props2.loop;
|
|
20030
|
+
video.playsInline = true;
|
|
20031
|
+
host.replaceChildren(video);
|
|
19968
20032
|
player = new Plyr(video, {
|
|
19969
20033
|
controls: props2.controls ? ["play", "progress", "current-time", "mute", "volume", "settings", "fullscreen"] : [],
|
|
19970
20034
|
settings: ["speed"],
|
|
@@ -19978,7 +20042,7 @@ var stdin_default$6 = defineComponent({
|
|
|
19978
20042
|
active: props2.loop
|
|
19979
20043
|
}
|
|
19980
20044
|
});
|
|
19981
|
-
mediaEvents.forEach((event) => video.addEventListener(event, emitMediaEvent));
|
|
20045
|
+
mediaEvents.forEach((event) => video == null ? void 0 : video.addEventListener(event, emitMediaEvent));
|
|
19982
20046
|
};
|
|
19983
20047
|
const play = () => player == null ? void 0 : player.play();
|
|
19984
20048
|
const pause = () => player == null ? void 0 : player.pause();
|
|
@@ -19989,6 +20053,12 @@ var stdin_default$6 = defineComponent({
|
|
|
19989
20053
|
close,
|
|
19990
20054
|
toggleFullscreen
|
|
19991
20055
|
});
|
|
20056
|
+
watch(playerHost, () => {
|
|
20057
|
+
destroyPlayer();
|
|
20058
|
+
createPlayer();
|
|
20059
|
+
}, {
|
|
20060
|
+
flush: "post"
|
|
20061
|
+
});
|
|
19992
20062
|
watch(() => props2.show, (show) => __async(this, null, function* () {
|
|
19993
20063
|
if (show) {
|
|
19994
20064
|
yield nextTick();
|
|
@@ -20022,15 +20092,11 @@ var stdin_default$6 = defineComponent({
|
|
|
20022
20092
|
default: () => [createVNode("div", {
|
|
20023
20093
|
"class": bem$2("backdrop"),
|
|
20024
20094
|
"onClick": close
|
|
20025
|
-
}, null), createVNode("
|
|
20026
|
-
"ref":
|
|
20027
|
-
"
|
|
20028
|
-
|
|
20029
|
-
|
|
20030
|
-
"autoplay": props2.autoplay,
|
|
20031
|
-
"muted": props2.muted,
|
|
20032
|
-
"loop": props2.loop,
|
|
20033
|
-
"playsinline": true
|
|
20095
|
+
}, null), createVNode("div", {
|
|
20096
|
+
"ref": playerHost,
|
|
20097
|
+
"style": {
|
|
20098
|
+
width: "100%"
|
|
20099
|
+
}
|
|
20034
20100
|
}, null)]
|
|
20035
20101
|
});
|
|
20036
20102
|
}
|
|
@@ -21772,7 +21838,7 @@ const Lazyload = {
|
|
|
21772
21838
|
});
|
|
21773
21839
|
}
|
|
21774
21840
|
};
|
|
21775
|
-
const version = "0.0.
|
|
21841
|
+
const version = "0.0.47";
|
|
21776
21842
|
function install(app) {
|
|
21777
21843
|
const components = [
|
|
21778
21844
|
ActionBar,
|
package/lib/vant.js
CHANGED
|
@@ -4419,6 +4419,7 @@
|
|
|
4419
4419
|
showTitleCollapseIcon: Boolean,
|
|
4420
4420
|
defaultMultiLineNotesCollapsed: Boolean,
|
|
4421
4421
|
threeLine: Boolean,
|
|
4422
|
+
threeLineEllipsis: Boolean,
|
|
4422
4423
|
labelSize: numericProp,
|
|
4423
4424
|
avatar: String,
|
|
4424
4425
|
showAvatar: {
|
|
@@ -4521,13 +4522,39 @@
|
|
|
4521
4522
|
var stdin_default$1M = vue.defineComponent({
|
|
4522
4523
|
name: name$1D,
|
|
4523
4524
|
props: cellProps,
|
|
4524
|
-
emits: ["click", "click-label", "click-description", "click-note", "click-title-icon", "update:leftSelect", "update:rightSelect", "update:multiLineNotesCollapsed"],
|
|
4525
|
+
emits: ["click", "click-label", "click-description", "click-note", "click-title-icon", "long-press", "update:leftSelect", "update:rightSelect", "update:multiLineNotesCollapsed"],
|
|
4525
4526
|
setup(props2, {
|
|
4526
4527
|
slots,
|
|
4527
4528
|
emit
|
|
4528
4529
|
}) {
|
|
4529
4530
|
var _a, _b;
|
|
4531
|
+
let longPressTimer;
|
|
4530
4532
|
const config = vue.inject(CONFIG_PROVIDER_KEY, null);
|
|
4533
|
+
const clearLongPress = () => {
|
|
4534
|
+
if (longPressTimer !== void 0) {
|
|
4535
|
+
clearTimeout(longPressTimer);
|
|
4536
|
+
longPressTimer = void 0;
|
|
4537
|
+
}
|
|
4538
|
+
};
|
|
4539
|
+
const startLongPress = (target, text) => {
|
|
4540
|
+
if (!props2.threeLine || !props2.threeLineEllipsis || !isDef(text))
|
|
4541
|
+
return;
|
|
4542
|
+
clearLongPress();
|
|
4543
|
+
longPressTimer = setTimeout(() => {
|
|
4544
|
+
longPressTimer = void 0;
|
|
4545
|
+
const payload = {
|
|
4546
|
+
target,
|
|
4547
|
+
text: String(text)
|
|
4548
|
+
};
|
|
4549
|
+
emit("long-press", payload);
|
|
4550
|
+
}, 500);
|
|
4551
|
+
};
|
|
4552
|
+
const longPressEvents = (target, text) => ({
|
|
4553
|
+
onPointerdown: () => startLongPress(target, text),
|
|
4554
|
+
onPointerup: clearLongPress,
|
|
4555
|
+
onPointercancel: clearLongPress,
|
|
4556
|
+
onPointerleave: clearLongPress
|
|
4557
|
+
});
|
|
4531
4558
|
const route2 = useRoute();
|
|
4532
4559
|
const vm = vue.getCurrentInstance().proxy;
|
|
4533
4560
|
const leftSelectState = vue.ref((_a = props2.leftSelect) != null ? _a : false);
|
|
@@ -4574,7 +4601,7 @@
|
|
|
4574
4601
|
const showLabel = slots.label || isDef(props2.label);
|
|
4575
4602
|
const showLabelIcon = (_a2 = props2.showLabelIcon) != null ? _a2 : !!(slots["label-icon"] || props2.labelIcon);
|
|
4576
4603
|
if (showLabel) {
|
|
4577
|
-
return vue.createVNode("div", {
|
|
4604
|
+
return vue.createVNode("div", vue.mergeProps({
|
|
4578
4605
|
"class": [bem$1z("label", {
|
|
4579
4606
|
clickable: props2.labelClickable
|
|
4580
4607
|
}), props2.labelClass],
|
|
@@ -4589,19 +4616,21 @@
|
|
|
4589
4616
|
event.stopPropagation();
|
|
4590
4617
|
emit("click-label", event);
|
|
4591
4618
|
}
|
|
4592
|
-
}, [showLabelIcon && slots["label-icon"] ? vue.createVNode("span", {
|
|
4619
|
+
}, longPressEvents("label", props2.label)), [showLabelIcon && slots["label-icon"] ? vue.createVNode("span", {
|
|
4593
4620
|
"class": bem$1z("label-icon")
|
|
4594
4621
|
}, [slots["label-icon"]()]) : showLabelIcon ? vue.createVNode(Icon, {
|
|
4595
4622
|
"name": props2.labelIcon || "location-o",
|
|
4596
4623
|
"class": bem$1z("label-icon"),
|
|
4597
4624
|
"classPrefix": props2.iconPrefix
|
|
4598
|
-
}, null) : null, vue.createVNode("span",
|
|
4625
|
+
}, null) : null, vue.createVNode("span", {
|
|
4626
|
+
"class": bem$1z("label-content")
|
|
4627
|
+
}, [slots.label ? slots.label() : props2.label])]);
|
|
4599
4628
|
}
|
|
4600
4629
|
};
|
|
4601
4630
|
const renderDescription = () => {
|
|
4602
4631
|
const showDescription = slots.description || isDef(props2.description);
|
|
4603
4632
|
if (showDescription) {
|
|
4604
|
-
return vue.createVNode("div", {
|
|
4633
|
+
return vue.createVNode("div", vue.mergeProps({
|
|
4605
4634
|
"class": bem$1z("description", {
|
|
4606
4635
|
clickable: props2.descriptionClickable
|
|
4607
4636
|
}),
|
|
@@ -4613,7 +4642,7 @@
|
|
|
4613
4642
|
event.stopPropagation();
|
|
4614
4643
|
emit("click-description", event);
|
|
4615
4644
|
}
|
|
4616
|
-
}, [slots.description ? slots.description() : props2.description]);
|
|
4645
|
+
}, longPressEvents("description", props2.description)), [slots.description ? slots.description() : props2.description]);
|
|
4617
4646
|
}
|
|
4618
4647
|
};
|
|
4619
4648
|
const renderMultiLineNotes = () => {
|
|
@@ -4658,7 +4687,9 @@
|
|
|
4658
4687
|
"class": bem$1z("title-collapse-icon", {
|
|
4659
4688
|
collapsed: multiLineNotesCollapsed.value
|
|
4660
4689
|
})
|
|
4661
|
-
}, null)]),
|
|
4690
|
+
}, null)]), vue.createVNode("span", vue.mergeProps({
|
|
4691
|
+
"class": bem$1z("title-content")
|
|
4692
|
+
}, longPressEvents("title", props2.title)), [slots.title ? slots.title() : props2.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props2.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
4662
4693
|
}
|
|
4663
4694
|
};
|
|
4664
4695
|
const renderValue = () => {
|
|
@@ -4670,7 +4701,7 @@
|
|
|
4670
4701
|
"class": [bem$1z("value", {
|
|
4671
4702
|
alone: !hasTitle
|
|
4672
4703
|
}), props2.valueClass]
|
|
4673
|
-
}, [slot ? slot() : vue.createVNode("span",
|
|
4704
|
+
}, [slot ? slot() : vue.createVNode("span", longPressEvents("value", props2.value), [props2.value])]);
|
|
4674
4705
|
}
|
|
4675
4706
|
};
|
|
4676
4707
|
const renderLeftIcon = () => {
|
|
@@ -4943,6 +4974,7 @@
|
|
|
4943
4974
|
clickable,
|
|
4944
4975
|
borderless: !border,
|
|
4945
4976
|
"three-line": threeLine,
|
|
4977
|
+
"three-line-ellipsis": threeLine && props2.threeLineEllipsis,
|
|
4946
4978
|
"multi-line-notes": hasMultiLineNotes
|
|
4947
4979
|
};
|
|
4948
4980
|
if (cellSize) {
|
|
@@ -6789,7 +6821,7 @@
|
|
|
6789
6821
|
required: Boolean,
|
|
6790
6822
|
actionText: String,
|
|
6791
6823
|
expandable: Boolean,
|
|
6792
|
-
showExpandIcon:
|
|
6824
|
+
showExpandIcon: Boolean,
|
|
6793
6825
|
modelValue: Boolean,
|
|
6794
6826
|
expandText: String,
|
|
6795
6827
|
collapseText: String
|
|
@@ -17898,7 +17930,8 @@
|
|
|
17898
17930
|
"showAction": true
|
|
17899
17931
|
}, null) : vue.createVNode(vue.Fragment, null, [vue.createVNode(NavBar, {
|
|
17900
17932
|
"title": props2.title,
|
|
17901
|
-
"class": bem$o("nav")
|
|
17933
|
+
"class": bem$o("nav"),
|
|
17934
|
+
"border": false
|
|
17902
17935
|
}, {
|
|
17903
17936
|
left: () => vue.createVNode(Icon, {
|
|
17904
17937
|
"name": "cross",
|
|
@@ -20322,6 +20355,7 @@
|
|
|
20322
20355
|
showSelectLevels: Array,
|
|
20323
20356
|
searchable: truthProp,
|
|
20324
20357
|
searchPlaceholder: String,
|
|
20358
|
+
showSearchParentPath: truthProp,
|
|
20325
20359
|
lazy: Boolean,
|
|
20326
20360
|
loading: Boolean,
|
|
20327
20361
|
finished: Boolean,
|
|
@@ -20334,11 +20368,15 @@
|
|
|
20334
20368
|
clearSelectedText: makeStringProp("清空已选"),
|
|
20335
20369
|
confirmText: makeStringProp("确定")
|
|
20336
20370
|
};
|
|
20337
|
-
const findMatchingLeaves = (items, keyword) => items.flatMap((item) => {
|
|
20371
|
+
const findMatchingLeaves = (items, keyword, parentPath = []) => items.flatMap((item) => {
|
|
20338
20372
|
var _a;
|
|
20339
|
-
if ((_a = item.children) == null ? void 0 : _a.length)
|
|
20340
|
-
return findMatchingLeaves(item.children, keyword);
|
|
20341
|
-
|
|
20373
|
+
if ((_a = item.children) == null ? void 0 : _a.length) {
|
|
20374
|
+
return findMatchingLeaves(item.children, keyword, [...parentPath, item.text]);
|
|
20375
|
+
}
|
|
20376
|
+
return item.text.toLocaleLowerCase().includes(keyword) ? [{
|
|
20377
|
+
item,
|
|
20378
|
+
parentPath
|
|
20379
|
+
}] : [];
|
|
20342
20380
|
});
|
|
20343
20381
|
const flattenItems = (items) => items.flatMap((item) => [item, ...item.children ? flattenItems(item.children) : []]);
|
|
20344
20382
|
var stdin_default$9 = vue.defineComponent({
|
|
@@ -20351,7 +20389,10 @@
|
|
|
20351
20389
|
const keyword = vue.ref("");
|
|
20352
20390
|
const expandedSelected = vue.ref(false);
|
|
20353
20391
|
const normalizedKeyword = vue.computed(() => keyword.value.trim().toLocaleLowerCase());
|
|
20354
|
-
const
|
|
20392
|
+
const searchResults = vue.computed(() => normalizedKeyword.value ? findMatchingLeaves(props2.items, normalizedKeyword.value) : []);
|
|
20393
|
+
const filteredItems = vue.computed(() => normalizedKeyword.value ? searchResults.value.map(({
|
|
20394
|
+
item
|
|
20395
|
+
}) => item) : props2.items);
|
|
20355
20396
|
const selectedItems = vue.computed(() => flattenItems(props2.items).filter((item) => props2.modelValue.includes(item.id)));
|
|
20356
20397
|
const close = () => emit("update:show", false);
|
|
20357
20398
|
const updateSelected = (value) => {
|
|
@@ -20406,7 +20447,17 @@
|
|
|
20406
20447
|
title: ({
|
|
20407
20448
|
item,
|
|
20408
20449
|
hasChildren
|
|
20409
|
-
}) =>
|
|
20450
|
+
}) => {
|
|
20451
|
+
if (hasChildren || !normalizedKeyword.value)
|
|
20452
|
+
return item.text;
|
|
20453
|
+
const result = searchResults.value.find((result2) => result2.item.id === item.id);
|
|
20454
|
+
if (!result || !props2.showSearchParentPath || !result.parentPath.length) {
|
|
20455
|
+
return renderHighlightedTitle(item.text);
|
|
20456
|
+
}
|
|
20457
|
+
return vue.createVNode(vue.Fragment, null, [result.parentPath.join("/"), vue.createVNode("span", {
|
|
20458
|
+
"class": bem$4("path-separator")
|
|
20459
|
+
}, [vue.createTextVNode("/")]), renderHighlightedTitle(item.text)]);
|
|
20460
|
+
}
|
|
20410
20461
|
})]);
|
|
20411
20462
|
};
|
|
20412
20463
|
return () => vue.createVNode(ActionSheet, {
|
|
@@ -23553,24 +23604,37 @@
|
|
|
23553
23604
|
setup(props2, {
|
|
23554
23605
|
emit
|
|
23555
23606
|
}) {
|
|
23556
|
-
const
|
|
23607
|
+
const playerHost = vue.ref();
|
|
23608
|
+
let video;
|
|
23557
23609
|
const mediaEvents = ["play", "pause", "ended", "timeupdate", "error"];
|
|
23558
23610
|
let player;
|
|
23559
23611
|
const updateShow = (show) => emit("update:show", show);
|
|
23560
23612
|
const close = () => updateShow(false);
|
|
23561
23613
|
const emitMediaEvent = (event) => emit(event.type, event);
|
|
23562
23614
|
const destroyPlayer = () => {
|
|
23563
|
-
|
|
23615
|
+
var _a;
|
|
23564
23616
|
if (video) {
|
|
23565
|
-
mediaEvents.forEach((event) => video.removeEventListener(event, emitMediaEvent));
|
|
23617
|
+
mediaEvents.forEach((event) => video == null ? void 0 : video.removeEventListener(event, emitMediaEvent));
|
|
23566
23618
|
}
|
|
23567
23619
|
player == null ? void 0 : player.destroy();
|
|
23568
23620
|
player = void 0;
|
|
23621
|
+
video = void 0;
|
|
23622
|
+
(_a = playerHost.value) == null ? void 0 : _a.replaceChildren();
|
|
23569
23623
|
};
|
|
23570
23624
|
const createPlayer = () => {
|
|
23571
|
-
const
|
|
23572
|
-
if (!
|
|
23625
|
+
const host = playerHost.value;
|
|
23626
|
+
if (!host || player || !props2.show)
|
|
23573
23627
|
return;
|
|
23628
|
+
video = document.createElement("video");
|
|
23629
|
+
video.className = `${name$2}__video ${name$2}__video--${props2.fit}`;
|
|
23630
|
+
video.src = props2.src;
|
|
23631
|
+
if (props2.poster)
|
|
23632
|
+
video.poster = props2.poster;
|
|
23633
|
+
video.autoplay = props2.autoplay;
|
|
23634
|
+
video.muted = props2.muted;
|
|
23635
|
+
video.loop = props2.loop;
|
|
23636
|
+
video.playsInline = true;
|
|
23637
|
+
host.replaceChildren(video);
|
|
23574
23638
|
player = new Plyr(video, {
|
|
23575
23639
|
controls: props2.controls ? ["play", "progress", "current-time", "mute", "volume", "settings", "fullscreen"] : [],
|
|
23576
23640
|
settings: ["speed"],
|
|
@@ -23584,7 +23648,7 @@
|
|
|
23584
23648
|
active: props2.loop
|
|
23585
23649
|
}
|
|
23586
23650
|
});
|
|
23587
|
-
mediaEvents.forEach((event) => video.addEventListener(event, emitMediaEvent));
|
|
23651
|
+
mediaEvents.forEach((event) => video == null ? void 0 : video.addEventListener(event, emitMediaEvent));
|
|
23588
23652
|
};
|
|
23589
23653
|
const play = () => player == null ? void 0 : player.play();
|
|
23590
23654
|
const pause = () => player == null ? void 0 : player.pause();
|
|
@@ -23595,6 +23659,12 @@
|
|
|
23595
23659
|
close,
|
|
23596
23660
|
toggleFullscreen
|
|
23597
23661
|
});
|
|
23662
|
+
vue.watch(playerHost, () => {
|
|
23663
|
+
destroyPlayer();
|
|
23664
|
+
createPlayer();
|
|
23665
|
+
}, {
|
|
23666
|
+
flush: "post"
|
|
23667
|
+
});
|
|
23598
23668
|
vue.watch(() => props2.show, (show) => __async(this, null, function* () {
|
|
23599
23669
|
if (show) {
|
|
23600
23670
|
yield vue.nextTick();
|
|
@@ -23628,15 +23698,11 @@
|
|
|
23628
23698
|
default: () => [vue.createVNode("div", {
|
|
23629
23699
|
"class": bem$2("backdrop"),
|
|
23630
23700
|
"onClick": close
|
|
23631
|
-
}, null), vue.createVNode("
|
|
23632
|
-
"ref":
|
|
23633
|
-
"
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
"autoplay": props2.autoplay,
|
|
23637
|
-
"muted": props2.muted,
|
|
23638
|
-
"loop": props2.loop,
|
|
23639
|
-
"playsinline": true
|
|
23701
|
+
}, null), vue.createVNode("div", {
|
|
23702
|
+
"ref": playerHost,
|
|
23703
|
+
"style": {
|
|
23704
|
+
width: "100%"
|
|
23705
|
+
}
|
|
23640
23706
|
}, null)]
|
|
23641
23707
|
});
|
|
23642
23708
|
}
|
|
@@ -25361,7 +25427,7 @@
|
|
|
25361
25427
|
});
|
|
25362
25428
|
}
|
|
25363
25429
|
};
|
|
25364
|
-
const version = "0.0.
|
|
25430
|
+
const version = "0.0.47";
|
|
25365
25431
|
function install(app) {
|
|
25366
25432
|
const components = [
|
|
25367
25433
|
ActionBar,
|