btxui 1.0.1

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.
Files changed (190) hide show
  1. package/README.md +42 -0
  2. package/app.vue +162 -0
  3. package/assets/css/_main.js +73 -0
  4. package/assets/css/btx.min.css +1 -0
  5. package/assets/css/btx.mob.min.css +1 -0
  6. package/assets/css/btx.pad.min.css +1 -0
  7. package/assets/css/btx.webapp.min.css +1 -0
  8. package/assets/css/custom_fonts/iconfont.css +37 -0
  9. package/assets/css/custom_fonts/iconfont.eot +0 -0
  10. package/assets/css/custom_fonts/iconfont.svg +47 -0
  11. package/assets/css/custom_fonts/iconfont.ttf +0 -0
  12. package/assets/css/custom_fonts/iconfont.woff +0 -0
  13. package/assets/css/custom_fonts/iconfont.woff2 +0 -0
  14. package/assets/css/res-l.css +47 -0
  15. package/assets/css/res-m.css +47 -0
  16. package/assets/css/res-s.css +61 -0
  17. package/assets/custom_fonts/iconfont.css +37 -0
  18. package/assets/custom_fonts/iconfont.eot +0 -0
  19. package/assets/custom_fonts/iconfont.svg +47 -0
  20. package/assets/custom_fonts/iconfont.ttf +0 -0
  21. package/assets/custom_fonts/iconfont.woff +0 -0
  22. package/assets/custom_fonts/iconfont.woff2 +0 -0
  23. package/assets/js/Btx.js +196 -0
  24. package/assets/js/Utils.js +421 -0
  25. package/assets/js/fastclick.js +802 -0
  26. package/assets/js/lazy.min.js +2 -0
  27. package/assets/js/touchwipe.js +111 -0
  28. package/assets/server.js +8 -0
  29. package/assets/start_site_code_str.js +119 -0
  30. package/cdn/css/btx.min.css +1 -0
  31. package/cdn/css/btx.min.css.map +1 -0
  32. package/cdn/fonts/iconfont.ttf +0 -0
  33. package/cdn/fonts/iconfont.woff +0 -0
  34. package/cdn/fonts/iconfont.woff2 +0 -0
  35. package/components/BTXUI/app/app-wid.vue +182 -0
  36. package/components/BTXUI/btn/btn-wid.vue +128 -0
  37. package/components/BTXUI/carousel/carousel-wid.vue +138 -0
  38. package/components/BTXUI/checkbox/checkbox-wid.vue +72 -0
  39. package/components/BTXUI/confirm/confirm-wid.vue +279 -0
  40. package/components/BTXUI/content/content-checkbox-wid.vue +44 -0
  41. package/components/BTXUI/content/content-node-wid.vue +114 -0
  42. package/components/BTXUI/content/content-tag-wid.vue +25 -0
  43. package/components/BTXUI/content/content-wid.vue +254 -0
  44. package/components/BTXUI/core/anis/ani-fail.vue +46 -0
  45. package/components/BTXUI/core/anis/ani-loading.vue +32 -0
  46. package/components/BTXUI/core/anis/ani-notic.vue +47 -0
  47. package/components/BTXUI/core/anis/ani-success.vue +48 -0
  48. package/components/BTXUI/core/b-drag.vue +258 -0
  49. package/components/BTXUI/core/b-grid.vue +84 -0
  50. package/components/BTXUI/core/b-hot.vue +171 -0
  51. package/components/BTXUI/core/b-icon.vue +76 -0
  52. package/components/BTXUI/core/b-img.vue +84 -0
  53. package/components/BTXUI/core/b-input.vue +198 -0
  54. package/components/BTXUI/core/b-list.vue +276 -0
  55. package/components/BTXUI/core/b-text/doc.ts +9 -0
  56. package/components/BTXUI/core/b-text/index.vue +16 -0
  57. package/components/BTXUI/core/b-textarea.vue +58 -0
  58. package/components/BTXUI/core/b-video.vue +35 -0
  59. package/components/BTXUI/core/b-view/doc.ts +10 -0
  60. package/components/BTXUI/core/b-view/index.vue +20 -0
  61. package/components/BTXUI/core/b-webview.vue +20 -0
  62. package/components/BTXUI/core/lib/ChapterLink.js +49 -0
  63. package/components/BTXUI/core/lib/Search.vue +60 -0
  64. package/components/BTXUI/core/styles/doc.ts +55 -0
  65. package/components/BTXUI/core/styles/index.vue +98 -0
  66. package/components/BTXUI/core/styles/prestyles.ts +471 -0
  67. package/components/BTXUI/core/styles/theme.ts +29 -0
  68. package/components/BTXUI/drawer/drawer-wid.vue +165 -0
  69. package/components/BTXUI/drawer/title-tag-wid.vue +114 -0
  70. package/components/BTXUI/form/form-select-wid.vue +57 -0
  71. package/components/BTXUI/form/form-wid.vue +324 -0
  72. package/components/BTXUI/formPannel/form-pannel-wid.vue +133 -0
  73. package/components/BTXUI/imgsUpload/imgs-upload-wid.vue +149 -0
  74. package/components/BTXUI/index.js +83 -0
  75. package/components/BTXUI/pageFlip/page-flip-wid.vue +206 -0
  76. package/components/BTXUI/pannel/pannel-wid.vue +167 -0
  77. package/components/BTXUI/range/range-wid.vue +134 -0
  78. package/components/BTXUI/search/search-wid.vue +80 -0
  79. package/components/BTXUI/select/select-wid.vue +186 -0
  80. package/components/BTXUI/slider/slider-wid.vue +444 -0
  81. package/components/BTXUI/tab/tab-wid.vue +109 -0
  82. package/components/BTXUI/table/table-wid.vue +324 -0
  83. package/components/BTXUI/tag/tag-wid.vue +183 -0
  84. package/components/BTXUI/tags/tags-wid.vue +121 -0
  85. package/components/BTXUI/tooltip/tooltip-wid.vue +146 -0
  86. package/components/BTXUI/upload/upload-wid.vue +215 -0
  87. package/components/BTXUI/waterfall/waterfall-wid.vue +166 -0
  88. package/components/header-info.vue +167 -0
  89. package/composables/@types.ts +4 -0
  90. package/composables/api.ts +18 -0
  91. package/env.d.ts +5 -0
  92. package/main.js +6 -0
  93. package/nuxt.config.ts +51 -0
  94. package/package.json +23 -0
  95. package/pages/article.vue +16 -0
  96. package/pages/download.vue +50 -0
  97. package/pages/example/app_wid/app/data_demo.vue +9 -0
  98. package/pages/example/app_wid/app/download_demo.vue +9 -0
  99. package/pages/example/app_wid/app/list_demo.vue +11 -0
  100. package/pages/example/app_wid/app/system_demo.vue +9 -0
  101. package/pages/example/app_wid/app_wid_demo.vue +198 -0
  102. package/pages/example/app_wid/btn_wid_demo.vue +179 -0
  103. package/pages/example/app_wid/carousel_wid_demo.vue +152 -0
  104. package/pages/example/app_wid/checkbox_wid_demo.vue +65 -0
  105. package/pages/example/app_wid/confirm_wid_demo.vue +197 -0
  106. package/pages/example/app_wid/content_wid_demo.vue +369 -0
  107. package/pages/example/app_wid/drawer_wid_demo.vue +155 -0
  108. package/pages/example/app_wid/form_pannel_wid_demo.vue +338 -0
  109. package/pages/example/app_wid/form_wid_demo.vue +550 -0
  110. package/pages/example/app_wid/imgs_upload_wid_demo.vue +159 -0
  111. package/pages/example/app_wid/index.js +158 -0
  112. package/pages/example/app_wid/page_flip_wid_demo.vue +99 -0
  113. package/pages/example/app_wid/pannel_wid_demo.vue +177 -0
  114. package/pages/example/app_wid/range_wid_demo.vue +101 -0
  115. package/pages/example/app_wid/search_wid_demo.vue +75 -0
  116. package/pages/example/app_wid/select_wid_demo.vue +217 -0
  117. package/pages/example/app_wid/slider_wid_demo.vue +143 -0
  118. package/pages/example/app_wid/tab_wid_demo.vue +170 -0
  119. package/pages/example/app_wid/table_wid_demo.vue +377 -0
  120. package/pages/example/app_wid/tag_wid_demo.vue +133 -0
  121. package/pages/example/app_wid/tags_wid_demo.vue +143 -0
  122. package/pages/example/app_wid/tooltip_wid_demo.vue +117 -0
  123. package/pages/example/app_wid/upload_wid_demo.vue +123 -0
  124. package/pages/example/base_wid/b_drag_demo.vue +159 -0
  125. package/pages/example/base_wid/b_grid_demo.vue +225 -0
  126. package/pages/example/base_wid/b_hot_demo.vue +135 -0
  127. package/pages/example/base_wid/b_icon_demo.vue +80 -0
  128. package/pages/example/base_wid/b_img_demo.vue +95 -0
  129. package/pages/example/base_wid/b_input_demo.vue +171 -0
  130. package/pages/example/base_wid/b_list_demo.vue +241 -0
  131. package/pages/example/base_wid/b_style_demo.vue +928 -0
  132. package/pages/example/base_wid/b_text_demo.vue +36 -0
  133. package/pages/example/base_wid/b_textarea_demo.vue +64 -0
  134. package/pages/example/base_wid/b_video_demo.vue +42 -0
  135. package/pages/example/base_wid/b_view_demo.vue +36 -0
  136. package/pages/example/base_wid/index.js +76 -0
  137. package/pages/example/content.js +49 -0
  138. package/pages/example/global_style/animation.vue +197 -0
  139. package/pages/example/global_style/color.vue +134 -0
  140. package/pages/example/global_style/decoration.vue +546 -0
  141. package/pages/example/global_style/icon.vue +345 -0
  142. package/pages/example/global_style/index.js +52 -0
  143. package/pages/example/global_style/layout.vue +846 -0
  144. package/pages/example/global_style/special.vue +37 -0
  145. package/pages/example/global_style/table.vue +298 -0
  146. package/pages/example/global_style/text.vue +159 -0
  147. package/pages/index.vue +29 -0
  148. package/pages/level_widget.vue +11 -0
  149. package/pages/start.vue +200 -0
  150. package/plugins/index.ts +2 -0
  151. package/public/favicon.gif +0 -0
  152. package/public/fonts/iconfont.ttf +0 -0
  153. package/public/fonts/iconfont.woff +0 -0
  154. package/public/fonts/iconfont.woff2 +0 -0
  155. package/public/img/banner.jpg +0 -0
  156. package/public/img/banner2.jpg +0 -0
  157. package/public/img/bg_pattern.png +0 -0
  158. package/public/img/btx.jpg +0 -0
  159. package/public/img/btx_ui.jpg +0 -0
  160. package/public/img/dir.png +0 -0
  161. package/public/img/f.png +0 -0
  162. package/public/img/head.jpg +0 -0
  163. package/public/img/head2.jpg +0 -0
  164. package/public/img/home_ico.png +0 -0
  165. package/public/img/icons.svg +164 -0
  166. package/public/img/mechanism/b-style.png +0 -0
  167. package/public/img/mechanism/slider-wid.png +0 -0
  168. package/public/img/mechanism/upload-wid.png +0 -0
  169. package/public/img/transform_origin.png +0 -0
  170. package/sass/animation.scss +400 -0
  171. package/sass/btx.mob.scss +10 -0
  172. package/sass/btx.pad.scss +3 -0
  173. package/sass/btx.scss +22 -0
  174. package/sass/btx.webapp.scss +22 -0
  175. package/sass/colors.scss +65 -0
  176. package/sass/decoration.scss +220 -0
  177. package/sass/flex.scss +29 -0
  178. package/sass/icons.scss +100 -0
  179. package/sass/layout.scss +88 -0
  180. package/sass/reset.scss +111 -0
  181. package/sass/response/flex_mixin.scss +91 -0
  182. package/sass/response/layout_mixin.scss +227 -0
  183. package/sass/response/main.scss +59 -0
  184. package/sass/response/text_mixin.scss +65 -0
  185. package/sass/scroll.scss +100 -0
  186. package/sass/special.scss +13 -0
  187. package/sass/table.scss +103 -0
  188. package/sass/text.scss +86 -0
  189. package/sass/webpack.config.js +31 -0
  190. package/tsconfig.json +4 -0
