@opentiny/vue-docs 2.0.5 → 2.0.6
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/demos/app/alert/close-text-composition-api.vue +2 -3
- package/demos/app/alert/close-text.vue +2 -3
- package/demos/app/anchor/on-change-composition-api.vue +2 -3
- package/demos/app/anchor/on-change.vue +2 -3
- package/demos/app/dept/before-confirm-composition-api.vue +2 -3
- package/demos/app/dept/before-confirm.vue +2 -3
- package/demos/app/file-upload/abort-quest-composition-api.vue +2 -3
- package/demos/app/file-upload/abort-quest.vue +2 -3
- package/demos/app/file-upload/custom-prefix-composition-api.vue +3 -4
- package/demos/app/file-upload/custom-prefix.vue +3 -4
- package/demos/app/file-upload/custom-upload-request-composition-api.vue +2 -3
- package/demos/app/file-upload/custom-upload-request.vue +2 -3
- package/demos/app/file-upload/drag-upload-composition-api.vue +2 -3
- package/demos/app/file-upload/drag-upload.vue +2 -3
- package/demos/app/file-upload/jalor-request-composition-api.vue +2 -3
- package/demos/app/file-upload/jalor-request.vue +2 -3
- package/demos/app/file-upload/max-file-count-composition-api.vue +2 -3
- package/demos/app/file-upload/max-file-count.vue +2 -3
- package/demos/app/file-upload/prevent-delete-file-composition-api.vue +2 -3
- package/demos/app/file-upload/prevent-delete-file.vue +2 -3
- package/demos/app/file-upload/prevent-upload-file-composition-api.vue +2 -3
- package/demos/app/file-upload/prevent-upload-file.vue +2 -3
- package/demos/app/file-upload/upload-events-composition-api.vue +9 -10
- package/demos/app/file-upload/upload-events.vue +9 -10
- package/demos/app/file-upload/upload-request-composition-api.vue +2 -3
- package/demos/app/file-upload/upload-request.vue +2 -3
- package/demos/app/form/display-only-composition-api.vue +1 -2
- package/demos/app/form/display-only.vue +1 -2
- package/demos/app/form/form-validate-field-composition-api.vue +151 -0
- package/demos/app/form/form-validate-field.vue +163 -0
- package/demos/app/form/frequently-used-form-composition-api.vue +3 -3
- package/demos/app/form/frequently-used-form.vue +2 -3
- package/demos/app/form/no-validate-to-add-composition-api.vue +4 -4
- package/demos/app/form/no-validate-to-add.vue +4 -4
- package/demos/app/form/size-composition-api.vue +3 -3
- package/demos/app/form/size.vue +2 -3
- package/demos/app/form/webdoc/form.js +12 -1
- package/demos/app/grid/event/toolbar-button-click-event-composition-api.vue +5 -6
- package/demos/app/grid/event/toolbar-button-click-event.vue +1 -2
- package/demos/app/grid/grid_Example/gridValid/before-submit-validation-composition-api.vue +3 -4
- package/demos/app/grid/grid_Example/gridValid/before-submit-validation.vue +3 -4
- package/demos/app/grid/grid_Example/gridValid/select-validation-composition-api.vue +4 -5
- package/demos/app/grid/grid_Example/gridValid/select-validation.vue +4 -5
- package/demos/app/grid/grid_Example/gridValid/validation-scroll-to-col-composition-api.vue +9 -4
- package/demos/app/grid/grid_Example/gridValid/validation-scroll-to-col.vue +3 -4
- package/demos/app/grid/grid_Example/shortcutMenu/footer-menu-composition-api.vue +1 -2
- package/demos/app/grid/grid_Example/shortcutMenu/footer-menu.vue +1 -2
- package/demos/app/grid/grid_Example/shortcutMenu/header-menu-composition-api.vue +1 -2
- package/demos/app/grid/grid_Example/shortcutMenu/header-menu.vue +1 -2
- package/demos/app/grid/grid_Example/shortcutMenu/menu-permissions-composition-api.vue +1 -2
- package/demos/app/grid/grid_Example/shortcutMenu/menu-permissions.vue +1 -2
- package/demos/app/grid/slot/buttons-slot-composition-api.vue +5 -6
- package/demos/app/grid/slot/buttons-slot.vue +5 -6
- package/demos/app/grid/tiny-first-menu/copy-row-data-composition-api.vue +2 -3
- package/demos/app/grid/tiny-first-menu/copy-row-data.vue +2 -3
- package/demos/app/grid/tiny-first-menu/get-row-method-composition-api.vue +6 -7
- package/demos/app/grid/tiny-first-menu/get-row-method.vue +6 -7
- package/demos/app/grid/tiny-first-menu/insert-delete-update-composition-api.vue +3 -4
- package/demos/app/grid/tiny-first-menu/insert-delete-update.vue +3 -4
- package/demos/app/grid/toolbar/toolbar-op-config-composition-api.vue +4 -5
- package/demos/app/grid/toolbar/toolbar-op-config.vue +4 -5
- package/package.json +23 -23
- package/playground/App.vue +12 -0
- package/LICENSE +0 -22
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
<script setup lang="jsx">
|
|
25
25
|
import { ref } from 'vue'
|
|
26
26
|
import { Grid as TinyGrid, GridColumn as TinyGridColumn, Modal } from '@opentiny/vue'
|
|
27
|
-
import { alert } from '@opentiny/vue-modal'
|
|
28
27
|
|
|
29
28
|
const bodyMenus = ref([
|
|
30
29
|
[
|
|
@@ -198,7 +197,7 @@ function contextMenuClickEvent({ menu, row, column }) {
|
|
|
198
197
|
}
|
|
199
198
|
break
|
|
200
199
|
default:
|
|
201
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
200
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
203
|
</script>
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
<script lang="jsx">
|
|
25
25
|
import { Grid, GridColumn, Modal } from '@opentiny/vue'
|
|
26
|
-
import { alert } from '@opentiny/vue-modal'
|
|
27
26
|
|
|
28
27
|
export default {
|
|
29
28
|
components: {
|
|
@@ -204,7 +203,7 @@ export default {
|
|
|
204
203
|
}
|
|
205
204
|
break
|
|
206
205
|
default:
|
|
207
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
206
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
208
207
|
}
|
|
209
208
|
}
|
|
210
209
|
}
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
<script setup lang="jsx">
|
|
22
22
|
import { ref } from 'vue'
|
|
23
23
|
import { Grid as TinyGrid, GridColumn as TinyGridColumn, Modal } from '@opentiny/vue'
|
|
24
|
-
import { alert } from '@opentiny/vue-modal'
|
|
25
24
|
|
|
26
25
|
const headerMenus = ref([
|
|
27
26
|
[
|
|
@@ -155,7 +154,7 @@ function contextMenuClickEvent({ menu, row, column }) {
|
|
|
155
154
|
}
|
|
156
155
|
break
|
|
157
156
|
default:
|
|
158
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
157
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
160
|
</script>
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
|
|
21
21
|
<script lang="jsx">
|
|
22
22
|
import { Grid, GridColumn, Modal } from '@opentiny/vue'
|
|
23
|
-
import { alert } from '@opentiny/vue-modal'
|
|
24
23
|
|
|
25
24
|
export default {
|
|
26
25
|
components: {
|
|
@@ -163,7 +162,7 @@ export default {
|
|
|
163
162
|
}
|
|
164
163
|
break
|
|
165
164
|
default:
|
|
166
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
165
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
168
|
}
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
import { ref } from 'vue'
|
|
28
28
|
import { Grid as TinyGrid, GridColumn as TinyGridColumn, Modal } from '@opentiny/vue'
|
|
29
29
|
import { IconCopy } from '@opentiny/vue-icon'
|
|
30
|
-
import { alert } from '@opentiny/vue-modal'
|
|
31
30
|
|
|
32
31
|
const bodyMenus = ref([
|
|
33
32
|
[
|
|
@@ -254,7 +253,7 @@ function contextMenuClickEvent({ menu, row, column }) {
|
|
|
254
253
|
}
|
|
255
254
|
break
|
|
256
255
|
default:
|
|
257
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
256
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
258
257
|
}
|
|
259
258
|
}
|
|
260
259
|
</script>
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
<script lang="jsx">
|
|
27
27
|
import { Grid, GridColumn, Modal } from '@opentiny/vue'
|
|
28
28
|
import { IconCopy } from '@opentiny/vue-icon'
|
|
29
|
-
import { alert } from '@opentiny/vue-modal'
|
|
30
29
|
|
|
31
30
|
export default {
|
|
32
31
|
components: {
|
|
@@ -260,7 +259,7 @@ export default {
|
|
|
260
259
|
}
|
|
261
260
|
break
|
|
262
261
|
default:
|
|
263
|
-
alert(`点击了 ${menu.name} 选项`)
|
|
262
|
+
Modal.alert(`点击了 ${menu.name} 选项`)
|
|
264
263
|
}
|
|
265
264
|
}
|
|
266
265
|
}
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup>
|
|
33
33
|
import { ref } from 'vue'
|
|
34
|
-
import { Grid as TinyGrid, GridColumn as TinyGridColumn, GridToolbar as TinyGridToolbar } from '@opentiny/vue'
|
|
35
|
-
import { Modal } from '@opentiny/vue-modal'
|
|
34
|
+
import { Grid as TinyGrid, GridColumn as TinyGridColumn, GridToolbar as TinyGridToolbar, Modal } from '@opentiny/vue'
|
|
36
35
|
|
|
37
36
|
const toolbarButtons = ref([
|
|
38
37
|
{
|
|
@@ -118,19 +117,19 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
118
117
|
}
|
|
119
118
|
case 'delete': {
|
|
120
119
|
if (data.length === 0) {
|
|
121
|
-
alert('请至少选中一条记录')
|
|
120
|
+
Modal.alert('请至少选中一条记录')
|
|
122
121
|
}
|
|
123
122
|
$grid.removeSelecteds()
|
|
124
123
|
break
|
|
125
124
|
}
|
|
126
125
|
case 'getDelete': {
|
|
127
126
|
const removeRecords = $grid.getRemoveRecords() // 获取删除的数据
|
|
128
|
-
alert('获取删除的数据' + JSON.stringify(removeRecords))
|
|
127
|
+
Modal.alert('获取删除的数据' + JSON.stringify(removeRecords))
|
|
129
128
|
break
|
|
130
129
|
}
|
|
131
130
|
case 'save': {
|
|
132
131
|
if (!updateData.length && !insertData.length && !removeData.length) {
|
|
133
|
-
alert('没有修改记录')
|
|
132
|
+
Modal.alert('没有修改记录')
|
|
134
133
|
} else {
|
|
135
134
|
Modal.message({
|
|
136
135
|
message: '点击保存触发, 新增的数据',
|
|
@@ -144,7 +143,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
144
143
|
}
|
|
145
144
|
case 'getRecordset': {
|
|
146
145
|
const records = $grid.getRecordset()
|
|
147
|
-
alert('增删改记录集合:' + JSON.stringify(records))
|
|
146
|
+
Modal.alert('增删改记录集合:' + JSON.stringify(records))
|
|
148
147
|
break
|
|
149
148
|
}
|
|
150
149
|
}
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script>
|
|
33
|
-
import { Grid, GridColumn, GridToolbar } from '@opentiny/vue'
|
|
34
|
-
import { Modal } from '@opentiny/vue-modal'
|
|
33
|
+
import { Grid, GridColumn, GridToolbar, Modal } from '@opentiny/vue'
|
|
35
34
|
|
|
36
35
|
export default {
|
|
37
36
|
components: {
|
|
@@ -126,19 +125,19 @@ export default {
|
|
|
126
125
|
}
|
|
127
126
|
case 'delete': {
|
|
128
127
|
if (data.length === 0) {
|
|
129
|
-
alert('请至少选中一条记录')
|
|
128
|
+
Modal.alert('请至少选中一条记录')
|
|
130
129
|
}
|
|
131
130
|
$grid.removeSelecteds()
|
|
132
131
|
break
|
|
133
132
|
}
|
|
134
133
|
case 'getDelete': {
|
|
135
134
|
const removeRecords = $grid.getRemoveRecords() // 获取删除的数据
|
|
136
|
-
alert('获取删除的数据' + JSON.stringify(removeRecords))
|
|
135
|
+
Modal.alert('获取删除的数据' + JSON.stringify(removeRecords))
|
|
137
136
|
break
|
|
138
137
|
}
|
|
139
138
|
case 'save': {
|
|
140
139
|
if (!updateData.length && !insertData.length && !removeData.length) {
|
|
141
|
-
alert('没有修改记录')
|
|
140
|
+
Modal.alert('没有修改记录')
|
|
142
141
|
} else {
|
|
143
142
|
Modal.message({
|
|
144
143
|
message: '点击保存触发, 新增的数据',
|
|
@@ -152,7 +151,7 @@ export default {
|
|
|
152
151
|
}
|
|
153
152
|
case 'getRecordset': {
|
|
154
153
|
const records = $grid.getRecordset()
|
|
155
|
-
alert('增删改记录集合:' + JSON.stringify(records))
|
|
154
|
+
Modal.alert('增删改记录集合:' + JSON.stringify(records))
|
|
156
155
|
break
|
|
157
156
|
}
|
|
158
157
|
}
|
|
@@ -31,8 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
<script setup lang="jsx">
|
|
33
33
|
import { ref } from 'vue'
|
|
34
|
-
import { Grid as TinyGrid, GridColumn as TinyGridColumn, GridToolbar as TinyGridToolbar } from '@opentiny/vue'
|
|
35
|
-
import { message } from '@opentiny/vue-modal'
|
|
34
|
+
import { Grid as TinyGrid, GridColumn as TinyGridColumn, GridToolbar as TinyGridToolbar, Modal } from '@opentiny/vue'
|
|
36
35
|
|
|
37
36
|
const toolbarButtons = ref([
|
|
38
37
|
{
|
|
@@ -91,7 +90,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
91
90
|
switch (code) {
|
|
92
91
|
case 'copy': {
|
|
93
92
|
if (data.length === 0) {
|
|
94
|
-
message({ message: '请至少选中一条记录', status: 'info' })
|
|
93
|
+
Modal.message({ message: '请至少选中一条记录', status: 'info' })
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
data.forEach((item) => {
|
|
@@ -30,8 +30,7 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script lang="jsx">
|
|
33
|
-
import { Grid, GridColumn, GridToolbar } from '@opentiny/vue'
|
|
34
|
-
import { message } from '@opentiny/vue-modal'
|
|
33
|
+
import { Grid, GridColumn, GridToolbar, Modal } from '@opentiny/vue'
|
|
35
34
|
|
|
36
35
|
export default {
|
|
37
36
|
components: {
|
|
@@ -100,7 +99,7 @@ export default {
|
|
|
100
99
|
switch (code) {
|
|
101
100
|
case 'copy': {
|
|
102
101
|
if (data.length === 0) {
|
|
103
|
-
message({ message: '请至少选中一条记录', status: 'info' })
|
|
102
|
+
Modal.message({ message: '请至少选中一条记录', status: 'info' })
|
|
104
103
|
}
|
|
105
104
|
|
|
106
105
|
data.forEach((item) => {
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
<script setup lang="jsx">
|
|
21
21
|
import { ref, getCurrentInstance } from 'vue'
|
|
22
|
-
import { Grid as TinyGrid, GridColumn as TinyGridColumn, Button as TinyButton } from '@opentiny/vue'
|
|
23
|
-
import { alert } from '@opentiny/vue-modal'
|
|
22
|
+
import { Grid as TinyGrid, GridColumn as TinyGridColumn, Button as TinyButton, Modal } from '@opentiny/vue'
|
|
24
23
|
|
|
25
24
|
const tableData = ref([
|
|
26
25
|
{
|
|
@@ -72,7 +71,7 @@ const instance = getCurrentInstance()
|
|
|
72
71
|
function getCurrentRow(hideMessage) {
|
|
73
72
|
const data = theGridRef.value.getCurrentRow()
|
|
74
73
|
|
|
75
|
-
!hideMessage && alert(`当前行数据是:${JSON.stringify(data)}`)
|
|
74
|
+
!hideMessage && Modal.alert(`当前行数据是:${JSON.stringify(data)}`)
|
|
76
75
|
|
|
77
76
|
return data
|
|
78
77
|
}
|
|
@@ -80,27 +79,27 @@ function getCurrentRow(hideMessage) {
|
|
|
80
79
|
function getRadioRow() {
|
|
81
80
|
const data = theGridRef.value.getRadioRow()
|
|
82
81
|
|
|
83
|
-
alert(`单选选中行数据是:${JSON.stringify(data)}`)
|
|
82
|
+
Modal.alert(`单选选中行数据是:${JSON.stringify(data)}`)
|
|
84
83
|
}
|
|
85
84
|
|
|
86
85
|
function getRowIndex() {
|
|
87
86
|
const row = getCurrentRow(true)
|
|
88
87
|
const data = theGridRef.value.getRowIndex(row)
|
|
89
88
|
|
|
90
|
-
alert(`当前选中行号是:${JSON.stringify(data)}`)
|
|
89
|
+
Modal.alert(`当前选中行号是:${JSON.stringify(data)}`)
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
function getRowById() {
|
|
94
93
|
const row = getCurrentRow(true) || {}
|
|
95
94
|
const data = theGridRef.value.getRowById(row._RID)
|
|
96
95
|
|
|
97
|
-
alert(`根据 rowId 获取的当前行:${JSON.stringify(data)}`)
|
|
96
|
+
Modal.alert(`根据 rowId 获取的当前行:${JSON.stringify(data)}`)
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
function getRowNode() {
|
|
101
100
|
const tr = instance.vnode.el.querySelector('.tiny-grid-body__row')
|
|
102
101
|
const data = theGridRef.value.getRowNode(tr)
|
|
103
102
|
|
|
104
|
-
alert(`根据 tr 元素获取对应的 row 信息:${JSON.stringify(data)}`)
|
|
103
|
+
Modal.alert(`根据 tr 元素获取对应的 row 信息:${JSON.stringify(data)}`)
|
|
105
104
|
}
|
|
106
105
|
</script>
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script lang="jsx">
|
|
21
|
-
import { Grid, GridColumn, Button } from '@opentiny/vue'
|
|
22
|
-
import { alert } from '@opentiny/vue-modal'
|
|
21
|
+
import { Grid, GridColumn, Button, Modal } from '@opentiny/vue'
|
|
23
22
|
|
|
24
23
|
export default {
|
|
25
24
|
components: {
|
|
@@ -79,32 +78,32 @@ export default {
|
|
|
79
78
|
getCurrentRow(hideMessage) {
|
|
80
79
|
const data = this.$refs.theGrid.getCurrentRow()
|
|
81
80
|
|
|
82
|
-
!hideMessage && alert(`当前行数据是:${JSON.stringify(data)}`)
|
|
81
|
+
!hideMessage && Modal.alert(`当前行数据是:${JSON.stringify(data)}`)
|
|
83
82
|
|
|
84
83
|
return data
|
|
85
84
|
},
|
|
86
85
|
getRadioRow() {
|
|
87
86
|
const data = this.$refs.theGrid.getRadioRow()
|
|
88
87
|
|
|
89
|
-
alert(`单选选中行数据是:${JSON.stringify(data)}`)
|
|
88
|
+
Modal.alert(`单选选中行数据是:${JSON.stringify(data)}`)
|
|
90
89
|
},
|
|
91
90
|
getRowIndex() {
|
|
92
91
|
const row = this.getCurrentRow(true)
|
|
93
92
|
const data = this.$refs.theGrid.getRowIndex(row)
|
|
94
93
|
|
|
95
|
-
alert(`当前选中行号是:${JSON.stringify(data)}`)
|
|
94
|
+
Modal.alert(`当前选中行号是:${JSON.stringify(data)}`)
|
|
96
95
|
},
|
|
97
96
|
getRowById() {
|
|
98
97
|
const row = this.getCurrentRow(true) || {}
|
|
99
98
|
const data = this.$refs.theGrid.getRowById(row._RID)
|
|
100
99
|
|
|
101
|
-
alert(`根据 rowId 获取的当前行:${JSON.stringify(data)}`)
|
|
100
|
+
Modal.alert(`根据 rowId 获取的当前行:${JSON.stringify(data)}`)
|
|
102
101
|
},
|
|
103
102
|
getRowNode() {
|
|
104
103
|
const tr = this.$el.querySelector('.tiny-grid-body__row')
|
|
105
104
|
const data = this.$refs.theGrid.getRowNode(tr)
|
|
106
105
|
|
|
107
|
-
alert(`根据 tr 元素获取对应的 row 信息:${JSON.stringify(data)}`)
|
|
106
|
+
Modal.alert(`根据 tr 元素获取对应的 row 信息:${JSON.stringify(data)}`)
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
}
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
<script setup>
|
|
36
36
|
import { ref } from 'vue'
|
|
37
37
|
import { Grid as TinyGrid, GridColumn as TinyGridColumn, GridToolbar as TinyGridToolbar, Modal } from '@opentiny/vue'
|
|
38
|
-
import { alert } from '@opentiny/vue-modal'
|
|
39
38
|
|
|
40
39
|
const toolbarButtons = ref([
|
|
41
40
|
{
|
|
@@ -127,7 +126,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
127
126
|
}
|
|
128
127
|
case 'delete': {
|
|
129
128
|
if (data.length === 0) {
|
|
130
|
-
alert('请至少选中一条记录')
|
|
129
|
+
Modal.alert('请至少选中一条记录')
|
|
131
130
|
}
|
|
132
131
|
$grid.removeSelecteds()
|
|
133
132
|
break
|
|
@@ -138,7 +137,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
138
137
|
}
|
|
139
138
|
case 'save': {
|
|
140
139
|
if (!updateData.length && !insertData.length) {
|
|
141
|
-
alert('没有修改记录')
|
|
140
|
+
Modal.alert('没有修改记录')
|
|
142
141
|
} else {
|
|
143
142
|
Modal.message({
|
|
144
143
|
message: '点击保存触发, 新增的数据',
|
|
@@ -152,7 +151,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
152
151
|
}
|
|
153
152
|
case 'getRecordset': {
|
|
154
153
|
const records = $grid.getRecordset()
|
|
155
|
-
alert('增删改记录集合:' + JSON.stringify(records))
|
|
154
|
+
Modal.alert('增删改记录集合:' + JSON.stringify(records))
|
|
156
155
|
break
|
|
157
156
|
}
|
|
158
157
|
}
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
|
|
35
35
|
<script>
|
|
36
36
|
import { Grid, GridColumn, GridToolbar, Modal } from '@opentiny/vue'
|
|
37
|
-
import { alert } from '@opentiny/vue-modal'
|
|
38
37
|
|
|
39
38
|
export default {
|
|
40
39
|
components: {
|
|
@@ -135,7 +134,7 @@ export default {
|
|
|
135
134
|
}
|
|
136
135
|
case 'delete': {
|
|
137
136
|
if (data.length === 0) {
|
|
138
|
-
alert('请至少选中一条记录')
|
|
137
|
+
Modal.alert('请至少选中一条记录')
|
|
139
138
|
}
|
|
140
139
|
$grid.removeSelecteds()
|
|
141
140
|
break
|
|
@@ -146,7 +145,7 @@ export default {
|
|
|
146
145
|
}
|
|
147
146
|
case 'save': {
|
|
148
147
|
if (!updateData.length && !insertData.length) {
|
|
149
|
-
alert('没有修改记录')
|
|
148
|
+
Modal.alert('没有修改记录')
|
|
150
149
|
} else {
|
|
151
150
|
Modal.message({
|
|
152
151
|
message: '点击保存触发, 新增的数据',
|
|
@@ -160,7 +159,7 @@ export default {
|
|
|
160
159
|
}
|
|
161
160
|
case 'getRecordset': {
|
|
162
161
|
const records = $grid.getRecordset()
|
|
163
|
-
alert('增删改记录集合:' + JSON.stringify(records))
|
|
162
|
+
Modal.alert('增删改记录集合:' + JSON.stringify(records))
|
|
164
163
|
break
|
|
165
164
|
}
|
|
166
165
|
}
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
<script setup lang="jsx">
|
|
6
6
|
import { ref } from 'vue'
|
|
7
|
-
import { Grid as TinyGrid, Pager, GridToolbar } from '@opentiny/vue'
|
|
8
|
-
import { alert } from '@opentiny/vue-modal'
|
|
7
|
+
import { Grid as TinyGrid, Pager, GridToolbar, Modal } from '@opentiny/vue'
|
|
9
8
|
|
|
10
9
|
const op = ref({
|
|
11
10
|
seqSerial: true,
|
|
@@ -183,7 +182,7 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
183
182
|
break
|
|
184
183
|
case 'copy': {
|
|
185
184
|
if (data.length === 0) {
|
|
186
|
-
alert('请至少选中一条记录')
|
|
185
|
+
Modal.alert('请至少选中一条记录')
|
|
187
186
|
}
|
|
188
187
|
data.forEach((item) => {
|
|
189
188
|
delete item._RID
|
|
@@ -197,13 +196,13 @@ function toolbarButtonClickEvent({ code, $grid }) {
|
|
|
197
196
|
}
|
|
198
197
|
case 'delete': {
|
|
199
198
|
if (data.length === 0) {
|
|
200
|
-
alert('请至少选中一条记录')
|
|
199
|
+
Modal.alert('请至少选中一条记录')
|
|
201
200
|
}
|
|
202
201
|
break
|
|
203
202
|
}
|
|
204
203
|
case 'save': {
|
|
205
204
|
if (update.length === 0) {
|
|
206
|
-
alert('没有修改记录')
|
|
205
|
+
Modal.alert('没有修改记录')
|
|
207
206
|
}
|
|
208
207
|
break
|
|
209
208
|
}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="jsx">
|
|
6
|
-
import { Grid, Pager, GridToolbar } from '@opentiny/vue'
|
|
7
|
-
import { alert } from '@opentiny/vue-modal'
|
|
6
|
+
import { Grid, Pager, GridToolbar, Modal } from '@opentiny/vue'
|
|
8
7
|
|
|
9
8
|
export default {
|
|
10
9
|
components: {
|
|
@@ -188,7 +187,7 @@ export default {
|
|
|
188
187
|
break
|
|
189
188
|
case 'copy': {
|
|
190
189
|
if (data.length === 0) {
|
|
191
|
-
alert('请至少选中一条记录')
|
|
190
|
+
Modal.alert('请至少选中一条记录')
|
|
192
191
|
}
|
|
193
192
|
data.forEach((item) => {
|
|
194
193
|
delete item._RID
|
|
@@ -202,13 +201,13 @@ export default {
|
|
|
202
201
|
}
|
|
203
202
|
case 'delete': {
|
|
204
203
|
if (data.length === 0) {
|
|
205
|
-
alert('请至少选中一条记录')
|
|
204
|
+
Modal.alert('请至少选中一条记录')
|
|
206
205
|
}
|
|
207
206
|
break
|
|
208
207
|
}
|
|
209
208
|
case 'save': {
|
|
210
209
|
if (update.length === 0) {
|
|
211
|
-
alert('没有修改记录')
|
|
210
|
+
Modal.alert('没有修改记录')
|
|
212
211
|
}
|
|
213
212
|
break
|
|
214
213
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-docs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"start": "node ./scripts/copy.js && vite",
|
|
6
|
+
"start:open": "node ./scripts/copy.js && vite --mode opendev",
|
|
7
|
+
"build:inner:alpha": "node ./scripts/copy.js && vite build --mode inneralpha",
|
|
8
|
+
"build:inner:prod": "node ./scripts/copy.js && vite build --mode innerprod",
|
|
9
|
+
"build:open": "node ./scripts/copy.js && vite build --mode open",
|
|
10
|
+
"prettier": "npx prettier --write ./**/*.{ts,tsx,css,less,scss,vue}",
|
|
11
|
+
"stylelint": "npx stylelint ./src/**/*.scss ./src/**/*.less ./src/**/*.css --fix"
|
|
12
|
+
},
|
|
4
13
|
"dependencies": {
|
|
14
|
+
"@opentiny/vue": "workspace:~",
|
|
15
|
+
"@opentiny/vue-common": "workspace:~",
|
|
16
|
+
"@opentiny/vue-icon": "workspace:~",
|
|
17
|
+
"@opentiny/vue-design-aurora": "workspace:~",
|
|
18
|
+
"@opentiny/vue-design-smb": "workspace:~",
|
|
19
|
+
"@opentiny/vue-theme-saas": "workspace:~",
|
|
20
|
+
"@opentiny/vue-theme": "workspace:~",
|
|
21
|
+
"@opentiny/vue-theme-mobile": "workspace:~",
|
|
22
|
+
"@opentiny/vue-vite-import": "workspace:~",
|
|
5
23
|
"@unocss/reset": "0.38.2",
|
|
6
24
|
"@vue/repl": "^2.5.5",
|
|
7
25
|
"@vueuse/head": "0.7.13",
|
|
@@ -15,18 +33,10 @@
|
|
|
15
33
|
"dompurify": "^3.0.1",
|
|
16
34
|
"@playwright/test": "^1.29.2",
|
|
17
35
|
"sortablejs": "1.15.0",
|
|
18
|
-
"@opentiny/vue-repl": "^1.0.2"
|
|
19
|
-
"@opentiny/vue-common": "~3.10.0",
|
|
20
|
-
"@opentiny/vue": "~3.10.0",
|
|
21
|
-
"@opentiny/vue-icon": "~3.10.0",
|
|
22
|
-
"@opentiny/vue-theme-saas": "~3.10.0",
|
|
23
|
-
"@opentiny/vue-design-aurora": "~3.10.0",
|
|
24
|
-
"@opentiny/vue-design-smb": "~3.10.0",
|
|
25
|
-
"@opentiny/vue-theme": "~3.10.0",
|
|
26
|
-
"@opentiny/vue-theme-mobile": "~3.10.0",
|
|
27
|
-
"@opentiny/vue-vite-import": "~1.1.5"
|
|
36
|
+
"@opentiny/vue-repl": "^1.0.2"
|
|
28
37
|
},
|
|
29
38
|
"devDependencies": {
|
|
39
|
+
"@opentiny-internal/unplugin-virtual-template": "workspace:~",
|
|
30
40
|
"@types/markdown-it": "^12.2.3",
|
|
31
41
|
"@types/node": "^17.0.45",
|
|
32
42
|
"@unocss/preset-icons": "^0.38.2",
|
|
@@ -59,16 +69,6 @@
|
|
|
59
69
|
"vite-plugin-inspect": "^0.5.0",
|
|
60
70
|
"vite-svg-loader": "^3.6.0",
|
|
61
71
|
"vite-plugin-md": "0.13.1",
|
|
62
|
-
"vite-plugin-dynamic-import": "1.5.0"
|
|
63
|
-
"@opentiny-internal/unplugin-virtual-template": "~0.1.1-beta.0"
|
|
64
|
-
},
|
|
65
|
-
"scripts": {
|
|
66
|
-
"start": "node ./scripts/copy.js && vite",
|
|
67
|
-
"start:open": "node ./scripts/copy.js && vite --mode opendev",
|
|
68
|
-
"build:inner:alpha": "node ./scripts/copy.js && vite build --mode inneralpha",
|
|
69
|
-
"build:inner:prod": "node ./scripts/copy.js && vite build --mode innerprod",
|
|
70
|
-
"build:open": "node ./scripts/copy.js && vite build --mode open",
|
|
71
|
-
"prettier": "npx prettier --write ./**/*.{ts,tsx,css,less,scss,vue}",
|
|
72
|
-
"stylelint": "npx stylelint ./src/**/*.scss ./src/**/*.less ./src/**/*.css --fix"
|
|
72
|
+
"vite-plugin-dynamic-import": "1.5.0"
|
|
73
73
|
}
|
|
74
|
-
}
|
|
74
|
+
}
|
package/playground/App.vue
CHANGED
|
@@ -107,6 +107,18 @@ const loadFileCode = async ({ cmpId, fileName, apiMode }) => {
|
|
|
107
107
|
onMounted(() => {
|
|
108
108
|
// 初始加载,有分享则加载分享,否则加载默认版本的默认文件
|
|
109
109
|
if (shareData.length === 2) {
|
|
110
|
+
const demoFile = Object.values(store.state.files).find(
|
|
111
|
+
(file) =>
|
|
112
|
+
file.filename.startsWith('src/') &&
|
|
113
|
+
file.filename.endsWith('.vue') &&
|
|
114
|
+
file.filename !== 'src/App.vue' &&
|
|
115
|
+
file.filename !== 'src/PlaygroundMain.vue'
|
|
116
|
+
)
|
|
117
|
+
if (demoFile) {
|
|
118
|
+
store.state.mainFile = demoFile.filename
|
|
119
|
+
store.state.activeFile = demoFile
|
|
120
|
+
}
|
|
121
|
+
|
|
110
122
|
versionChange(shareData[0])
|
|
111
123
|
} else {
|
|
112
124
|
const searchObj = new URLSearchParams(location.search)
|
package/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 - present TinyVue Authors.
|
|
4
|
-
Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|