1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- "use strict";
- const common_vendor = require("../../common/vendor.js");
- const _sfc_main = {
- props: {
- border: {
- type: String,
- default: "1"
- },
- borderColor: {
- type: String,
- default: "#d0dee5"
- },
- isCheck: {
- type: Boolean,
- default: false
- }
- },
- provide() {
- return {
- table: this
- };
- },
- data() {
- return {};
- },
- created() {
- this.childrens = [];
- this.index = 0;
- },
- methods: {
- fire(e, index, len) {
- let childrens = this.childrens;
- console.log(childrens);
- if (index === 0) {
- childrens.map((vm, index2) => {
- vm.checkboxData.checked = e;
- return vm;
- });
- } else {
- let isAll = childrens.find((n, ids) => ids !== 0 && !n.checkboxData.checked);
- childrens[0].checkboxData.checked = isAll ? false : true;
- }
- let fireArr = [];
- for (let i = 0; i < childrens.length; i++) {
- if (childrens[i].checkboxData.checked && i !== 0) {
- fireArr.push(childrens[i].checkboxData.value - 1);
- }
- }
- this.$emit("change", {
- detail: fireArr
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: $props.border + "px",
- b: $props.borderColor
- };
- }
- const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-3d456fea"], ["__file", "E:/psy_web_share/components/t-table/t-table.vue"]]);
- tt.createComponent(Component);
|