vue-devui 1.0.0-rc.10 → 1.0.0-rc.13
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/LICENSE +23 -0
- package/README.md +156 -149
- package/auto-complete/index.es.js +53 -23
- package/auto-complete/index.umd.js +15 -15
- package/auto-complete/style.css +1 -1
- package/badge/index.es.js +8 -2
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +5 -3
- package/button/index.umd.js +6 -6
- package/button/style.css +1 -1
- package/card/index.es.js +5 -1
- package/card/index.umd.js +1 -1
- package/card/style.css +1 -1
- package/checkbox/index.es.js +22 -14
- package/checkbox/index.umd.js +7 -7
- package/checkbox/style.css +1 -1
- package/collapse/index.es.js +20 -186
- package/collapse/index.umd.js +1 -1
- package/collapse/style.css +1 -1
- package/countdown/index.es.js +56 -13
- package/countdown/index.umd.js +1 -1
- package/{date-picker → date-picker-pro}/index.d.ts +0 -0
- package/date-picker-pro/index.es.js +10867 -0
- package/date-picker-pro/index.umd.js +27 -0
- package/date-picker-pro/package.json +7 -0
- package/date-picker-pro/style.css +1 -0
- package/dropdown/index.es.js +9 -2
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +98 -56
- package/editable-select/index.umd.js +1 -1
- package/editable-select/style.css +1 -1
- package/form/index.es.js +22 -14
- package/form/index.umd.js +11 -11
- package/icon/index.es.js +5 -3
- package/icon/index.umd.js +1 -1
- package/icon/style.css +1 -1
- package/image-preview/style.css +1 -1
- package/input/index.es.js +59 -23
- package/input/index.umd.js +7 -7
- package/input/style.css +1 -1
- package/input-number/index.es.js +1 -4
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/modal/index.es.js +5 -3
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +32 -34
- package/notification/index.umd.js +1 -1
- package/notification/style.css +1 -1
- package/nuxt/components/DRangeDatePickerPro.js +3 -0
- package/nuxt/components/DatePickerPro.js +3 -0
- package/nuxt/components/OptionGroup.js +3 -0
- package/nuxt/components/Step.js +3 -0
- package/nuxt/components/Steps.js +3 -0
- package/nuxt/components/TABLE_TOKEN.js +3 -0
- package/nuxt/components/TimePicker.js +3 -0
- package/nuxt/components/TimeSelect.js +3 -0
- package/nuxt/components/datePickerProCommonProps.js +3 -0
- package/nuxt/components/datePickerProPanelProps.js +3 -0
- package/nuxt/components/datePickerProProps.js +3 -0
- package/nuxt/components/stepProps.js +3 -0
- package/nuxt/components/stepsProps.js +3 -0
- package/nuxt/components/tableProps.js +3 -0
- package/nuxt/components/timerPickerPanelProps.js +3 -0
- package/package.json +2 -1
- package/pagination/index.es.js +25 -7
- package/pagination/index.umd.js +1 -1
- package/pagination/style.css +1 -1
- package/panel/style.css +1 -1
- package/radio/index.es.js +22 -14
- package/radio/index.umd.js +8 -8
- package/radio/style.css +1 -1
- package/rate/style.css +1 -1
- package/result/index.es.js +5 -3
- package/result/index.umd.js +1 -1
- package/result/style.css +1 -1
- package/search/index.es.js +65 -26
- package/search/index.umd.js +7 -7
- package/search/style.css +1 -1
- package/select/index.es.js +270 -269
- package/select/index.umd.js +13 -13
- package/select/style.css +1 -1
- package/slider/index.es.js +116 -143
- package/slider/index.umd.js +1 -1
- package/slider/style.css +1 -1
- package/splitter/index.es.js +27 -7
- package/splitter/index.umd.js +10 -10
- package/statistic/index.es.js +34 -16
- package/statistic/index.umd.js +1 -1
- package/statistic/style.css +1 -1
- package/status/style.css +1 -1
- package/steps/index.d.ts +7 -0
- package/steps/index.es.js +386 -0
- package/steps/index.umd.js +1 -0
- package/{date-picker → steps}/package.json +1 -1
- package/steps/style.css +1 -0
- package/style.css +1 -1
- package/switch/index.es.js +22 -14
- package/switch/index.umd.js +9 -9
- package/switch/style.css +1 -1
- package/table/index.es.js +873 -441
- package/table/index.umd.js +15 -15
- package/table/style.css +1 -1
- package/tabs/index.es.js +25 -13
- package/tabs/index.umd.js +1 -1
- package/tabs/style.css +1 -1
- package/textarea/index.es.js +22 -14
- package/textarea/index.umd.js +10 -10
- package/textarea/style.css +1 -1
- package/time-picker/index.d.ts +7 -0
- package/{date-picker → time-picker}/index.es.js +1408 -1053
- package/time-picker/index.umd.js +27 -0
- package/time-picker/package.json +7 -0
- package/time-picker/style.css +1 -0
- package/time-select/index.d.ts +7 -0
- package/time-select/index.es.js +9435 -0
- package/time-select/index.umd.js +27 -0
- package/time-select/package.json +7 -0
- package/time-select/style.css +1 -0
- package/timeline/index.es.js +5 -3
- package/timeline/index.umd.js +1 -1
- package/timeline/style.css +1 -1
- package/tooltip/index.es.js +1 -1
- package/tooltip/index.umd.js +1 -1
- package/tree/index.es.js +1322 -126
- package/tree/index.umd.js +17 -17
- package/tree/style.css +1 -1
- package/upload/index.es.js +128 -67
- package/upload/index.umd.js +1 -1
- package/upload/style.css +1 -1
- package/vue-devui.es.js +6605 -2566
- package/vue-devui.umd.js +23 -23
- package/date-picker/index.umd.js +0 -27
- package/date-picker/style.css +0 -1
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
package/icon/index.es.js
CHANGED
|
@@ -126,7 +126,8 @@ function useIconDom(props, ctx) {
|
|
|
126
126
|
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
127
127
|
"style": {
|
|
128
128
|
width: iconSize.value || "",
|
|
129
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)
|
|
129
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
130
|
+
verticalAlign: "middle"
|
|
130
131
|
}
|
|
131
132
|
}, ctx.attrs), null);
|
|
132
133
|
};
|
|
@@ -162,6 +163,7 @@ function useIconDom(props, ctx) {
|
|
|
162
163
|
var Icon = defineComponent({
|
|
163
164
|
name: "DIcon",
|
|
164
165
|
props: iconProps,
|
|
166
|
+
emits: ["click"],
|
|
165
167
|
setup(props, ctx) {
|
|
166
168
|
const {
|
|
167
169
|
disabled,
|
|
@@ -178,9 +180,9 @@ var Icon = defineComponent({
|
|
|
178
180
|
}));
|
|
179
181
|
const onClick = (e) => {
|
|
180
182
|
if (disabled.value) {
|
|
181
|
-
|
|
182
|
-
e.stopImmediatePropagation();
|
|
183
|
+
return;
|
|
183
184
|
}
|
|
185
|
+
ctx.emit("click", e);
|
|
184
186
|
};
|
|
185
187
|
return () => {
|
|
186
188
|
var _a, _b, _c, _d;
|
package/icon/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(i,n){typeof exports=="object"&&typeof module!="undefined"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(i=typeof globalThis!="undefined"?globalThis:i||self,n(i.index={},i.Vue))})(this,function(i,n){"use strict";const I={name:{type:String,default:"",required:!0},size:{type:[Number,String],default:"inherit"},color:{type:String,default:"inherit"},component:{type:Object,default:null},classPrefix:{type:String,default:"icon"},operable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},rotate:{type:[Number,String]}},b={name:{type:String,default:"",required:!0},color:{type:String,default:"inherit"},size:{type:[Number,String],default:"inherit"}};function m(s,l,o){let t=s;return l&&(t+=`__${l}`),o&&(t+=`--${o}`),t}function d(s,l=!1){const o=l?`.devui-${s}`:`devui-${s}`;return{b:()=>m(o),e:e=>e?m(o,e):"",m:e=>e?m(o,"",e):"",em:(e,a)=>e&&a?m(o,e,a):""}}var V="",h=n.defineComponent({name:"DSvgIcon",props:b,setup(s){const{name:l,color:o,size:t}=n.toRefs(s),c=d("svg-icon"),r=n.computed(()=>`#icon-${l.value}`),u=n.computed(()=>typeof t.value=="number"?`${t.value}px`:t.value),e={width:u.value,height:u.value};return()=>n.createVNode("svg",{class:c.b(),style:e},[n.createVNode("use",{"xlink:href":r.value,fill:o.value},null)])}});function D(s){return/^((http|https):)?\/\//.test(s)}function S(s,l){const{component:o,name:t,size:c,color:r,classPrefix:u,rotate:e}=n.toRefs(s),a=d("icon"),p=n.computed(()=>typeof c.value=="number"?`${c.value}px`:c.value),f=o.value?n.resolveDynamicComponent(o.value):n.resolveDynamicComponent(h),v=()=>n.createVNode("img",n.mergeProps({src:t.value,alt:t.value.split("/")[t.value.split("/").length-1],class:[(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{width:p.value||"",transform:`rotate(${e==null?void 0:e.value}deg)`,verticalAlign:"middle"}},l.attrs),null),P=()=>n.createVNode(f,n.mergeProps({name:t.value,color:r.value,size:p.value,class:[(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{transform:`rotate(${e==null?void 0:e.value}deg)`}},l.attrs),null),$=()=>{const C=/^icon-/.test(t.value)?t.value:`${u.value}-${t.value}`;return n.createVNode("i",n.mergeProps({class:[u.value,C,(e==null?void 0:e.value)==="infinite"&&a.m("spin")],style:{fontSize:p.value,color:r.value,transform:`rotate(${e==null?void 0:e.value}deg)`}},l.attrs),null)};return{iconDom:()=>o.value?P():D(t.value)?v():$()}}var g=n.defineComponent({name:"DIcon",props:I,emits:["click"],setup(s,l){const{disabled:o,operable:t}=n.toRefs(s),{iconDom:c}=S(s,l),r=d("icon"),u=n.computed(()=>({[r.e("container")]:!0,[r.m("disabled")]:o.value,[r.m("operable")]:t.value})),e=a=>{o.value||l.emit("click",a)};return()=>{var a,p,f,v;return n.createVNode("div",{class:u.value,onClick:e},[(p=(a=l.slots).prefix)==null?void 0:p.call(a),c(),(v=(f=l.slots).suffix)==null?void 0:v.call(f)])}}}),_="",y=n.defineComponent({name:"DIconGroup",setup(s,l){const o=d("icon-group");return()=>{var t,c;return n.createVNode("div",{class:o.b()},[(c=(t=l.slots).default)==null?void 0:c.call(t)])}}}),N={title:"Icon \u56FE\u6807",category:"\u901A\u7528",status:"100%",install(s){s.component(g.name,g),s.component(y.name,y)}};i.Icon=g,i.IconGroup=y,i.default=N,i.iconProps=I,i.svgIconProps=b,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
package/icon/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-icon__container{display:inline-
|
|
1
|
+
.devui-icon__container{display:inline-block;color:var(--devui-icon-fill, #71757f)}.devui-icon__container>*:not(:last-child){vertical-align:middle;margin-right:8px}.devui-icon__container i{vertical-align:middle;transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--disabled{color:var(--devui-disabled-text, #adb0b8);cursor:not-allowed}.devui-icon--disabled i{color:var(--devui-disabled-text, #adb0b8)}.devui-icon--operable:not(.devui-icon--disabled){cursor:pointer;transition:color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--operable:not(.devui-icon--disabled) i{cursor:pointer}.devui-icon--operable:hover:not(.devui-icon--disabled){color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:hover:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-hover, var(--devui-list-item-hover-bg, #f2f2f3))}.devui-icon--operable:hover:not(.devui-icon--disabled) i{color:var(--devui-icon-fill-hover, #252b3a)}.devui-icon--operable:active:not(.devui-icon--disabled){color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable:active:not(.devui-icon--disabled).devui-icon__container{background-color:var(--devui-icon-background-active, var(--devui-list-item-active-bg, #f2f5fc))}.devui-icon--operable:active:not(.devui-icon--disabled) i{color:var(--devui-icon-active-color, var(--devui-icon-fill-active, #252b3a))}.devui-icon--operable.devui-icon__container{height:32px;line-height:32px;padding:0 8px;margin-left:-8px;border-radius:var(--devui-border-radius, 4px);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-out-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-icon--spin{animation:iconSpin 2.5s linear infinite}.devui-svg-icon{vertical-align:middle}@keyframes iconSpin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.devui-icon-group{display:inline-flex;align-items:center}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable){padding:8px;margin-left:0}.devui-icon-group>.devui-icon__container:not(.devui-icon--operable):first-child{margin-left:-8px}.devui-icon-group>*:not(:first-child){margin-left:0}
|
package/image-preview/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-image-preview{position:fixed;left:0;top:0;right:0;bottom:0;z-index:calc(var(--devui-z-index-modal, 1050));display:flex;align-items:center;justify-content:center;overflow:hidden}.devui-image-preview svg,.devui-image-preview polygon,.devui-image-preview g,.devui-image-preview path{fill:var(--devui-icon-text, #71757f)}.devui-image-preview__main-image{width:auto;height:auto;max-width:90%;max-height:90%;margin-top:-20px;cursor:grab}.devui-image-preview__close-btn{position:fixed;z-index:var(--devui-z-index-modal, 1050);cursor:pointer;width:36px;height:36px;border-radius:50%;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-light-shadow, rgba(37, 43, 58, .1));display:inline-flex;align-items:center;justify-content:center;top:15px;right:20px}.devui-image-preview__close-btn:hover{background:var(--devui-area, #
|
|
1
|
+
.devui-image-preview{position:fixed;left:0;top:0;right:0;bottom:0;z-index:calc(var(--devui-z-index-modal, 1050));display:flex;align-items:center;justify-content:center;overflow:hidden}.devui-image-preview svg,.devui-image-preview polygon,.devui-image-preview g,.devui-image-preview path{fill:var(--devui-icon-text, #71757f)}.devui-image-preview__main-image{width:auto;height:auto;max-width:90%;max-height:90%;margin-top:-20px;cursor:grab}.devui-image-preview__close-btn{position:fixed;z-index:var(--devui-z-index-modal, 1050);cursor:pointer;width:36px;height:36px;border-radius:50%;border:none;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-light-shadow, rgba(37, 43, 58, .1));display:inline-flex;align-items:center;justify-content:center;top:15px;right:20px}.devui-image-preview__close-btn:hover{background:var(--devui-area, #f8f8f8)}.devui-image-preview__close-btn svg{width:38px;height:18px}.devui-image-preview__arrow-left{position:fixed;z-index:var(--devui-z-index-modal, 1050);cursor:pointer;width:36px;height:36px;border-radius:50%;border:none;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-light-shadow, rgba(37, 43, 58, .1));display:inline-flex;align-items:center;justify-content:center;top:50%;left:20px;transform:translateY(-50%)}.devui-image-preview__arrow-left:hover{background:var(--devui-area, #f8f8f8)}.devui-image-preview__arrow-left svg{width:38px;height:18px}.devui-image-preview__arrow-right{position:fixed;z-index:var(--devui-z-index-modal, 1050);cursor:pointer;width:36px;height:36px;border-radius:50%;border:none;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-base, 0 1px 4px 0) var(--devui-light-shadow, rgba(37, 43, 58, .1));display:inline-flex;align-items:center;justify-content:center;top:50%;right:20px;transform:translateY(-50%)}.devui-image-preview__arrow-right:hover{background:var(--devui-area, #f8f8f8)}.devui-image-preview__arrow-right svg{width:38px;height:18px}.devui-image-preview__toolbar{position:fixed;bottom:0;left:0;width:100%;height:50px;display:flex;align-items:center;justify-content:center;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 12px 24px 0) var(--devui-light-shadow, rgba(37, 43, 58, .1))}.devui-image-preview__toolbar button{display:inline-flex;width:24px;height:24px;align-items:center;justify-content:center;color:var(--devui-text, #252b3a)}.devui-image-preview__toolbar .devui-image-preview__index{display:inline-flex;width:100px;justify-content:center;align-items:center;cursor:pointer}.devui-image-preview__toolbar>:not(:first-child){margin-left:20px}.devui-image-preview__bg{position:fixed;left:0;top:0;right:0;bottom:0;z-index:calc(var(--devui-z-index-modal, 1050) - 1);background:var(--devui-shadow, rgba(37, 43, 58, .2));border-radius:var(--devui-border-radius, 4px);box-shadow:var(--devui-shadow-length-fullscreen-overlay, 0 12px 24px 0) var(--devui-shadow, rgba(37, 43, 58, .2))}
|
package/input/index.es.js
CHANGED
|
@@ -29,7 +29,7 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, watch, provide, reactive, onUnmounted, Transition, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, shallowRef } from "vue";
|
|
32
|
+
import { defineComponent, toRefs, computed, createVNode, resolveDynamicComponent, mergeProps, watch, provide, reactive, onUnmounted, Transition, ref, unref, nextTick, Comment, Text, h, Fragment, inject, withDirectives, cloneVNode, onMounted, Teleport, createTextVNode, onBeforeUnmount, getCurrentInstance, shallowRef } from "vue";
|
|
33
33
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
34
34
|
const DEFAULT_PREFIX = "icon";
|
|
35
35
|
const iconProps = {
|
|
@@ -158,7 +158,8 @@ function useIconDom(props, ctx) {
|
|
|
158
158
|
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns2.m("spin")],
|
|
159
159
|
"style": {
|
|
160
160
|
width: iconSize.value || "",
|
|
161
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)
|
|
161
|
+
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
162
|
+
verticalAlign: "middle"
|
|
162
163
|
}
|
|
163
164
|
}, ctx.attrs), null);
|
|
164
165
|
};
|
|
@@ -194,6 +195,7 @@ function useIconDom(props, ctx) {
|
|
|
194
195
|
var Icon = defineComponent({
|
|
195
196
|
name: "DIcon",
|
|
196
197
|
props: iconProps,
|
|
198
|
+
emits: ["click"],
|
|
197
199
|
setup(props, ctx) {
|
|
198
200
|
const {
|
|
199
201
|
disabled,
|
|
@@ -210,9 +212,9 @@ var Icon = defineComponent({
|
|
|
210
212
|
}));
|
|
211
213
|
const onClick = (e) => {
|
|
212
214
|
if (disabled.value) {
|
|
213
|
-
|
|
214
|
-
e.stopImmediatePropagation();
|
|
215
|
+
return;
|
|
215
216
|
}
|
|
217
|
+
ctx.emit("click", e);
|
|
216
218
|
};
|
|
217
219
|
return () => {
|
|
218
220
|
var _a, _b, _c, _d;
|
|
@@ -258,6 +260,10 @@ const inputProps = {
|
|
|
258
260
|
clearable: {
|
|
259
261
|
type: Boolean,
|
|
260
262
|
default: false
|
|
263
|
+
},
|
|
264
|
+
placeholder: {
|
|
265
|
+
type: String,
|
|
266
|
+
default: ""
|
|
261
267
|
}
|
|
262
268
|
};
|
|
263
269
|
const formItemProps = {
|
|
@@ -1435,7 +1441,7 @@ var lodash = { exports: {} };
|
|
|
1435
1441
|
function baseAt(object4, paths) {
|
|
1436
1442
|
var index2 = -1, length = paths.length, result2 = Array2(length), skip = object4 == null;
|
|
1437
1443
|
while (++index2 < length) {
|
|
1438
|
-
result2[index2] = skip ? undefined$1 :
|
|
1444
|
+
result2[index2] = skip ? undefined$1 : get2(object4, paths[index2]);
|
|
1439
1445
|
}
|
|
1440
1446
|
return result2;
|
|
1441
1447
|
}
|
|
@@ -1880,7 +1886,7 @@ var lodash = { exports: {} };
|
|
|
1880
1886
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
1881
1887
|
}
|
|
1882
1888
|
return function(object4) {
|
|
1883
|
-
var objValue =
|
|
1889
|
+
var objValue = get2(object4, path);
|
|
1884
1890
|
return objValue === undefined$1 && objValue === srcValue ? hasIn(object4, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1885
1891
|
};
|
|
1886
1892
|
}
|
|
@@ -4613,7 +4619,7 @@ var lodash = { exports: {} };
|
|
|
4613
4619
|
function functionsIn(object4) {
|
|
4614
4620
|
return object4 == null ? [] : baseFunctions(object4, keysIn(object4));
|
|
4615
4621
|
}
|
|
4616
|
-
function
|
|
4622
|
+
function get2(object4, path, defaultValue) {
|
|
4617
4623
|
var result2 = object4 == null ? undefined$1 : baseGet(object4, path);
|
|
4618
4624
|
return result2 === undefined$1 ? defaultValue : result2;
|
|
4619
4625
|
}
|
|
@@ -5468,7 +5474,7 @@ var lodash = { exports: {} };
|
|
|
5468
5474
|
lodash2.forInRight = forInRight;
|
|
5469
5475
|
lodash2.forOwn = forOwn;
|
|
5470
5476
|
lodash2.forOwnRight = forOwnRight;
|
|
5471
|
-
lodash2.get =
|
|
5477
|
+
lodash2.get = get2;
|
|
5472
5478
|
lodash2.gt = gt;
|
|
5473
5479
|
lodash2.gte = gte;
|
|
5474
5480
|
lodash2.has = has;
|
|
@@ -7688,6 +7694,16 @@ Schema.register = function register(type4, validator) {
|
|
|
7688
7694
|
Schema.warning = warning;
|
|
7689
7695
|
Schema.messages = messages;
|
|
7690
7696
|
Schema.validators = validators;
|
|
7697
|
+
function getFieldValue(obj, path) {
|
|
7698
|
+
return {
|
|
7699
|
+
get value() {
|
|
7700
|
+
return lodash.exports.get(obj, path);
|
|
7701
|
+
},
|
|
7702
|
+
set value(val) {
|
|
7703
|
+
lodash.exports.set(obj, path, val);
|
|
7704
|
+
}
|
|
7705
|
+
};
|
|
7706
|
+
}
|
|
7691
7707
|
function useFormItem(messageType, _rules, validateState) {
|
|
7692
7708
|
const formContext = inject(FORM_TOKEN);
|
|
7693
7709
|
const ns2 = useNamespace("form");
|
|
@@ -7726,17 +7742,12 @@ function useFormItemValidate(props, _rules) {
|
|
|
7726
7742
|
const computedField = computed(() => {
|
|
7727
7743
|
return typeof props.field === "string" ? props.field : "";
|
|
7728
7744
|
});
|
|
7729
|
-
const fieldValue = computed({
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
return;
|
|
7734
|
-
}
|
|
7735
|
-
return formData[props.field];
|
|
7736
|
-
},
|
|
7737
|
-
set: (val) => {
|
|
7738
|
-
formContext.data[props.field] = val;
|
|
7745
|
+
const fieldValue = computed(() => {
|
|
7746
|
+
const formData = formContext.data;
|
|
7747
|
+
if (!formData || !props.field) {
|
|
7748
|
+
return;
|
|
7739
7749
|
}
|
|
7750
|
+
return getFieldValue(formData, props.field).value;
|
|
7740
7751
|
});
|
|
7741
7752
|
const getRuleByTrigger = (triggerVal) => {
|
|
7742
7753
|
return _rules.value.filter((rule) => {
|
|
@@ -7749,7 +7760,7 @@ function useFormItemValidate(props, _rules) {
|
|
|
7749
7760
|
return rule.trigger === triggerVal;
|
|
7750
7761
|
}
|
|
7751
7762
|
}).map((_a) => {
|
|
7752
|
-
var
|
|
7763
|
+
var rule = __objRest(_a, []);
|
|
7753
7764
|
return rule;
|
|
7754
7765
|
});
|
|
7755
7766
|
};
|
|
@@ -7805,13 +7816,16 @@ function useFormItemValidate(props, _rules) {
|
|
|
7805
7816
|
if (!formContext.data || !props.field) {
|
|
7806
7817
|
return;
|
|
7807
7818
|
}
|
|
7808
|
-
|
|
7809
|
-
|
|
7819
|
+
const currentValue = getFieldValue(formContext.data, props.field);
|
|
7820
|
+
if (!lodash.exports.isEqual(currentValue.value, initFieldValue)) {
|
|
7821
|
+
isResetting = true;
|
|
7822
|
+
}
|
|
7823
|
+
currentValue.value = initFieldValue;
|
|
7810
7824
|
await nextTick();
|
|
7811
7825
|
clearValidate();
|
|
7812
7826
|
};
|
|
7813
7827
|
onMounted(() => {
|
|
7814
|
-
initFieldValue = lodash.exports.
|
|
7828
|
+
initFieldValue = lodash.exports.clone(fieldValue.value);
|
|
7815
7829
|
});
|
|
7816
7830
|
return { validateState, validateMessage, validate, resetField, clearValidate };
|
|
7817
7831
|
}
|
|
@@ -7968,6 +7982,7 @@ function useInputEvent(isFocus, props, ctx, focus) {
|
|
|
7968
7982
|
}
|
|
7969
7983
|
};
|
|
7970
7984
|
const onInput = (e) => {
|
|
7985
|
+
ctx.emit("input", e.target.value);
|
|
7971
7986
|
ctx.emit("update:modelValue", e.target.value);
|
|
7972
7987
|
};
|
|
7973
7988
|
const onChange = (e) => {
|
|
@@ -8000,12 +8015,32 @@ function useInputFunction(input2) {
|
|
|
8000
8015
|
return { select, focus, blur };
|
|
8001
8016
|
}
|
|
8002
8017
|
var input = "";
|
|
8018
|
+
const camelize = (name) => name.substring(1).replace(/^\S/, (s) => s.toLocaleLowerCase());
|
|
8019
|
+
function get(object4, path) {
|
|
8020
|
+
const keys = path.split(".");
|
|
8021
|
+
let result = object4;
|
|
8022
|
+
keys.forEach((key) => {
|
|
8023
|
+
var _a;
|
|
8024
|
+
result = (_a = result[key]) != null ? _a : "";
|
|
8025
|
+
});
|
|
8026
|
+
return result;
|
|
8027
|
+
}
|
|
8028
|
+
function createI18nTranslate(name, app, newPrefix) {
|
|
8029
|
+
const prefix = newPrefix || camelize(name) + ".";
|
|
8030
|
+
return (path) => {
|
|
8031
|
+
const messages2 = app == null ? void 0 : app.appContext.config.globalProperties.langMessages.value;
|
|
8032
|
+
const message = get(messages2, prefix + path) || get(messages2, path);
|
|
8033
|
+
return message;
|
|
8034
|
+
};
|
|
8035
|
+
}
|
|
8003
8036
|
var Input = defineComponent({
|
|
8004
8037
|
name: "DInput",
|
|
8005
8038
|
inheritAttrs: false,
|
|
8006
8039
|
props: inputProps,
|
|
8007
8040
|
emits: ["update:modelValue", "focus", "blur", "input", "change", "keydown", "clear"],
|
|
8008
8041
|
setup(props, ctx) {
|
|
8042
|
+
const app = getCurrentInstance();
|
|
8043
|
+
const t = createI18nTranslate("DInput", app);
|
|
8009
8044
|
const formItemContext = inject(FORM_ITEM_TOKEN, void 0);
|
|
8010
8045
|
const {
|
|
8011
8046
|
modelValue
|
|
@@ -8071,7 +8106,8 @@ var Input = defineComponent({
|
|
|
8071
8106
|
"ref": input2,
|
|
8072
8107
|
"value": modelValue.value,
|
|
8073
8108
|
"disabled": inputDisabled.value,
|
|
8074
|
-
"class": ns2.e("inner")
|
|
8109
|
+
"class": ns2.e("inner"),
|
|
8110
|
+
"placeholder": props.placeholder || t("placeholder")
|
|
8075
8111
|
}, otherAttrs, {
|
|
8076
8112
|
"type": props.showPassword ? passwordVisible.value ? "text" : "password" : "text",
|
|
8077
8113
|
"onInput": onInput,
|