sakura-ui-plus 1.0.3 → 1.0.5
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/es/index.js +49 -14
- package/dist/lib/index.js +48 -13
- package/dist/style.css +48 -1
- package/dist/types/components/cell/cell-group.vue.d.ts +1 -0
- package/dist/types/components/cell/props.d.ts +1 -0
- package/dist/types/components/index.d.ts +6 -2
- package/dist/types/components/select/props.d.ts +1 -1
- package/dist/types/components/select/select.vue.d.ts +1 -1
- package/dist/types/components/upload/props.d.ts +1 -0
- package/dist/types/components/upload/upload.vue.d.ts +1 -0
- package/dist/types/types/index.d.ts +1 -1
- package/package.json +14 -10
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unref, getCurrentInstance, ref, nextTick, reactive, defineComponent, mergeModels, computed, useModel, openBlock, createBlock, withCtx, createElementVNode, mergeProps, resolveDynamicComponent, createSlots, renderSlot, createElementBlock, Fragment, renderList, inject, normalizeClass, toDisplayString, createTextVNode, provide, toRef, createCommentVNode, createVNode, withKeys, useTemplateRef, onMounted, onUnmounted, normalizeStyle, withModifiers, render } from "vue";
|
|
2
|
-
import { sleep, isEmpty, keysOf, isString, isArray, addUnit, extend, computedTextsSize, FILE_TYPE, isFunction, getFileType, extractSuffix, getMultipleFileDotSuffix } from "sakura-utils";
|
|
2
|
+
import { sleep, isEmpty, keysOf, isString, isArray, addUnit, extend, computedTextsSize, FILE_TYPE, formatBytes, isFunction, getFileType, extractSuffix, getMultipleFileDotSuffix } from "sakura-utils";
|
|
3
3
|
import { ElLoading, ElMessage, ElMessageBox, ElNotification, ElSelectV2, ElSelect, ElConfigProvider, ElOption, ElPagination, CHANGE_EVENT, ElInput, ElButton, ElTabs, ElTabPane, ElTooltip, ElDialog, ElIcon, ElScrollbar, ElDrawer, ElPopconfirm, ElSwitch } from "element-plus";
|
|
4
4
|
import { TinyColor } from "@ctrl/tinycolor";
|
|
5
5
|
import { useDebounceFn, useThrottleFn } from "@vueuse/core";
|
|
@@ -571,7 +571,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
571
571
|
loading: { type: Boolean },
|
|
572
572
|
virtualized: { type: Boolean },
|
|
573
573
|
emptyValues: { default: () => [void 0, null] },
|
|
574
|
-
stringEmpty: { type: Boolean, default:
|
|
574
|
+
stringEmpty: { type: Boolean, default: true },
|
|
575
575
|
locale: { default: zhCn },
|
|
576
576
|
maxLength: { default: 50 }
|
|
577
577
|
}, {
|
|
@@ -649,10 +649,10 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
649
649
|
} : void 0,
|
|
650
650
|
_ctx.$slots.default ? {
|
|
651
651
|
name: "default",
|
|
652
|
-
fn: withCtx((
|
|
652
|
+
fn: withCtx((data) => [
|
|
653
653
|
isUseVirtualized.value ? renderSlot(_ctx.$slots, "default", {
|
|
654
654
|
key: 0,
|
|
655
|
-
item
|
|
655
|
+
item: data.item
|
|
656
656
|
}) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(__props.options, (v) => {
|
|
657
657
|
return openBlock(), createBlock(unref(ElOption), {
|
|
658
658
|
key: v.value,
|
|
@@ -700,6 +700,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
700
700
|
props: {
|
|
701
701
|
labelWidth: {},
|
|
702
702
|
background: {},
|
|
703
|
+
row: {},
|
|
703
704
|
label: {},
|
|
704
705
|
content: {}
|
|
705
706
|
},
|
|
@@ -711,7 +712,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
711
712
|
const { labelWidth, background } = props;
|
|
712
713
|
return ns.cssBlockVar("cell", {
|
|
713
714
|
"label-width": addUnit(labelWidth || cellContext.labelWidth || 140),
|
|
714
|
-
"background": background || cellContext.background || "#F2FAFF"
|
|
715
|
+
"background": background || cellContext.background || "#F2FAFF",
|
|
716
|
+
"width": 100 / (cellContext.row ?? 1) + "%"
|
|
715
717
|
});
|
|
716
718
|
});
|
|
717
719
|
return (_ctx, _cache) => {
|
|
@@ -740,18 +742,23 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
740
742
|
__name: "cell-group",
|
|
741
743
|
props: {
|
|
742
744
|
labelWidth: { default: 140 },
|
|
743
|
-
background: { default: "#F2FAFF" }
|
|
745
|
+
background: { default: "#F2FAFF" },
|
|
746
|
+
row: { default: 1 }
|
|
744
747
|
},
|
|
745
748
|
setup(__props) {
|
|
746
749
|
const ns = useNamespace("cell-group");
|
|
747
750
|
const props = __props;
|
|
748
751
|
provide(CellContextKey, reactive({
|
|
749
752
|
labelWidth: toRef(props, "labelWidth"),
|
|
750
|
-
background: toRef(props, "background")
|
|
753
|
+
background: toRef(props, "background"),
|
|
754
|
+
row: toRef(props, "row")
|
|
751
755
|
}));
|
|
752
756
|
return (_ctx, _cache) => {
|
|
753
757
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
754
|
-
class: [
|
|
758
|
+
class: [
|
|
759
|
+
unref(ns).b(),
|
|
760
|
+
unref(ns).is(__props.row > 1 ? "row" : "col")
|
|
761
|
+
]
|
|
755
762
|
}, _ctx.$attrs), [
|
|
756
763
|
renderSlot(_ctx.$slots, "default")
|
|
757
764
|
], 16);
|
|
@@ -1231,7 +1238,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1231
1238
|
if (formatFontSize) {
|
|
1232
1239
|
return formatFontSize(fileSize);
|
|
1233
1240
|
}
|
|
1234
|
-
return
|
|
1241
|
+
return formatBytes(fileSize);
|
|
1235
1242
|
});
|
|
1236
1243
|
return (_ctx, _cache) => {
|
|
1237
1244
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
@@ -2129,7 +2136,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2129
2136
|
disabled: { type: Boolean },
|
|
2130
2137
|
validate: { type: Boolean, default: true },
|
|
2131
2138
|
showMessage: { type: Boolean },
|
|
2132
|
-
type: { default: "upload" }
|
|
2139
|
+
type: { default: "upload" },
|
|
2140
|
+
text: { type: Boolean, default: true }
|
|
2133
2141
|
},
|
|
2134
2142
|
emits: ["change"],
|
|
2135
2143
|
setup(__props, { emit: __emit }) {
|
|
@@ -2148,7 +2156,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2148
2156
|
const message = useMessage();
|
|
2149
2157
|
const onDrop = (e) => {
|
|
2150
2158
|
var _a;
|
|
2151
|
-
const { showMessage } = props;
|
|
2159
|
+
const { showMessage, disabled } = props;
|
|
2160
|
+
if (disabled) {
|
|
2161
|
+
return;
|
|
2162
|
+
}
|
|
2152
2163
|
isDragging.value = false;
|
|
2153
2164
|
const files = (_a = e.dataTransfer) == null ? void 0 : _a.files;
|
|
2154
2165
|
const fileResult = getFileResult(files);
|
|
@@ -2203,11 +2214,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2203
2214
|
key: 1,
|
|
2204
2215
|
class: normalizeClass([
|
|
2205
2216
|
unref(ns).b(),
|
|
2206
|
-
unref(ns).m(__props.type)
|
|
2217
|
+
unref(ns).m(__props.type),
|
|
2218
|
+
unref(ns).is("disabled", __props.disabled)
|
|
2207
2219
|
])
|
|
2208
2220
|
}, [
|
|
2209
2221
|
createVNode(unref(ElButton), {
|
|
2210
|
-
text:
|
|
2222
|
+
text: __props.text,
|
|
2211
2223
|
icon: __props.buttonIcon,
|
|
2212
2224
|
type: "primary"
|
|
2213
2225
|
}, {
|
|
@@ -2215,7 +2227,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2215
2227
|
createTextVNode(toDisplayString(__props.buttonTitle), 1)
|
|
2216
2228
|
]),
|
|
2217
2229
|
_: 1
|
|
2218
|
-
}, 8, ["icon"]),
|
|
2230
|
+
}, 8, ["text", "icon"]),
|
|
2219
2231
|
createElementVNode("input", {
|
|
2220
2232
|
class: normalizeClass([unref(ns).e("file")]),
|
|
2221
2233
|
type: "file",
|
|
@@ -2252,6 +2264,9 @@ const components = {
|
|
|
2252
2264
|
};
|
|
2253
2265
|
const ShowModalInstall = {
|
|
2254
2266
|
install(vm) {
|
|
2267
|
+
if (typeof document === "undefined") {
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2255
2270
|
const vnode = createVNode(_sfc_main$3);
|
|
2256
2271
|
checkElementIsExist("u-show-modal");
|
|
2257
2272
|
render(vnode, document.querySelector("#u-show-modal"));
|
|
@@ -2277,7 +2292,20 @@ const SakuraUiPlus = {
|
|
|
2277
2292
|
install
|
|
2278
2293
|
};
|
|
2279
2294
|
export {
|
|
2295
|
+
_sfc_main$i as Cell,
|
|
2296
|
+
_sfc_main$h as CellGroup,
|
|
2297
|
+
_sfc_main$f as Container,
|
|
2298
|
+
_sfc_main$6 as CountDown,
|
|
2299
|
+
_sfc_main$5 as Dialog,
|
|
2300
|
+
_sfc_main$4 as Drawer,
|
|
2280
2301
|
EVENT_NAME,
|
|
2302
|
+
_sfc_main$8 as FileItem,
|
|
2303
|
+
_sfc_main$7 as FileList,
|
|
2304
|
+
_sfc_main$b as FilterGroup,
|
|
2305
|
+
_sfc_main$c as FilterItem,
|
|
2306
|
+
_sfc_main$1 as PageContainer,
|
|
2307
|
+
_sfc_main$e as Pagination,
|
|
2308
|
+
_sfc_main$2 as PopconfirmSwitch,
|
|
2281
2309
|
_sfc_main$i as SakuraCell,
|
|
2282
2310
|
_sfc_main$h as SakuraCellGroup,
|
|
2283
2311
|
_sfc_main$f as SakuraContainer,
|
|
@@ -2298,6 +2326,13 @@ export {
|
|
|
2298
2326
|
_sfc_main$a as SakuraTabs,
|
|
2299
2327
|
_sfc_main$9 as SakuraTooltipText,
|
|
2300
2328
|
_sfc_main as SakuraUpload,
|
|
2329
|
+
_sfc_main$d as SearchInput,
|
|
2330
|
+
_sfc_main$j as Select,
|
|
2331
|
+
_sfc_main$3 as ShowModal,
|
|
2332
|
+
_sfc_main$g as Status,
|
|
2333
|
+
_sfc_main$a as Tabs,
|
|
2334
|
+
_sfc_main$9 as TooltipText,
|
|
2335
|
+
_sfc_main as Upload,
|
|
2301
2336
|
checkElementIsExist,
|
|
2302
2337
|
createRules,
|
|
2303
2338
|
SakuraUiPlus as default,
|
package/dist/lib/index.js
CHANGED
|
@@ -573,7 +573,7 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
573
573
|
loading: { type: Boolean },
|
|
574
574
|
virtualized: { type: Boolean },
|
|
575
575
|
emptyValues: { default: () => [void 0, null] },
|
|
576
|
-
stringEmpty: { type: Boolean, default:
|
|
576
|
+
stringEmpty: { type: Boolean, default: true },
|
|
577
577
|
locale: { default: zhCn },
|
|
578
578
|
maxLength: { default: 50 }
|
|
579
579
|
}, {
|
|
@@ -651,10 +651,10 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
|
|
|
651
651
|
} : void 0,
|
|
652
652
|
_ctx.$slots.default ? {
|
|
653
653
|
name: "default",
|
|
654
|
-
fn: vue.withCtx((
|
|
654
|
+
fn: vue.withCtx((data) => [
|
|
655
655
|
isUseVirtualized.value ? vue.renderSlot(_ctx.$slots, "default", {
|
|
656
656
|
key: 0,
|
|
657
|
-
item
|
|
657
|
+
item: data.item
|
|
658
658
|
}) : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(__props.options, (v) => {
|
|
659
659
|
return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElOption), {
|
|
660
660
|
key: v.value,
|
|
@@ -702,6 +702,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
702
702
|
props: {
|
|
703
703
|
labelWidth: {},
|
|
704
704
|
background: {},
|
|
705
|
+
row: {},
|
|
705
706
|
label: {},
|
|
706
707
|
content: {}
|
|
707
708
|
},
|
|
@@ -713,7 +714,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
713
714
|
const { labelWidth, background } = props;
|
|
714
715
|
return ns.cssBlockVar("cell", {
|
|
715
716
|
"label-width": sakuraUtils.addUnit(labelWidth || cellContext.labelWidth || 140),
|
|
716
|
-
"background": background || cellContext.background || "#F2FAFF"
|
|
717
|
+
"background": background || cellContext.background || "#F2FAFF",
|
|
718
|
+
"width": 100 / (cellContext.row ?? 1) + "%"
|
|
717
719
|
});
|
|
718
720
|
});
|
|
719
721
|
return (_ctx, _cache) => {
|
|
@@ -742,18 +744,23 @@ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
|
|
|
742
744
|
__name: "cell-group",
|
|
743
745
|
props: {
|
|
744
746
|
labelWidth: { default: 140 },
|
|
745
|
-
background: { default: "#F2FAFF" }
|
|
747
|
+
background: { default: "#F2FAFF" },
|
|
748
|
+
row: { default: 1 }
|
|
746
749
|
},
|
|
747
750
|
setup(__props) {
|
|
748
751
|
const ns = useNamespace("cell-group");
|
|
749
752
|
const props = __props;
|
|
750
753
|
vue.provide(CellContextKey, vue.reactive({
|
|
751
754
|
labelWidth: vue.toRef(props, "labelWidth"),
|
|
752
|
-
background: vue.toRef(props, "background")
|
|
755
|
+
background: vue.toRef(props, "background"),
|
|
756
|
+
row: vue.toRef(props, "row")
|
|
753
757
|
}));
|
|
754
758
|
return (_ctx, _cache) => {
|
|
755
759
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
756
|
-
class: [
|
|
760
|
+
class: [
|
|
761
|
+
vue.unref(ns).b(),
|
|
762
|
+
vue.unref(ns).is(__props.row > 1 ? "row" : "col")
|
|
763
|
+
]
|
|
757
764
|
}, _ctx.$attrs), [
|
|
758
765
|
vue.renderSlot(_ctx.$slots, "default")
|
|
759
766
|
], 16);
|
|
@@ -1233,7 +1240,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
|
|
|
1233
1240
|
if (formatFontSize) {
|
|
1234
1241
|
return formatFontSize(fileSize);
|
|
1235
1242
|
}
|
|
1236
|
-
return
|
|
1243
|
+
return sakuraUtils.formatBytes(fileSize);
|
|
1237
1244
|
});
|
|
1238
1245
|
return (_ctx, _cache) => {
|
|
1239
1246
|
return vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
|
|
@@ -2131,7 +2138,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2131
2138
|
disabled: { type: Boolean },
|
|
2132
2139
|
validate: { type: Boolean, default: true },
|
|
2133
2140
|
showMessage: { type: Boolean },
|
|
2134
|
-
type: { default: "upload" }
|
|
2141
|
+
type: { default: "upload" },
|
|
2142
|
+
text: { type: Boolean, default: true }
|
|
2135
2143
|
},
|
|
2136
2144
|
emits: ["change"],
|
|
2137
2145
|
setup(__props, { emit: __emit }) {
|
|
@@ -2150,7 +2158,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2150
2158
|
const message = useMessage();
|
|
2151
2159
|
const onDrop = (e) => {
|
|
2152
2160
|
var _a;
|
|
2153
|
-
const { showMessage } = props;
|
|
2161
|
+
const { showMessage, disabled } = props;
|
|
2162
|
+
if (disabled) {
|
|
2163
|
+
return;
|
|
2164
|
+
}
|
|
2154
2165
|
isDragging.value = false;
|
|
2155
2166
|
const files = (_a = e.dataTransfer) == null ? void 0 : _a.files;
|
|
2156
2167
|
const fileResult = getFileResult(files);
|
|
@@ -2205,11 +2216,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2205
2216
|
key: 1,
|
|
2206
2217
|
class: vue.normalizeClass([
|
|
2207
2218
|
vue.unref(ns).b(),
|
|
2208
|
-
vue.unref(ns).m(__props.type)
|
|
2219
|
+
vue.unref(ns).m(__props.type),
|
|
2220
|
+
vue.unref(ns).is("disabled", __props.disabled)
|
|
2209
2221
|
])
|
|
2210
2222
|
}, [
|
|
2211
2223
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
2212
|
-
text:
|
|
2224
|
+
text: __props.text,
|
|
2213
2225
|
icon: __props.buttonIcon,
|
|
2214
2226
|
type: "primary"
|
|
2215
2227
|
}, {
|
|
@@ -2217,7 +2229,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
2217
2229
|
vue.createTextVNode(vue.toDisplayString(__props.buttonTitle), 1)
|
|
2218
2230
|
]),
|
|
2219
2231
|
_: 1
|
|
2220
|
-
}, 8, ["icon"]),
|
|
2232
|
+
}, 8, ["text", "icon"]),
|
|
2221
2233
|
vue.createElementVNode("input", {
|
|
2222
2234
|
class: vue.normalizeClass([vue.unref(ns).e("file")]),
|
|
2223
2235
|
type: "file",
|
|
@@ -2254,6 +2266,9 @@ const components = {
|
|
|
2254
2266
|
};
|
|
2255
2267
|
const ShowModalInstall = {
|
|
2256
2268
|
install(vm) {
|
|
2269
|
+
if (typeof document === "undefined") {
|
|
2270
|
+
return;
|
|
2271
|
+
}
|
|
2257
2272
|
const vnode = vue.createVNode(_sfc_main$3);
|
|
2258
2273
|
checkElementIsExist("u-show-modal");
|
|
2259
2274
|
vue.render(vnode, document.querySelector("#u-show-modal"));
|
|
@@ -2278,7 +2293,20 @@ const index = "";
|
|
|
2278
2293
|
const SakuraUiPlus = {
|
|
2279
2294
|
install
|
|
2280
2295
|
};
|
|
2296
|
+
exports.Cell = _sfc_main$i;
|
|
2297
|
+
exports.CellGroup = _sfc_main$h;
|
|
2298
|
+
exports.Container = _sfc_main$f;
|
|
2299
|
+
exports.CountDown = _sfc_main$6;
|
|
2300
|
+
exports.Dialog = _sfc_main$5;
|
|
2301
|
+
exports.Drawer = _sfc_main$4;
|
|
2281
2302
|
exports.EVENT_NAME = EVENT_NAME;
|
|
2303
|
+
exports.FileItem = _sfc_main$8;
|
|
2304
|
+
exports.FileList = _sfc_main$7;
|
|
2305
|
+
exports.FilterGroup = _sfc_main$b;
|
|
2306
|
+
exports.FilterItem = _sfc_main$c;
|
|
2307
|
+
exports.PageContainer = _sfc_main$1;
|
|
2308
|
+
exports.Pagination = _sfc_main$e;
|
|
2309
|
+
exports.PopconfirmSwitch = _sfc_main$2;
|
|
2282
2310
|
exports.SakuraCell = _sfc_main$i;
|
|
2283
2311
|
exports.SakuraCellGroup = _sfc_main$h;
|
|
2284
2312
|
exports.SakuraContainer = _sfc_main$f;
|
|
@@ -2299,6 +2327,13 @@ exports.SakuraStatus = _sfc_main$g;
|
|
|
2299
2327
|
exports.SakuraTabs = _sfc_main$a;
|
|
2300
2328
|
exports.SakuraTooltipText = _sfc_main$9;
|
|
2301
2329
|
exports.SakuraUpload = _sfc_main;
|
|
2330
|
+
exports.SearchInput = _sfc_main$d;
|
|
2331
|
+
exports.Select = _sfc_main$j;
|
|
2332
|
+
exports.ShowModal = _sfc_main$3;
|
|
2333
|
+
exports.Status = _sfc_main$g;
|
|
2334
|
+
exports.Tabs = _sfc_main$a;
|
|
2335
|
+
exports.TooltipText = _sfc_main$9;
|
|
2336
|
+
exports.Upload = _sfc_main;
|
|
2302
2337
|
exports.checkElementIsExist = checkElementIsExist;
|
|
2303
2338
|
exports.createRules = createRules;
|
|
2304
2339
|
exports.default = SakuraUiPlus;
|
package/dist/style.css
CHANGED
|
@@ -2830,6 +2830,7 @@
|
|
|
2830
2830
|
.sakura-cell {
|
|
2831
2831
|
display: flex;
|
|
2832
2832
|
flex-direction: row;
|
|
2833
|
+
width: var(--sakura-cell-width);
|
|
2833
2834
|
border-bottom: 1px solid var(--sakura-cell-border-color);
|
|
2834
2835
|
}
|
|
2835
2836
|
.sakura-cell:last-of-type {
|
|
@@ -2860,6 +2861,7 @@
|
|
|
2860
2861
|
border-right: 1px solid var(--sakura-cell-border-color);
|
|
2861
2862
|
color: var(--sakura-cell-label-color);
|
|
2862
2863
|
font-size: var(--sakura-cell-label-font-size);
|
|
2864
|
+
border-left: 1px solid var(--sakura-cell-border-color);
|
|
2863
2865
|
}
|
|
2864
2866
|
.sakura-cell {
|
|
2865
2867
|
/**
|
|
@@ -2959,6 +2961,13 @@
|
|
|
2959
2961
|
--sakura-cell-border-color: var(--sakura-border-color);
|
|
2960
2962
|
--sakura-cell-padding: 15px 10px;
|
|
2961
2963
|
border: 1px solid var(--sakura-cell-border-color);
|
|
2964
|
+
border-left: 0;
|
|
2965
|
+
}
|
|
2966
|
+
.sakura-cell-group.is-row {
|
|
2967
|
+
display: flex;
|
|
2968
|
+
flex-wrap: wrap;
|
|
2969
|
+
}
|
|
2970
|
+
.sakura-cell-group.is-col {
|
|
2962
2971
|
display: flex;
|
|
2963
2972
|
flex-direction: column;
|
|
2964
2973
|
}
|
|
@@ -3860,6 +3869,7 @@
|
|
|
3860
3869
|
border: var(--sakura-file-item-border);
|
|
3861
3870
|
border-radius: var(--sakura-file-item-border-radius);
|
|
3862
3871
|
cursor: pointer;
|
|
3872
|
+
position: relative;
|
|
3863
3873
|
}
|
|
3864
3874
|
.sakura-file-item + .sakura-file-item {
|
|
3865
3875
|
margin-top: 20px;
|
|
@@ -4813,11 +4823,12 @@
|
|
|
4813
4823
|
--sakura-upload-tips-color: var(--sakura-text-color-placeholder);
|
|
4814
4824
|
cursor: pointer;
|
|
4815
4825
|
position: relative;
|
|
4826
|
+
overflow: hidden;
|
|
4816
4827
|
}
|
|
4817
4828
|
.sakura-upload.is-active {
|
|
4818
4829
|
border-color: var(--sakura-color-primary);
|
|
4819
4830
|
}
|
|
4820
|
-
.sakura-upload:hover {
|
|
4831
|
+
.sakura-upload:not(.sakura-upload.is-disabled):hover {
|
|
4821
4832
|
border-color: var(--sakura-color-primary);
|
|
4822
4833
|
}
|
|
4823
4834
|
.sakura-upload {
|
|
@@ -4847,6 +4858,12 @@
|
|
|
4847
4858
|
padding: var(--sakura-upload-padding);
|
|
4848
4859
|
border: var(--sakura-upload-border);
|
|
4849
4860
|
}
|
|
4861
|
+
.sakura-upload--button {
|
|
4862
|
+
width: auto;
|
|
4863
|
+
}
|
|
4864
|
+
.sakura-upload--button .el-button {
|
|
4865
|
+
width: 100%;
|
|
4866
|
+
}
|
|
4850
4867
|
.sakura-upload {
|
|
4851
4868
|
/**
|
|
4852
4869
|
@at-root使用之后会将另起一行不在进行嵌套
|
|
@@ -4907,4 +4924,34 @@
|
|
|
4907
4924
|
cursor: pointer;
|
|
4908
4925
|
width: 200%;
|
|
4909
4926
|
height: 200%;
|
|
4927
|
+
}
|
|
4928
|
+
.sakura-upload.is-disabled {
|
|
4929
|
+
cursor: not-allowed;
|
|
4930
|
+
}
|
|
4931
|
+
.sakura-upload.is-disabled:after {
|
|
4932
|
+
content: "";
|
|
4933
|
+
width: 100%;
|
|
4934
|
+
height: 100%;
|
|
4935
|
+
position: absolute;
|
|
4936
|
+
left: 0;
|
|
4937
|
+
top: 0;
|
|
4938
|
+
z-index: 9;
|
|
4939
|
+
cursor: not-allowed;
|
|
4940
|
+
}
|
|
4941
|
+
.sakura-upload.is-disabled {
|
|
4942
|
+
/**
|
|
4943
|
+
@at-root使用之后会将另起一行不在进行嵌套
|
|
4944
|
+
.demo {
|
|
4945
|
+
@at-root .a{
|
|
4946
|
+
color: red;
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
.demo{}
|
|
4950
|
+
.a{
|
|
4951
|
+
color: red;
|
|
4952
|
+
}
|
|
4953
|
+
*/
|
|
4954
|
+
}
|
|
4955
|
+
.sakura-upload.is-disabled .sakura-upload__file {
|
|
4956
|
+
display: none;
|
|
4910
4957
|
}
|
|
@@ -11,6 +11,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
11
11
|
declare const __VLS_component: import('vue').DefineComponent<CellGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CellGroupProps> & Readonly<{}>, {
|
|
12
12
|
background: string;
|
|
13
13
|
labelWidth: string | number;
|
|
14
|
+
row: number;
|
|
14
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
17
|
export default _default;
|
|
@@ -1560,7 +1560,7 @@ declare const _default: {
|
|
|
1560
1560
|
item: any;
|
|
1561
1561
|
}): any;
|
|
1562
1562
|
default?(_: {
|
|
1563
|
-
item: import('..').OptionsItem
|
|
1563
|
+
item: import('..').OptionsItem<any>;
|
|
1564
1564
|
}): any;
|
|
1565
1565
|
footer?(_: {}): any;
|
|
1566
1566
|
tag?(_: {
|
|
@@ -1589,6 +1589,7 @@ declare const _default: {
|
|
|
1589
1589
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./cell/props').CellGroupProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
1590
1590
|
background: string;
|
|
1591
1591
|
labelWidth: string | number;
|
|
1592
|
+
row: number;
|
|
1592
1593
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
1593
1594
|
P: {};
|
|
1594
1595
|
B: {};
|
|
@@ -1599,6 +1600,7 @@ declare const _default: {
|
|
|
1599
1600
|
}, Readonly<import('./cell/props').CellGroupProps> & Readonly<{}>, {}, {}, {}, {}, {
|
|
1600
1601
|
background: string;
|
|
1601
1602
|
labelWidth: string | number;
|
|
1603
|
+
row: number;
|
|
1602
1604
|
}>;
|
|
1603
1605
|
__isFragment?: never;
|
|
1604
1606
|
__isTeleport?: never;
|
|
@@ -1606,6 +1608,7 @@ declare const _default: {
|
|
|
1606
1608
|
} & import('vue').ComponentOptionsBase<Readonly<import('./cell/props').CellGroupProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
1607
1609
|
background: string;
|
|
1608
1610
|
labelWidth: string | number;
|
|
1611
|
+
row: number;
|
|
1609
1612
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
1610
1613
|
$slots: {
|
|
1611
1614
|
default?(_: {}): any;
|
|
@@ -2222,6 +2225,7 @@ declare const _default: {
|
|
|
2222
2225
|
onChange?: ((fileInfoList: import('./upload/props').UploadResult<import('..').FileInfo[]>) => any) | undefined;
|
|
2223
2226
|
}>, {
|
|
2224
2227
|
title: string;
|
|
2228
|
+
text: boolean;
|
|
2225
2229
|
type: "upload" | "button";
|
|
2226
2230
|
tips: string;
|
|
2227
2231
|
validate: boolean;
|
|
@@ -2233,4 +2237,4 @@ declare const _default: {
|
|
|
2233
2237
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
2234
2238
|
};
|
|
2235
2239
|
export default _default;
|
|
2236
|
-
export { Select as SakuraSelect, Cell as SakuraCell, CellGroup as SakuraCellGroup, Status as SakuraStatus, Container as SakuraContainer, Pagination as SakuraPagination, SearchInput as SakuraSearchInput, FilterItem as SakuraFilterItem, FilterGroup as SakuraFilterGroup, Tabs as SakuraTabs, TooltipText as SakuraTooltipText, FileItem as SakuraFileItem, FileList as SakuraFileList, CountDown as SakuraCountDown, Dialog as SakuraDialog, Drawer as SakuraDrawer, ShowModal as SakuraShowModal, PopconfirmSwitch as SakuraPopconfirmSwitch, PageContainer as SakuraPageContainer, Upload as SakuraUpload };
|
|
2240
|
+
export { Select as SakuraSelect, Cell as SakuraCell, CellGroup as SakuraCellGroup, Status as SakuraStatus, Container as SakuraContainer, Pagination as SakuraPagination, SearchInput as SakuraSearchInput, FilterItem as SakuraFilterItem, FilterGroup as SakuraFilterGroup, Tabs as SakuraTabs, TooltipText as SakuraTooltipText, FileItem as SakuraFileItem, FileList as SakuraFileList, CountDown as SakuraCountDown, Dialog as SakuraDialog, Drawer as SakuraDrawer, ShowModal as SakuraShowModal, PopconfirmSwitch as SakuraPopconfirmSwitch, PageContainer as SakuraPageContainer, Upload as SakuraUpload, Select, Cell, CellGroup, Status, Container, Pagination, SearchInput, FilterItem, FilterGroup, Tabs, TooltipText, FileItem, FileList, CountDown, Dialog, Drawer, ShowModal, PopconfirmSwitch, PageContainer, Upload };
|
|
@@ -6,6 +6,7 @@ declare const _default: import('vue').DefineComponent<UploadProps, {}, {}, {}, {
|
|
|
6
6
|
onChange?: ((fileInfoList: import('./props.ts').UploadResult<import('../../index.ts').FileInfo[]>) => any) | undefined;
|
|
7
7
|
}>, {
|
|
8
8
|
title: string;
|
|
9
|
+
text: boolean;
|
|
9
10
|
type: "upload" | "button";
|
|
10
11
|
tips: string;
|
|
11
12
|
validate: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sakura-ui-plus",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "开发常用组件",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -48,16 +48,19 @@
|
|
|
48
48
|
"test:ui": "vitest --ui",
|
|
49
49
|
"test:coverage": "vitest run --coverage",
|
|
50
50
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
|
51
|
-
"prepublishOnly": "npm run build"
|
|
51
|
+
"prepublishOnly": "npm run build",
|
|
52
|
+
"docs:dev": "vitepress dev docs",
|
|
53
|
+
"docs:build": "vitepress build docs",
|
|
54
|
+
"docs:preview": "vitepress preview docs"
|
|
52
55
|
},
|
|
53
56
|
"peerDependencies": {
|
|
54
|
-
"element-plus": "^2.13.0",
|
|
55
|
-
"@vueuse/core": "^12.3.0",
|
|
56
|
-
"sakura-utils": "^1.0.7",
|
|
57
|
-
"vue": "^3.3.0",
|
|
58
57
|
"@ctrl/tinycolor": "^3.6.0",
|
|
59
58
|
"@element-plus/icons-vue": "^2.3.1",
|
|
60
|
-
"
|
|
59
|
+
"@vueuse/core": "^12.3.0",
|
|
60
|
+
"dompurify": "^3.2.6",
|
|
61
|
+
"element-plus": "^2.13.0",
|
|
62
|
+
"sakura-utils": "^1.0.8",
|
|
63
|
+
"vue": "^3.3.0"
|
|
61
64
|
},
|
|
62
65
|
"devDependencies": {
|
|
63
66
|
"@types/node": "^20.0.0",
|
|
@@ -72,8 +75,9 @@
|
|
|
72
75
|
"unplugin-vue-components": "^0.28.0",
|
|
73
76
|
"vite": "^4.0.0",
|
|
74
77
|
"vite-plugin-dts": "^4.5.4",
|
|
78
|
+
"vitepress": "^1.6.4",
|
|
79
|
+
"vitepress-theme-demoblock": "^3.1.3",
|
|
75
80
|
"vitest": "^0.34.0",
|
|
76
81
|
"vue-tsc": "^3.2.1"
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
}
|
|
82
|
+
}
|
|
83
|
+
}
|