@ctzy-web-client/plugin-component-vue 1.0.4 → 1.0.6

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,11 +1,6 @@
1
1
  import { defineComponent, ref, inject, computed, useSlots, unref, provide, watch, resolveComponent, openBlock, createBlock, withCtx, renderSlot, createElementVNode, normalizeClass, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from 'vue';
2
2
  import { useNamespace, filterPanelItemKey, useGlobalConfig } from 'web-base-client-vue';
3
- import { dayjs } from 'element-plus';
4
- import PanelDateRange from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-range';
5
- import { timePickerDefaultProps } from 'element-plus/es/components/time-picker/src/common/props';
6
- import { ROOT_PICKER_INJECTION_KEY } from 'element-plus/es/components/date-picker/src/constants';
7
- import { useNamespace as useNamespace$1 } from 'element-plus/es/hooks/index';
8
- import { parseDate, valueEquals, formatter } from 'element-plus/es/components/time-picker/src/utils';
3
+ import { timePickerDefaultProps, ROOT_PICKER_INJECTION_KEY, useNamespace as useNamespace$1, dayjs, parseDate, valueEquals, formatter, PanelDateRange } from 'element-plus';
9
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
10
5
 
11
6
  const __default__ = defineComponent({ name: "BwaDateRange" });
@@ -5,21 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var vue = require('vue');
6
6
  var webBaseClientVue = require('web-base-client-vue');
7
7
  var ElementPlus = require('element-plus');
8
- var PanelDateRange = require('element-plus/es/components/date-picker/src/date-picker-com/panel-date-range');
9
- var props = require('element-plus/es/components/time-picker/src/common/props');
10
- var constants = require('element-plus/es/components/date-picker/src/constants');
11
- var index = require('element-plus/es/hooks/index');
12
- var utils = require('element-plus/es/components/time-picker/src/utils');
13
8
  var _pluginVue_exportHelper = require('../_virtual/_plugin-vue_export-helper.js');
14
9
 
15
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
-
17
- var PanelDateRange__default = /*#__PURE__*/_interopDefaultLegacy(PanelDateRange);
18
-
19
10
  const __default__ = vue.defineComponent({ name: "BwaDateRange" });
20
11
  const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
21
12
  props: {
22
- ...props.timePickerDefaultProps,
13
+ ...ElementPlus.timePickerDefaultProps,
23
14
  modelValue: {
24
15
  type: null,
25
16
  required: true
@@ -38,9 +29,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
38
29
  const slots = vue.useSlots();
39
30
  const locale = webBaseClientVue.useGlobalConfig("locale", "ZH");
40
31
  const lang = vue.computed(() => vue.unref(locale).name);
41
- vue.provide(constants.ROOT_PICKER_INJECTION_KEY, {
32
+ vue.provide(ElementPlus.ROOT_PICKER_INJECTION_KEY, {
42
33
  slots,
43
- pickerNs: index.useNamespace("picker-panel")
34
+ pickerNs: ElementPlus.useNamespace("picker-panel")
44
35
  });
45
36
  vue.provide("EP_PICKER_BASE", {
46
37
  props
@@ -82,14 +73,14 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
82
73
  const { valueFormat } = props;
83
74
  const value = vue.unref(dateRangeValue);
84
75
  if (!vue.unref(valueIsEmpty)) {
85
- return value.map((d) => utils.parseDate(d, valueFormat, vue.unref(lang)));
76
+ return value.map((d) => ElementPlus.parseDate(d, valueFormat, vue.unref(lang)));
86
77
  }
87
78
  return [];
88
79
  });
89
80
  const emitInput = (input) => {
90
- if (!utils.valueEquals(vue.unref(dateRangeValue), input)) {
81
+ if (!ElementPlus.valueEquals(vue.unref(dateRangeValue), input)) {
91
82
  const formatted = input.map(
92
- (item) => utils.formatter(item, props.valueFormat, vue.unref(lang))
83
+ (item) => ElementPlus.formatter(item, props.valueFormat, vue.unref(lang))
93
84
  );
94
85
  emit("update:modelValue", {
95
86
  start: formatted[0] ? ElementPlus.dayjs(formatted[0]).set("hour", 0).set("minute", 0).set("second", 0).format("YYYY-MM-DD HH:mm:ss") : "",
@@ -171,7 +162,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
171
162
  ])
172
163
  ]),
173
164
  content: vue.withCtx(() => [
174
- vue.createVNode(vue.unref(PanelDateRange__default["default"]), {
165
+ vue.createVNode(vue.unref(ElementPlus.PanelDateRange), {
175
166
  "parsed-value": vue.unref(parsedValue),
176
167
  type: "daterange",
177
168
  visible: pickerVisivle.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzy-web-client/plugin-component-vue",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.mjs",
6
6
  "exports": {
@@ -33,11 +33,11 @@
33
33
  "quill": "^1.3.7",
34
34
  "rxjs": "^7.6.0",
35
35
  "tinymce": "^6.4.2",
36
- "web-base-client-vue": "^1.0.0"
36
+ "@ctzy-web-client/web-base-client-vue": "^1.0.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@vueuse/core": "^9.6.0",
40
40
  "vue": "^3.2.41",
41
41
  "vue-router": "^4.1.6"
42
42
  }
43
- }
43
+ }
@@ -63,15 +63,15 @@ import {
63
63
  useGlobalConfig,
64
64
  } from 'web-base-client-vue';
65
65
  import { dayjs } from 'element-plus';
66
- import PanelDateRange from 'element-plus/es/components/date-picker/src/date-picker-com/panel-date-range';
67
- import { timePickerDefaultProps } from 'element-plus/es/components/time-picker/src/common/props';
68
- import { ROOT_PICKER_INJECTION_KEY } from 'element-plus/es/components/date-picker/src/constants';
69
- import { useNamespace as useElementPlusNamesplace } from 'element-plus/es/hooks/index';
66
+ import { PanelDateRange } from 'element-plus';
67
+ import { timePickerDefaultProps } from 'element-plus';
68
+ import { ROOT_PICKER_INJECTION_KEY } from 'element-plus';
69
+ import { useNamespace as useElementPlusNamesplace } from 'element-plus';
70
70
  import {
71
71
  formatter,
72
72
  parseDate,
73
73
  valueEquals,
74
- } from 'element-plus/es/components/time-picker/src/utils';
74
+ } from 'element-plus';
75
75
 
76
76
  defineOptions({ name: 'BwaDateRange' });
77
77