12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <view class="page">
- <view class="inp">
- <view class="">
- <u--input placeholder="请输入内容" border="none" v-model="name" @confirm='changename'></u--input>
- </view>
- <text style="color: rgba(34, 34, 34, 0.3);">{{name.length}}</text>
- </view>
- <view class="prompt">
- {{i18n.prompt}}
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- name: '张三'
- }
- },
- onLoad(option) {
- this.name = option.name
- },
- computed: {
- i18n() {
- return this.$t('index')
- }
- },
- mounted() {
- uni.setNavigationBarTitle({
- title: this.i18n.editNextname
- })
- },
- methods: {
- changename(){
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.emit("getname", this.name);
- uni.navigateBack()
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- padding: 20rpx 24rpx;
- .inp{
- background-color: #fff;
- border-radius: 16rpx;
- height: 96rpx;
- display: flex;
- justify-content: space-between;
- padding: 0 20px;
- align-items: center;
- }
- }
- .prompt {
- margin-top: 16rpx;
- font-size: 26rpx;
- color: rgba(34, 34, 34, 0.6);
- }
- </style>
|