ct-component-plus 0.0.29 → 0.0.30

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ct-component-plus",
3
3
  "private": false,
4
- "version": "0.0.29",
4
+ "version": "0.0.30",
5
5
  "type": "module",
6
6
  "main": "packages/components/index.js",
7
7
  "files": [
@@ -11,8 +11,7 @@
11
11
  ns.is('text', isText),
12
12
  ]"
13
13
  v-bind="$attrs"
14
- @click="handleClick"
15
- >
14
+ @click="handleClick">
16
15
  <span v-if="$slots.default" :class="[ns.e('text')]">
17
16
  <slot />
18
17
  </span>
@@ -52,7 +51,7 @@ defineExpose({
52
51
  ref: _ref,
53
52
  });
54
53
  </script>
55
- <style lang='less'>
54
+ <style lang="less">
56
55
  .ct-button {
57
56
  cursor: pointer;
58
57
  box-sizing: border-box;
@@ -114,7 +113,7 @@ defineExpose({
114
113
  }
115
114
  }
116
115
  &--text {
117
- background-color: #fff;
116
+ background-color: transparent;
118
117
  color: var(--ct-color-primary);
119
118
  &:hover:not(.is-disabled) {
120
119
  opacity: var(--button-hover-opacity);
@@ -124,7 +123,7 @@ defineExpose({
124
123
  }
125
124
  }
126
125
  &--text-plain {
127
- background-color: #fff;
126
+ background-color: transparent;
128
127
  color: var(--ct-color-black);
129
128
  &:hover:not(.is-disabled) {
130
129
  color: var(--ct-color-primary);
@@ -169,4 +168,4 @@ defineExpose({
169
168
  margin-left: 8px;
170
169
  }
171
170
  }
172
- </style>
171
+ </style>
@@ -118,20 +118,26 @@ const handleBuriedParams = (params) => {
118
118
  };
119
119
  const getComponentProps = (item) => {
120
120
  const bpKey = toFirstUpperCase(buriedParamsKey);
121
+ console.log(item);
122
+ const attrObj = {
123
+ ...item,
124
+ };
125
+ delete attrObj.type;
121
126
  // const
122
127
  return {
123
- param: item.param,
124
- label: item.label,
128
+ ...attrObj,
129
+ // param: item.param,
130
+ // label: item.label,
131
+ // multiple: item.multiple,
132
+ // api: item.api,
133
+ // placeholder: item.placeholder,
134
+ // clearable: item.clearable,
135
+ // disabled: item.disabled,
136
+ // range: item.range,
137
+ // mapObj: item.mapObj,
125
138
  options: item.list,
126
- multiple: item.multiple,
127
- api: item.api,
128
- placeholder: item.placeholder,
129
- clearable: item.clearable,
130
- disabled: item.disabled,
131
- range: item.range,
132
- mapObj: item.mapObj,
133
139
  name: item.param, //用作插槽名
134
- rawAttr: item.rawAttr,
140
+ // rawAttr: item.rawAttr,
135
141
 
136
142
  ["on" + bpKey]: handleBuriedParams,
137
143
  };
@@ -1,4 +1,5 @@
1
1
  <template>
2
+ <!-- {{ rawAttr }}-- -->
2
3
  <el-select
3
4
  ref="selectRef"
4
5
  :class="[ns.b(), ns.is('multiple', multiple)]"
@@ -11,15 +12,14 @@
11
12
  :suffix-icon="suffixIcon"
12
13
  :fit-input-width="fitInputWidth"
13
14
  :select-text="selectText"
15
+ :data-va="rawAttr.clearable"
14
16
  :popper-class="ns.e('popper')"
15
17
  @focus="showSearchPrefix"
16
- @blur="hideSearchPrefix"
17
- >
18
+ @blur="hideSearchPrefix">
18
19
  <template #prefix>
19
20
  <div
20
21
  :class="[ns.e('filterable-icon')]"
21
- v-if="filterable && !valueModel && showSearch"
22
- >
22
+ v-if="filterable && !valueModel && showSearch">
23
23
  <ct-icon name="search_line"></ct-icon>
24
24
  </div>
25
25
  <slot name="prefix"></slot>
@@ -49,8 +49,7 @@
49
49
  :key="item.value"
50
50
  :label="item.label"
51
51
  :value="item.value"
52
- :disabled="item.disabled"
53
- >
52
+ :disabled="item.disabled">
54
53
  <slot name="option" :item="item" :index="index">
55
54
  <span>{{ item.label }}</span>
56
55
  </slot>
@@ -289,7 +288,7 @@ defineExpose({
289
288
  checkedAll,
290
289
  });
291
290
  </script>
292
- <style lang='less'>
291
+ <style lang="less">
293
292
  .ct-select {
294
293
  width: 214px;
295
294
  &__top {
@@ -366,4 +365,4 @@ defineExpose({
366
365
  }
367
366
  }
368
367
  }
369
- </style>
368
+ </style>