|
|
@@ -13,7 +13,8 @@ import { ActionSheet, Popup } from '@nutui/nutui';
|
|
|
import { ActionSheet, Popup } from '@nutui/nutui-taro';
|
|
|
|
|
|
const app = createApp();
|
|
|
-app.use(ActionSheet).use(Popup);
|
|
|
+app.use(ActionSheet);
|
|
|
+app.use(Popup);
|
|
|
```
|
|
|
|
|
|
## Basic Usage
|
|
|
@@ -259,7 +260,53 @@ export default {
|
|
|
```
|
|
|
:::
|
|
|
|
|
|
-## Prop
|
|
|
+## Custom Content
|
|
|
+
|
|
|
+:::demo
|
|
|
+``` html
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <nut-cell
|
|
|
+ :show-icon="true"
|
|
|
+ :isLink="true"
|
|
|
+ @click="switchActionSheet('isVisible')"
|
|
|
+
|
|
|
+ >
|
|
|
+ <span><label>Custom Content</label></span>
|
|
|
+ </nut-cell>
|
|
|
+ <nut-actionsheet v-model:visible="state.isVisible" title="title">
|
|
|
+ <div class="custom-content">Custom Content</div>
|
|
|
+ </nut-actionsheet>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { reactive } from 'vue';
|
|
|
+export default {
|
|
|
+ setup() {
|
|
|
+ const state = reactive({
|
|
|
+ isVisible: false,
|
|
|
+ val: '',
|
|
|
+ });
|
|
|
+ const switchActionSheet = ( param ) => {
|
|
|
+ state.isVisible = !state.isVisible;
|
|
|
+ };
|
|
|
+ return {
|
|
|
+ state,
|
|
|
+ switchActionSheet,
|
|
|
+ };
|
|
|
+ }
|
|
|
+}
|
|
|
+ </script>
|
|
|
+ <style lang="scss" scoped>
|
|
|
+.custom-content {
|
|
|
+ padding: 10px 10px 160px;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+```
|
|
|
+:::
|
|
|
+
|
|
|
+## Props
|
|
|
|
|
|
| Attribute | Description | Type | Default |
|
|
|
|------------------|----------------------------------------|---------|-----------|
|
|
|
@@ -271,7 +318,7 @@ export default {
|
|
|
| color | selected item color,when choose-tag-value == option-tag | String | '#ee0a24' |
|
|
|
| title | set list item title | String | '' |
|
|
|
| description | set list item description | String | '' |
|
|
|
-| cancel-txt | Text of cancel button | String | '取消' |
|
|
|
+| cancel-txt | Text of cancel button | String | 'cancel' |
|
|
|
| close-abled | Whether the mask layer can be closed | Boolean | true |
|
|
|
|
|
|
## menu-items
|
|
|
@@ -284,7 +331,7 @@ export default {
|
|
|
| loading | Whether to be loading status | Boolean |
|
|
|
| disable | Whether to be disabled | Boolean |
|
|
|
|
|
|
-## Event
|
|
|
+## Events
|
|
|
|
|
|
| Event | Description | Arguments |
|
|
|
|--------|--------------------|-----------------------------------|
|