br-dionysus 1.7.2 → 1.7.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.
package/.eslintrc.cjs CHANGED
@@ -88,7 +88,7 @@ module.exports = {
88
88
  'vue/use-v-on-exact': 'error',
89
89
  // 强制执行有效的nextTick函数调用
90
90
  'vue/valid-next-tick': 'error',
91
- 'vue/valid-attribute-name': 'error',
91
+ 'vue/valid-attribute-name': 'warn',
92
92
  'vue/return-in-emits-validator': 'warn',
93
93
  // template必须有内容
94
94
  'vue/valid-template-root': 'error',
@@ -105,7 +105,8 @@ module.exports = {
105
105
  'vue/valid-v-once': 'error',
106
106
  'vue/valid-v-pre': 'error',
107
107
  'vue/valid-v-show': 'error',
108
- 'vue/valid-v-slot': 'error',
108
+ // 执行有效v-slot指令 标记,关闭此规则,组件需允许非法操作
109
+ 'vue/valid-v-slot': 'off',
109
110
  'vue/valid-v-text': 'error',
110
111
  'vue/no-parsing-error': [
111
112
  2, {
package/README.md CHANGED
@@ -48,7 +48,7 @@
48
48
  <div>
49
49
  <p>弹窗</p>
50
50
  <el-button @click="open">默认</el-button>
51
- <m-dialog
51
+ <MDialog
52
52
  v-model="dialogVisible"
53
53
  draggable
54
54
  title="这是标题"
@@ -67,14 +67,19 @@
67
67
  <template #footer>
68
68
  <div class="dialog-footer">
69
69
  <el-button @click="dialogVisible = false">取消</el-button>
70
- <el-button type="primary" @click="dialogVisible = false">确认</el-button>
70
+ <el-button
71
+ type="primary"
72
+ @click="dialogVisible = false"
73
+ >
74
+ 确认
75
+ </el-button>
71
76
  </div>
72
77
  </template>
73
- </m-dialog>
78
+ </MDialog>
74
79
 
75
80
  <p>设置弹窗高(弹框高度为{{ insideHeight }})</p>
76
81
  <el-button @click="open2">设置容器高度为300px</el-button>
77
- <m-dialog
82
+ <MDialog
78
83
  v-model="dialogVisible2"
79
84
  draggable
80
85
  title="这是标题"
@@ -91,19 +96,24 @@
91
96
  useRemainingSpace计算高度{{ height }}
92
97
  </p>
93
98
  <div>这是干扰元素</div>
94
- <div class="u-pa">这是绝对<br/>定位元素</div>
99
+ <div class="u-pa">这是绝对<br />定位元素</div>
95
100
  </div>
96
101
  <template #footer>
97
102
  <div class="dialog-footer">
98
103
  <el-button @click="dialogVisible2 = false">取消</el-button>
99
- <el-button type="primary" @click="dialogVisible2 = false">确认</el-button>
104
+ <el-button
105
+ type="primary"
106
+ @click="dialogVisible2 = false"
107
+ >
108
+ 确认
109
+ </el-button>
100
110
  </div>
101
111
  </template>
102
- </m-dialog>
112
+ </MDialog>
103
113
 
104
114
  <p>设置弹窗高对话框的最小高度(弹框高度为{{ insideHeight3 }})</p>
105
115
  <el-button @click="open3">对话框的最小高度为100px</el-button>
106
- <m-dialog
116
+ <MDialog
107
117
  v-model="dialogVisible3"
108
118
  draggable
109
119
  title="这是标题"
@@ -116,10 +126,15 @@
116
126
  <template #footer>
117
127
  <div class="dialog-footer">
118
128
  <el-button @click="dialogVisible3 = false">取消</el-button>
119
- <el-button type="primary" @click="dialogVisible3 = false">确认</el-button>
129
+ <el-button
130
+ type="primary"
131
+ @click="dialogVisible3 = false"
132
+ >
133
+ 确认
134
+ </el-button>
120
135
  </div>
121
136
  </template>
122
- </m-dialog>
137
+ </MDialog>
123
138
  </div>
124
139
  </template>
125
140
 
@@ -139,7 +154,7 @@ const showText = ref<boolean>(false)
139
154
 
140
155
  const dialogVisible2 = ref<boolean>(false)
141
156
  const test = (size: { width: number, height: number }) => {
142
- // console.log('size', size)
157
+ console.log('size', size)
143
158
  }
144
159
  const { height, init } = useRemainingSpace('j-box', 'j-table')
145
160
  const opened = () => {
@@ -153,7 +168,7 @@ const open2 = () => {
153
168
 
154
169
  const dialogVisible3 = ref<boolean>(false)
155
170
  const insideHeight3 = ref<number>(0)
156
- const minHeight = ref<number>(0)
171
+ // const minHeight = ref<number>(0)
157
172
  const minInsideHeight = ref<number>(0)
158
173
  const open3 = () => {
159
174
  minInsideHeight.value = 100
@@ -655,7 +670,7 @@ setTimeout(() => {
655
670
  }, 1000)
656
671
 
657
672
  const selected = (value: string | number | Array<number | string>) => {
658
- // console.log(value)
673
+ console.log(value)
659
674
  // code.value = value
660
675
  // console.log('selected',value)
661
676
  // // console.log('selected', row)
@@ -851,6 +866,7 @@ const clearCall = (e: any) => {
851
866
  console.log('!@#@#')
852
867
  }
853
868
  const remoteMethod = async (query: string = '', page: Page) => {
869
+ console.log('query', query)
854
870
  console.log('page', page)
855
871
  options.value = mockData.map(item => ({
856
872
  label: item.fileName,
@@ -1015,7 +1031,9 @@ const options: Option[] = [{
1015
1031
  type="expand"
1016
1032
  width="1"
1017
1033
  >
1018
- <template #default>
1034
+ <template #default="props">
1035
+ <h1>index{{ props.index }}</h1>
1036
+ <h1>$index{{ props.$index }}</h1>
1019
1037
  <h1>测试</h1>
1020
1038
  </template>
1021
1039
  </MTableColumn>
@@ -1090,9 +1108,9 @@ const privateExpandChange = (row: any, expandedRows: any[]) => {
1090
1108
  console.log('expandedRows', expandedRows)
1091
1109
  }
1092
1110
 
1093
- const test = (data: any) => {
1094
- console.log('data', data)
1095
- }
1111
+ // const test = (data: any) => {
1112
+ // console.log('data', data)
1113
+ // }
1096
1114
 
1097
1115
  const tableData = ref<any[]>([])
1098
1116
  const { tableTitle, headerDragend, tableConfig, filtersValue } = useTableConfig('MTableDemo', [{
@@ -1114,24 +1132,24 @@ const { tableTitle, headerDragend, tableConfig, filtersValue } = useTableConfig(
1114
1132
  minWidth: 200
1115
1133
  }], tableData)
1116
1134
 
1117
- const childTableTitle: TableTitle[] = [{
1118
- label: '序号',
1119
- prop: 'sn',
1120
- minWidth: 200,
1121
- fixed: 'left'
1122
- }, {
1123
- label: '时间',
1124
- prop: 'date',
1125
- minWidth: 200
1126
- }, {
1127
- label: '地址',
1128
- prop: 'address',
1129
- minWidth: 200
1130
- }, {
1131
- label: '名称',
1132
- prop: 'name',
1133
- minWidth: 200
1134
- }]
1135
+ // const childTableTitle: TableTitle[] = [{
1136
+ // label: '序号',
1137
+ // prop: 'sn',
1138
+ // minWidth: 200,
1139
+ // fixed: 'left'
1140
+ // }, {
1141
+ // label: '时间',
1142
+ // prop: 'date',
1143
+ // minWidth: 200
1144
+ // }, {
1145
+ // label: '地址',
1146
+ // prop: 'address',
1147
+ // minWidth: 200
1148
+ // }, {
1149
+ // label: '名称',
1150
+ // prop: 'name',
1151
+ // minWidth: 200
1152
+ // }]
1135
1153
 
1136
1154
  tableData.value = [{
1137
1155
  id: 1,
@@ -1155,14 +1173,14 @@ tableData.value = [{
1155
1173
  date: '2016-05-02',
1156
1174
  name: 'Tom21',
1157
1175
  address: 'No. 189, Grove St, Los Angeles',
1158
- tag: 'Office',
1176
+ tag: 'Office'
1159
1177
  }, {
1160
1178
  id: 22,
1161
1179
  sn: 2,
1162
1180
  date: '2016-05-02',
1163
1181
  name: 'Tom22',
1164
1182
  address: 'No. 189, Grove St, Los Angeles',
1165
- tag: 'Office',
1183
+ tag: 'Office'
1166
1184
  }]
1167
1185
  }, {
1168
1186
  id: 3,
@@ -1242,9 +1260,7 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
1242
1260
 
1243
1261
  <template>
1244
1262
  <div class="g-box">
1245
- <el-table
1246
- :data="tableData"
1247
- >
1263
+ <el-table :data="tableData">
1248
1264
  <MTableColumn
1249
1265
  v-for="item in tableTitle"
1250
1266
  :key="item.prop"
@@ -1470,7 +1486,8 @@ const tableConfig = ref({
1470
1486
  <ul>
1471
1487
  <li
1472
1488
  class="u-li"
1473
- v-for="item in list"
1489
+ v-for="(item, index) in list"
1490
+ :key="index"
1474
1491
  :class="item.className"
1475
1492
  >
1476
1493
  {{ item.name }}
@@ -2332,7 +2349,7 @@ const list = ref<{ name: string, className: string }[]>([
2332
2349
  <div>
2333
2350
  <p>弹窗</p>
2334
2351
  <el-button @click="open">默认</el-button>
2335
- <m-dialog
2352
+ <MDialog
2336
2353
  v-model="dialogVisible"
2337
2354
  draggable
2338
2355
  title="这是标题"
@@ -2351,14 +2368,19 @@ const list = ref<{ name: string, className: string }[]>([
2351
2368
  <template #footer>
2352
2369
  <div class="dialog-footer">
2353
2370
  <el-button @click="dialogVisible = false">取消</el-button>
2354
- <el-button type="primary" @click="dialogVisible = false">确认</el-button>
2371
+ <el-button
2372
+ type="primary"
2373
+ @click="dialogVisible = false"
2374
+ >
2375
+ 确认
2376
+ </el-button>
2355
2377
  </div>
2356
2378
  </template>
2357
- </m-dialog>
2379
+ </MDialog>
2358
2380
 
2359
2381
  <p>设置弹窗高(弹框高度为{{ insideHeight }})</p>
2360
2382
  <el-button @click="open2">设置容器高度为300px</el-button>
2361
- <m-dialog
2383
+ <MDialog
2362
2384
  v-model="dialogVisible2"
2363
2385
  draggable
2364
2386
  title="这是标题"
@@ -2375,19 +2397,24 @@ const list = ref<{ name: string, className: string }[]>([
2375
2397
  useRemainingSpace计算高度{{ height }}
2376
2398
  </p>
2377
2399
  <div>这是干扰元素</div>
2378
- <div class="u-pa">这是绝对<br/>定位元素</div>
2400
+ <div class="u-pa">这是绝对<br />定位元素</div>
2379
2401
  </div>
2380
2402
  <template #footer>
2381
2403
  <div class="dialog-footer">
2382
2404
  <el-button @click="dialogVisible2 = false">取消</el-button>
2383
- <el-button type="primary" @click="dialogVisible2 = false">确认</el-button>
2405
+ <el-button
2406
+ type="primary"
2407
+ @click="dialogVisible2 = false"
2408
+ >
2409
+ 确认
2410
+ </el-button>
2384
2411
  </div>
2385
2412
  </template>
2386
- </m-dialog>
2413
+ </MDialog>
2387
2414
 
2388
2415
  <p>设置弹窗高对话框的最小高度(弹框高度为{{ insideHeight3 }})</p>
2389
2416
  <el-button @click="open3">对话框的最小高度为100px</el-button>
2390
- <m-dialog
2417
+ <MDialog
2391
2418
  v-model="dialogVisible3"
2392
2419
  draggable
2393
2420
  title="这是标题"
@@ -2400,10 +2427,15 @@ const list = ref<{ name: string, className: string }[]>([
2400
2427
  <template #footer>
2401
2428
  <div class="dialog-footer">
2402
2429
  <el-button @click="dialogVisible3 = false">取消</el-button>
2403
- <el-button type="primary" @click="dialogVisible3 = false">确认</el-button>
2430
+ <el-button
2431
+ type="primary"
2432
+ @click="dialogVisible3 = false"
2433
+ >
2434
+ 确认
2435
+ </el-button>
2404
2436
  </div>
2405
2437
  </template>
2406
- </m-dialog>
2438
+ </MDialog>
2407
2439
  </div>
2408
2440
  </template>
2409
2441
 
@@ -2423,7 +2455,7 @@ const showText = ref<boolean>(false)
2423
2455
 
2424
2456
  const dialogVisible2 = ref<boolean>(false)
2425
2457
  const test = (size: { width: number, height: number }) => {
2426
- // console.log('size', size)
2458
+ console.log('size', size)
2427
2459
  }
2428
2460
  const { height, init } = useRemainingSpace('j-box', 'j-table')
2429
2461
  const opened = () => {
@@ -2437,7 +2469,7 @@ const open2 = () => {
2437
2469
 
2438
2470
  const dialogVisible3 = ref<boolean>(false)
2439
2471
  const insideHeight3 = ref<number>(0)
2440
- const minHeight = ref<number>(0)
2472
+ // const minHeight = ref<number>(0)
2441
2473
  const minInsideHeight = ref<number>(0)
2442
2474
  const open3 = () => {
2443
2475
  minInsideHeight.value = 100
@@ -2939,7 +2971,7 @@ setTimeout(() => {
2939
2971
  }, 1000)
2940
2972
 
2941
2973
  const selected = (value: string | number | Array<number | string>) => {
2942
- // console.log(value)
2974
+ console.log(value)
2943
2975
  // code.value = value
2944
2976
  // console.log('selected',value)
2945
2977
  // // console.log('selected', row)
@@ -3135,6 +3167,7 @@ const clearCall = (e: any) => {
3135
3167
  console.log('!@#@#')
3136
3168
  }
3137
3169
  const remoteMethod = async (query: string = '', page: Page) => {
3170
+ console.log('query', query)
3138
3171
  console.log('page', page)
3139
3172
  options.value = mockData.map(item => ({
3140
3173
  label: item.fileName,
@@ -3299,7 +3332,9 @@ const options: Option[] = [{
3299
3332
  type="expand"
3300
3333
  width="1"
3301
3334
  >
3302
- <template #default>
3335
+ <template #default="props">
3336
+ <h1>index{{ props.index }}</h1>
3337
+ <h1>$index{{ props.$index }}</h1>
3303
3338
  <h1>测试</h1>
3304
3339
  </template>
3305
3340
  </MTableColumn>
@@ -3374,9 +3409,9 @@ const privateExpandChange = (row: any, expandedRows: any[]) => {
3374
3409
  console.log('expandedRows', expandedRows)
3375
3410
  }
3376
3411
 
3377
- const test = (data: any) => {
3378
- console.log('data', data)
3379
- }
3412
+ // const test = (data: any) => {
3413
+ // console.log('data', data)
3414
+ // }
3380
3415
 
3381
3416
  const tableData = ref<any[]>([])
3382
3417
  const { tableTitle, headerDragend, tableConfig, filtersValue } = useTableConfig('MTableDemo', [{
@@ -3398,24 +3433,24 @@ const { tableTitle, headerDragend, tableConfig, filtersValue } = useTableConfig(
3398
3433
  minWidth: 200
3399
3434
  }], tableData)
3400
3435
 
3401
- const childTableTitle: TableTitle[] = [{
3402
- label: '序号',
3403
- prop: 'sn',
3404
- minWidth: 200,
3405
- fixed: 'left'
3406
- }, {
3407
- label: '时间',
3408
- prop: 'date',
3409
- minWidth: 200
3410
- }, {
3411
- label: '地址',
3412
- prop: 'address',
3413
- minWidth: 200
3414
- }, {
3415
- label: '名称',
3416
- prop: 'name',
3417
- minWidth: 200
3418
- }]
3436
+ // const childTableTitle: TableTitle[] = [{
3437
+ // label: '序号',
3438
+ // prop: 'sn',
3439
+ // minWidth: 200,
3440
+ // fixed: 'left'
3441
+ // }, {
3442
+ // label: '时间',
3443
+ // prop: 'date',
3444
+ // minWidth: 200
3445
+ // }, {
3446
+ // label: '地址',
3447
+ // prop: 'address',
3448
+ // minWidth: 200
3449
+ // }, {
3450
+ // label: '名称',
3451
+ // prop: 'name',
3452
+ // minWidth: 200
3453
+ // }]
3419
3454
 
3420
3455
  tableData.value = [{
3421
3456
  id: 1,
@@ -3439,14 +3474,14 @@ tableData.value = [{
3439
3474
  date: '2016-05-02',
3440
3475
  name: 'Tom21',
3441
3476
  address: 'No. 189, Grove St, Los Angeles',
3442
- tag: 'Office',
3477
+ tag: 'Office'
3443
3478
  }, {
3444
3479
  id: 22,
3445
3480
  sn: 2,
3446
3481
  date: '2016-05-02',
3447
3482
  name: 'Tom22',
3448
3483
  address: 'No. 189, Grove St, Los Angeles',
3449
- tag: 'Office',
3484
+ tag: 'Office'
3450
3485
  }]
3451
3486
  }, {
3452
3487
  id: 3,
@@ -3526,9 +3561,7 @@ sole 必须传递在表格数据内为唯一的值 如id key 等不会发生重
3526
3561
 
3527
3562
  <template>
3528
3563
  <div class="g-box">
3529
- <el-table
3530
- :data="tableData"
3531
- >
3564
+ <el-table :data="tableData">
3532
3565
  <MTableColumn
3533
3566
  v-for="item in tableTitle"
3534
3567
  :key="item.prop"
@@ -3754,7 +3787,8 @@ const tableConfig = ref({
3754
3787
  <ul>
3755
3788
  <li
3756
3789
  class="u-li"
3757
- v-for="item in list"
3790
+ v-for="(item, index) in list"
3791
+ :key="index"
3758
3792
  :class="item.className"
3759
3793
  >
3760
3794
  {{ item.name }}
@@ -1,6 +1,6 @@
1
1
  import { resolve } from 'path'
2
2
  import { defineConfig } from 'vite'
3
- // import eslint from 'vite-plugin-eslint'
3
+ import eslint from 'vite-plugin-eslint'
4
4
  import vue from '@vitejs/plugin-vue'
5
5
  import Markdown from 'vite-plugin-md'
6
6
  import VueDevTools from 'vite-plugin-vue-devtools'
@@ -17,7 +17,7 @@ export default defineConfig({
17
17
  vue({
18
18
  include: [/\.vue$/, /\.md$/]
19
19
  }),
20
- // eslint(),
20
+ eslint(),
21
21
  Markdown(),
22
22
  VueDevTools(),
23
23
  {
@@ -138,7 +138,7 @@ const createWebTypes = (vueComponents = []) => {
138
138
  contributions: {
139
139
  html: {
140
140
  'vue-components': vueComponents,
141
- attributes: attributes
141
+ attributes
142
142
  }
143
143
  }
144
144
  }
@@ -178,11 +178,11 @@ const main = () => {
178
178
  symbol: fileName
179
179
  },
180
180
  description: `这是一个${fileName}`,
181
- docUrl: docUrl,
181
+ docUrl,
182
182
  props: props.map(node => ({
183
183
  name: node.name,
184
184
  description: node.jsDoc,
185
- docUrl: docUrl,
185
+ docUrl,
186
186
  type: [
187
187
  `${node.type}`
188
188
  ]
@@ -191,7 +191,7 @@ const main = () => {
191
191
  events: events.map(node => ({
192
192
  name: node.name,
193
193
  description: node.jsDoc,
194
- docUrl: docUrl,
194
+ docUrl,
195
195
  type: [
196
196
  `${node.type}`
197
197
  ]
@@ -213,7 +213,7 @@ const main = () => {
213
213
 
214
214
  const filePath = item.fullPath
215
215
  const fileContent = fs.readFileSync(filePath, 'utf-8')
216
- const {descriptor} = parse(fileContent)
216
+ const { descriptor } = parse(fileContent)
217
217
  const fileName = item.name.substring(0, item.name.lastIndexOf('.vue'))
218
218
  if (!descriptor.scriptSetup) continue
219
219
  const { props, events } = analyzeScriptPart(descriptor.scriptSetup.content)
@@ -235,7 +235,7 @@ const main = () => {
235
235
 
236
236
  const filePath = item.fullPath
237
237
  const fileContent = fs.readFileSync(filePath, 'utf-8')
238
- const {descriptor} = parse(fileContent)
238
+ const { descriptor } = parse(fileContent)
239
239
  const fileName = item.name.substring(0, item.name.lastIndexOf('.vue'))
240
240
  if (!descriptor.scriptSetup) continue
241
241
  const { props, events } = analyzeScriptPart(descriptor.scriptSetup.content)