huiyi-select-table 0.0.7
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/favicon.ico +0 -0
- package/huiyi-select-table.mjs +95 -0
- package/huiyi-select-table.umd.js +1 -0
- package/index.html +17 -0
- package/package.json +20 -0
- package/style.css +1 -0
package/favicon.ico
ADDED
|
Binary file
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as L, resolveComponent as c, createBlock as f, openBlock as a, unref as _, isRef as O, withCtx as d, createElementBlock as h, Fragment as b, renderList as g, createVNode as j } from "vue";
|
|
2
|
+
const E = /* @__PURE__ */ L({
|
|
3
|
+
name: "InputSelectCom",
|
|
4
|
+
__name: "SelectTable",
|
|
5
|
+
props: {
|
|
6
|
+
originalData: Object,
|
|
7
|
+
showValue: String,
|
|
8
|
+
columnList: Object
|
|
9
|
+
},
|
|
10
|
+
emits: ["slectValue"],
|
|
11
|
+
setup(e, { emit: l }) {
|
|
12
|
+
const r = e, n = ref(""), u = ref(""), v = ref(!1), V = ref([]), m = ref([]);
|
|
13
|
+
ref(!1), ref(-1), ref(-1);
|
|
14
|
+
const k = ref(null), x = l, y = (t) => {
|
|
15
|
+
m.value = t;
|
|
16
|
+
}, R = (t) => {
|
|
17
|
+
m.value = t, t && (u.value = t[r.showValue], v.value = !1), x("slectValue", t);
|
|
18
|
+
};
|
|
19
|
+
return (t, w) => {
|
|
20
|
+
const S = c("el-table-column"), T = c("el-table"), B = c("el-option"), D = c("el-select");
|
|
21
|
+
return a(), f(D, {
|
|
22
|
+
modelValue: _(n),
|
|
23
|
+
"onUpdate:modelValue": w[0] || (w[0] = (o) => O(n) ? n.value = o : null),
|
|
24
|
+
filterable: "",
|
|
25
|
+
placeholder: "Select",
|
|
26
|
+
style: { width: "240px" }
|
|
27
|
+
}, {
|
|
28
|
+
default: d(() => [
|
|
29
|
+
(a(!0), h(b, null, g(e.originalData, (o) => (a(), f(B, {
|
|
30
|
+
key: o.name,
|
|
31
|
+
label: o.name,
|
|
32
|
+
value: o.name
|
|
33
|
+
}, {
|
|
34
|
+
default: d(() => [
|
|
35
|
+
j(T, {
|
|
36
|
+
ref_for: !0,
|
|
37
|
+
ref_key: "singleTableRef",
|
|
38
|
+
ref: k,
|
|
39
|
+
border: "",
|
|
40
|
+
class: "spanInputTable",
|
|
41
|
+
"row-class-name": t.tableRowClassName,
|
|
42
|
+
"highlight-current-row": "",
|
|
43
|
+
data: _(V),
|
|
44
|
+
style: { width: "300px", height: "230px", position: "fixed" },
|
|
45
|
+
onCurrentChange: y,
|
|
46
|
+
onRowClick: R
|
|
47
|
+
}, {
|
|
48
|
+
default: d(() => [
|
|
49
|
+
(a(!0), h(b, null, g(e.columnList, (i, I) => (a(), f(S, {
|
|
50
|
+
key: I,
|
|
51
|
+
prop: i.prop,
|
|
52
|
+
label: i.label,
|
|
53
|
+
width: i.width,
|
|
54
|
+
"show-overflow-tooltip": "",
|
|
55
|
+
align: "center"
|
|
56
|
+
}, null, 8, ["prop", "label", "width"]))), 128))
|
|
57
|
+
]),
|
|
58
|
+
_: 2
|
|
59
|
+
}, 1032, ["row-class-name", "data"])
|
|
60
|
+
]),
|
|
61
|
+
_: 2
|
|
62
|
+
}, 1032, ["label", "value"]))), 128))
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}, 8, ["modelValue"]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}), N = (e, l) => {
|
|
69
|
+
const r = e.__vccOpts || e;
|
|
70
|
+
for (const [n, u] of l)
|
|
71
|
+
r[n] = u;
|
|
72
|
+
return r;
|
|
73
|
+
}, s = /* @__PURE__ */ N(E, [["__scopeId", "data-v-3cde86ca"]]);
|
|
74
|
+
s.install = (e) => {
|
|
75
|
+
e.component(s.name, s);
|
|
76
|
+
};
|
|
77
|
+
const C = [
|
|
78
|
+
s
|
|
79
|
+
], p = function(e) {
|
|
80
|
+
p.installed || C.forEach((l) => {
|
|
81
|
+
e.component(l.name, l);
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
typeof window < "u" && window.Vue && p(window.Vue);
|
|
85
|
+
const Q = {
|
|
86
|
+
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
87
|
+
install: p,
|
|
88
|
+
// 以下是具体的组件列表
|
|
89
|
+
...C
|
|
90
|
+
};
|
|
91
|
+
export {
|
|
92
|
+
s as SelectTable,
|
|
93
|
+
Q as default,
|
|
94
|
+
p as install
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.HuiyiSelectTable={},n.Vue))})(this,function(n,e){"use strict";const a=((t,o)=>{const i=t.__vccOpts||t;for(const[c,f]of o)i[c]=f;return i})(e.defineComponent({name:"InputSelectCom",__name:"SelectTable",props:{originalData:Object,showValue:String,columnList:Object},emits:["slectValue"],setup(t,{emit:o}){const i=t,c=ref(""),f=ref(""),h=ref(!1),w=ref([]),u=ref([]);ref(!1),ref(-1),ref(-1);const b=ref(null),k=o,C=l=>{u.value=l},g=l=>{u.value=l,l&&(f.value=l[i.showValue],h.value=!1),k("slectValue",l)};return(l,m)=>{const y=e.resolveComponent("el-table-column"),V=e.resolveComponent("el-table"),x=e.resolveComponent("el-option"),B=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(B,{modelValue:e.unref(c),"onUpdate:modelValue":m[0]||(m[0]=r=>e.isRef(c)?c.value=r:null),filterable:"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.originalData,r=>(e.openBlock(),e.createBlock(x,{key:r.name,label:r.name,value:r.name},{default:e.withCtx(()=>[e.createVNode(V,{ref_for:!0,ref_key:"singleTableRef",ref:b,border:"",class:"spanInputTable","row-class-name":l.tableRowClassName,"highlight-current-row":"",data:e.unref(w),style:{width:"300px",height:"230px",position:"fixed"},onCurrentChange:C,onRowClick:g},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columnList,(d,S)=>(e.openBlock(),e.createBlock(y,{key:S,prop:d.prop,label:d.label,width:d.width,"show-overflow-tooltip":"",align:"center"},null,8,["prop","label","width"]))),128))]),_:2},1032,["row-class-name","data"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-3cde86ca"]]);a.install=t=>{t.component(a.name,a)};const p=[a],s=function(t){s.installed||p.forEach(o=>{t.component(o.name,o)})};typeof window<"u"&&window.Vue&&s(window.Vue);const _={install:s,...p};n.SelectTable=a,n.default=_,n.install=s,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/index.html
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
+
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
|
8
|
+
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<noscript>
|
|
12
|
+
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
|
13
|
+
</noscript>
|
|
14
|
+
<div id="app"></div>
|
|
15
|
+
<!-- built files will be auto injected -->
|
|
16
|
+
</body>
|
|
17
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "huiyi-select-table",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "A Vue.js time range picker component",
|
|
5
|
+
"main": "huiyi-select-table.umd.min.js",
|
|
6
|
+
"module": "huiyi-select-table.common.js",
|
|
7
|
+
"unpkg": "huiyi-select-table.umd.min.js",
|
|
8
|
+
"browser": "huiyi-select-table.umd.min.js",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"vue",
|
|
11
|
+
"component",
|
|
12
|
+
"time-picker",
|
|
13
|
+
"date-range"
|
|
14
|
+
],
|
|
15
|
+
"author": "Time Components Up",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"vue": "^3.0.0"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.el-table .warning-row[data-v-3cde86ca]{--el-table-tr-bg-color: #141}.spanInput[data-v-3cde86ca]{display:inline-block;position:relative}.spanDiv[data-v-3cde86ca]{z-index:10000;position:absolute;top:35px;background-color:#fff;height:230px;border:1px solid #eee}
|