jobsys-explore 4.2.13 → 4.2.14
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/.changeset/README.md +8 -8
- package/.changeset/config.json +11 -11
- package/.changeset/{chatty-donkeys-grin.md → hip-hounds-drop.md} +1 -1
- package/.changeset/{bright-cycles-cheer.md → hip-spoons-smell.md} +1 -1
- package/.changeset/tall-trainers-sin.md +5 -0
- package/.eslintignore +3 -3
- package/.eslintrc.cjs +37 -37
- package/.prettierrc.cjs +38 -38
- package/CHANGELOG.md +8 -0
- package/README.md +41 -41
- package/TODOs.md +8 -8
- package/components/button/ExButton.jsx +120 -120
- package/components/button/index.js +4 -4
- package/components/button/index.less +7 -7
- package/components/decorator/ExDecorator.jsx +31 -31
- package/components/decorator/index.js +5 -5
- package/components/decorator/index.less +76 -76
- package/components/form/ExAddress.jsx +195 -195
- package/components/form/ExCascader.jsx +174 -174
- package/components/form/ExCheckbox.jsx +59 -59
- package/components/form/ExDate.jsx +143 -143
- package/components/form/ExDatetime.jsx +148 -148
- package/components/form/ExField.jsx +140 -140
- package/components/form/ExFieldUploader.jsx +50 -50
- package/components/form/ExForm.jsx +458 -458
- package/components/form/ExNumber.jsx +51 -51
- package/components/form/ExRadio.jsx +58 -58
- package/components/form/ExRate.jsx +51 -51
- package/components/form/ExSelect.jsx +248 -248
- package/components/form/ExSlider.jsx +55 -55
- package/components/form/ExSwitch.jsx +51 -51
- package/components/form/ExTime.jsx +99 -99
- package/components/form/FormItem.jsx +263 -263
- package/components/form/PickerWrapper.jsx +120 -120
- package/components/form/index.js +44 -44
- package/components/form/index.less +134 -134
- package/components/form/utils.js +53 -53
- package/components/grid/ExGrid.jsx +53 -53
- package/components/grid/index.js +4 -4
- package/components/grid/index.less +2 -2
- package/components/index.js +12 -12
- package/components/pagination/ExPagination.jsx +294 -294
- package/components/pagination/index.js +5 -5
- package/components/pagination/index.less +3 -3
- package/components/provider/ExProvider.jsx +173 -173
- package/components/provider/index.js +4 -4
- package/components/qrcode/ExQrcode.jsx +86 -86
- package/components/qrcode/index.js +5 -5
- package/components/qrcode/index.less +8 -8
- package/components/result/ExResult.jsx +122 -122
- package/components/result/index.js +5 -5
- package/components/result/index.less +59 -59
- package/components/search/ExSearch.jsx +281 -281
- package/components/search/components/Expand.jsx +77 -77
- package/components/search/components/Field.jsx +27 -27
- package/components/search/components/Quick.jsx +53 -53
- package/components/search/components/index.js +5 -5
- package/components/search/index.js +5 -5
- package/components/search/index.less +118 -118
- package/components/search/utils.js +30 -30
- package/components/sector/ExSector.jsx +52 -52
- package/components/sector/README.md +26 -26
- package/components/sector/index.js +5 -5
- package/components/sector/index.less +122 -122
- package/components/theme/ExTheme.jsx +10 -10
- package/components/theme/index.js +4 -4
- package/components/theme/index.less +98 -98
- package/components/uploader/ExUploader.jsx +260 -260
- package/components/uploader/index.js +5 -5
- package/components/utils.js +196 -187
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index-20463bba.js.map +1 -1
- package/dist/index-f397a67d.cjs.map +1 -1
- package/dist/jobsys-explore.cjs +6 -6
- package/dist/jobsys-explore.cjs.map +1 -1
- package/dist/jobsys-explore.js +529 -523
- package/dist/jobsys-explore.js.map +1 -1
- package/docgen.config.js +15 -15
- package/docs/.vuepress/config.js +61 -61
- package/docs/.vuepress/styles/index.scss +7 -7
- package/docs/components/sector/ExSector.md +43 -43
- package/docs/index.md +82 -82
- package/hooks/cipher.js +44 -44
- package/hooks/datetime.js +66 -66
- package/hooks/form.js +193 -193
- package/hooks/index.js +5 -5
- package/hooks/network.js +122 -122
- package/hooks/utils.js +231 -231
- package/index.html +17 -17
- package/index.js +26 -26
- package/package.json +1 -1
- package/playground/App.vue +100 -100
- package/playground/TestButton.vue +61 -61
- package/playground/TestCascader.vue +2441 -2441
- package/playground/TestDecorator.vue +14 -14
- package/playground/TestForm.vue +372 -374
- package/playground/TestFormItem.vue +110 -110
- package/playground/TestGrid.vue +22 -22
- package/playground/TestPagination.vue +1227 -1227
- package/playground/TestQrcode.vue +7 -7
- package/playground/TestResult.vue +12 -12
- package/playground/TestSearch.vue +106 -106
- package/playground/TestSector.vue +15 -15
- package/playground/TestUploader.vue +9 -9
- package/playground/http.js +23 -23
- package/playground/main.js +22 -22
- package/postcss.config.cjs +8 -8
- package/utils/style.js +13 -13
- package/utils/withInstall.js +7 -7
- package/vite.config.js +53 -53
- package/.changeset/curly-buttons-smash.md +0 -5
- package/.changeset/flat-buckets-taste.md +0 -5
- package/.changeset/good-cherries-guess.md +0 -5
- package/.changeset/hot-apples-jump.md +0 -5
- package/.changeset/many-teachers-boil.md +0 -5
- package/.changeset/pretty-ducks-tease.md +0 -5
- package/.changeset/smooth-emus-move.md +0 -5
- package/.changeset/tasty-clouds-brake.md +0 -5
- package/.changeset/ten-needles-wait.md +0 -5
- package/.changeset/unlucky-onions-dance.md +0 -5
- package/.changeset/wise-horses-mix.md +0 -5
package/.changeset/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
|
|
3
|
-
"changelog": "@changesets/cli/changelog",
|
|
4
|
-
"commit": false,
|
|
5
|
-
"fixed": [],
|
|
6
|
-
"linked": [],
|
|
7
|
-
"access": "public",
|
|
8
|
-
"baseBranch": "master",
|
|
9
|
-
"updateInternalDependencies": "patch",
|
|
10
|
-
"ignore": []
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "master",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
package/.eslintignore
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
dist
|
|
2
|
-
node_modules
|
|
3
|
-
.prettierrc.cjs
|
|
1
|
+
dist
|
|
2
|
+
node_modules
|
|
3
|
+
.prettierrc.cjs
|
|
4
4
|
vite.config.js
|
package/.eslintrc.cjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es2021: true
|
|
5
|
-
},
|
|
6
|
-
globals: {
|
|
7
|
-
defineOptions: true
|
|
8
|
-
},
|
|
9
|
-
extends: ["eslint-config-prettier", "plugin:import/recommended", "eslint:recommended", "plugin:vue/vue3-recommended", "plugin:prettier/recommended"],
|
|
10
|
-
overrides: [],
|
|
11
|
-
parserOptions: {
|
|
12
|
-
ecmaVersion: "latest",
|
|
13
|
-
sourceType: "module",
|
|
14
|
-
ecmaFeatures: {
|
|
15
|
-
jsx: true
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
plugins: ["vue"],
|
|
19
|
-
rules: {
|
|
20
|
-
"import/prefer-default-export": "off",
|
|
21
|
-
"import/no-extraneous-dependencies": "off",
|
|
22
|
-
"import/no-duplicates": "off",
|
|
23
|
-
"import/named": "off",
|
|
24
|
-
"import/order": "off",
|
|
25
|
-
"import/first": "off",
|
|
26
|
-
"vue/attributes-order": "off",
|
|
27
|
-
"vue/no-mutating-props": "off",
|
|
28
|
-
"vue/no-reserved-component-names": "off",
|
|
29
|
-
"vue/no-v-html": "off",
|
|
30
|
-
"no-param-reassign": "off",
|
|
31
|
-
"no-console": "off",
|
|
32
|
-
"no-restricted-globals": "off",
|
|
33
|
-
"no-debugger": "off",
|
|
34
|
-
"no-use-before-define": "off",
|
|
35
|
-
"no-promise-executor-return": "off",
|
|
36
|
-
"spaced-comment": "off"
|
|
37
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es2021: true
|
|
5
|
+
},
|
|
6
|
+
globals: {
|
|
7
|
+
defineOptions: true
|
|
8
|
+
},
|
|
9
|
+
extends: ["eslint-config-prettier", "plugin:import/recommended", "eslint:recommended", "plugin:vue/vue3-recommended", "plugin:prettier/recommended"],
|
|
10
|
+
overrides: [],
|
|
11
|
+
parserOptions: {
|
|
12
|
+
ecmaVersion: "latest",
|
|
13
|
+
sourceType: "module",
|
|
14
|
+
ecmaFeatures: {
|
|
15
|
+
jsx: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
plugins: ["vue"],
|
|
19
|
+
rules: {
|
|
20
|
+
"import/prefer-default-export": "off",
|
|
21
|
+
"import/no-extraneous-dependencies": "off",
|
|
22
|
+
"import/no-duplicates": "off",
|
|
23
|
+
"import/named": "off",
|
|
24
|
+
"import/order": "off",
|
|
25
|
+
"import/first": "off",
|
|
26
|
+
"vue/attributes-order": "off",
|
|
27
|
+
"vue/no-mutating-props": "off",
|
|
28
|
+
"vue/no-reserved-component-names": "off",
|
|
29
|
+
"vue/no-v-html": "off",
|
|
30
|
+
"no-param-reassign": "off",
|
|
31
|
+
"no-console": "off",
|
|
32
|
+
"no-restricted-globals": "off",
|
|
33
|
+
"no-debugger": "off",
|
|
34
|
+
"no-use-before-define": "off",
|
|
35
|
+
"no-promise-executor-return": "off",
|
|
36
|
+
"spaced-comment": "off"
|
|
37
|
+
}
|
|
38
38
|
};
|
package/.prettierrc.cjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
// 一行最多多少个字符
|
|
3
|
-
printWidth: 150,
|
|
4
|
-
// 指定每个缩进级别的空格数
|
|
5
|
-
tabWidth: 4,
|
|
6
|
-
// 使用制表符而不是空格缩进行
|
|
7
|
-
useTabs: true,
|
|
8
|
-
// 在语句末尾是否需要分号
|
|
9
|
-
semi: false,
|
|
10
|
-
// 是否使用单引号
|
|
11
|
-
singleQuote: false,
|
|
12
|
-
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
|
13
|
-
quoteProps: "as-needed",
|
|
14
|
-
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
|
15
|
-
trailingComma: "all",
|
|
16
|
-
// 在对象文字中的括号之间打印空格
|
|
17
|
-
bracketSpacing: true,
|
|
18
|
-
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
|
19
|
-
arrowParens: "always",
|
|
20
|
-
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
|
21
|
-
rangeStart: 0,
|
|
22
|
-
rangeEnd: Infinity,
|
|
23
|
-
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
|
24
|
-
requirePragma: false,
|
|
25
|
-
// 不需要自动在文件开头插入 @prettier
|
|
26
|
-
insertPragma: false,
|
|
27
|
-
// 使用默认的折行标准 always\never\preserve
|
|
28
|
-
proseWrap: "preserve",
|
|
29
|
-
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
|
30
|
-
htmlWhitespaceSensitivity: "css",
|
|
31
|
-
// Vue文件脚本和样式标签缩进
|
|
32
|
-
vueIndentScriptAndStyle: false,
|
|
33
|
-
// 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF),
|
|
34
|
-
// 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。
|
|
35
|
-
// 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾
|
|
36
|
-
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
|
37
|
-
endOfLine: "auto"
|
|
38
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
// 一行最多多少个字符
|
|
3
|
+
printWidth: 150,
|
|
4
|
+
// 指定每个缩进级别的空格数
|
|
5
|
+
tabWidth: 4,
|
|
6
|
+
// 使用制表符而不是空格缩进行
|
|
7
|
+
useTabs: true,
|
|
8
|
+
// 在语句末尾是否需要分号
|
|
9
|
+
semi: false,
|
|
10
|
+
// 是否使用单引号
|
|
11
|
+
singleQuote: false,
|
|
12
|
+
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
|
13
|
+
quoteProps: "as-needed",
|
|
14
|
+
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
|
15
|
+
trailingComma: "all",
|
|
16
|
+
// 在对象文字中的括号之间打印空格
|
|
17
|
+
bracketSpacing: true,
|
|
18
|
+
// 在单独的箭头函数参数周围包括括号 always:(x) => x \ avoid:x => x
|
|
19
|
+
arrowParens: "always",
|
|
20
|
+
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
|
21
|
+
rangeStart: 0,
|
|
22
|
+
rangeEnd: Infinity,
|
|
23
|
+
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
|
24
|
+
requirePragma: false,
|
|
25
|
+
// 不需要自动在文件开头插入 @prettier
|
|
26
|
+
insertPragma: false,
|
|
27
|
+
// 使用默认的折行标准 always\never\preserve
|
|
28
|
+
proseWrap: "preserve",
|
|
29
|
+
// 指定HTML文件的全局空格敏感度 css\strict\ignore
|
|
30
|
+
htmlWhitespaceSensitivity: "css",
|
|
31
|
+
// Vue文件脚本和样式标签缩进
|
|
32
|
+
vueIndentScriptAndStyle: false,
|
|
33
|
+
// 在 windows 操作系统中换行符通常是回车 (CR) 加换行分隔符 (LF),也就是回车换行(CRLF),
|
|
34
|
+
// 然而在 Linux 和 Unix 中只使用简单的换行分隔符 (LF)。
|
|
35
|
+
// 对应的控制字符为 "\n" (LF) 和 "\r\n"(CRLF)。auto意为保持现有的行尾
|
|
36
|
+
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
|
37
|
+
endOfLine: "auto"
|
|
38
|
+
}
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
# TODOs
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
## 增强
|
|
6
|
-
|
|
7
|
-
- [ ] ExploreForm
|
|
8
|
-
|
|
9
|
-
- [x] Address
|
|
10
|
-
- [x] Cascader
|
|
11
|
-
- [x] Checkbox
|
|
12
|
-
- [x] Date
|
|
13
|
-
- [ ] Group
|
|
14
|
-
- [ ] Html
|
|
15
|
-
- [x] Input
|
|
16
|
-
- [x] Number
|
|
17
|
-
- [x] Radio
|
|
18
|
-
- [ ] Remote
|
|
19
|
-
- [x] Select
|
|
20
|
-
- [x] Switch
|
|
21
|
-
- [] Tag
|
|
22
|
-
- [x] Text
|
|
23
|
-
- [x] Time
|
|
24
|
-
- [ ] TreeSelect
|
|
25
|
-
- [x] Uploader
|
|
26
|
-
|
|
27
|
-
- [x] ExploreSearch
|
|
28
|
-
|
|
29
|
-
- [x] 同上
|
|
30
|
-
|
|
31
|
-
- [x] Field
|
|
32
|
-
- [x] Disabled
|
|
33
|
-
- [x] Help
|
|
34
|
-
|
|
35
|
-
## 新增
|
|
36
|
-
|
|
37
|
-
- [ ] 样式定制
|
|
38
|
-
- [ ] 浮动按钮
|
|
39
|
-
- [ ] 列表组件
|
|
40
|
-
- [ ] 背景生成
|
|
41
|
-
- [ ] 简易图表
|
|
1
|
+
# TODOs
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## 增强
|
|
6
|
+
|
|
7
|
+
- [ ] ExploreForm
|
|
8
|
+
|
|
9
|
+
- [x] Address
|
|
10
|
+
- [x] Cascader
|
|
11
|
+
- [x] Checkbox
|
|
12
|
+
- [x] Date
|
|
13
|
+
- [ ] Group
|
|
14
|
+
- [ ] Html
|
|
15
|
+
- [x] Input
|
|
16
|
+
- [x] Number
|
|
17
|
+
- [x] Radio
|
|
18
|
+
- [ ] Remote
|
|
19
|
+
- [x] Select
|
|
20
|
+
- [x] Switch
|
|
21
|
+
- [] Tag
|
|
22
|
+
- [x] Text
|
|
23
|
+
- [x] Time
|
|
24
|
+
- [ ] TreeSelect
|
|
25
|
+
- [x] Uploader
|
|
26
|
+
|
|
27
|
+
- [x] ExploreSearch
|
|
28
|
+
|
|
29
|
+
- [x] 同上
|
|
30
|
+
|
|
31
|
+
- [x] Field
|
|
32
|
+
- [x] Disabled
|
|
33
|
+
- [x] Help
|
|
34
|
+
|
|
35
|
+
## 新增
|
|
36
|
+
|
|
37
|
+
- [ ] 样式定制
|
|
38
|
+
- [ ] 浮动按钮
|
|
39
|
+
- [ ] 列表组件
|
|
40
|
+
- [ ] 背景生成
|
|
41
|
+
- [ ] 简易图表
|
package/TODOs.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Bugs
|
|
2
|
-
|
|
3
|
-
- [ ] ExPagination 无限加载数据问题
|
|
4
|
-
|
|
5
|
-
# Improvements
|
|
6
|
-
|
|
7
|
-
# Features
|
|
8
|
-
|
|
1
|
+
# Bugs
|
|
2
|
+
|
|
3
|
+
- [ ] ExPagination 无限加载数据问题
|
|
4
|
+
|
|
5
|
+
# Improvements
|
|
6
|
+
|
|
7
|
+
# Features
|
|
8
|
+
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import { defineComponent } from "vue"
|
|
2
|
-
import { Button } from "vant"
|
|
3
|
-
import "./index.less"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 主题组件
|
|
7
|
-
* @version 1.0.0
|
|
8
|
-
*/
|
|
9
|
-
export default defineComponent({
|
|
10
|
-
name: "ExButton",
|
|
11
|
-
props: {
|
|
12
|
-
/**
|
|
13
|
-
* 按钮类型
|
|
14
|
-
* @values primary, success, warning, danger
|
|
15
|
-
*/
|
|
16
|
-
type: { type: String, default: "default" },
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 按钮大小
|
|
20
|
-
* @values large, normal, small, mini
|
|
21
|
-
*/
|
|
22
|
-
size: { type: String, default: "normal" },
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 失效状态
|
|
26
|
-
*/
|
|
27
|
-
disabled: { type: Boolean, default: false },
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 是否圆形按钮
|
|
31
|
-
*/
|
|
32
|
-
round: { type: Boolean, default: true },
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* 是否块状按钮
|
|
36
|
-
*/
|
|
37
|
-
block: { type: Boolean, default: true },
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 按钮标签
|
|
41
|
-
*/
|
|
42
|
-
text: { type: String, default: "" },
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 按钮图标,需要使用
|
|
46
|
-
*
|
|
47
|
-
*/
|
|
48
|
-
icon: { type: Object, default: null },
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 按钮图标位置
|
|
52
|
-
* @values left, right
|
|
53
|
-
*/
|
|
54
|
-
iconPosition: { type: String, default: "left" },
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* 请求状态控制器
|
|
58
|
-
* @param {boolean} fetcher.loading 是否加载中
|
|
59
|
-
*/
|
|
60
|
-
fetcher: {
|
|
61
|
-
type: Object,
|
|
62
|
-
default: () => ({ loading: false }),
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/button)
|
|
67
|
-
*/
|
|
68
|
-
buttonProps: {
|
|
69
|
-
type: Object,
|
|
70
|
-
default: () => ({}),
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
emits: [
|
|
74
|
-
/**
|
|
75
|
-
* @event click
|
|
76
|
-
* @param {Event} event 点击事件
|
|
77
|
-
*/
|
|
78
|
-
"click",
|
|
79
|
-
],
|
|
80
|
-
|
|
81
|
-
setup(props, { emit, slots }) {
|
|
82
|
-
const onClick = (e) => {
|
|
83
|
-
/**
|
|
84
|
-
* @event click 点击事件
|
|
85
|
-
*/
|
|
86
|
-
emit("click", e)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const defaultLabel = () => {
|
|
90
|
-
return props.text || slots.default?.()
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const defaultSlot = () => {
|
|
94
|
-
if (props.icon && props.iconPosition === "left") {
|
|
95
|
-
return [props.icon, defaultLabel()]
|
|
96
|
-
} else if (props.icon && props.iconPosition === "right") {
|
|
97
|
-
return [defaultLabel(), props.icon]
|
|
98
|
-
}
|
|
99
|
-
return [defaultLabel()]
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return () => (
|
|
103
|
-
<Button
|
|
104
|
-
class={"ex-button"}
|
|
105
|
-
loading={props.fetcher.loading}
|
|
106
|
-
type={props.type}
|
|
107
|
-
size={props.size}
|
|
108
|
-
disabled={props.disabled}
|
|
109
|
-
round={props.round}
|
|
110
|
-
block={props.block}
|
|
111
|
-
onClick={onClick}
|
|
112
|
-
{...props.buttonProps}
|
|
113
|
-
>
|
|
114
|
-
{{
|
|
115
|
-
default: () => defaultSlot(),
|
|
116
|
-
}}
|
|
117
|
-
</Button>
|
|
118
|
-
)
|
|
119
|
-
},
|
|
120
|
-
})
|
|
1
|
+
import { defineComponent } from "vue"
|
|
2
|
+
import { Button } from "vant"
|
|
3
|
+
import "./index.less"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 主题组件
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
*/
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: "ExButton",
|
|
11
|
+
props: {
|
|
12
|
+
/**
|
|
13
|
+
* 按钮类型
|
|
14
|
+
* @values primary, success, warning, danger
|
|
15
|
+
*/
|
|
16
|
+
type: { type: String, default: "default" },
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 按钮大小
|
|
20
|
+
* @values large, normal, small, mini
|
|
21
|
+
*/
|
|
22
|
+
size: { type: String, default: "normal" },
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 失效状态
|
|
26
|
+
*/
|
|
27
|
+
disabled: { type: Boolean, default: false },
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 是否圆形按钮
|
|
31
|
+
*/
|
|
32
|
+
round: { type: Boolean, default: true },
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 是否块状按钮
|
|
36
|
+
*/
|
|
37
|
+
block: { type: Boolean, default: true },
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 按钮标签
|
|
41
|
+
*/
|
|
42
|
+
text: { type: String, default: "" },
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 按钮图标,需要使用
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
icon: { type: Object, default: null },
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 按钮图标位置
|
|
52
|
+
* @values left, right
|
|
53
|
+
*/
|
|
54
|
+
iconPosition: { type: String, default: "left" },
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 请求状态控制器
|
|
58
|
+
* @param {boolean} fetcher.loading 是否加载中
|
|
59
|
+
*/
|
|
60
|
+
fetcher: {
|
|
61
|
+
type: Object,
|
|
62
|
+
default: () => ({ loading: false }),
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* [原生配置](https://vant-contrib.gitee.io/vant/#/zh-CN/button)
|
|
67
|
+
*/
|
|
68
|
+
buttonProps: {
|
|
69
|
+
type: Object,
|
|
70
|
+
default: () => ({}),
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
emits: [
|
|
74
|
+
/**
|
|
75
|
+
* @event click
|
|
76
|
+
* @param {Event} event 点击事件
|
|
77
|
+
*/
|
|
78
|
+
"click",
|
|
79
|
+
],
|
|
80
|
+
|
|
81
|
+
setup(props, { emit, slots }) {
|
|
82
|
+
const onClick = (e) => {
|
|
83
|
+
/**
|
|
84
|
+
* @event click 点击事件
|
|
85
|
+
*/
|
|
86
|
+
emit("click", e)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const defaultLabel = () => {
|
|
90
|
+
return props.text || slots.default?.()
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const defaultSlot = () => {
|
|
94
|
+
if (props.icon && props.iconPosition === "left") {
|
|
95
|
+
return [props.icon, defaultLabel()]
|
|
96
|
+
} else if (props.icon && props.iconPosition === "right") {
|
|
97
|
+
return [defaultLabel(), props.icon]
|
|
98
|
+
}
|
|
99
|
+
return [defaultLabel()]
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return () => (
|
|
103
|
+
<Button
|
|
104
|
+
class={"ex-button"}
|
|
105
|
+
loading={props.fetcher.loading}
|
|
106
|
+
type={props.type}
|
|
107
|
+
size={props.size}
|
|
108
|
+
disabled={props.disabled}
|
|
109
|
+
round={props.round}
|
|
110
|
+
block={props.block}
|
|
111
|
+
onClick={onClick}
|
|
112
|
+
{...props.buttonProps}
|
|
113
|
+
>
|
|
114
|
+
{{
|
|
115
|
+
default: () => defaultSlot(),
|
|
116
|
+
}}
|
|
117
|
+
</Button>
|
|
118
|
+
)
|
|
119
|
+
},
|
|
120
|
+
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _ExButton from "./ExButton.jsx"
|
|
2
|
-
import withInstall from "../../utils/withInstall"
|
|
3
|
-
export const ExButton = withInstall(_ExButton)
|
|
4
|
-
export default ExButton
|
|
1
|
+
import _ExButton from "./ExButton.jsx"
|
|
2
|
+
import withInstall from "../../utils/withInstall"
|
|
3
|
+
export const ExButton = withInstall(_ExButton)
|
|
4
|
+
export default ExButton
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.ex-button {
|
|
2
|
-
padding: 0 40px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
:root:root {
|
|
6
|
-
--van-button-normal-font-size: 16px;
|
|
7
|
-
--van-button-default-height: 48px;
|
|
1
|
+
.ex-button {
|
|
2
|
+
padding: 0 40px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
:root:root {
|
|
6
|
+
--van-button-normal-font-size: 16px;
|
|
7
|
+
--van-button-default-height: 48px;
|
|
8
8
|
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent } from "vue"
|
|
2
|
-
import "./index.less"
|
|
3
|
-
import { genPixel } from "../../utils/style.js"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 装饰组件
|
|
7
|
-
*
|
|
8
|
-
* @version 1.0.0
|
|
9
|
-
*/
|
|
10
|
-
export default defineComponent({
|
|
11
|
-
name: "ExDecorator",
|
|
12
|
-
props: {
|
|
13
|
-
/**
|
|
14
|
-
* 自定义颜色
|
|
15
|
-
* @values green, blue, black, orange
|
|
16
|
-
*/
|
|
17
|
-
color: { type: String, default: "green" },
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 高度
|
|
21
|
-
*/
|
|
22
|
-
height: { type: [Number, String], default: "auto" },
|
|
23
|
-
},
|
|
24
|
-
setup(props, { slots }) {
|
|
25
|
-
return () => (
|
|
26
|
-
<div class={`ex-decorator ex-decorator__${props.color}`} style={{ height: genPixel(props.height) }}>
|
|
27
|
-
{slots.default?.()}
|
|
28
|
-
</div>
|
|
29
|
-
)
|
|
30
|
-
},
|
|
31
|
-
})
|
|
1
|
+
import { defineComponent } from "vue"
|
|
2
|
+
import "./index.less"
|
|
3
|
+
import { genPixel } from "../../utils/style.js"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 装饰组件
|
|
7
|
+
*
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
*/
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: "ExDecorator",
|
|
12
|
+
props: {
|
|
13
|
+
/**
|
|
14
|
+
* 自定义颜色
|
|
15
|
+
* @values green, blue, black, orange
|
|
16
|
+
*/
|
|
17
|
+
color: { type: String, default: "green" },
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 高度
|
|
21
|
+
*/
|
|
22
|
+
height: { type: [Number, String], default: "auto" },
|
|
23
|
+
},
|
|
24
|
+
setup(props, { slots }) {
|
|
25
|
+
return () => (
|
|
26
|
+
<div class={`ex-decorator ex-decorator__${props.color}`} style={{ height: genPixel(props.height) }}>
|
|
27
|
+
{slots.default?.()}
|
|
28
|
+
</div>
|
|
29
|
+
)
|
|
30
|
+
},
|
|
31
|
+
})
|