This commit is contained in:
2025-03-13 03:10:06 +08:00
parent 61b51b6fab
commit f3854743a6
1835 changed files with 74284 additions and 419 deletions
@@ -0,0 +1,11 @@
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uni_modules/uni-table/components/uni-th/uni-th"],{633:function(t,n,e){"use strict";e.r(n);var i=e(634),r=e(636);for(var s in r)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return r[t]}))}(s);e(638);var d,c=e(46),u=Object(c["default"])(r["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],d);u.options.__file="uni_modules/uni-table/components/uni-th/uni-th.vue",n["default"]=u.exports},634:function(t,n,e){"use strict";e.r(n);var i=e(635);e.d(n,"render",(function(){return i["render"]})),e.d(n,"staticRenderFns",(function(){return i["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return i["recyclableRender"]})),e.d(n,"components",(function(){return i["components"]}))},635:function(t,n,e){"use strict";var i;e.r(n),e.d(n,"render",(function(){return r})),e.d(n,"staticRenderFns",(function(){return d})),e.d(n,"recyclableRender",(function(){return s})),e.d(n,"components",(function(){return i}));var r=function(){var t=this,n=t.$createElement;t._self._c},s=!1,d=[];r._withStripped=!0},636:function(t,n,e){"use strict";e.r(n);var i=e(637),r=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(s);n["default"]=r.a},637:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e={name:"uniTh",options:{virtualHost:!0},components:{},emits:["sort-change","filter-change"],props:{width:{type:[String,Number],default:""},align:{type:String,default:"left"},rowspan:{type:[Number,String],default:1},colspan:{type:[Number,String],default:1},sortable:{type:Boolean,default:!1},filterType:{type:String,default:""},filterData:{type:Array,default:function(){return[]}},filterDefaultValue:{type:[Array,String],default:function(){return""}}},data:function(){return{border:!1,ascending:!1,descending:!1}},computed:{customWidth:function(){if("number"===typeof this.width)return this.width;if("string"===typeof this.width){var n=new RegExp(/^[1-9][0-9]*px$/g),e=new RegExp(/^[1-9][0-9]*rpx$/g),i=new RegExp(/^[1-9][0-9]*$/g);if(null!==this.width.match(n))return this.width.replace("px","");if(null!==this.width.match(e)){var r=Number(this.width.replace("rpx","")),s=t.getWindowInfo().screenWidth/750;return Math.round(r*s)}return null!==this.width.match(i)?this.width:""}return""},contentAlign:function(){var t="left";switch(this.align){case"left":t="flex-start";break;case"center":t="center";break;case"right":t="flex-end";break}return t}},created:function(){this.root=this.getTable("uniTable"),this.rootTr=this.getTable("uniTr"),this.rootTr.minWidthUpdate(this.customWidth?this.customWidth:140),this.border=this.root.border,this.root.thChildren.push(this)},methods:{sort:function(){if(this.sortable)return this.clearOther(),this.ascending||this.descending?this.ascending&&!this.descending?(this.ascending=!1,this.descending=!0,void this.$emit("sort-change",{order:"descending"})):void(!this.ascending&&this.descending&&(this.ascending=!1,this.descending=!1,this.$emit("sort-change",{order:null}))):(this.ascending=!0,void this.$emit("sort-change",{order:"ascending"}))},ascendingFn:function(){this.clearOther(),this.ascending=!this.ascending,this.descending=!1,this.$emit("sort-change",{order:this.ascending?"ascending":null})},descendingFn:function(){this.clearOther(),this.descending=!this.descending,this.ascending=!1,this.$emit("sort-change",{order:this.descending?"descending":null})},clearOther:function(){var t=this;this.root.thChildren.map((function(n){return n!==t&&(n.ascending=!1,n.descending=!1),n}))},ondropdown:function(t){this.$emit("filter-change",t)},getTable:function(t){var n=this.$parent,e=n.$options.name;while(e!==t){if(n=n.$parent,!n)return!1;e=n.$options.name}return n}}};n.default=e}).call(this,e(2)["default"])},638:function(t,n,e){"use strict";e.r(n);var i=e(639),r=e.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(s);n["default"]=r.a},639:function(t,n,e){}}]);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-table/components/uni-th/uni-th.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'uni_modules/uni-table/components/uni-th/uni-th-create-component',
{
'uni_modules/uni-table/components/uni-th/uni-th-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('2')['createComponent'](__webpack_require__(633))
})
},
[['uni_modules/uni-table/components/uni-th/uni-th-create-component']]
]);
@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}
@@ -0,0 +1 @@
<view class="{{['uni-table-th',(border)?'table--border':'']}}" style="{{'width:'+(customWidth+'px')+';'+('text-align:'+(align)+';')}}"><slot></slot></view>
@@ -0,0 +1,88 @@
@charset "UTF-8";
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.uni-table-th {
padding: 12px 10px;
display: table-cell;
box-sizing: border-box;
font-size: 14px;
font-weight: bold;
color: #909399;
border-bottom: 1px #ebeef5 solid;
}
.uni-table-th-row {
display: flex;
flex-direction: row;
}
.table--border {
border-right: 1px #ebeef5 solid;
}
.uni-table-th-content {
display: flex;
align-items: center;
flex: 1;
}
.arrow {
display: block;
position: relative;
width: 10px;
height: 8px;
left: 5px;
overflow: hidden;
cursor: pointer;
}
.down {
top: 3px;
}
.down ::after {
content: '';
width: 8px;
height: 8px;
position: absolute;
left: 2px;
top: -5px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
background-color: #ccc;
}
.down.active ::after {
background-color: #007aff;
}
.up ::after {
content: '';
width: 8px;
height: 8px;
position: absolute;
left: 2px;
top: 5px;
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
background-color: #ccc;
}
.up.active ::after {
background-color: #007aff;
}