leisure-core 0.4.52 → 0.4.53

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/index.js CHANGED
@@ -27,6 +27,12 @@ import LeMpurl from "./le-mpurl/index.js";
27
27
  import { LeHelp, LeHelpDetail } from "./le-help/index.js";
28
28
  import LeSelectUser from "./le-select-user/index.js";
29
29
  import LeArea from "./le-area/index.js";
30
+ import LeSelect from "./le-select/index.js";
31
+ import LeSelectSearch from "./le-select-search/index.js";
32
+ import LeInput from "./le-input/index.js";
33
+ import LeForm from "./le-form/index";
34
+ import LeFormItem from "./le-form-item/index";
35
+ import LeInputNumber from "./le-input-number/index.js";
30
36
 
31
37
  const components = [
32
38
  LeArea,
@@ -54,6 +60,12 @@ const components = [
54
60
  LeHelpDetail,
55
61
  LeSelectUser,
56
62
  LeCommonPage,
63
+ LeSelect,
64
+ LeSelectSearch,
65
+ LeInput,
66
+ LeInputNumber,
67
+ LeForm,
68
+ LeFormItem,
57
69
  ];
58
70
 
59
71
  const install = function (Vue) {
@@ -115,8 +127,6 @@ const install = function (Vue) {
115
127
  });
116
128
  };
117
129
 
118
-
119
-
120
130
  export default {
121
131
  install,
122
132
  LeArea,
@@ -144,4 +154,10 @@ export default {
144
154
  LeHelpDetail,
145
155
  LeSelectUser,
146
156
  LeCommonPage,
157
+ LeSelect,
158
+ LeSelectSearch,
159
+ LeInput,
160
+ LeInputNumber,
161
+ LeForm,
162
+ LeFormItem,
147
163
  };
@@ -1,14 +1,15 @@
1
1
  <template>
2
2
  <el-button
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ :class="['customClass', $attrs.class]"
6
+ :style="$attrs.style"
3
7
  :id="id"
4
8
  :type="type"
5
9
  :size="size"
6
10
  v-permission="$route.params.btns"
7
- @click="click"
8
- :disabled="disabled"
9
- style="margin-left: 2px; margin-right: 2px"
10
11
  v-if="disp"
11
- >{{ text }}</el-button
12
+ ><slot></slot>{{ text }}</el-button
12
13
  >
13
14
  </template>
14
15
  <script>
@@ -33,21 +34,14 @@ export default {
33
34
  },
34
35
  text: {
35
36
  type: String,
36
- default: "按钮",
37
+ default: "",
37
38
  },
38
39
  disp: {
39
40
  type: Boolean,
40
41
  default: true,
41
42
  },
42
- disabled: {
43
- type: Boolean,
44
- default: false,
45
- },
46
43
  },
47
44
  methods: {
48
- click(param) {
49
- this.$emit("click", param);
50
- },
51
45
  },
52
46
  };
53
47
  </script>
@@ -1,5 +1,8 @@
1
1
  <template>
2
2
  <el-popconfirm
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ :class="['customClass', $attrs.class]"
3
6
  :title="title"
4
7
  :id="id"
5
8
  @confirm="click"
@@ -8,16 +11,17 @@
8
11
  v-if="disp"
9
12
  >
10
13
  <template #reference>
11
- <el-button :type="type" :size="size"
12
- ><span v-if="!isDispSlot">{{ text }}</span
13
- ><slot v-if="isDispSlot"></slot
14
- ></el-button>
14
+ <le-button :type="type" :size="size" :text="text">
15
+ <slot></slot>
16
+ </le-button>
15
17
  </template>
16
18
  </el-popconfirm>
17
19
  </template>
18
20
  <script>