@@ -0,0 +1,550 @@
1
+ <template>
2
+ <article>
3
+ <header-info v-bind="header_info" />
4
+
5
+ <!--基础使用-->
6
+ <section>
7
+ <h5>基础使用</h5>
8
+ <p>通过 <code>v-model</code> 可以初始化及双向绑定表单选取数据。其次可以使用 <code>form-data</code> 属性,对表单元素进行常规设置:<b>name</b> 设置数据字段键名、<b>placeholder</b> 设置提示文字、<b>maxlength</b> 设置最大字符数、<b>readonly</b> 内容只读。</p>
9
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
10
+ <form-wid :form-data="data_1.data" v-model="data_1.selected" />
11
+ </div>
12
+ <p class="flex resize">
13
+ <btn-wid btnText="设置密码" @on_click="$_set_pwd1" />
14
+ </p>
15
+ <p>当前所选数据:<code class="mrg-r-d5" v-for="(val, key) of data_1.selected"><b>{{key}}</b>:{{val}}</code></p>
16
+ <hr>
17
+ <p></p>
18
+ </section>
19
+
20
+ <!--表单元素图标标题-->
21
+ <section>
22
+ <h5>表单元素图标标题</h5>
23
+ <p>通过 <code>layout</code> 属性的 <b>title_width</b> 字段可以设置表单项标题的固定宽度;通过 <code>form-data</code> 属性的 <b>icon</b> 字段可以设置表单项标题图标,标题图标和标题可以同时存在。</p>
24
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
25
+ <form-wid :form-data="dataList_2.data" :layout="dataList_2.layout" v-model="dataList_2.selected" />
26
+ </div>
27
+ <p>当前所选数据:<code class="mrg-r-d5" v-for="(val, key) of dataList_2.selected"><b>{{key}}</b>:{{val}}</code></p>
28
+ <hr>
29
+ <p></p>
30
+ </section>
31
+
32
+ <!--表单元素标题折行-->
33
+ <section>
34
+ <h5>表单元素标题折行</h5>
35
+ <p>通过 <code>layout</code> 属性的 <b>title_wrap</b> 字段可以设置表单项标题折行。</p>
36
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
37
+ <form-wid :form-data="dataList_3.data" :layout="dataList_3.layout" v-model="dataList_3.selected" />
38
+ </div>
39
+ <p>当前所选数据:<code class="mrg-r-d5" v-for="(val, key) of dataList_3.selected"><b>{{key}}</b>:{{val}}</code></p>
40
+ <hr>
41
+ <p></p>
42
+ </section>
43
+
44
+ <!--其它表单元素及提交-->
45
+ <section>
46
+ <h5>其它表单元素及提交</h5>
47
+ <p>通过 <code>submit</code> 属性可设置表单"提交"按钮和其对齐方式,以及点击操作所执行的回调函数,函数中自变量为表单选择数据。<b>btnColor</b> 字段可以设置按钮颜色风格。(可参考:<code>btn-wid</code> 组件入参)。通过 <code>reset</code> 属性可设置表单"恢复"按钮,初始化表单元素数据。</p>
48
+ <p>通过 <code>select</code> 属性可设置下拉框表单元素;<code>input_data</code> 属性 <b>type="textarea"</b> 可设置多行文本输入表单元素;<code>imgs</code> 属性可设置图片上传。</p>
49
+ <p>通过 <code>colors</code> 属性可设置输入型表单元素及下拉列表的颜色风格,包括常规(normal)和激活(focus)两种状态。注:下拉列表无激活状态。通过 <code>baseLine</code> 属性可设置基线模式,一旦使用 <code>colors</code> 属性的 <b>line</b> 字段仅影响下划线颜色。</p>
50
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
51
+ <form-wid v-bind="data_4.props" v-model="data_4.selected" />
52
+ </div>
53
+ <p>表单提交数据:<code class="mrg-r-d5" v-for="(val, key) of data_4.submit_data"><b>{{key}}</b>:{{val}}</code></p>
54
+ <hr>
55
+ <p></p>
56
+ </section>
57
+
58
+ <!--表单验证-->
59
+ <section>
60
+ <h5>表单验证</h5>
61
+ <p>通过 <b>input-wid</b> 组件的 <code>rule</code> 属性可设置表单项验证,当执行表单"提交"时会包含验证信息以供回调处理。</p>
62
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
63
+ <form-wid :form-data="dataList_5.data" :layout="dataList_5.layout" :submit="dataList_5.submit" v-model="dataList_5.selected" />
64
+ </div>
65
+ <p>表单提交数据:<code class="mrg-r-d5" v-for="(val, key) of dataList_5.submit_data"><b>{{key}}</b>:{{val}}</code></p>
66
+ <hr>
67
+ <p></p>
68
+ </section>
69
+
70
+ <!--表单项只读-->
71
+ <section>
72
+ <h5>表单项只读</h5>
73
+ <p>通过 <b>input-wid</b> 组件的 <code>readonly</code> 属性可设置表单项只读,此外通过 API <code>set_only_read</code> 和 <code>set_write</code> 方法可以动态设置表单项只读或可写。</p>
74
+ <div class="resize bg-color-lgray pad-v-1 pad-h-2 round-sm">
75
+ <form-wid ref="form6" v-bind="data_6.props" v-model="data_6.selected" />
76
+ </div>
77
+ <div class="flex resize mrg-t-1">
78
+ <btn-wid btnText="设置账号只读" @on_click="$_set_form6_readonly" />
79
+ <div class="mrg-l-1">
80
+ <btn-wid btnText="设置账号可写" @on_click="$_set_form6_write" />
81
+ </div>
82
+ </div>
83
+ <p>当前所选数据:<code class="mrg-r-d5" v-for="(val, key) of data_6.selected"><b>{{key}}</b>:{{val}}</code></p>
84
+ </section>
85
+
86
+ </article>
87
+ </template>
88
+
89
+ <script>
90
+ import HeaderInfo from "@/components/header-info"
91
+ import FormWid from "@/components/BTXUI/form/form-wid"
92
+ import BtnWid from "@/components/BTXUI/btn/btn-wid"
93
+ import server from "@/assets/server.js"
94
+
95
+ const uploadApi = server.apis.upload;
96
+
97
+ export default {
98
+ name: "form_pannel_wid_demo",
99
+ components: {
100
+ HeaderInfo,
101
+ FormWid,
102
+ BtnWid
103
+ },
104
+ data(){
105
+ return {
106
+
107
+ //初始化入参
108
+ header_info: {
109
+ name: FormWid.name,
110
+ ...FormWid.introduce,
111
+ },
112
+
113
+ data_1: {
114
+ data: [
115
+ {
116
+ input_data: {
117
+ type: "text",
118
+ name: "uname",
119
+ placeholder: "请输入英文字母、下划线或数字"
120
+ },
121
+ text: "账号",
122
+ },
123
+ {
124
+ input_data: {
125
+ type: "password",
126
+ name: "pwd",
127
+ maxlength: 6,
128
+ placeholder: "请输入您的账号密码"
129
+ },
130
+ text: "密码",
131
+ },
132
+ {
133
+ input_data: {
134
+ type: "text",
135
+ name: "license",
136
+ readonly: true
137
+ },
138
+ text: "串号",
139
+ },
140
+ ],
141
+ selected: {
142
+ uname: "administrator",
143
+ license: 745829
144
+ },
145
+ },
146
+
147
+ dataList_2: {
148
+ data: [
149
+ {
150
+ input_data: {
151
+ type: "text",
152
+ name: "uname",
153
+ placeholder: "请输入英文字母、下划线或数字"
154
+ },
155
+ icon: "user",
156
+ text: "账号",
157
+ },
158
+ {
159
+ input_data: {
160
+ type: "text",
161
+ name: "tel",
162
+ maxlength: 11,
163
+ placeholder: "请填写您的手机号"
164
+ },
165
+ icon: "mobile",
166
+ },
167
+ {
168
+ input_data: {
169
+ type: "password",
170
+ name: "pwd",
171
+ maxlength: 6,
172
+ placeholder: "请输入您的账号密码"
173
+ },
174
+ text: "密码",
175
+ },
176
+ ],
177
+ layout: {
178
+ title_width: 7
179
+ },
180
+ selected: {},
181
+ },
182
+
183
+ dataList_3: {
184
+ data: [
185
+ {
186
+ input_data: {
187
+ type: "text",
188
+ name: "uname",
189
+ placeholder: "请输入英文字母、下划线或数字"
190
+ },
191
+ text: "账号",
192
+ },
193
+ {
194
+ input_data: {
195
+ type: "text",
196
+ name: "tel",
197
+ maxlength: 11,
198
+ placeholder: "请填写您的手机号"
199
+ },
200
+ text: "手机号",
201
+ },
202
+ {
203
+ input_data: {
204
+ type: "password",
205
+ name: "pwd",
206
+ maxlength: 6,
207
+ placeholder: "请输入您的账号密码"
208
+ },
209
+ text: "密码",
210
+ },
211
+ ],
212
+ layout: {
213
+ title_wrap: true
214
+ },
215
+ selected: {},
216
+ },
217
+
218
+ data_4: {
219
+ props: {
220
+ formData: [
221
+ {
222
+ imgs: {
223
+ name: "cover",
224
+ imgs_upload_data: {}
225
+ },
226
+ text: "头像",
227
+ },
228
+ {
229
+ input_data: {
230
+ type: "text",
231
+ name: "uname",
232
+ placeholder: "请输入英文字母、下划线或数字",
233
+ rule: {
234
+ type: "uname",
235
+ notic: "账号输入内容不合法"
236
+ }
237
+ },
238
+ text: "账号",
239
+ },
240
+ {
241
+ select: {
242
+ name: "city",
243
+ select_data: {
244
+ listData: [
245
+ {
246
+ text: "北京",
247
+ val: "bj"
248
+ },
249
+ {
250
+ text: "上海",
251
+ val: "sh"
252
+ },
253
+ {
254
+ text: "深圳",
255
+ val: "sz"
256
+ }
257
+ ],
258
+ placeholder: "请选择所在城市",
259
+ colors: {
260
+ text: "mgray"
261
+ }
262
+ }
263
+ },
264
+ text: "所在城市",
265
+ },
266
+ {
267
+ input_data: {
268
+ type: "text",
269
+ name: "zh_name",
270
+ placeholder: "请输入真实中文名",
271
+ rule: {
272
+ type: "zh"
273
+ }
274
+ },
275
+ text: "真实姓名",
276
+ },
277
+ {
278
+ input_data: {
279
+ type: "textarea",
280
+ name: "about",
281
+ placeholder: "请输入个人简介...",
282
+ rows: 5
283
+ },
284
+ text: "关于自己",
285
+ }
286
+ ],
287
+ layout: {
288
+ title_width: 10
289
+ },
290
+ submit: {
291
+ callback: (form_data)=>{
292
+ let result = {},
293
+ val;
294
+ for(let pro in form_data){
295
+ val = form_data[pro];
296
+ if(val) result[pro] = val;
297
+ }
298
+ if(!Object.values(result).join("")) result = { result: "暂无数据" };
299
+ this.data_4.submit_data = result;
300
+ },
301
+ btn_data: {
302
+ btnText: "提交表单",
303
+ btnColor: {
304
+ normal: {
305
+ text: "dgray",
306
+ bg: "light",
307
+ line: "none",
308
+ },
309
+ hover: {
310
+ text: "light",
311
+ bg: "blue",
312
+ line: "none",
313
+ },
314
+ }
315
+ },
316
+ reset: true
317
+ },
318
+ baseLine: true,
319
+ colors: {
320
+ normal: {
321
+ text: "mgray",
322
+ bg: "none",
323
+ line: "neutral",
324
+ },
325
+ focus: {
326
+ text: "blue",
327
+ bg: "light",
328
+ }
329
+ }
330
+ },
331
+ selected: {
332
+ uname: "Steve Jobs"
333
+ },
334
+ submit_data: {}
335
+ },
336
+
337
+ dataList_5: {
338
+ data: [
339
+ {
340
+ input_data: {
341
+ type: "text",
342
+ name: "uname",
343
+ placeholder: "请输入英文字母、下划线或数字",
344
+ rule: {
345
+ type: "uname",
346
+ notic: "账号输入内容不合法"
347
+ }
348
+ },
349
+ text: "账号",
350
+ },
351
+ {
352
+ input_data: {
353
+ type: "text",
354
+ name: "zh_name",
355
+ placeholder: "请输入真实中文名",
356
+ rule: {
357
+ type: "zh"
358
+ }
359
+ },
360
+ text: "真实姓名",
361
+ },
362
+ {
363
+ input_data: {
364
+ type: "text",
365
+ name: "uid",
366
+ placeholder: "请输入身份证号",
367
+ rule: {
368
+ type: "uid"
369
+ }
370
+ },
371
+ text: "身份证号",
372
+ },
373
+ {
374
+ input_data: {
375
+ type: "text",
376
+ name: "email",
377
+ placeholder: "请输入您的邮箱",
378
+ rule: {
379
+ type: "email"
380
+ }
381
+ },
382
+ text: "邮箱",
383
+ },
384
+ {
385
+ input_data: {
386
+ type: "text",
387
+ name: "url",
388
+ placeholder: "请输入您的个人网址",
389
+ rule: {
390
+ type: "url"
391
+ }
392
+ },
393
+ text: "网址",
394
+ },
395
+ {
396
+ input_data: {
397
+ type: "text",
398
+ name: "tel",
399
+ placeholder: "请输入您的手机号",
400
+ maxlength: 11,
401
+ rule: {
402
+ type: "tel"
403
+ }
404
+ },
405
+ text: "手机号",
406
+ },
407
+ {
408
+ input_data: {
409
+ type: "text",
410
+ name: "creed",
411
+ placeholder: "请输入您的座右铭",
412
+ rule: {
413
+ type: "required"
414
+ }
415
+ },
416
+ text: "座右铭",
417
+ },
418
+ {
419
+ input_data: {
420
+ type: "text",
421
+ name: "recommend",
422
+ placeholder: "请输入至少两个推荐人,以顿号相隔",
423
+ rule: {
424
+ type: /\w+(、\w)+/,
425
+ notic: "推荐人格式有误!"
426
+ }
427
+ },
428
+ text: "推荐人"
429
+ },
430
+ ],
431
+ selected: {},
432
+ layout: {
433
+ title_width: 10
434
+ },
435
+ submit: {
436
+ callback: (form_data, check_result)=>{
437
+ let notics = Object.values(check_result),
438
+ result = {},
439
+ val;
440
+ if(notics.length){
441
+ this.$confirm.toast(notics[0], 2000, "fail");
442
+ }else{
443
+ for(let pro in form_data){
444
+ val = form_data[pro];
445
+ if(val) result[pro] = val;
446
+ }
447
+ this.dataList_5.submit_data = result;
448
+ }
449
+ },
450
+ align: "center",
451
+ btn_data: {
452
+ btnText: "提交表单",
453
+ btnColor: {
454
+ normal: {
455
+ text: "#fff",
456
+ bg: "dgray",
457
+ line: "none",
458
+ },
459
+ hover: {
460
+ text: "light",
461
+ bg: "blue",
462
+ line: "none",
463
+ }
464
+ },
465
+ btnWidth: 14,
466
+ btnRound: true
467
+ },
468
+ },
469
+ submit_data: {}
470
+ },
471
+
472
+ data_6: {
473
+ props: {
474
+ formData: [
475
+ {
476
+ input_data: {
477
+ type: "text",
478
+ name: "uname",
479
+ placeholder: "请输入英文字母、下划线或数字",
480
+ rule: {
481
+ type: "uname",
482
+ notic: "账号输入内容不合法"
483
+ }
484
+ },
485
+ text: "账号",
486
+ },
487
+ {
488
+ input_data: {
489
+ type: "text",
490
+ name: "zh_name",
491
+ placeholder: "请输入真实中文名",
492
+ rule: {
493
+ type: "zh"
494
+ }
495
+ },
496
+ text: "真实姓名",
497
+ },
498
+ {
499
+ input_data: {
500
+ type: "text",
501
+ name: "uid",
502
+ placeholder: "请输入身份证号",
503
+ readonly: true,
504
+ rule: {
505
+ type: "uid"
506
+ }
507
+ },
508
+ text: "身份证号",
509
+ }
510
+ ],
511
+ colors: {
512
+ normal: {
513
+ text: "dgray",
514
+ bg: "light"
515
+ },
516
+ focus: {
517
+ text: "blue",
518
+ bg: "rgba(255,255,255,.5)"
519
+ }
520
+ },
521
+ layout: {
522
+ title_width: 10
523
+ },
524
+ },
525
+ selected: {uid: "510122198708103372"},
526
+ },
527
+
528
+ }
529
+ },
530
+ methods: {
531
+
532
+ $_set_pwd1(){
533
+ this.data_1.selected = {
534
+ uname: "administrator",
535
+ pwd: "123456",
536
+ license: 745829
537
+ };
538
+ },
539
+
540
+ $_set_form6_readonly(){
541
+ this.$refs.form6.set_only_read("uname");
542
+ },
543
+
544
+ $_set_form6_write(){
545
+ this.$refs.form6.set_write("uname");
546
+ }
547
+
548
+ }
549
+ }
550
+ </script>