@fangzhongya/fang-ui 0.1.33 → 0.1.35
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/dist/components/buttons/src/data.cjs +1 -1
- package/dist/components/buttons/src/data.d.ts +1 -1
- package/dist/components/buttons/src/data.js +1 -1
- package/dist/components/buttons/src/index2.cjs +1 -1
- package/dist/components/buttons/src/index2.js +1 -1
- package/dist/components/common/config.d.ts +42 -40
- package/dist/components/common/urls.cjs +1 -1
- package/dist/components/common/urls.js +1 -1
- package/dist/components/dates-picker/src/index2.cjs +1 -1
- package/dist/components/dates-picker/src/index2.js +1 -1
- package/dist/components/dates2/src/index2.cjs +1 -1
- package/dist/components/dates2/src/index2.js +1 -1
- package/dist/components/dialogs/src/data.cjs +2 -2
- package/dist/components/dialogs/src/data.d.ts +5 -2
- package/dist/components/dialogs/src/data.js +2 -2
- package/dist/components/dialogs/src/index2.cjs +1 -1
- package/dist/components/dialogs/src/index2.js +1 -1
- package/dist/components/edit/src/data.cjs +1 -1
- package/dist/components/edit/src/data.d.ts +1 -1
- package/dist/components/edit/src/data.js +1 -1
- package/dist/components/edit/src/index2.cjs +3 -3
- package/dist/components/edit/src/index2.js +3 -3
- package/dist/components/edit/style/index2.scss +2 -0
- package/dist/components/edit-float/src/data.cjs +2 -2
- package/dist/components/edit-float/src/data.d.ts +2 -2
- package/dist/components/edit-float/src/data.js +2 -2
- package/dist/components/edit-float/src/index2.cjs +2 -2
- package/dist/components/edit-float/src/index2.js +2 -2
- package/dist/components/edit-float/style/index2.scss +4 -0
- package/dist/components/forms/index.css +3 -0
- package/dist/components/forms/index.scss +3 -0
- package/dist/components/forms/src/index2.cjs +2 -2
- package/dist/components/forms/src/index2.js +2 -2
- package/dist/components/forms-drag/src/index2.cjs +2 -2
- package/dist/components/forms-drag/src/index2.js +2 -2
- package/dist/components/forms-item/src/index2.cjs +2 -2
- package/dist/components/forms-item/src/index2.js +2 -2
- package/dist/components/forms-items/src/index2.cjs +2 -2
- package/dist/components/forms-items/src/index2.js +2 -2
- package/dist/components/index.scss +1 -0
- package/dist/components/input-history/src/index2.cjs +1 -1
- package/dist/components/input-history/src/index2.js +1 -1
- package/dist/components/input-history/style/index2.scss +3 -0
- package/dist/components/listsp/src/index2.cjs +3 -3
- package/dist/components/listsp/src/index2.js +3 -3
- package/dist/components/listspd/src/index2.cjs +8 -3
- package/dist/components/listspd/src/index2.js +8 -3
- package/dist/components/menus/src/index2.cjs +1 -1
- package/dist/components/menus/src/index2.js +1 -1
- package/dist/components/page/index.css +3 -0
- package/dist/components/page/src/index2.cjs +6 -6
- package/dist/components/page/src/index2.js +6 -6
- package/dist/components/selects/src/index2.cjs +36 -46
- package/dist/components/selects/src/index2.js +37 -47
- package/dist/components/switchs/src/data.cjs +5 -1
- package/dist/components/switchs/src/data.d.ts +4 -0
- package/dist/components/switchs/src/data.js +5 -1
- package/dist/components/switchs/src/index2.cjs +19 -2
- package/dist/components/switchs/src/index2.js +19 -2
- package/dist/components/tables/common/pagin.cjs +4 -10
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +4 -10
- package/dist/components/tablesp/src/index2.cjs +2 -2
- package/dist/components/tablesp/src/index2.js +2 -2
- package/dist/components/tablespd/src/index2.cjs +7 -3
- package/dist/components/tablespd/src/index2.js +7 -3
- package/dist/components/tabless/src/index2.cjs +3 -3
- package/dist/components/tabless/src/index2.js +3 -3
- package/dist/components/tablesv/src/index2.cjs +1 -1
- package/dist/components/tablesv/src/index2.js +1 -1
- package/dist/components/tablesvp/src/index2.cjs +5 -3
- package/dist/components/tablesvp/src/index2.js +5 -3
- package/dist/components/tablesvpd/src/index2.cjs +8 -3
- package/dist/components/tablesvpd/src/index2.js +8 -3
- package/dist/components/videos/index.css +11 -2
- package/dist/components/videos/index.scss +13 -2
- package/dist/components/videos/src/index2.cjs +49 -5
- package/dist/components/videos/src/index2.js +49 -5
- package/dist/components/window/src/data.cjs +3 -3
- package/dist/components/window/src/data.d.ts +2 -2
- package/dist/components/window/src/data.js +3 -3
- package/dist/components/window/src/index2.cjs +1 -1
- package/dist/components/window/src/index2.js +1 -1
- package/dist/css/forms.css +3 -0
- package/dist/css/index.css +36 -2
- package/dist/css/page.css +3 -0
- package/dist/css/videos.css +11 -2
- package/dist/icons/index.json +1 -1
- package/dist/index.css +36 -2
- package/package.json +2 -2
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
- /package/dist/components/{draggable → popover}/index.css +0 -0
- /package/dist/css/{forms-items.css → forms-item.css} +0 -0
- /package/dist/css/{draggable.css → popover.css} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ref, reactive, watch, computed, nextTick } from "vue";
|
|
2
|
+
import { unmergeObject } from "@fangzhongya/utils/basic/object/unmergeObject";
|
|
2
3
|
import "../../../utils/index.js";
|
|
3
4
|
import { props, comHandle } from "../../common/urls.js";
|
|
4
5
|
import { firstLower } from "@fangzhongya/utils/basic/string/firstLower";
|
|
@@ -71,7 +72,7 @@ const dataProps = {
|
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
74
|
const dataEmit = ["list-events", "selection", "drag", "update:value"];
|
|
74
|
-
const useInit = (props2, emit, refTable, getLocale,
|
|
75
|
+
const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
|
|
75
76
|
var _a, _b;
|
|
76
77
|
const loading = ref(false);
|
|
77
78
|
const mpagconfig = {
|
|
@@ -205,7 +206,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
205
206
|
paginat.cross = pagin.cross || false;
|
|
206
207
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
207
208
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
208
|
-
tableConfig.value = config;
|
|
209
|
+
tableConfig.value = unmergeObject(defaultConfig, config, 2);
|
|
209
210
|
};
|
|
210
211
|
watch(
|
|
211
212
|
[() => props2.configs, () => props2.config, () => props2.list],
|
|
@@ -230,13 +231,6 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
230
231
|
});
|
|
231
232
|
return obj;
|
|
232
233
|
});
|
|
233
|
-
const istype = computed(() => {
|
|
234
|
-
if (isEl) {
|
|
235
|
-
return true;
|
|
236
|
-
} else {
|
|
237
|
-
return tableConfig.value.type == 1;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
234
|
function setCrossPage() {
|
|
241
235
|
const v = data.current;
|
|
242
236
|
console.log("v", v);
|
|
@@ -426,7 +420,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
426
420
|
}
|
|
427
421
|
function empty() {
|
|
428
422
|
var _a2, _b2, _c, _d;
|
|
429
|
-
if (
|
|
423
|
+
if (tableConfig.value.type == 1 && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
430
424
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
431
425
|
}
|
|
432
426
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale);
|
|
48
48
|
__expose({
|
|
49
49
|
getRef,
|
|
50
50
|
getSelection,
|
|
@@ -79,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
79
79
|
prop: vue.unref(paginat).prop
|
|
80
80
|
} : void 0,
|
|
81
81
|
paginat: vue.unref(paginat),
|
|
82
|
-
loading: ((_d = vue.unref(tableConfig).config) == null ? void 0 : _d.
|
|
82
|
+
loading: ((_d = vue.unref(tableConfig).config) == null ? void 0 : _d.isloading) === false || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
83
83
|
options: vue.unref(props).options,
|
|
84
84
|
compons: vue.unref(props).compons,
|
|
85
85
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
onCurrentChange,
|
|
43
43
|
paginat,
|
|
44
44
|
data
|
|
45
|
-
} = useInit(props, emit, refTable, getLocale
|
|
45
|
+
} = useInit(props, emit, refTable, getLocale);
|
|
46
46
|
__expose({
|
|
47
47
|
getRef,
|
|
48
48
|
getSelection,
|
|
@@ -77,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
77
77
|
prop: unref(paginat).prop
|
|
78
78
|
} : void 0,
|
|
79
79
|
paginat: unref(paginat),
|
|
80
|
-
loading: ((_d = unref(tableConfig).config) == null ? void 0 : _d.
|
|
80
|
+
loading: ((_d = unref(tableConfig).config) == null ? void 0 : _d.isloading) === false || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
81
81
|
options: unref(props).options,
|
|
82
82
|
compons: unref(props).compons,
|
|
83
83
|
onSortChange: unref(onSortChange),
|
|
@@ -46,7 +46,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
onCurrentChange,
|
|
47
47
|
paginat,
|
|
48
48
|
data: data$1
|
|
49
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
49
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
50
|
+
config: {
|
|
51
|
+
isdrag: true
|
|
52
|
+
}
|
|
53
|
+
});
|
|
50
54
|
__expose({
|
|
51
55
|
getSelection,
|
|
52
56
|
getRef,
|
|
@@ -78,7 +82,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
82
|
list: vue.unref(tableList),
|
|
79
83
|
size: (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
80
84
|
paginat: vue.unref(paginat),
|
|
81
|
-
loading: ((_c = vue.unref(tableConfig).config) == null ? void 0 : _c.
|
|
85
|
+
loading: ((_c = vue.unref(tableConfig).config) == null ? void 0 : _c.isloading) === false || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
82
86
|
options: vue.unref(props).options,
|
|
83
87
|
compons: vue.unref(props).compons,
|
|
84
88
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -91,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
91
95
|
return {
|
|
92
96
|
name: k,
|
|
93
97
|
fn: vue.withCtx((scope) => [
|
|
94
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
98
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
95
99
|
])
|
|
96
100
|
};
|
|
97
101
|
})
|
|
@@ -44,7 +44,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data
|
|
47
|
-
} = useInit(props, emit, refTable, getLocale,
|
|
47
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
config: {
|
|
49
|
+
isdrag: true
|
|
50
|
+
}
|
|
51
|
+
});
|
|
48
52
|
__expose({
|
|
49
53
|
getSelection,
|
|
50
54
|
getRef,
|
|
@@ -76,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
80
|
list: unref(tableList),
|
|
77
81
|
size: (_b = unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
78
82
|
paginat: unref(paginat),
|
|
79
|
-
loading: ((_c = unref(tableConfig).config) == null ? void 0 : _c.
|
|
83
|
+
loading: ((_c = unref(tableConfig).config) == null ? void 0 : _c.isloading) === false || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
80
84
|
options: unref(props).options,
|
|
81
85
|
compons: unref(props).compons,
|
|
82
86
|
onSortChange: unref(onSortChange),
|
|
@@ -89,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
93
|
return {
|
|
90
94
|
name: k,
|
|
91
95
|
fn: withCtx((scope) => [
|
|
92
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
96
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
93
97
|
])
|
|
94
98
|
};
|
|
95
99
|
})
|
|
@@ -69,7 +69,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
69
69
|
value: vue.unref(data).list,
|
|
70
70
|
list: vue.unref(tableList),
|
|
71
71
|
paginat: vue.unref(paginat),
|
|
72
|
-
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.
|
|
72
|
+
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : vue.unref(loading),
|
|
73
73
|
options: vue.unref(props).options,
|
|
74
74
|
compons: vue.unref(props).compons,
|
|
75
75
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -81,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
81
|
return {
|
|
82
82
|
name: k,
|
|
83
83
|
fn: vue.withCtx((scope) => [
|
|
84
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
84
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
85
85
|
])
|
|
86
86
|
};
|
|
87
87
|
})
|
|
@@ -110,7 +110,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
110
110
|
return {
|
|
111
111
|
name: k,
|
|
112
112
|
fn: vue.withCtx((scope) => [
|
|
113
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
113
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
114
114
|
])
|
|
115
115
|
};
|
|
116
116
|
})
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
67
67
|
value: unref(data).list,
|
|
68
68
|
list: unref(tableList),
|
|
69
69
|
paginat: unref(paginat),
|
|
70
|
-
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.
|
|
70
|
+
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : unref(loading),
|
|
71
71
|
options: unref(props).options,
|
|
72
72
|
compons: unref(props).compons,
|
|
73
73
|
onSortChange: unref(onSortChange),
|
|
@@ -79,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
return {
|
|
80
80
|
name: k,
|
|
81
81
|
fn: withCtx((scope) => [
|
|
82
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
82
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
83
83
|
])
|
|
84
84
|
};
|
|
85
85
|
})
|
|
@@ -108,7 +108,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
108
108
|
return {
|
|
109
109
|
name: k,
|
|
110
110
|
fn: withCtx((scope) => [
|
|
111
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
111
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
112
112
|
])
|
|
113
113
|
};
|
|
114
114
|
})
|
|
@@ -260,7 +260,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
260
260
|
return {
|
|
261
261
|
name: k,
|
|
262
262
|
fn: vue.withCtx((scope) => [
|
|
263
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
263
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
264
264
|
])
|
|
265
265
|
};
|
|
266
266
|
})
|
|
@@ -258,7 +258,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
258
258
|
return {
|
|
259
259
|
name: k,
|
|
260
260
|
fn: withCtx((scope) => [
|
|
261
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
261
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
262
262
|
])
|
|
263
263
|
};
|
|
264
264
|
})
|
|
@@ -44,7 +44,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
paginat,
|
|
45
45
|
scroll,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
type: 1
|
|
49
|
+
});
|
|
48
50
|
__expose({
|
|
49
51
|
getSelection,
|
|
50
52
|
getRef,
|
|
@@ -71,7 +73,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
71
73
|
value: vue.unref(data$1).list,
|
|
72
74
|
list: vue.unref(tableList),
|
|
73
75
|
paginat: vue.unref(paginat),
|
|
74
|
-
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.
|
|
76
|
+
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : vue.unref(loading),
|
|
75
77
|
options: vue.unref(props).options,
|
|
76
78
|
compons: vue.unref(props).compons,
|
|
77
79
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -84,7 +86,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
86
|
return {
|
|
85
87
|
name: k,
|
|
86
88
|
fn: vue.withCtx((scope) => [
|
|
87
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
89
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
88
90
|
])
|
|
89
91
|
};
|
|
90
92
|
})
|
|
@@ -42,7 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
paginat,
|
|
43
43
|
scroll,
|
|
44
44
|
data
|
|
45
|
-
} = useInit(props, emit, refTable, getLocale
|
|
45
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
46
|
+
type: 1
|
|
47
|
+
});
|
|
46
48
|
__expose({
|
|
47
49
|
getSelection,
|
|
48
50
|
getRef,
|
|
@@ -69,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
69
71
|
value: unref(data).list,
|
|
70
72
|
list: unref(tableList),
|
|
71
73
|
paginat: unref(paginat),
|
|
72
|
-
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.
|
|
74
|
+
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : unref(loading),
|
|
73
75
|
options: unref(props).options,
|
|
74
76
|
compons: unref(props).compons,
|
|
75
77
|
onSortChange: unref(onSortChange),
|
|
@@ -82,7 +84,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
82
84
|
return {
|
|
83
85
|
name: k,
|
|
84
86
|
fn: withCtx((scope) => [
|
|
85
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
87
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
86
88
|
])
|
|
87
89
|
};
|
|
88
90
|
})
|
|
@@ -46,7 +46,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
scroll,
|
|
47
47
|
sortable,
|
|
48
48
|
data: data$1
|
|
49
|
-
} = pagin.useInit(props, emit, refTable, getLocale
|
|
49
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
50
|
+
type: 1,
|
|
51
|
+
config: {
|
|
52
|
+
isdrag: true
|
|
53
|
+
}
|
|
54
|
+
});
|
|
50
55
|
__expose({
|
|
51
56
|
getSelection,
|
|
52
57
|
getRef,
|
|
@@ -74,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
79
|
value: vue.unref(data$1).list,
|
|
75
80
|
list: vue.unref(tableList),
|
|
76
81
|
paginat: vue.unref(paginat),
|
|
77
|
-
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.
|
|
82
|
+
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : vue.unref(loading),
|
|
78
83
|
options: vue.unref(props).options,
|
|
79
84
|
compons: vue.unref(props).compons,
|
|
80
85
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -87,7 +92,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
92
|
return {
|
|
88
93
|
name: k,
|
|
89
94
|
fn: vue.withCtx((scope) => [
|
|
90
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
95
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
91
96
|
])
|
|
92
97
|
};
|
|
93
98
|
})
|
|
@@ -44,7 +44,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
scroll,
|
|
45
45
|
sortable,
|
|
46
46
|
data
|
|
47
|
-
} = useInit(props, emit, refTable, getLocale
|
|
47
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
48
|
+
type: 1,
|
|
49
|
+
config: {
|
|
50
|
+
isdrag: true
|
|
51
|
+
}
|
|
52
|
+
});
|
|
48
53
|
__expose({
|
|
49
54
|
getSelection,
|
|
50
55
|
getRef,
|
|
@@ -72,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
77
|
value: unref(data).list,
|
|
73
78
|
list: unref(tableList),
|
|
74
79
|
paginat: unref(paginat),
|
|
75
|
-
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.
|
|
80
|
+
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.isloading) === false ? false : unref(loading),
|
|
76
81
|
options: unref(props).options,
|
|
77
82
|
compons: unref(props).compons,
|
|
78
83
|
onSortChange: unref(onSortChange),
|
|
@@ -85,7 +90,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
90
|
return {
|
|
86
91
|
name: k,
|
|
87
92
|
fn: withCtx((scope) => [
|
|
88
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
93
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
89
94
|
])
|
|
90
95
|
};
|
|
91
96
|
})
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
bottom: 0;
|
|
41
41
|
width: 100%;
|
|
42
42
|
}
|
|
43
|
-
.videos.is-fullscreen .videos-list {
|
|
43
|
+
.videos.is-fullscreen .videos-controls-list {
|
|
44
44
|
background-color: rgba(238, 238, 238, 0.5);
|
|
45
45
|
position: absolute;
|
|
46
46
|
top: 0;
|
|
@@ -50,6 +50,15 @@
|
|
|
50
50
|
.videos.is-list .videos-controls-bottom {
|
|
51
51
|
width: calc(100% - var(--videos-list-width));
|
|
52
52
|
}
|
|
53
|
+
.videos.is-controls .videos-controls-top {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
.videos.is-controls .videos-controls-bottom {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
.videos.is-controls .videos-controls-list {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
53
62
|
.videos-videos {
|
|
54
63
|
flex: 1;
|
|
55
64
|
height: 100%;
|
|
@@ -124,7 +133,7 @@
|
|
|
124
133
|
width: 60px;
|
|
125
134
|
margin: 0 10px;
|
|
126
135
|
}
|
|
127
|
-
.videos-list {
|
|
136
|
+
.videos-controls-list {
|
|
128
137
|
width: var(--videos-list-width);
|
|
129
138
|
height: 100%;
|
|
130
139
|
box-sizing: border-box;
|
|
@@ -17,7 +17,7 @@ $videos: 'videos';
|
|
|
17
17
|
bottom: 0;
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
|
-
.#{z($videos, 'list')} {
|
|
20
|
+
.#{z($videos, 'controls-list')} {
|
|
21
21
|
background-color: rgba(238, 238, 238, 0.5);
|
|
22
22
|
position: absolute;
|
|
23
23
|
top: 0;
|
|
@@ -30,6 +30,17 @@ $videos: 'videos';
|
|
|
30
30
|
width: calc(100% - var(#{vdm('list-width', $videos)}));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
+
&.#{is('controls')} {
|
|
34
|
+
.#{z($videos, 'controls-top')} {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
.#{z($videos, 'controls-bottom')} {
|
|
38
|
+
display: none;
|
|
39
|
+
}
|
|
40
|
+
.#{z($videos, 'controls-list')} {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
33
44
|
&-videos {
|
|
34
45
|
flex: 1;
|
|
35
46
|
height: 100%;
|
|
@@ -106,7 +117,7 @@ $videos: 'videos';
|
|
|
106
117
|
}
|
|
107
118
|
}
|
|
108
119
|
}
|
|
109
|
-
&-list {
|
|
120
|
+
&-controls-list {
|
|
110
121
|
width: var(#{vdm('list-width', $videos)});
|
|
111
122
|
height: 100%;
|
|
112
123
|
box-sizing: border-box;
|
|
@@ -53,7 +53,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
53
|
const duration = vue.ref(0);
|
|
54
54
|
const isLoading = vue.ref(false);
|
|
55
55
|
const buffered = vue.ref(0);
|
|
56
|
-
const showControls = vue.ref(
|
|
56
|
+
const showControls = vue.ref(true);
|
|
57
57
|
const showEndOverlay = vue.ref(false);
|
|
58
58
|
const optionsRate = [
|
|
59
59
|
{
|
|
@@ -127,6 +127,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
127
127
|
}
|
|
128
128
|
isMouse.value = true;
|
|
129
129
|
};
|
|
130
|
+
let controlsTimeout;
|
|
131
|
+
const resetControlsTimeout = () => {
|
|
132
|
+
clearTimeout(controlsTimeout);
|
|
133
|
+
if (isPlaying.value) {
|
|
134
|
+
controlsTimeout = setTimeout(() => {
|
|
135
|
+
showControls.value = false;
|
|
136
|
+
isList.value = false;
|
|
137
|
+
}, 5e3);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
130
140
|
const togglePlay = () => {
|
|
131
141
|
if (!videoRef.value) return;
|
|
132
142
|
if (isPlaying.value) {
|
|
@@ -136,6 +146,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
136
146
|
}
|
|
137
147
|
isPlaying.value = !isPlaying.value;
|
|
138
148
|
showEndOverlay.value = false;
|
|
149
|
+
resetControlsTimeout();
|
|
139
150
|
};
|
|
140
151
|
const setPlaybackRate = () => {
|
|
141
152
|
if (videoRef.value) {
|
|
@@ -191,6 +202,33 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
191
202
|
}
|
|
192
203
|
});
|
|
193
204
|
};
|
|
205
|
+
const handleMouseMove = () => {
|
|
206
|
+
showControls.value = true;
|
|
207
|
+
resetControlsTimeout();
|
|
208
|
+
};
|
|
209
|
+
const handleKeydown = (event) => {
|
|
210
|
+
if (!videoRef.value) return;
|
|
211
|
+
console.log("event.key", event.key);
|
|
212
|
+
switch (event.key) {
|
|
213
|
+
case " ":
|
|
214
|
+
case "Spacebar":
|
|
215
|
+
event.preventDefault();
|
|
216
|
+
togglePlay();
|
|
217
|
+
break;
|
|
218
|
+
case "ArrowLeft":
|
|
219
|
+
onTrack(true);
|
|
220
|
+
break;
|
|
221
|
+
case "ArrowRight":
|
|
222
|
+
onTrack(false);
|
|
223
|
+
break;
|
|
224
|
+
case "ArrowUp":
|
|
225
|
+
onSkip(true);
|
|
226
|
+
break;
|
|
227
|
+
case "ArrowDown":
|
|
228
|
+
onSkip(false);
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
194
232
|
vue.onMounted(() => {
|
|
195
233
|
if (videoRef.value) {
|
|
196
234
|
videoRef.value.volume = volume.value / 100;
|
|
@@ -201,8 +239,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
201
239
|
isPlaying.value = true;
|
|
202
240
|
}
|
|
203
241
|
}
|
|
242
|
+
document.addEventListener("keydown", handleKeydown);
|
|
243
|
+
resetControlsTimeout();
|
|
204
244
|
});
|
|
205
245
|
vue.onUnmounted(() => {
|
|
246
|
+
document.removeEventListener("keydown", handleKeydown);
|
|
247
|
+
clearTimeout(controlsTimeout);
|
|
206
248
|
});
|
|
207
249
|
__expose({
|
|
208
250
|
...data.dataExpose
|
|
@@ -213,10 +255,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
213
255
|
class: vue.normalizeClass([
|
|
214
256
|
vue.unref(cs).z(),
|
|
215
257
|
vue.unref(cs).is("fullscreen", vue.unref(isFullscreen)),
|
|
216
|
-
vue.unref(cs).is("list", isList.value)
|
|
258
|
+
vue.unref(cs).is("list", isList.value),
|
|
259
|
+
vue.unref(cs).is("controls", !showControls.value)
|
|
217
260
|
]),
|
|
218
261
|
ref_key: "domRef",
|
|
219
|
-
ref: domRef
|
|
262
|
+
ref: domRef,
|
|
263
|
+
onMousemove: handleMouseMove
|
|
220
264
|
}, [
|
|
221
265
|
vue.createElementVNode("div", {
|
|
222
266
|
class: vue.normalizeClass(vue.unref(cs).z("videos"))
|
|
@@ -381,7 +425,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
381
425
|
], 2),
|
|
382
426
|
list.value.length > 1 ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
383
427
|
key: 0,
|
|
384
|
-
class: vue.normalizeClass(vue.unref(cs).z("list"))
|
|
428
|
+
class: vue.normalizeClass(vue.unref(cs).z("controls-list"))
|
|
385
429
|
}, [
|
|
386
430
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(list.value, (item, index2) => {
|
|
387
431
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
@@ -395,7 +439,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
395
439
|
], 2)), [
|
|
396
440
|
[vue.vShow, isList.value]
|
|
397
441
|
]) : vue.createCommentVNode("", true)
|
|
398
|
-
],
|
|
442
|
+
], 34);
|
|
399
443
|
};
|
|
400
444
|
}
|
|
401
445
|
});
|
|
@@ -51,7 +51,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
const duration = ref(0);
|
|
52
52
|
const isLoading = ref(false);
|
|
53
53
|
const buffered = ref(0);
|
|
54
|
-
const showControls = ref(
|
|
54
|
+
const showControls = ref(true);
|
|
55
55
|
const showEndOverlay = ref(false);
|
|
56
56
|
const optionsRate = [
|
|
57
57
|
{
|
|
@@ -125,6 +125,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
125
125
|
}
|
|
126
126
|
isMouse.value = true;
|
|
127
127
|
};
|
|
128
|
+
let controlsTimeout;
|
|
129
|
+
const resetControlsTimeout = () => {
|
|
130
|
+
clearTimeout(controlsTimeout);
|
|
131
|
+
if (isPlaying.value) {
|
|
132
|
+
controlsTimeout = setTimeout(() => {
|
|
133
|
+
showControls.value = false;
|
|
134
|
+
isList.value = false;
|
|
135
|
+
}, 5e3);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
128
138
|
const togglePlay = () => {
|
|
129
139
|
if (!videoRef.value) return;
|
|
130
140
|
if (isPlaying.value) {
|
|
@@ -134,6 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
134
144
|
}
|
|
135
145
|
isPlaying.value = !isPlaying.value;
|
|
136
146
|
showEndOverlay.value = false;
|
|
147
|
+
resetControlsTimeout();
|
|
137
148
|
};
|
|
138
149
|
const setPlaybackRate = () => {
|
|
139
150
|
if (videoRef.value) {
|
|
@@ -189,6 +200,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
189
200
|
}
|
|
190
201
|
});
|
|
191
202
|
};
|
|
203
|
+
const handleMouseMove = () => {
|
|
204
|
+
showControls.value = true;
|
|
205
|
+
resetControlsTimeout();
|
|
206
|
+
};
|
|
207
|
+
const handleKeydown = (event) => {
|
|
208
|
+
if (!videoRef.value) return;
|
|
209
|
+
console.log("event.key", event.key);
|
|
210
|
+
switch (event.key) {
|
|
211
|
+
case " ":
|
|
212
|
+
case "Spacebar":
|
|
213
|
+
event.preventDefault();
|
|
214
|
+
togglePlay();
|
|
215
|
+
break;
|
|
216
|
+
case "ArrowLeft":
|
|
217
|
+
onTrack(true);
|
|
218
|
+
break;
|
|
219
|
+
case "ArrowRight":
|
|
220
|
+
onTrack(false);
|
|
221
|
+
break;
|
|
222
|
+
case "ArrowUp":
|
|
223
|
+
onSkip(true);
|
|
224
|
+
break;
|
|
225
|
+
case "ArrowDown":
|
|
226
|
+
onSkip(false);
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
192
230
|
onMounted(() => {
|
|
193
231
|
if (videoRef.value) {
|
|
194
232
|
videoRef.value.volume = volume.value / 100;
|
|
@@ -199,8 +237,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
199
237
|
isPlaying.value = true;
|
|
200
238
|
}
|
|
201
239
|
}
|
|
240
|
+
document.addEventListener("keydown", handleKeydown);
|
|
241
|
+
resetControlsTimeout();
|
|
202
242
|
});
|
|
203
243
|
onUnmounted(() => {
|
|
244
|
+
document.removeEventListener("keydown", handleKeydown);
|
|
245
|
+
clearTimeout(controlsTimeout);
|
|
204
246
|
});
|
|
205
247
|
__expose({
|
|
206
248
|
...dataExpose
|
|
@@ -211,10 +253,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
211
253
|
class: normalizeClass([
|
|
212
254
|
unref(cs).z(),
|
|
213
255
|
unref(cs).is("fullscreen", unref(isFullscreen)),
|
|
214
|
-
unref(cs).is("list", isList.value)
|
|
256
|
+
unref(cs).is("list", isList.value),
|
|
257
|
+
unref(cs).is("controls", !showControls.value)
|
|
215
258
|
]),
|
|
216
259
|
ref_key: "domRef",
|
|
217
|
-
ref: domRef
|
|
260
|
+
ref: domRef,
|
|
261
|
+
onMousemove: handleMouseMove
|
|
218
262
|
}, [
|
|
219
263
|
createElementVNode("div", {
|
|
220
264
|
class: normalizeClass(unref(cs).z("videos"))
|
|
@@ -379,7 +423,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
379
423
|
], 2),
|
|
380
424
|
list.value.length > 1 ? withDirectives((openBlock(), createElementBlock("div", {
|
|
381
425
|
key: 0,
|
|
382
|
-
class: normalizeClass(unref(cs).z("list"))
|
|
426
|
+
class: normalizeClass(unref(cs).z("controls-list"))
|
|
383
427
|
}, [
|
|
384
428
|
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item, index) => {
|
|
385
429
|
return openBlock(), createElementBlock("div", {
|
|
@@ -393,7 +437,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
393
437
|
], 2)), [
|
|
394
438
|
[vShow, isList.value]
|
|
395
439
|
]) : createCommentVNode("", true)
|
|
396
|
-
],
|
|
440
|
+
], 34);
|
|
397
441
|
};
|
|
398
442
|
}
|
|
399
443
|
});
|
|
@@ -61,12 +61,12 @@ const dataProps = buildProps.buildProps({
|
|
|
61
61
|
default: true
|
|
62
62
|
},
|
|
63
63
|
/**
|
|
64
|
-
* @props {Boolean}
|
|
64
|
+
* @props {Boolean} isMin=true ( )
|
|
65
65
|
* 是否不要最小化
|
|
66
66
|
*/
|
|
67
|
-
|
|
67
|
+
isMin: {
|
|
68
68
|
type: Boolean,
|
|
69
|
-
default:
|
|
69
|
+
default: true
|
|
70
70
|
},
|
|
71
71
|
/**
|
|
72
72
|
* @props { Boolean } often= ( )
|