21
+ import LeButton from "../../le-button/index";
19
22
  export default {
20
23
  name: "le-button-msg",
24
+ components: { LeButton },
21
25
  props: {
22
26
  id: {
23
27
  type: String,
@@ -37,7 +41,7 @@ export default {
37
41
  },
38
42
  text: {
39
43
  type: String,
40
- default: "删除",
44
+ default: "",
41
45
  },
42
46
  title: {
43
47
  type: String,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="le-button-select-media">
3
- <el-button type="primary" id="btnSelectMedia" @click="onClick"
4
- >选择素材</el-button
3
+ <le-button type="primary" id="btnSelectMedia" @click="onClick"
4
+ >选择素材</le-button
5
5
  >
6
6
  <le-dialog-container
7
7
  :title="title"
@@ -19,8 +19,10 @@
19
19
  </div>
20
20
  </template>
21
21
  <script>
22
+ import LeButton from "../../le-button/index";
22
23
  export default {
23
24
  name: "le-button-select-media",
25
+ components: { LeButton },
24
26
  props: {
25
27
  width: {
26
28
  type: String,
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <el-button type="primary" id="btnUpload" @click="onClick">{{
3
+ <le-button type="primary" id="btnUpload" @click="onClick">{{
4
4
  title
5
- }}</el-button>
5
+ }}</le-button>
6
6
  <le-dialog-container
7
7
  :title="title"
8
8
  :showDialog="showDialog"
@@ -18,8 +18,12 @@
18
18
  </div>
19
19
  </template>
20
20
  <script>
21
+ import LeButton from "../../le-button/index";
21
22
  export default {
22
23
  name: "le-button-upload",
24
+ components: {
25
+ LeButton,
26
+ },
23
27
  props: {
24
28
  width: {
25
29
  type: String,
@@ -4,9 +4,9 @@
4
4
  <slot name="paramSlot"></slot>
5
5
  <el-form-item>
6
6
  <slot></slot>
7
- <el-button type="primary" @click="onClickQuery()">查询</el-button>
8
- <el-button type="primary" @click="addItem()" v-if="isDispAddBtn"
9
- >新建</el-button
7
+ <le-button type="primary" @click="onClickQuery()">查询</le-button>
8
+ <le-button type="primary" @click="addItem()" v-if="isDispAddBtn"
9
+ >新建</le-button
10
10
  >
11
11
  </el-form-item>
12
12
  </el-form>
@@ -100,11 +100,13 @@
100
100
  import { Number } from "core-js";
101
101
  import leMixins from "../../le-libs/mixins/main";
102
102
  import LeCommonPageSub from "./sub.vue";
103
+ import LeButton from "../../le-button/index";
103
104
  export default {
104
105
  name: "le-common-page",
105
106
  mixins: [leMixins],
106
107
  components: {
107
108
  LeCommonPageSub,
109
+ LeButton,
108
110
  },
109
111
  props: {
110
112
  tableData: {
@@ -11,11 +11,11 @@
11
11
  :label="item.label"
12
12
  :prop="item.prop"
13
13
  >
14
- <el-input
14
+ <le-input
15
15
  v-if="!item.type || item.type === 'input'"
16
16
  v-model="formPop[item.prop]"
17
17
  />
18
- <el-input-number
18
+ <le-input-number
19
19
  v-else-if="item.type === 'number'"
20
20
  v-model="formPop[item.prop]"
21
21
  :min="item.min || 0"
@@ -33,7 +33,7 @@
33
33
  >{{ option.label }}</el-radio
34
34
  >
35
35
  </el-radio-group>
36
- <el-select
36
+ <le-select
37
37
  v-else-if="item.type === 'select'"
38
38
  v-model="formPop[item.prop]"
39
39
  placeholder="请选择"
@@ -44,17 +44,23 @@
44
44
  :label="option.label"
45
45
  :value="option.value"
46
46
  />
47
- </el-select>
47
+ </le-select>
48
48
  </el-form-item>
49
49
  <el-form-item v-rfooter>
50
- <el-button type="primary" @click="saveData">保存</el-button>
51
- <el-button @click="close()">关闭</el-button>
50
+ <le-button type="primary" @click="saveData">保存</le-button>
51
+ <le-button type="info" @click="close()">关闭</le-button>
52
52
  </el-form-item>
53
53
  </el-form>
54
54
  </template>
55
55
  <script>
56
+ import LeSelect from "../../le-select/index";
57
+ import LeInput from "../../le-input/index";
58
+ import LeButton from "../../le-button/index";
59
+ // import LeForm from "../../le-form/index";
60
+ // import LeFormItem from "../../le-form-item/index";
56
61
  export default {
57
62
  name: "le-common-page-sub",
63
+ components: { LeSelect, LeInput, LeButton },
58
64
  props: {
59
65
  formColumns: {
60
66
  type: Array,
@@ -0,0 +1,7 @@
1
+ import LeForm from "./src/main.vue";
2
+
3
+ LeForm.install = function (Vue) {
4
+ Vue.component(LeForm.name, LeForm);
5
+ };
6
+
7
+ export default LeForm;
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <le-form v-bind="$attrs" v-on="$listeners" :style="$attrs.style">
3
+ <slot></slot>
4
+ </le-form>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: "le-form",
9
+ inheritAttrs: false,
10
+ props: {},
11
+ methods: {},
12
+ };
13
+ </script>
@@ -0,0 +1,7 @@
1
+ import LeFormItem from "./src/main.vue";
2
+
3
+ LeFormItem.install = function (Vue) {
4
+ Vue.component(LeFormItem.name, LeFormItem);
5
+ };
6
+
7
+ export default LeFormItem;
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <le-form-item v-bind="$attrs" v-on="$listeners" :style="$attrs.style">
3
+ <slot></slot>
4
+ </le-form-item>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: "le-form-item",
9
+ inheritAttrs: false,
10
+ props: {},
11
+ methods: {},
12
+ };
13
+ </script>
@@ -12,8 +12,8 @@
12
12
  </el-table-column>
13
13
  <el-table-column fixed="right" label="操作" align="center" width="180">
14
14
  <template slot-scope="scope">
15
- <le-button text="编辑" @click="edit(scope.row)"></le-button>
16
- <le-button-msg @click="del(scope.row.id)"></le-button-msg>
15
+ <le-button @click="edit(scope.row)">编辑</le-button>
16
+ <le-button-msg @click="del(scope.row.id)">删除</le-button-msg>
17
17
  </template>
18
18
  </el-table-column>
19
19
  </el-table>
@@ -47,10 +47,14 @@
47
47
  <script>
48
48
  import { list, edit, del } from "@/api/SystemHelp";
49
49
  import { LeEditor } from "leisure-editor";
50
+ import leButton from "../../le-button/index";
51
+ import LeButtonMsg from "../../le-button-msg/index";
50
52
  export default {
51
53
  name: "le-help",
52
54
  components: {
53
55
  LeEditor,
56
+ leButton,
57
+ LeButtonMsg,
54
58
  },
55
59
  data() {
56
60
  return {
@@ -0,0 +1,7 @@
1
+ import LeInput from "./src/main.vue";
2
+
3
+ LeInput.install = function (Vue) {
4
+ Vue.component(LeInput.name, LeInput);
5
+ };
6
+
7
+ export default LeInput;
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <el-input
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ :class="['customClass', $attrs.class]"
6
+ :style="$attrs.style"
7
+ clearable
8
+ ></el-input>
9
+ </template>
10
+ <script>
11
+ export default {
12
+ name: "le-button",
13
+ inheritAttrs: false,
14
+ props: {},
15
+ methods: {},
16
+ };
17
+ </script>
@@ -0,0 +1,7 @@
1
+ import LeInputNumber from "./src/main.vue";
2
+
3
+ LeInputNumber.install = function (Vue) {
4
+ Vue.component(LeInputNumber.name, LeInputNumber);
5
+ };
6
+
7
+ export default LeInputNumber;
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <el-input-number
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ :class="['customClass', $attrs.class]"
6
+ :style="$attrs.style"
7
+ ></el-input-number>
8
+ </template>
9
+ <script>
10
+ export default {
11
+ name: "le-input-number",
12
+ inheritAttrs: false,
13
+ props: {},
14
+ methods: {},
15
+ };
16
+ </script>
@@ -0,0 +1,7 @@
1
+ import LeSelect from "./src/main.vue";
2
+
3
+ LeSelect.install = function (Vue) {
4
+ Vue.component(LeSelect.name, LeSelect);
5
+ };
6
+
7
+ export default LeSelect;
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <el-select
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ :class="['customClass', $attrs.class]"
6
+ :style="$attrs.style"
7
+ >
8
+ <slot></slot>
9
+ </el-select>
10
+ </template>
11
+ <script>
12
+ export default {
13
+ name: "le-select",
14
+ props: {
15
+ // options: {
16
+ // type: Array,
17
+ // default: () => [],
18
+ // },
19
+ },
20
+ inheritAttrs: false,
21
+ data() {
22
+ return {};
23
+ },
24
+ methods: {},
25
+ };
26
+ </script>
27
+ <style lang="scss" scoped></style>
@@ -0,0 +1,7 @@
1
+ import LeSelectSearch from "./src/main.vue";
2
+
3
+ LeSelectSearch.install = function (Vue) {
4
+ Vue.component(LeSelectSearch.name, LeSelectSearch);
5
+ };
6
+
7
+ export default LeSelectSearch;
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <le-select
3
+ v-bind="$attrs"
4
+ v-on="$listeners"
5
+ remote
6
+ multiple
7
+ filterable
8
+ reserve-keyword
9
+ placeholder="请输入搜索关键字"
10
+ :remote-method="remoteMethod"
11
+ :loading="loading"
12
+ >
13
+ <slot></slot>
14
+ </le-select>
15
+ </template>
16
+ <script>
17
+ import LeSelect from "../../le-select/index";
18
+ export default {
19
+ name: "le-select-search",
20
+ components: { LeSelect },
21
+ props: {
22
+ remote: {
23
+ type: Boolean,
24
+ default: false,
25
+ },
26
+ },
27
+ inheritAttrs: false,
28
+ data() {
29
+ return {
30
+ loading: false,
31
+ selectValue: "",
32
+ };
33
+ },
34
+ methods: {
35
+ remoteMethod(params) {
36
+ if (params !== "") {
37
+ this.loading = true;
38
+ this.$emit("remoteMethod", params, () => {
39
+ this.loading = false;
40
+ });
41
+ }
42
+ },
43
+ },
44
+ };
45
+ </script>
46
+ <style lang="scss" scoped></style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leisure-core",
3
- "version": "0.4.52",
3
+ "version": "0.4.53",
4
4
  "description": "leisure-core是京心数据基于vue2.x开发的一套桌面端组件库,封装了大量实用的UI控件模板,非常方便开发者快速搭建前端应用",
5
5
  "private": false,
6
6
  "author": "北方乐逍遥(zcx7878)",