1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- props: {
- align: String
- },
- data() {
- return {
- thBorder: "1",
- borderColor: "#d0dee5",
- fontSize: "15",
- color: "#3b4246",
- thAlign: "center"
- };
- },
- inject: ["table", "tr"],
- created() {
- this.thBorder = this.table.border;
- this.borderColor = this.table.borderColor;
- this.fontSize = this.tr.fontSize;
- this.color = this.tr.color;
- if (this.align) {
- this.thAlign = this.align;
- } else {
- this.thAlign = this.tr.align;
- }
- },
- computed: {
- thAlignCpd() {
- let nameAlign = "";
- switch (this.thAlign) {
- case "left":
- nameAlign = "flex-start";
- break;
- case "center":
- nameAlign = "center";
- break;
- case "right":
- nameAlign = "flex-end";
- break;
- default:
- nameAlign = "center";
- break;
- }
- return nameAlign;
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: $data.thBorder + "px",
- b: $data.borderColor,
- c: $data.fontSize + "px",
- d: $data.color,
- e: $options.thAlignCpd
- };
- }
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/psy_web_share/components/t-table/t-th.vue"]]);
- tt.createComponent(Component);
|