sctj-components 1.1.17 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { computed as computed$1, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, normalizeClass, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, createElementVNode, ref as ref$1, watch, mergeProps, createSlots, renderSlot, createVNode, TransitionGroup, useCssVars, withModifiers, normalizeStyle, nextTick, onMounted as onMounted$1, onUnmounted, isRef, withDirectives, vShow, onBeforeMount, getCurrentInstance, reactive, resolveDirective, useSlots, resolveDynamicComponent, toRefs, withKeys, pushScopeId, popScopeId, shallowRef, onBeforeUnmount, markRaw } from "vue";
1
+ import { computed as computed$1, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, normalizeClass, toDisplayString, createBlock, withCtx, createTextVNode, createCommentVNode, createElementVNode, ref as ref$1, watch, mergeProps, createSlots, renderSlot, createVNode, TransitionGroup, useCssVars, withModifiers, normalizeStyle, nextTick, onMounted as onMounted$1, onUnmounted, isRef, withDirectives, vShow, onBeforeMount, reactive, getCurrentInstance, resolveDirective, useSlots, resolveDynamicComponent, toRefs, withKeys, pushScopeId, popScopeId, shallowRef, onBeforeUnmount, markRaw } from "vue";
2
2
  import VueOfficePdf from "@vue-office/pdf";
3
3
  import VueOfficeDocx from "@vue-office/docx";
4
4
  import VueOfficeExcel from "@vue-office/excel";
@@ -1310,13 +1310,17 @@ const _sfc_main$r = {
1310
1310
  clearable: {
1311
1311
  type: Boolean,
1312
1312
  default: true
1313
+ },
1314
+ shortcuts: {
1315
+ type: Array,
1316
+ default: () => []
1313
1317
  }
1314
1318
  },
1315
1319
  emits: ["update:modelValue", "change"],
1316
1320
  setup(__props, { emit }) {
1317
1321
  const props = __props;
1318
1322
  const { isMobile } = useMobile();
1319
- const shortcuts = [
1323
+ const defaultShortcuts = reactive([
1320
1324
  {
1321
1325
  text: "\u8FC7\u53BB7\u5929",
1322
1326
  value: () => {
@@ -1365,7 +1369,10 @@ const _sfc_main$r = {
1365
1369
  return [startOfLastYear, endOfLastYear];
1366
1370
  }
1367
1371
  }
1368
- ];
1372
+ ]);
1373
+ const computedShortcuts = computed$1(() => {
1374
+ return [...defaultShortcuts, ...props.shortcuts];
1375
+ });
1369
1376
  const timeRange = computed$1({
1370
1377
  get() {
1371
1378
  return props.modelValue;
@@ -1388,11 +1395,11 @@ const _sfc_main$r = {
1388
1395
  "value-format": __props.valueFormat,
1389
1396
  "disabled-date": __props.disabledDate,
1390
1397
  "range-separator": "\u5230",
1391
- shortcuts,
1398
+ shortcuts: unref(computedShortcuts),
1392
1399
  "start-placeholder": "\u5F00\u59CB\u65F6\u95F4",
1393
1400
  "end-placeholder": "\u7ED3\u675F\u65F6\u95F4",
1394
1401
  onChange: handleDateChange
1395
- }, _ctx.$attrs), null, 16, ["size", "clearable", "modelValue", "value-format", "disabled-date"]);
1402
+ }, _ctx.$attrs), null, 16, ["size", "clearable", "modelValue", "value-format", "disabled-date", "shortcuts"]);
1396
1403
  };
1397
1404
  }
1398
1405
  };