vue-devui 1.0.0-beta.5 → 1.0.0-beta.9
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/accordion/index.d.ts +7 -0
- package/accordion/index.es.js +186 -139
- package/accordion/index.umd.js +1 -1
- package/accordion/style.css +1 -1
- package/alert/index.d.ts +7 -0
- package/alert/index.es.js +1 -1
- package/alert/index.umd.js +1 -1
- package/anchor/index.d.ts +7 -0
- package/avatar/index.d.ts +7 -0
- package/avatar/index.es.js +1 -1
- package/avatar/index.umd.js +1 -1
- package/back-top/index.d.ts +7 -0
- package/back-top/index.es.js +61 -5
- package/back-top/index.umd.js +1 -1
- package/back-top/style.css +1 -1
- package/badge/index.d.ts +7 -0
- package/badge/index.es.js +1 -1
- package/badge/index.umd.js +1 -1
- package/breadcrumb/index.d.ts +7 -0
- package/button/index.d.ts +7 -0
- package/button/index.es.js +4 -4
- package/button/index.umd.js +1 -1
- package/card/index.d.ts +7 -0
- package/card/index.es.js +1 -1
- package/card/index.umd.js +1 -1
- package/carousel/index.d.ts +7 -0
- package/carousel/index.es.js +3 -3
- package/carousel/index.umd.js +1 -1
- package/cascader/index.d.ts +7 -0
- package/cascader/index.es.js +1239 -83
- package/cascader/index.umd.js +1 -1
- package/cascader/style.css +1 -1
- package/checkbox/index.d.ts +7 -0
- package/checkbox/index.es.js +1 -1
- package/checkbox/index.umd.js +1 -1
- package/comment/index.d.ts +7 -0
- package/comment/index.es.js +57 -0
- package/comment/index.umd.js +1 -0
- package/comment/package.json +7 -0
- package/comment/style.css +1 -0
- package/countdown/index.d.ts +7 -0
- package/countdown/index.es.js +167 -0
- package/countdown/index.umd.js +1 -0
- package/countdown/package.json +7 -0
- package/countdown/style.css +1 -0
- package/date-picker/index.d.ts +7 -0
- package/date-picker/index.es.js +15 -15
- package/date-picker/index.umd.js +1 -1
- package/dragdrop/index.d.ts +7 -0
- package/drawer/index.d.ts +7 -0
- package/drawer/index.es.js +33 -9
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.d.ts +7 -0
- package/dropdown/index.es.js +7 -5
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.d.ts +7 -0
- package/editable-select/index.es.js +166 -104
- package/editable-select/index.umd.js +16 -16
- package/editable-select/style.css +1 -1
- package/form/index.d.ts +7 -0
- package/form/index.es.js +23 -8
- package/form/index.umd.js +1 -1
- package/form/style.css +1 -1
- package/fullscreen/index.d.ts +7 -0
- package/fullscreen/index.es.js +14 -4
- package/fullscreen/index.umd.js +1 -1
- package/gantt/index.d.ts +7 -0
- package/grid/index.d.ts +7 -0
- package/grid/index.es.js +2 -2
- package/grid/index.umd.js +1 -1
- package/icon/index.d.ts +7 -0
- package/icon/index.es.js +4 -4
- package/icon/index.umd.js +1 -1
- package/image-preview/index.d.ts +7 -0
- package/image-preview/index.es.js +51 -11
- package/image-preview/index.umd.js +1 -1
- package/image-preview/style.css +1 -1
- package/index.d.ts +7 -0
- package/input/index.d.ts +7 -0
- package/input/index.es.js +12 -12
- package/input/index.umd.js +1 -1
- package/input-icon/index.d.ts +7 -0
- package/input-icon/index.es.js +331 -0
- package/input-icon/index.umd.js +1 -0
- package/input-icon/package.json +7 -0
- package/input-icon/style.css +1 -0
- package/input-number/index.d.ts +7 -0
- package/input-number/index.es.js +3 -3
- package/input-number/index.umd.js +1 -1
- package/layout/index.d.ts +7 -0
- package/layout/index.es.js +1 -1
- package/layout/index.umd.js +1 -1
- package/loading/index.d.ts +7 -0
- package/loading/index.es.js +1 -1
- package/loading/index.umd.js +1 -1
- package/modal/index.d.ts +7 -0
- package/modal/index.es.js +9 -7
- package/modal/index.umd.js +1 -1
- package/nav-sprite/index.d.ts +7 -0
- package/overlay/index.d.ts +7 -0
- package/overlay/index.es.js +6 -4
- package/overlay/index.umd.js +1 -1
- package/package.json +2 -31
- package/pagination/index.d.ts +7 -0
- package/pagination/index.es.js +3 -3
- package/pagination/index.umd.js +1 -1
- package/panel/index.d.ts +7 -0
- package/popover/index.d.ts +7 -0
- package/popover/index.es.js +1 -1
- package/popover/index.umd.js +1 -1
- package/progress/index.d.ts +7 -0
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +2 -2
- package/quadrant-diagram/index.d.ts +7 -0
- package/radio/index.d.ts +7 -0
- package/radio/index.es.js +1 -1
- package/radio/index.umd.js +1 -1
- package/rate/index.d.ts +7 -0
- package/rate/index.es.js +1 -1
- package/rate/index.umd.js +1 -1
- package/read-tip/index.d.ts +7 -0
- package/read-tip/index.es.js +74 -24
- package/read-tip/index.umd.js +1 -1
- package/read-tip/style.css +1 -1
- package/result/index.d.ts +7 -0
- package/result/index.es.js +118 -0
- package/result/index.umd.js +1 -0
- package/result/package.json +7 -0
- package/result/style.css +1 -0
- package/ripple/index.d.ts +7 -0
- package/ripple/index.es.js +5 -2
- package/ripple/index.umd.js +1 -1
- package/search/index.d.ts +7 -0
- package/search/index.es.js +23 -20
- package/search/index.umd.js +1 -1
- package/select/index.d.ts +7 -0
- package/select/index.es.js +3 -3
- package/select/index.umd.js +1 -1
- package/skeleton/index.d.ts +7 -0
- package/skeleton/index.es.js +148 -26
- package/skeleton/index.umd.js +1 -1
- package/skeleton/style.css +1 -1
- package/slider/index.d.ts +7 -0
- package/slider/index.es.js +1 -1
- package/slider/index.umd.js +1 -1
- package/splitter/index.d.ts +7 -0
- package/splitter/index.es.js +24 -25
- package/splitter/index.umd.js +1 -1
- package/statistic/index.d.ts +7 -0
- package/statistic/index.es.js +280 -0
- package/statistic/index.umd.js +1 -0
- package/statistic/package.json +7 -0
- package/statistic/style.css +1 -0
- package/status/index.d.ts +7 -0
- package/status/index.es.js +2 -2
- package/status/index.umd.js +1 -1
- package/steps-guide/index.d.ts +7 -0
- package/steps-guide/index.es.js +100 -75
- package/steps-guide/index.umd.js +1 -1
- package/sticky/index.d.ts +7 -0
- package/style.css +1 -1
- package/switch/index.d.ts +7 -0
- package/switch/index.es.js +1 -1
- package/switch/index.umd.js +1 -1
- package/table/index.d.ts +7 -0
- package/table/index.es.js +1492 -157
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tabs/index.d.ts +7 -0
- package/tag/index.d.ts +7 -0
- package/tag/index.es.js +94 -12
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/tag-input/index.d.ts +7 -0
- package/tag-input/index.es.js +1 -1
- package/tag-input/index.umd.js +1 -1
- package/textarea/index.d.ts +7 -0
- package/textarea/index.es.js +1 -1
- package/textarea/index.umd.js +1 -1
- package/time-axis/index.d.ts +7 -0
- package/time-axis/index.es.js +6 -4
- package/time-axis/index.umd.js +1 -1
- package/time-picker/index.d.ts +7 -0
- package/time-picker/index.es.js +12 -7
- package/time-picker/index.umd.js +1 -1
- package/time-picker/style.css +1 -1
- package/toast/index.d.ts +7 -0
- package/toast/index.es.js +4 -4
- package/toast/index.umd.js +1 -1
- package/tooltip/index.d.ts +7 -0
- package/transfer/index.d.ts +7 -0
- package/transfer/index.es.js +310 -68
- package/transfer/index.umd.js +1 -1
- package/transfer/style.css +1 -1
- package/tree/index.d.ts +7 -0
- package/tree/index.es.js +160 -31
- package/tree/index.umd.js +1 -1
- package/tree-select/index.d.ts +7 -0
- package/tree-select/index.es.js +435 -110
- package/tree-select/index.umd.js +1 -1
- package/tree-select/style.css +1 -1
- package/upload/index.d.ts +7 -0
- package/upload/index.es.js +4 -4
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +14125 -11791
- package/vue-devui.umd.js +18 -18
package/drawer/index.es.js
CHANGED
|
@@ -39,6 +39,13 @@ const drawerProps = {
|
|
|
39
39
|
position: {
|
|
40
40
|
type: String,
|
|
41
41
|
default: "left"
|
|
42
|
+
},
|
|
43
|
+
backdropCloseable: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
46
|
+
},
|
|
47
|
+
beforeHidden: {
|
|
48
|
+
type: [Promise, Function]
|
|
42
49
|
}
|
|
43
50
|
};
|
|
44
51
|
var drawerHeader = "";
|
|
@@ -122,35 +129,41 @@ var DrawerBody = defineComponent({
|
|
|
122
129
|
const position = inject("position");
|
|
123
130
|
const width = inject("width");
|
|
124
131
|
const visible = inject("visible");
|
|
132
|
+
const backdropCloseable = inject("backdropCloseable");
|
|
125
133
|
const navRight = computed(() => position.value === "right" ? {
|
|
126
134
|
"right": 0
|
|
127
135
|
} : {
|
|
128
136
|
"left": 0
|
|
129
137
|
});
|
|
130
138
|
const navWidth = computed(() => isFullScreen.value ? "100vw" : width.value);
|
|
131
|
-
|
|
139
|
+
const clickContent = (e) => {
|
|
132
140
|
e.stopPropagation();
|
|
133
141
|
};
|
|
142
|
+
const handleDrawerClose = () => {
|
|
143
|
+
if (!backdropCloseable.value)
|
|
144
|
+
return;
|
|
145
|
+
closeDrawer();
|
|
146
|
+
};
|
|
134
147
|
return {
|
|
135
|
-
closeDrawer,
|
|
136
148
|
zindex,
|
|
137
149
|
slots,
|
|
138
150
|
isCover,
|
|
139
151
|
navRight,
|
|
140
152
|
navWidth,
|
|
141
153
|
visible,
|
|
142
|
-
clickContent
|
|
154
|
+
clickContent,
|
|
155
|
+
handleDrawerClose
|
|
143
156
|
};
|
|
144
157
|
},
|
|
145
158
|
render() {
|
|
146
159
|
const {
|
|
147
160
|
zindex,
|
|
148
|
-
closeDrawer,
|
|
149
161
|
slots,
|
|
150
162
|
isCover,
|
|
151
163
|
navRight,
|
|
152
164
|
navWidth,
|
|
153
|
-
visible
|
|
165
|
+
visible,
|
|
166
|
+
handleDrawerClose
|
|
154
167
|
} = this;
|
|
155
168
|
if (!visible)
|
|
156
169
|
return null;
|
|
@@ -159,7 +172,7 @@ var DrawerBody = defineComponent({
|
|
|
159
172
|
"style": {
|
|
160
173
|
zIndex: zindex
|
|
161
174
|
},
|
|
162
|
-
"onClick":
|
|
175
|
+
"onClick": handleDrawerClose
|
|
163
176
|
}, [isCover ? createVNode("div", {
|
|
164
177
|
"class": "devui-overlay-backdrop"
|
|
165
178
|
}, null) : null, createVNode("div", {
|
|
@@ -189,13 +202,23 @@ var Drawer = defineComponent({
|
|
|
189
202
|
zIndex,
|
|
190
203
|
isCover,
|
|
191
204
|
escKeyCloseable,
|
|
192
|
-
position
|
|
205
|
+
position,
|
|
206
|
+
backdropCloseable
|
|
193
207
|
} = toRefs(props);
|
|
194
|
-
|
|
208
|
+
const isFullScreen = ref(false);
|
|
195
209
|
const fullScreenEvent = () => {
|
|
196
210
|
isFullScreen.value = !isFullScreen.value;
|
|
197
211
|
};
|
|
198
|
-
const closeDrawer = () => {
|
|
212
|
+
const closeDrawer = async () => {
|
|
213
|
+
var _a;
|
|
214
|
+
const beforeHidden = props.beforeHidden;
|
|
215
|
+
let result = (_a = typeof beforeHidden === "function" ? beforeHidden() : beforeHidden) != null ? _a : true;
|
|
216
|
+
if (result instanceof Promise) {
|
|
217
|
+
console.log(result);
|
|
218
|
+
result = await result;
|
|
219
|
+
}
|
|
220
|
+
if (result)
|
|
221
|
+
return;
|
|
199
222
|
emit("update:visible", false);
|
|
200
223
|
emit("close");
|
|
201
224
|
};
|
|
@@ -222,6 +245,7 @@ var Drawer = defineComponent({
|
|
|
222
245
|
provide("width", width);
|
|
223
246
|
provide("visible", visible);
|
|
224
247
|
provide("isFullScreen", isFullScreen);
|
|
248
|
+
provide("backdropCloseable", backdropCloseable);
|
|
225
249
|
onUnmounted(() => {
|
|
226
250
|
document.removeEventListener("keyup", escCloseDrawer);
|
|
227
251
|
});
|
package/drawer/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var j=Object.defineProperty;var D=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var N=(n,e,o)=>e in n?j(n,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[e]=o,S=(n,e)=>{for(var o in e||(e={}))x.call(e,o)&&N(n,o,e[o]);if(D)for(var o of D(e))B.call(e,o)&&N(n,o,e[o]);return n};(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n.index={},n.Vue))})(this,function(n,e){"use strict";const o={width:{type:String,default:"300px"},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:1e3},isCover:{type:Boolean,default:!0},escKeyCloseable:{type:Boolean,default:!0},position:{type:String,default:"left"},backdropCloseable:{type:Boolean,default:!0},beforeHidden:{type:[Promise,Function]}};var z="",V=e.defineComponent({name:"DrawerHeader",emits:["toggleFullScreen","close"],setup(r,t){const l=e.ref(!1),s=e.inject("visible");return{fullScreenClassName:e.computed(()=>l.value?"icon icon-minimize":"icon icon-maxmize"),visible:s,handleFullScreen:f=>{f.stopPropagation(),l.value=!l.value,t.emit("toggleFullScreen")},handleDrawerClose:()=>{t.emit("close")}}},render(){const{handleFullScreen:r,handleDrawerClose:t,visible:l,fullScreenClassName:s}=this;return l?e.createVNode("div",{class:"devui-drawer-header"},[e.createVNode("div",{class:"devui-drawer-header-item"},[e.createVNode("span",{class:"devui-drawer-header-item icon icon-more-operate"},null)]),e.createVNode("div",{class:"devui-drawer-header-item",onClick:r},[e.createVNode("span",{class:s},null)]),e.createVNode("div",{class:"devui-drawer-header-item",onClick:t},[e.createVNode("span",{class:"icon icon-close"},null)])]):null}}),g=e.defineComponent({name:"DrawerContainer",setup(){return{visible:e.inject("visible")}},render(){const{visible:r}=this;return r?e.createVNode("div",null,[e.createTextVNode("\u5185\u5BB9\u533A\u57DF")]):null}}),E="",k=e.defineComponent({name:"DrawerBody",setup(r,{slots:t}){const l=e.inject("isFullScreen"),s=e.inject("closeDrawer"),a=e.inject("zindex"),c=e.inject("isCover"),u=e.inject("position"),f=e.inject("width"),C=e.inject("visible"),v=e.inject("backdropCloseable"),d=e.computed(()=>u.value==="right"?{right:0}:{left:0}),b=e.computed(()=>l.value?"100vw":f.value);return{zindex:a,slots:t,isCover:c,navRight:d,navWidth:b,visible:C,clickContent:i=>{i.stopPropagation()},handleDrawerClose:()=>{!v.value||s()}}},render(){const{zindex:r,slots:t,isCover:l,navRight:s,navWidth:a,visible:c,handleDrawerClose:u}=this;return c?e.createVNode("div",{class:"devui-drawer",style:{zIndex:r},onClick:u},[l?e.createVNode("div",{class:"devui-overlay-backdrop"},null):null,e.createVNode("div",{class:"devui-overlay-wrapper"},[e.createVNode("div",{class:"devui-drawer-nav",style:S({width:a},s)},[e.createVNode("div",{class:"devui-drawer-content",onClick:this.clickContent},[t.default?t.default():null])])])]):null}}),p=e.defineComponent({name:"DDrawer",props:o,emits:["close","update:visible","afterOpened"],setup(r,{emit:t,slots:l}){const{width:s,visible:a,zIndex:c,isCover:u,escKeyCloseable:f,position:C,backdropCloseable:v}=e.toRefs(r),d=e.ref(!1),b=()=>{d.value=!d.value},h=async()=>{var y;const i=r.beforeHidden;let w=(y=typeof i=="function"?i():i)!=null?y:!0;w instanceof Promise&&(console.log(w),w=await w),!w&&(t("update:visible",!1),t("close"))},m=i=>{i.code==="Escape"&&h()};return e.watch(a,i=>{i&&(t("afterOpened"),d.value=!1),f&&i?document.addEventListener("keyup",m):document.removeEventListener("keyup",m)}),e.provide("closeDrawer",h),e.provide("zindex",c),e.provide("isCover",u),e.provide("position",C),e.provide("width",s),e.provide("visible",a),e.provide("isFullScreen",d),e.provide("backdropCloseable",v),e.onUnmounted(()=>{document.removeEventListener("keyup",m)}),{isFullScreen:d,visible:a,slots:l,fullScreenEvent:b,closeDrawer:h}},render(){const r=this.fullScreenEvent,t=this.closeDrawer;return this.visible?e.createVNode(e.Teleport,{to:"body"},{default:()=>[e.createVNode(k,null,{default:()=>[e.createVNode(V,{onToggleFullScreen:r,onClose:t},null),this.slots.default?this.slots.default():e.createVNode(g,null,null)]})]}):null}});p.install=function(r){r.component(p.name,p)};var F={title:"Drawer \u62BD\u5C49\u677F",category:"\u53CD\u9988",status:"30%",install(r){r.use(p)}};n.Drawer=p,n.default=F,Object.defineProperty(n,"__esModule",{value:!0}),n[Symbol.toStringTag]="Module"});
|
package/dropdown/index.es.js
CHANGED
|
@@ -40,7 +40,7 @@ const dropdownProps = {
|
|
|
40
40
|
},
|
|
41
41
|
closeOnMouseLeaveMenu: {
|
|
42
42
|
type: Boolean,
|
|
43
|
-
default:
|
|
43
|
+
default: false
|
|
44
44
|
},
|
|
45
45
|
showAnimation: {
|
|
46
46
|
type: Boolean,
|
|
@@ -175,7 +175,7 @@ const overlayProps = {
|
|
|
175
175
|
backgroundStyle: {
|
|
176
176
|
type: [String, Object]
|
|
177
177
|
},
|
|
178
|
-
|
|
178
|
+
onBackdropClick: {
|
|
179
179
|
type: Function
|
|
180
180
|
},
|
|
181
181
|
backdropClose: {
|
|
@@ -187,6 +187,7 @@ const overlayProps = {
|
|
|
187
187
|
default: true
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
|
+
const overlayEmits = ["onUpdate:visible", "backdropClick"];
|
|
190
191
|
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
191
192
|
overlayStyle: {
|
|
192
193
|
type: [String, Object],
|
|
@@ -222,7 +223,7 @@ function useOverlayLogic(props) {
|
|
|
222
223
|
const handleBackdropClick = (event) => {
|
|
223
224
|
var _a, _b;
|
|
224
225
|
event.preventDefault();
|
|
225
|
-
(_a = props.
|
|
226
|
+
(_a = props.onBackdropClick) == null ? void 0 : _a.call(props);
|
|
226
227
|
if (props.backdropClose) {
|
|
227
228
|
(_b = props["onUpdate:visible"]) == null ? void 0 : _b.call(props, false);
|
|
228
229
|
}
|
|
@@ -261,6 +262,7 @@ function useOverlayLogic(props) {
|
|
|
261
262
|
const FixedOverlay = defineComponent({
|
|
262
263
|
name: "DFixedOverlay",
|
|
263
264
|
props: fixedOverlayProps,
|
|
265
|
+
emits: overlayEmits,
|
|
264
266
|
setup(props, ctx) {
|
|
265
267
|
const {
|
|
266
268
|
backgroundClass,
|
|
@@ -284,7 +286,7 @@ const FixedOverlay = defineComponent({
|
|
|
284
286
|
const FlexibleOverlay = defineComponent({
|
|
285
287
|
name: "DFlexibleOverlay",
|
|
286
288
|
props: flexibleOverlayProps,
|
|
287
|
-
emits:
|
|
289
|
+
emits: overlayEmits,
|
|
288
290
|
setup(props, ctx) {
|
|
289
291
|
const overlayRef = ref(null);
|
|
290
292
|
const positionedStyle = reactive({
|
|
@@ -520,7 +522,7 @@ Dropdown.install = function(app) {
|
|
|
520
522
|
var index = {
|
|
521
523
|
title: "Dropdown \u4E0B\u62C9\u83DC\u5355",
|
|
522
524
|
category: "\u5BFC\u822A",
|
|
523
|
-
status:
|
|
525
|
+
status: "10%",
|
|
524
526
|
install(app) {
|
|
525
527
|
app.use(Dropdown);
|
|
526
528
|
}
|
package/dropdown/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Q=Object.defineProperty,W=Object.defineProperties;var Z=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var X=(a,t,f)=>t in a?Q(a,t,{enumerable:!0,configurable:!0,writable:!0,value:f}):a[t]=f,V=(a,t)=>{for(var f in t||(t={}))ee.call(t,f)&&X(a,f,t[f]);if(j)for(var f of j(t))te.call(t,f)&&X(a,f,t[f]);return a},Y=(a,t)=>W(a,Z(t));(function(a,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(a=typeof globalThis!="undefined"?globalThis:a||self,t(a.index={},a.Vue))})(this,function(a,t){"use strict";const f={origin:{type:Object},isOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},trigger:{type:String,default:"click"},closeScope:{type:String,default:"all"},closeOnMouseLeaveMenu:{type:Boolean,default:!1},showAnimation:{type:Boolean,default:!0}};function F(e){return!!(e==null?void 0:e.$el)}function S(e){return e instanceof Element?e:e&&typeof e=="object"&&e.$el instanceof Element?e.$el:null}function g(e,o,n){return e==null||e.addEventListener(o,n),()=>{e==null||e.removeEventListener(o,n)}}const _=({visible:e,trigger:o,origin:n,closeScope:r,closeOnMouseLeaveMenu:i})=>{const l=t.ref(),s=()=>{r.value!=="none"&&(e.value=!1)};return t.watch([o,n,l],([u,v,y],m,b)=>{const c=S(v);if(!c||!y)return;const p=[g(y,"click",()=>{r.value==="all"&&(e.value=!1)})];if(u==="click")p.push(g(c,"click",()=>e.value=!e.value),g(document,"click",d=>{if(!e.value)return;const h=d.target;c.contains(h)||y.contains(h)||s()}),g(y,"mouseleave",()=>{i.value&&(e.value=!1)}));else if(u==="hover"){let d=!1,h=!1;const O=async w=>{await new Promise(k=>setTimeout(k,50)),!(w==="origin"&&d||w==="dropdown"&&h)&&s()};p.push(g(c,"mouseenter",()=>{h=!0,e.value=!0}),g(c,"mouseleave",()=>{h=!1,i.value||O("origin")}),g(y,"mouseenter",()=>{d=!0,e.value=!0}),g(y,"mouseleave",()=>{d=!1,O("dropdown")}))}b(()=>p.forEach(d=>d()))}),{dropdownEl:l}};var ne="";function M(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const R=t.defineComponent({setup(e,o){return()=>{let n;return t.createVNode(t.Teleport,{to:"#d-overlay-anchor"},{default:()=>[t.createVNode(t.Transition,{name:"devui-overlay-fade"},M(n=t.renderSlot(o.slots,"default"))?n:{default:()=>[n]})]})}}}),D={visible:{type:Boolean},"onUpdate:visible":{type:Function},backgroundBlock:{type:Boolean,default:!1},backgroundClass:{type:String,default:""},backgroundStyle:{type:[String,Object]},onBackdropClick:{type:Function},backdropClose:{type:Boolean,default:!0},hasBackdrop:{type:Boolean,default:!0}},N=["onUpdate:visible","backdropClick"],T=Y(V({},D),{overlayStyle:{type:[String,Object],default:void 0}}),z=V({origin:{type:Object,require:!0},position:{type:Object,default:()=>({originX:"left",originY:"top",overlayX:"left",overlayY:"top"})}},D);function L(e){const o=t.computed(()=>["devui-overlay-background",e.backgroundClass,e.hasBackdrop?"devui-overlay-background__color":"devui-overlay-background__disabled"]),n=t.computed(()=>"devui-overlay"),r=l=>{var s,u;l.preventDefault(),(s=e.onBackdropClick)==null||s.call(e),e.backdropClose&&((u=e["onUpdate:visible"])==null||u.call(e,!1))},i=l=>l.cancelBubble=!0;return t.onMounted(()=>{const l=document.body,s=l.style.overflow,u=l.style.position;t.watch([()=>e.visible,()=>e.backgroundBlock],([v,y])=>{if(y){const m=l.getBoundingClientRect().y;v?(l.style.overflowY="scroll",l.style.position=v?"fixed":"",l.style.top=`${m}px`):(l.style.overflowY=s,l.style.position=u,l.style.top="",window.scrollTo(0,-m))}}),t.onUnmounted(()=>{document.body.style.overflow=s})}),{backgroundClass:o,overlayClass:n,handleBackdropClick:r,handleOverlayBubbleCancel:i}}const E=t.defineComponent({name:"DFixedOverlay",props:T,emits:N,setup(e,o){const{backgroundClass:n,overlayClass:r,handleBackdropClick:i,handleOverlayBubbleCancel:l}=L(e);return()=>t.createVNode(R,null,{default:()=>[t.withDirectives(t.createVNode("div",{class:n.value,style:e.backgroundStyle,onClick:i},[t.createVNode("div",{class:r.value,style:e.overlayStyle,onClick:l},[t.renderSlot(o.slots,"default")])]),[[t.vShow,e.visible]])]})}}),B=t.defineComponent({name:"DFlexibleOverlay",props:z,emits:N,setup(e,o){const n=t.ref(null),r=t.reactive({position:"absolute"});t.onMounted(async()=>{const v=(c,p,d)=>{const h=$(c,p,d);r.left=`${h.x}px`,r.top=`${h.y}px`},y=t.computed(()=>{const c=n.value,p=P(e.origin);if(!(!c||!p))return{origin:p,overlay:c}}),m=t.toRef(e,"visible"),b=t.toRef(e,"position");t.watch([y,m,b],async([c,p,d],h,O)=>{if(!p||!c)return;const{origin:w,overlay:k}=c;v(d,k.getBoundingClientRect(),w);const K=[G(()=>v(d,k.getBoundingClientRect(),w)),H(k,x=>v(d,x[0].contentRect,w)),I(w,()=>v(d,k.getBoundingClientRect(),w))];O(()=>{K.forEach(x=>x())})})});const{backgroundClass:i,overlayClass:l,handleBackdropClick:s,handleOverlayBubbleCancel:u}=L(e);return()=>t.createVNode(R,null,{default:()=>[t.withDirectives(t.createVNode("div",{style:e.backgroundStyle,class:i.value,onClick:s},[t.createVNode("div",{ref:n,class:l.value,style:r,onClick:u},[t.renderSlot(o.slots,"default")])]),[[t.vShow,e.visible]])]})}});function P(e){return e instanceof Element?e:t.isRef(e)?S(e.value):F(e)?S(e):e}function $(e,o,n){const r=U(n),i=q(r,e);return A(i,o,e)}function U(e){if(e instanceof Element)return e.getBoundingClientRect();const o=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+o,height:n,width:o}}function A(e,o,n){let r;const{width:i,height:l}=o;n.overlayX=="center"?r=e.x-i/2:r=n.overlayX=="left"?e.x:e.x-i;let s;return n.overlayY=="center"?s=e.y-l/2:s=n.overlayY=="top"?e.y:e.y-l,{x:r,y:s}}function q(e,o){let n;if(o.originX=="center")n=e.left+e.width/2;else{const i=e.left,l=e.right;n=o.originX=="left"?i:l}let r;return o.originY=="center"?r=e.top+e.height/2:r=o.originY=="top"?e.top:e.bottom,{x:n,y:r}}function G(e){return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}}function H(e,o){if(e instanceof Element){const n=new ResizeObserver(o);return n.observe(e),()=>n.disconnect()}return()=>{}}function I(e,o){if(e instanceof Element){const n=new MutationObserver(o);return n.observe(e,{attributeFilter:["style"]}),()=>n.disconnect()}return()=>{}}B.install=function(e){e.component(B.name,B)},E.install=function(e){e.component(E.name,E)};var oe="",C=t.defineComponent({name:"DDropdown",props:f,emits:[],setup(e,o){const{isOpen:n,origin:r,trigger:i,closeScope:l,closeOnMouseLeaveMenu:s}=t.toRefs(e),u=t.ref(!1);t.watch(n,b=>{u.value=b},{immediate:!0});const v={originX:"center",originY:"bottom",overlayX:"center",overlayY:"top"},{dropdownEl:y}=_({visible:u,origin:r,trigger:i,closeScope:l,closeOnMouseLeaveMenu:s}),m=t.computed(()=>e.showAnimation?u.value:!0);return()=>t.createVNode(t.Fragment,null,[t.createVNode(B,{origin:e.origin,visible:u.value,"onUpdate:visible":b=>u.value=b,position:v,hasBackdrop:!1},{default:()=>[t.createVNode(t.Transition,{name:"devui-dropdown-fade"},{default:()=>{var b,c;return[t.withDirectives(t.createVNode("div",{ref:y,style:"min-width:102px"},[(c=(b=o.slots).default)==null?void 0:c.call(b)]),[[t.vShow,m.value]])]}})]})])}});C.install=function(e){e.component(C.name,C)};var J={title:"Dropdown \u4E0B\u62C9\u83DC\u5355",category:"\u5BFC\u822A",status:"10%",install(e){e.use(C)}};a.Dropdown=C,a.default=J,Object.defineProperty(a,"__esModule",{value:!0}),a[Symbol.toStringTag]="Module"});
|
|
@@ -14,8 +14,12 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { defineComponent, createVNode,
|
|
17
|
+
import { defineComponent, inject, withDirectives, createVNode, vShow, ref, reactive, computed, provide, toRefs, Fragment, resolveComponent, resolveDirective, Transition, renderSlot } from "vue";
|
|
18
18
|
const editableSelectProps = {
|
|
19
|
+
appendToBody: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
19
23
|
modelValue: {
|
|
20
24
|
type: [String, Number]
|
|
21
25
|
},
|
|
@@ -24,7 +28,8 @@ const editableSelectProps = {
|
|
|
24
28
|
default: () => []
|
|
25
29
|
},
|
|
26
30
|
width: {
|
|
27
|
-
type: Number
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 450
|
|
28
33
|
},
|
|
29
34
|
maxHeight: {
|
|
30
35
|
type: Number
|
|
@@ -43,6 +48,10 @@ const editableSelectProps = {
|
|
|
43
48
|
loading: {
|
|
44
49
|
type: Boolean
|
|
45
50
|
},
|
|
51
|
+
enableLazyLoad: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
46
55
|
remoteMethod: {
|
|
47
56
|
type: Function
|
|
48
57
|
},
|
|
@@ -51,57 +60,77 @@ const editableSelectProps = {
|
|
|
51
60
|
},
|
|
52
61
|
searchFn: {
|
|
53
62
|
type: Function
|
|
63
|
+
},
|
|
64
|
+
loadMore: {
|
|
65
|
+
type: Function
|
|
54
66
|
}
|
|
55
67
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
default: "icon"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
68
|
+
const selectDropdownProps = {
|
|
69
|
+
options: {
|
|
70
|
+
type: Array,
|
|
71
|
+
default: () => []
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
function className(classStr, classOpt) {
|
|
75
|
+
let classname = classStr;
|
|
76
|
+
if (typeof classOpt === "object") {
|
|
77
|
+
Object.keys(classOpt).forEach((key) => {
|
|
78
|
+
classOpt[key] && (classname += ` ${key}`);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return classname;
|
|
82
|
+
}
|
|
83
|
+
var SelectDropdown = defineComponent({
|
|
84
|
+
name: "DSelectDropdown",
|
|
85
|
+
props: selectDropdownProps,
|
|
77
86
|
setup(props) {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
const select = inject("InjectionKey");
|
|
88
|
+
const {
|
|
89
|
+
props: selectProps,
|
|
90
|
+
dropdownRef,
|
|
91
|
+
visible,
|
|
92
|
+
selectOptionClick,
|
|
93
|
+
renderDefaultSlots,
|
|
94
|
+
renderEmptySlots,
|
|
95
|
+
selectedIndex,
|
|
96
|
+
loadMore
|
|
97
|
+
} = select;
|
|
81
98
|
const {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
maxHeight
|
|
100
|
+
} = selectProps;
|
|
101
|
+
return () => {
|
|
102
|
+
const getLiCls = (item, index2) => {
|
|
103
|
+
const {
|
|
104
|
+
disabledKey
|
|
105
|
+
} = selectProps;
|
|
106
|
+
return className("devui-dropdown-item", {
|
|
107
|
+
disabled: disabledKey ? !!item[disabledKey] : false,
|
|
108
|
+
selected: selectedIndex.value === index2
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
return withDirectives(createVNode("div", {
|
|
112
|
+
"class": "devui-dropdown-menu"
|
|
113
|
+
}, [createVNode("ul", {
|
|
114
|
+
"ref": dropdownRef,
|
|
115
|
+
"class": "devui-list-unstyled scroll-height",
|
|
116
|
+
"style": {
|
|
117
|
+
maxHeight: maxHeight + "px"
|
|
118
|
+
},
|
|
119
|
+
"onScroll": loadMore
|
|
120
|
+
}, [props.options.map((o, index2) => {
|
|
121
|
+
return createVNode("li", {
|
|
122
|
+
"class": getLiCls(o, index2),
|
|
123
|
+
"onClick": ($evnet) => selectOptionClick($evnet, o)
|
|
124
|
+
}, [renderDefaultSlots(o)]);
|
|
125
|
+
}), withDirectives(createVNode("li", {
|
|
126
|
+
"class": "devui-no-result-template"
|
|
127
|
+
}, [createVNode("div", {
|
|
128
|
+
"class": "devui-no-data-tip"
|
|
129
|
+
}, [renderEmptySlots()])]), [[vShow, props.options.length === 0]])])]), [[vShow, visible]]);
|
|
130
|
+
};
|
|
100
131
|
}
|
|
101
132
|
});
|
|
102
|
-
|
|
103
|
-
app.component(Icon.name, Icon);
|
|
104
|
-
};
|
|
133
|
+
var editableSelect = "";
|
|
105
134
|
const inBrowser = typeof window !== "undefined";
|
|
106
135
|
function on(element, eventName, handler) {
|
|
107
136
|
if (document.addEventListener) {
|
|
@@ -157,15 +186,6 @@ const clickoutsideDirective = {
|
|
|
157
186
|
delete el[ctx];
|
|
158
187
|
}
|
|
159
188
|
};
|
|
160
|
-
function className(classStr, classOpt) {
|
|
161
|
-
let classname = classStr;
|
|
162
|
-
if (typeof classOpt === "object") {
|
|
163
|
-
Object.keys(classOpt).forEach((key) => {
|
|
164
|
-
classOpt[key] && (classname += ` ${key}`);
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
return classname;
|
|
168
|
-
}
|
|
169
189
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
170
190
|
var lodash = { exports: {} };
|
|
171
191
|
/**
|
|
@@ -5586,24 +5606,58 @@ var EditableSelect = defineComponent({
|
|
|
5586
5606
|
props: editableSelectProps,
|
|
5587
5607
|
emits: ["update:modelValue"],
|
|
5588
5608
|
setup(props, ctx2) {
|
|
5589
|
-
const
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
})
|
|
5609
|
+
const renderDropdown = (condition, type) => {
|
|
5610
|
+
if (!condition && type === 0) {
|
|
5611
|
+
return createVNode(Transition, {
|
|
5612
|
+
"name": "fade"
|
|
5613
|
+
}, {
|
|
5614
|
+
default: () => [createVNode(SelectDropdown, {
|
|
5615
|
+
"options": filteredOptions.value
|
|
5616
|
+
}, null)]
|
|
5617
|
+
});
|
|
5618
|
+
} else if (condition && type === 1) {
|
|
5619
|
+
return createVNode(resolveComponent("d-flexible-overlay"), {
|
|
5620
|
+
"hasBackdrop": false,
|
|
5621
|
+
"origin": origin,
|
|
5622
|
+
"position": position,
|
|
5623
|
+
"visible": visible.value,
|
|
5624
|
+
"onUpdate:visible": ($event) => visible.value = $event
|
|
5625
|
+
}, {
|
|
5626
|
+
default: () => [createVNode("div", {
|
|
5627
|
+
"class": "devui-dropdown",
|
|
5628
|
+
"style": {
|
|
5629
|
+
width: props.width + "px"
|
|
5630
|
+
}
|
|
5631
|
+
}, [createVNode(SelectDropdown, {
|
|
5632
|
+
"options": filteredOptions.value
|
|
5633
|
+
}, null)])]
|
|
5634
|
+
});
|
|
5635
|
+
}
|
|
5636
|
+
};
|
|
5637
|
+
const renderDefaultSlots = (item) => {
|
|
5638
|
+
return ctx2.slots.default ? renderSlot(ctx2.slots, "default", {
|
|
5639
|
+
item
|
|
5640
|
+
}) : item.name;
|
|
5599
5641
|
};
|
|
5642
|
+
const renderEmptySlots = () => {
|
|
5643
|
+
return ctx2.slots.empty ? renderSlot(ctx2.slots, "empty") : emptyText.value;
|
|
5644
|
+
};
|
|
5645
|
+
const origin = ref();
|
|
5646
|
+
const dropdownRef = ref();
|
|
5600
5647
|
const visible = ref(false);
|
|
5601
5648
|
const inputValue = ref("");
|
|
5649
|
+
const selectedIndex = ref(0);
|
|
5602
5650
|
const query = ref(props.modelValue);
|
|
5651
|
+
const position = reactive({
|
|
5652
|
+
originX: "left",
|
|
5653
|
+
originY: "bottom",
|
|
5654
|
+
overlayX: "left",
|
|
5655
|
+
overlayY: "top"
|
|
5656
|
+
});
|
|
5603
5657
|
const wait = computed(() => props.remote ? 300 : 0);
|
|
5604
5658
|
const emptyText = computed(() => {
|
|
5605
5659
|
const options = filteredOptions.value;
|
|
5606
|
-
if (!props.remote &&
|
|
5660
|
+
if (!props.remote && options.length === 0) {
|
|
5607
5661
|
return "\u6CA1\u6709\u76F8\u5173\u8BB0\u5F55";
|
|
5608
5662
|
}
|
|
5609
5663
|
if (options.length === 0) {
|
|
@@ -5626,7 +5680,7 @@ var EditableSelect = defineComponent({
|
|
|
5626
5680
|
const filteredOptions = computed(() => {
|
|
5627
5681
|
const isValidOption = (o) => {
|
|
5628
5682
|
const query2 = inputValue.value;
|
|
5629
|
-
const containsQueryString = query2 ? o.name.
|
|
5683
|
+
const containsQueryString = query2 ? o.name.toLocaleLowerCase().indexOf(query2.toLocaleLowerCase()) >= 0 : true;
|
|
5630
5684
|
return containsQueryString;
|
|
5631
5685
|
};
|
|
5632
5686
|
return normalizeOptions.value.map((item) => {
|
|
@@ -5636,6 +5690,11 @@ var EditableSelect = defineComponent({
|
|
|
5636
5690
|
return null;
|
|
5637
5691
|
}).filter((item) => item !== null);
|
|
5638
5692
|
});
|
|
5693
|
+
const findIndex = (o) => {
|
|
5694
|
+
return normalizeOptions.value.findIndex((item) => {
|
|
5695
|
+
return item.name === o.name;
|
|
5696
|
+
});
|
|
5697
|
+
};
|
|
5639
5698
|
const handleClose = () => {
|
|
5640
5699
|
visible.value = false;
|
|
5641
5700
|
};
|
|
@@ -5644,11 +5703,11 @@ var EditableSelect = defineComponent({
|
|
|
5644
5703
|
visible.value = !visible.value;
|
|
5645
5704
|
}
|
|
5646
5705
|
};
|
|
5647
|
-
const onInputChange = () => {
|
|
5706
|
+
const onInputChange = (val) => {
|
|
5648
5707
|
if (props.filterMethod) {
|
|
5649
|
-
props.filterMethod(
|
|
5708
|
+
props.filterMethod(val);
|
|
5650
5709
|
} else if (props.remote) {
|
|
5651
|
-
props.remoteMethod(
|
|
5710
|
+
props.remoteMethod(val);
|
|
5652
5711
|
}
|
|
5653
5712
|
};
|
|
5654
5713
|
const debouncedOnInputChange = lodash.exports.debounce(onInputChange, wait.value);
|
|
@@ -5657,9 +5716,9 @@ var EditableSelect = defineComponent({
|
|
|
5657
5716
|
inputValue.value = value;
|
|
5658
5717
|
query.value = value;
|
|
5659
5718
|
if (props.remote) {
|
|
5660
|
-
debouncedOnInputChange();
|
|
5719
|
+
debouncedOnInputChange(value);
|
|
5661
5720
|
} else {
|
|
5662
|
-
onInputChange();
|
|
5721
|
+
onInputChange(value);
|
|
5663
5722
|
}
|
|
5664
5723
|
};
|
|
5665
5724
|
const selectOptionClick = (e, item) => {
|
|
@@ -5670,13 +5729,41 @@ var EditableSelect = defineComponent({
|
|
|
5670
5729
|
e.stopPropagation();
|
|
5671
5730
|
} else {
|
|
5672
5731
|
query.value = item.name;
|
|
5732
|
+
selectedIndex.value = findIndex(item);
|
|
5733
|
+
inputValue.value = "";
|
|
5673
5734
|
ctx2.emit("update:modelValue", item.name);
|
|
5674
5735
|
}
|
|
5675
5736
|
};
|
|
5737
|
+
const loadMore = () => {
|
|
5738
|
+
if (!props.enableLazyLoad)
|
|
5739
|
+
return;
|
|
5740
|
+
const dropdownVal = dropdownRef.value;
|
|
5741
|
+
if (dropdownVal.clientHeight + dropdownVal.scrollTop >= dropdownVal.scrollHeight) {
|
|
5742
|
+
props.loadMore();
|
|
5743
|
+
}
|
|
5744
|
+
};
|
|
5745
|
+
provide("InjectionKey", {
|
|
5746
|
+
dropdownRef,
|
|
5747
|
+
props: reactive(__spreadValues({}, toRefs(props))),
|
|
5748
|
+
visible,
|
|
5749
|
+
emptyText,
|
|
5750
|
+
selectedIndex,
|
|
5751
|
+
loadMore,
|
|
5752
|
+
selectOptionClick,
|
|
5753
|
+
renderDefaultSlots,
|
|
5754
|
+
renderEmptySlots
|
|
5755
|
+
});
|
|
5676
5756
|
return () => {
|
|
5677
|
-
|
|
5678
|
-
"
|
|
5679
|
-
|
|
5757
|
+
const selectCls = className("devui-editable-select devui-form-group devui-has-feedback", {
|
|
5758
|
+
"devui-select-open": visible.value
|
|
5759
|
+
});
|
|
5760
|
+
const inputCls = className("devui-form-control devui-dropdown-origin devui-dropdown-origin-open", {
|
|
5761
|
+
disabled: props.disabled
|
|
5762
|
+
});
|
|
5763
|
+
return createVNode(Fragment, null, [withDirectives(createVNode("div", {
|
|
5764
|
+
"class": selectCls,
|
|
5765
|
+
"onClick": toggleMenu,
|
|
5766
|
+
"ref": origin
|
|
5680
5767
|
}, [createVNode("input", {
|
|
5681
5768
|
"class": inputCls,
|
|
5682
5769
|
"type": "text",
|
|
@@ -5686,34 +5773,9 @@ var EditableSelect = defineComponent({
|
|
|
5686
5773
|
"class": "devui-form-control-feedback"
|
|
5687
5774
|
}, [createVNode("span", {
|
|
5688
5775
|
"class": "devui-select-chevron-icon"
|
|
5689
|
-
}, [createVNode(
|
|
5776
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
5690
5777
|
"name": "select-arrow"
|
|
5691
|
-
}, null)])]),
|
|
5692
|
-
"class": "devui-editable-select"
|
|
5693
|
-
}, [createVNode(Transition, {
|
|
5694
|
-
"name": "fade"
|
|
5695
|
-
}, {
|
|
5696
|
-
default: () => [withDirectives(createVNode("div", {
|
|
5697
|
-
"class": "devui-dropdown-menu"
|
|
5698
|
-
}, [createVNode("ul", {
|
|
5699
|
-
"class": "devui-list-unstyled scroll-height",
|
|
5700
|
-
"style": {
|
|
5701
|
-
maxHeight: props.maxHeight + "px"
|
|
5702
|
-
}
|
|
5703
|
-
}, [filteredOptions.value.map((item) => {
|
|
5704
|
-
return createVNode("li", {
|
|
5705
|
-
"class": getLiCls(item),
|
|
5706
|
-
"onClick": ($evnet) => selectOptionClick($evnet, item),
|
|
5707
|
-
"key": item.name
|
|
5708
|
-
}, [ctx2.slots.default ? renderSlot(ctx2.slots, "default", {
|
|
5709
|
-
item
|
|
5710
|
-
}) : item.name]);
|
|
5711
|
-
}), withDirectives(createVNode("li", {
|
|
5712
|
-
"class": "devui-no-result-template"
|
|
5713
|
-
}, [createVNode("div", {
|
|
5714
|
-
"class": "devui-no-data-tip"
|
|
5715
|
-
}, [emptyText.value])]), [[vShow, filteredOptions.value.length === 0]])])]), [[vShow, visible.value]])]
|
|
5716
|
-
})])]), [[resolveDirective("click-outside"), handleClose]]);
|
|
5778
|
+
}, null)])]), renderDropdown(props.appendToBody, 0)]), [[resolveDirective("click-outside"), handleClose]]), renderDropdown(props.appendToBody, 1)]);
|
|
5717
5779
|
};
|
|
5718
5780
|
}
|
|
5719
5781
|
});
|
|
@@ -5723,7 +5785,7 @@ EditableSelect.install = function(app) {
|
|
|
5723
5785
|
var index = {
|
|
5724
5786
|
title: "EditableSelect \u53EF\u8F93\u5165\u4E0B\u62C9\u9009\u62E9\u6846",
|
|
5725
5787
|
category: "\u6570\u636E\u5F55\u5165",
|
|
5726
|
-
status:
|
|
5788
|
+
status: "10%",
|
|
5727
5789
|
install(app) {
|
|
5728
5790
|
app.use(EditableSelect);
|
|
5729
5791
|
}
|