gi-component 0.0.1 → 0.0.3

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, useAttrs, computed, resolveComponent, createBlock, mergeProps, unref, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, mergeModels, useModel, ref, createSlots, resolveDynamicComponent, createVNode, createApp, h, Fragment, renderList, watch, onMounted, onUpdated, onUnmounted, inject, toRefs, watchEffect, reactive, provide, toRaw, normalizeProps, guardReactiveProps } from "vue";
1
+ import { defineComponent, createElementBlock, openBlock, createElementVNode, getCurrentInstance, useAttrs, computed, resolveComponent, createBlock, mergeProps, unref, withCtx, renderSlot, createTextVNode, toDisplayString, useSlots, normalizeClass, createCommentVNode, normalizeStyle, mergeModels, useModel, ref, createSlots, resolveDynamicComponent, createVNode, createApp, h, Fragment, renderList, watch, onMounted, onUpdated, onUnmounted, inject, toRefs, watchEffect, reactive, provide, toRaw, normalizeProps, guardReactiveProps, useTemplateRef } from "vue";
2
2
  import * as El from "element-plus";
3
3
  import El__default, { ElMessage } from "element-plus";
4
4
  /*! Element Plus Icons Vue v2.3.2 */
@@ -1993,10 +1993,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1993
1993
  scrollbarTabindex: {},
1994
1994
  nativeScrollbar: {}
1995
1995
  },
1996
- setup(__props) {
1996
+ setup(__props, { expose: __expose }) {
1997
1997
  const props = __props;
1998
1998
  const attrs = useAttrs();
1999
1999
  const { b } = useBemClass();
2000
+ const tableRef = useTemplateRef("tableRef");
2000
2001
  const tableProps = computed(() => {
2001
2002
  return {
2002
2003
  ...attrs,
@@ -2019,12 +2020,19 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2019
2020
  function handleCurrentChange(page) {
2020
2021
  props.pagination.currentPage = page;
2021
2022
  }
2023
+ __expose({
2024
+ tableRef
2025
+ });
2022
2026
  return (_ctx, _cache) => {
2023
2027
  const _component_el_table = resolveComponent("el-table");
2024
2028
  const _component_el_pagination = resolveComponent("el-pagination");
2025
2029
  const _component_el_row = resolveComponent("el-row");
2026
- return openBlock(), createElementBlock("div", null, [
2030
+ return openBlock(), createElementBlock("div", {
2031
+ class: normalizeClass(unref(b)("table"))
2032
+ }, [
2027
2033
  createVNode(_component_el_table, mergeProps(tableProps.value, {
2034
+ ref_key: "tableRef",
2035
+ ref: tableRef,
2028
2036
  data: props.data
2029
2037
  }), {
2030
2038
  default: withCtx(() => [
@@ -2062,11 +2070,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
2062
2070
  ]),
2063
2071
  _: 1
2064
2072
  }, 8, ["class"])
2065
- ]);
2073
+ ], 2);
2066
2074
  };
2067
2075
  }
2068
2076
  });
2069
- const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b15a0f4d"]]);
2077
+ const Table = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-a2fb9c9b"]]);
2070
2078
  const _sfc_main = /* @__PURE__ */ defineComponent({
2071
2079
  __name: "tabs",
2072
2080
  props: /* @__PURE__ */ mergeModels({
@@ -2148,6 +2156,8 @@ const createSelectDialog = (params) => {
2148
2156
  const { multiple = false, onOk, onBeforeOk, queryParams } = options;
2149
2157
  const DialogTableRef = ref();
2150
2158
  Dialog.open({
2159
+ bodyClass: "gi-p0",
2160
+ ...{ ...params, component: void 0, componentProps: void 0, tip: void 0 },
2151
2161
  title: params.title || options.title,
2152
2162
  content: () => h(params.component, {
2153
2163
  ref: (e) => DialogTableRef.value = e,
@@ -2155,8 +2165,7 @@ const createSelectDialog = (params) => {
2155
2165
  queryParams,
2156
2166
  ...params.componentProps
2157
2167
  }),
2158
- style: { maxWidth: "960px" },
2159
- bodyClass: params.bodyClass,
2168
+ style: { maxWidth: "1000px", ...params.style },
2160
2169
  onBeforeOk: async () => {
2161
2170
  var _a;
2162
2171
  if (!DialogTableRef.value.getSelectedData) {